Who this document is for
The Integration Service provides an interface for generating and ordering laboratory results, as well as receiving results.
This document describes the integration for developers. All requests are SOAP requests.
Prerequisite
Developers of the integration module must complete the following steps:
- Obtain the test API from SIROCA Technology.
- Approve the authorisation type.
- Obtain login, password, client_id (application identifier of Siroca system), MisID (MIS identifier in Siroca system) to work with the API.
- Get contracts for work.
- Realise interaction with API.
- Carry out testing.
Surroundings |
API address |
Test |
http://{host}/LisService.svc |
/GetToken
You need to pass the following parameters:
Parameters for obtaining a token
Parameter |
Data type |
Mandatory |
login |
String |
True |
password |
String |
True |
client_id |
String |
True |
An AccessToken model must be included in the response:
Field |
Data Type |
Description |
access_token |
String |
Access token |
message |
String |
Message |
manager_id |
Int |
Not used |
life_time_seconds |
Int |
Lifetime in seconds |
Example of requesting and receiving a token
To get a token, you need to make a SOAP request to a method
http://tempuri.org/ILisService/GetToken
In Body, the model should have a similar structure:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:GetToken>
<tem:login>LOGIN</tem:login>
<tem:password>PASSWORD</tem:password>
<tem:client_id>APPLICATION SENDER ID</tem:client_id>
</tem:GetToken>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetTokenResponse xmlns="http://tempuri.org/">
<GetTokenResult xmlns:a="http://schemas.datacontract.org/2004/07/Ais.Business" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:access_token>d20iddf83jvh837py14t</a:access_token>
<a:life_time_seconds>86400</a:life_time_seconds>
<a:manager_id>0</a:manager_id>
<a:message/>
</GetTokenResult>
</GetTokenResponse>
</s:Body>
</s:Envelope>
POST /CreateOrder2
The method accepts the following parameters: :
Order Creation Parameters
Parameter |
Data type |
Mandatory |
Order |
OrderCreateRequest |
True |
Token |
String |
True |
Models used when creating the order:
Property |
Data type |
Mandatory |
Description |
OrderNumber |
String |
True |
Order number from external system |
Person |
Person |
True |
Client |
Sender |
String |
True |
Sender system code |
MisID |
Long |
True |
Identifier of the external service in LIS |
FinanceSourceCode |
String |
False |
Funding source |
Researches |
List<OrderRequestResearch> |
True |
List of studies, must be at least 1 service |
Materials |
List<Material> |
False |
Materials in the referral |
IsCito |
Bool |
True |
Indication of urgency |
Comment |
String |
False |
Doctor's comment |
IdRecievePunkt |
Int |
False |
Point of collection |
SenderFuncStructureID |
Long |
False |
Code of the sender's functional unit |
Nurse |
Person |
True, если в заказе есть услуги COVID |
Nurse who collected the BM |
IsResident |
Bool |
False |
Whether the client is a resident of the country (default is True) |
HasCovidSimptoms |
Bool |
False |
Whether COVID symptoms are present |
MessageType |
MessageType |
True |
Message type |
Person
Property |
Data type |
Mandatory |
Description |
MisID |
String |
True |
Not used |
Code |
String |
True |
Client's IIN. If it is set, it searches for an existing client, otherwise a client is created |
LastName |
String |
True |
LastName |
FirstName |
String |
True |
FirstName |
SecondName |
String |
False |
Patronymic |
BirthDate |
DateTime |
True |
Date of birth |
SexID |
SexType |
True |
Gender |
IsUnknownPerson |
bool |
True |
Not used |
Telephone |
String |
False |
Phone |
|
String |
False |
|
Address |
String |
False |
Address |
JobInfo |
String |
False |
Information about place of work |
Еnum
Title |
Significance |
Description |
Female |
2 |
Woman |
Male |
3 |
Man |
MessageType - enum
Title |
Value |
Description |
CreateOrderRequest |
0 |
Request to create an order |
CreateOrderResponse |
1 |
Response to the request to create an order |
RemoveOrderRequest |
2 |
Request for order cancellation |
RemoveOrderResponse |
3 |
Response to order cancellation request |
OrderStatusRequest |
4 |
Request order status |
OrderStatusResponse |
5 |
Response to order status request |
OrderResultsRequest |
6 |
Order result request |
OrderResultsResponse |
7 |
Response to order results request |
OrderNextResultRequest |
8 |
Request to receive the next finished order |
OrderNextResultResponse |
9 |
Response for requesting the next finished order |
OrderResultSuccessDeliveredRequest |
10 |
Request for confirmation of receipt of results |
OrderResultSuccessDeliveredResponse |
11 |
Response to request for confirmation of receipt of results |
ContainerStatusResponse |
14 |
Request for container status |
OrderRequestResearch
Property |
Data type |
Commitment |
Description |
ServiceCode |
String |
True |
Research code |
ParameterId |
Long |
False |
Not used |
ReferralExternalId |
String |
False |
Not used |
Notification |
String |
False |
Not used |
Material
Property |
Data type |
Mandatory |
Description |
MaterialNumber |
String |
True |
Biomaterial barcode |
MaterialTypeID |
String |
True |
Biomaterial code |
TakeDate |
DateTime |
True |
Date of biomaterial collection. |
TakePlace |
String |
True |
Address of collection |
Researches |
List<OrderRequestResearch> |
True |
List of studies |
В ответ должна прийти следующая модель OrderCreateResponse:
Field |
Data type |
Description |
MisID |
Long |
MIS Identifier |
OrderNumber |
String |
Application number |
LisID |
Long |
LIS referral identifier |
Warnings |
List<String> |
Warnings/errors |
GeneratedContainers |
List<MContainers> |
Generated containers |
Code |
ResponseCode |
Response Code. 0 - Successful, 1 - Error, 2 - Expired token, 3 - Not used, 4 - Order cancelled |
Error |
String |
Error Text |
MContainers
Field |
Data type |
Description |
Id |
Int |
Container type identifier |
Name |
String |
Container type name |
Barcode |
Long |
Barcode |
Warnings |
List<String> |
Warnings/errors |
GeneratedContainers |
List<MContainers> |
Generated containers |
Biomaterial |
String |
Biomaterial |
DestinationPunktName |
String |
Destination name |
Example of order creation request
http://tempuri.org/ILisService/CreateOrder2
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:ais="http://schemas.datacontract.org/2004/07/Ais.Business.Models.LisService">
<soapenv:Header/>
<soapenv:Body>
<tem:CreateOrder2>
<tem:Order>
<ais:MessageType>CreateOrderRequest</ais:MessageType>
<ais:Sender>SENDER NUMBER</ais:Sender>
<ais:Comment>COMMENT</ais:Comment>
<ais:HasCovidSimptoms>0</ais:HasCovidSimptoms>
<ais:IdRecievePunkt>1</ais:IdRecievePunkt>
<ais:IsCito>0</ais:IsCito>
<ais:IsResident>0</ais:IsResident>
<ais:MisID>0</ais:MisID>
<ais:OrderNumber>123456</ais:OrderNumber>
<ais:Person>
<ais:BirthDate>2021-09-21T03:21:53.699Z</ais:BirthDate>
<ais:CitizenshipID>0</ais:CitizenshipID>
<ais:Code>IIN</ais:Code>
<ais:FirstName>Test</ais:FirstName>
<ais:IsUnknownPerson>0</ais:IsUnknownPerson>
<ais:LastName>Testov</ais:LastName>
<ais:MisID>0</ais:MisID>
<ais:PersonAge>18</ais:PersonAge>
<ais:SexID>Male</ais:SexID>
</ais:Person>
<ais:Researches>
<!--Zero or more repetitions:-->
<ais:OrderRequestResearch>
<ais:ServiceCode>09-017</ais:ServiceCode>
</ais:OrderRequestResearch>
</ais:Researches>
</tem:Order>
<tem:token>d20iddf83jvh837py14t</tem:token>
</tem:CreateOrder2>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<CreateOrder2Response xmlns="http://tempuri.org/">
<CreateOrder2Result xmlns:a="http://schemas.datacontract.org/2004/07/Ais.Business.Models.LisService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Date>2022-04-07T09:12:43.0819648+06:00</a:Date>
<a:MessageType>CreateOrderResponse</a:MessageType>
<a:Sender>SENDER</a:Sender>
<a:Code>Success</a:Code>
<a:Error i:nil="true"/>
<a:GeneratedContainers i:nil="true" xmlns:b="http://schemas.datacontract.org/2004/07/Ais.Business"/>
<a:LisID>10038664</a:LisID>
<a:MisID>0</a:MisID>
<a:OrderNumber>123456</a:OrderNumber>
<a:Warnings xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
</CreateOrder2Result>
</CreateOrder2Response>
</s:Body>
</s:Envelope>
/GetOrderStatus2
The method accepts the following parameters:
GetOrderStatus2 parameters
Parameter |
Data type |
Mandatory |
Request |
OrderRequest |
True |
Token |
String |
True |
OrderRequest
Property |
Data type |
Obligability |
Description |
OrderNumber |
String |
True |
Application number from external system |
MisID |
Long |
False |
Identifier of the external system |
LisID |
Long |
True |
LIS application identifier |
Sender |
String |
True |
Sender system code |
MessageType |
MessageType |
True |
Message type |
The following OrderStatusResponse model should be received in response:
OrderStatusResponse
Title |
Data type |
Description |
MisID |
Long |
External System Identifier |
OrderNumber |
String |
Application number |
LisID |
Long |
LIS referral identifier |
Status |
OrderStatusForExternalSystem |
Status |
Code |
ResponseCode |
Response code |
Error |
String |
Error |
OrderStatusForExternalSystem
Name |
Value |
Description |
OrderNotFound |
0 |
Order not found |
NoMaterial |
1 |
No material |
HasMaterial |
2 |
Material collected |
TaskMustClarify |
3 |
Task requires clarification |
TasksCreated |
4 |
The task is formed |
HasHalfResults |
5 |
Incomplete results obtained |
HasPreResults |
6 |
Preliminary results obtained |
ResultsHalfApproved |
7 |
Results are partially approved |
OrderComplete |
8 |
Order fulfilled |
OrderClosed |
9 |
The order is closed |
ResultsIssuedToPatient |
10 |
Results given to patient |
ResultsSendedToSenderSystem |
11 |
Results sent to sender system |
OrderIsCanceled |
12 |
Rejection of all tests in the order |
Order status request example
http://tempuri.org/ILisService/GetOrderStatus2
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:ais="http://schemas.datacontract.org/2004/07/Ais.Business.Models.LisService">
<soapenv:Header/>
<soapenv:Body>
<tem:GetOrderStatus2>
<tem:request>
<ais:MessageType>OrderStatusRequest</ais:MessageType>
<ais:Sender>SENDER</ais:Sender>
<ais:LisID>10038664</ais:LisID>
<ais:MisID>0</ais:MisID>
<ais:OrderNumber>123456</ais:OrderNumber>
</tem:request>
<tem:token>d20iddf83jvh837py14t</tem:token>
</tem:GetOrderStatus2>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetOrderStatus2Response xmlns="http://tempuri.org/">
<GetOrderStatus2Result xmlns:a="http://schemas.datacontract.org/2004/07/Ais.Business.Models.LisService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Date>2022-04-07T09:20:44.1662271+06:00</a:Date>
<a:MessageType>OrderStatusResponse</a:MessageType>
<a:Sender i:nil="true"/>
<a:Code>Success</a:Code>
<a:Error i:nil="true"/>
<a:LisID>10038664</a:LisID>
<a:MisID>0</a:MisID>
<a:OrderNumber>123456</a:OrderNumber>
<a:Status>TasksCreated</a:Status>
</GetOrderStatus2Result>
</GetOrderStatus2Response>
</s:Body>
</s:Envelope>
/RemoveOrder2
The method accepts the following parameters:
GetOrderStatus2 parameters
Parameter |
Data type |
Mandatory |
Request |
OrderRequest |
True |
Token |
String |
True |
The OrderResponse model should come in response:
OrderResponse
Field |
Data type |
Description |
MisID |
Long |
External system identifier |
OrderNumber |
String |
Order number |
LisID |
Long |
LIS referral identifier |
Code |
ResponseCode |
Response code |
Error |
String |
Error |
Example of RemoveOrder2 request
http://tempuri.org/ILisService/RemoveOrder2
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:ais="http://schemas.datacontract.org/2004/07/Ais.Business.Models.LisService">
<soapenv:Header/>
<soapenv:Body>
<tem:RemoveOrder2>
<tem:request>
<ais:MessageType>RemoveOrderRequest</ais:MessageType>
<ais:Sender>SENDER</ais:Sender>
<ais:LisID>10038664</ais:LisID>
<ais:MisID>0</ais:MisID>
<ais:OrderNumber>123456</ais:OrderNumber>
</tem:request>
<tem:token>d20iddf83jvh837py14t</tem:token>
</tem:RemoveOrder2>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<RemoveOrder2Response xmlns="http://tempuri.org/">
<RemoveOrder2Result xmlns:a="http://schemas.datacontract.org/2004/07/Ais.Business.Models.LisService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Date>2022-04-07T09:28:58.733834+06:00</a:Date>
<a:MessageType>RemoveOrderResponse</a:MessageType>
<a:Sender i:nil="true"/>
<a:Code>Success</a:Code>
<a:Error/>
<a:LisID>10038664</a:LisID>
<a:MisID>0</a:MisID>
<a:OrderNumber>123456</a:OrderNumber>
</RemoveOrder2Result>
</RemoveOrder2Response>
</s:Body>
</s:Envelope>
/GetOrderResults2
The method accepts the following parameters:
GetOrderResults2 parameters
Parameter |
Data type |
Mandatory |
Request |
OrderRequest |
True |
Token |
String |
True |
The following OrderResultResponse model should be received in response:
OrderResultResponse Parameters
Field |
Data type |
Description |
MisID |
Long |
External system identifier |
OrderNumber |
String |
Order number |
LisID |
Long |
LIS referral identifier |
Code |
ResponseCode |
Response code |
Error |
String |
Error |
ReceiveDate |
DateTime |
Date of receipt/registration |
PersonFIO |
String |
Client name |
IsManual |
Bool |
Not used |
SenderFuncStructureID |
Long |
Sender's functional unit code |
SenderPostID |
Long |
Sender's doctor code |
OrderStatus |
OrderStatusForExternalSystem |
Order status |
Person |
Person |
Patient information |
Researches |
List<OrderRequestResearch> |
Studies in the order |
Materials |
List<Material> |
Materials in referral |
OrderResultXML |
String |
Result in XML |
OrderResultFileID |
long |
Not used |
OrderResultDate |
DateTime |
Date of result generation |
OrderResultFile |
Byte[] |
Pdf file with results |
ApprovedPostOriginalID |
String |
DOCTOR'S ID in RMS |
ExtInfo |
List<KmisAssayData> |
Study data |
Example of request to get results by order number
http://tempuri.org/ILisService/GetOrderResult2
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:ais="http://schemas.datacontract.org/2004/07/Ais.Business.Models.LisService">
<soapenv:Header/>
<soapenv:Body>
<tem:GetOrderResults2>
<tem:request>
<ais:MessageType>OrderResultsRequest</ais:MessageType>
<ais:Sender>SENDER</ais:Sender>
<ais:LisID>8962157</ais:LisID>
<ais:MisID>0</ais:MisID>
<ais:OrderNumber>2003670502202151125478</ais:OrderNumber>
</tem:request>
<tem:token>d20iddf83jvh837py14t</tem:token>
</tem:GetOrderResults2>
</soapenv:Body>
</soapenv:Envelope>
The method returns the next ready result to the sender. After receiving the results, the external system should send the Acknowledgement of results receipt in the form of method
/SaveOrderResultSuccessDelivered2
The sequence is as follows.
/GetOrderNextResults2
Accepts the following parameters:
Parameters for GetOrderNextResults2
Parameter |
Data type | Mandatory |
Request |
RequestBase |
True |
Token |
String |
True |
RequestBase
Property |
Data type |
Obligability |
Description |
Sender |
String |
True |
Sender system code |
MessageType |
MessageType |
True |
Message type |
The OrderResultResponse model should be received in response.
Example request to receive the sender's next completed order
http://tempuri.org/ILisService/GetOrderNextResult2
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:ais="http://schemas.datacontract.org/2004/07/Ais.Business.Models.LisService">
<soapenv:Header/>
<soapenv:Body>
<tem:GetOrderNextResult2>
<tem:request>
<ais:MessageType>OrderNextResultRequest</ais:MessageType>
<ais:Sender>Sender</ais:Sender>
</tem:request>
<tem:token>d20iddf83jvh837py14t</tem:token>
</tem:GetOrderNextResult2>
</soapenv:Body>
</soapenv:Envelope>
/SaveOrderResultSuccessDelivered2
Accepts the following parameters:
Parameters for GetOrderNextResults2
Parameter |
Data type |
Mandatory |
Request |
OrderRequest |
True |
Token |
String |
True |
The following ResponseBase model should be returned in the response:
ResponseBase
Property |
Data Type |
Description |
Code |
ResponseCode |
Response code |
Error |
String |
Error |
Example of a query to confirm receipt of results
http://tempuri.org/ILisService/SaveOrderResultSuccessDelivered2
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:ais="http://schemas.datacontract.org/2004/07/Ais.Business.Models.LisService">
<soapenv:Header/>
<soapenv:Body>
<tem:SaveOrderResultSuccessDelivered2>
<tem:request>
<ais:MessageType>OrderResultSuccessDeliveredRequest</ais:MessageType>
<ais:Sender>SENDER</ais:Sender>
<ais:LisID>10038664</ais:LisID>
<ais:MisID>0</ais:MisID>
<ais:OrderNumber>123456</ais:OrderNumber>
</tem:request>
<tem:token>d20iddf83jvh837py14t</tem:token>
</tem:SaveOrderResultSuccessDelivered2>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<SaveOrderResultSuccessDelivered2Response xmlns="http://tempuri.org/">
<SaveOrderResultSuccessDelivered2Result xmlns:a="http://schemas.datacontract.org/2004/07/Ais.Business.Models.LisService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Date>2022-04-07T10:01:18.763194+06:00</a:Date>
<a:MessageType>OrderResultSuccessDeliveredResponse</a:MessageType>
<a:Sender>SENDER</a:Sender>
<a:Code>Success</a:Code>
<a:Error i:nil="true"/>
</SaveOrderResultSuccessDelivered2Result>
</SaveOrderResultSuccessDelivered2Response>
</s:Body>
</s:Envelope>