G
G
garaga20922016-08-24 15:04:12
PHP
garaga2092, 2016-08-24 15:04:12

Integration of MIS Infoclinic with the site. How to form a soap request in php?

The task is to integrate the medical system into the site, so that patients themselves can make an appointment with a doctor through the site. Data is exchanged through soap requests and responses. There is documentation, but it is not entirely clear how to form this soap request, and what to pass in the parameters. How to parse data in php is approximately clear, but I haven’t worked with queries before. Who can help?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Entelis, 2016-08-24
@garaga2092

Everything is written there in the documentation for this infoclinic.
Create a new soapclient based on their wsdl, form a string containing xml with a command what to do, send it to the opHl7Message method (however, the method may change from version to version)

For example, you need to add a new patient. In the documentation, such an example of a function call
<WEB_CLIENT_ADD>
 <MSH>
 <MSH.7>
 <TS.1>20110302184008</TS.1>
 </MSH.7>
 <MSH.9>
 <MSG.1>WEB</MSG.1>
 <MSG.2>CLIENT_ADD</MSG.2>
 </MSH.9>
 <MSH.10>74C0ACA47AFE4CED2B838996B0DF5821</MSH.10>
 <MSH.18>UTF-8</MSH.18>
 </MSH>
 <CLIENT_ADD_IN>
 <LASTNAME>Мосягина</LASTNAME> <!-- Фамилия пациента -->
 <FIRSTNAME>Валентина</FIRSTNAME> <!-- Имя пациента -->
 <MIDNAME>Митрофановна</MIDNAME> <!-- Отчество пациента -->
 <EMAIL>[email protected]</EMAIL> <!-- E-mail -->
 <PHONE>1234567</PHONE> <!-- Телефон пациента -->
 <BDATE>19310215</BDATE> <!-- Дата рождения -->
 <SNILS>123-456-789 64</SNILS> <!-- СНИЛС -->
 <!-- Режим поиска пациента в БД. 1 – поиск по ФИО + Дата рождения, -->
 <!-- 2 – ФИО + Дата рождения + СНИЛС. -->
 <CHECKMODE>2</CHECKMODE>
 </CLIENT_ADD_IN>
</WEB_CLIENT_ADD>

what to do with it?

$xml  = 'весь ваш xml из примера';

$options = [
  'trace'      => 1,
  'exceptions' => 1,
  'login'      => 'логин',
  'password'   => 'пароль',
];
$client = new SoapClient('url wsdl файла', $options);

$response = $client->__soapCall('opHl7Message', $xml)

M
Max, 2016-08-24
@AloneCoder

RTFM
php.net/manual/en/soapclient.soapclient.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question