Interacting with LIS

Who is this document for

The integration service provides an interface for generating and ordering lab results, as well as receiving results.

This document describes the integration for developers. All requests are SOAP requests.

Prerequisites

The integration module developers must perform the following steps:

  1. Get a test API from SIROCA Technology.
  2. Approve the authorization type.
  3. Get login, password, client_id (Siroca application identifier), MisID (Siroca MIS identifier) to work with API.
  4. Get contracts to work with.
  5. Implement interaction with the API.
  6. Conduct testing.

Environment

API Address

Test

http://{host}/LisService.svc

Getting a token
/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

A model should come in response AccessToken:

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 for the 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>

Creating an order in LIS
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 an order:

Property

Data Type

Mandatory

Description

OrderNumber

String

True

Application number from the external system

Person

Person

True

Client

Sender

String

True

Sender's system code

MisID

Long

True

The external service ID in the LIS

FinanceSourceCode

String

False

Source of funding

Researches

List<OrderRequestResearch>

True

List of studies, there must be at least 1 service

Materials

List<Material>

False

Materials in an appointment card

IsCito

Bool

True

The urgency sign

Comment

String

False

Doctor's comment

IdRecievePunkt

Int

False

Drawing point

SenderFuncStructureID

Long

False

The code of the sender's functional unit

Nurse

Person

True if the order contains COVID services

The nurse who made the BM drawing

IsResident

Bool

False

Is the client a resident of the country (by default - True)

HasCovidSimptoms

Bool

False

Are there any symptoms of COVID

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 it creates a client

LastName

String

True

Surmane

FirstName

String

True

Name

SecondName

String

False

Patronymic

BirthDate

DateTime

True

Date of birth

SexID

SexType

True

Sex

IsUnknownPerson

bool

True

Not used

Telephone

String

False

Telephone

Email

String

False

Email

Address

String

False

Address

JobInfo

String

False

Job information

Еnum

Title

Value

Description

Female

2

Female

Male

3

Male

MessageType - enum

Title

Value

Description

CreateOrderRequest

0

Request to create an order

CreateOrderResponse

1

Response to an order creation request

RemoveOrderRequest

2

Request for the order remove

RemoveOrderResponse

3

Response to the order remove request

OrderStatusRequest

4

Request for order status

OrderStatusResponse

5

Response to the order status request

OrderResultsRequest

6

Request for order results

OrderResultsResponse

7

Response to the request for order results

OrderNextResultRequest

8

Request to receive the next finished order

OrderNextResultResponse

9

Response for the request to receive the next finished order

OrderResultSuccessDeliveredRequest

10

Request to confirm receipt of results

OrderResultSuccessDeliveredResponse

11

Response to the request to confirm receipt of results

ContainerStatusResponse

14

Request for container status

OrderRequestResearch

Property

Data Type

Mandatory

Description

ServiceCode

String

True

Study 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 taking

TakePlace

String

True

Taking address

Researches

List<OrderRequestResearch>

True

List of studies

The following model should come in response OrderCreateResponse:

Field

Data Type

Description

MisID

Long

MIS ID

OrderNumber

String

Application number

LisID

Long

Appointment card ID to LIS

Warnings

List<String>

Warnings/Errors

GeneratedContainers

List<MContainers>

Generated containers

Code

ResponseCode

The response code. 0 – Successful, 1 – Error, 2 – Token expired, 3 – not used, 4 – Order removed

Error

String

Error text

MContainers

Field

Data Type

Description

Id

Int

Container type ID

Name

String

Name of the container type

Barcode

Long

Barcode

Warnings

List<String>

Warnings/Errors

GeneratedContainers

List<MContainers>

Generated containers

Biomaterial

String

Biomaterial

DestinationPunktName

String

Name of the destination point

Example of the order creation request

http://tempuri.org/ILisService/CreateOrder2

Request for:

<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>

Getting the order status
/GetOrderStatus2

The method accepts the following parameters:

GetOrderStatus2 parameters

Parameter

Data Type

Mandatory

Request

OrderRequest

True

Token

String

True

OrderRequest

Property

Data Type

Mandatory

Description

OrderNumber

String

True

Application number from the external system

MisID

Long

False

External System ID

LisID

Long

True

The application ID in LIS

Sender

String

True

Sender's system code

MessageType

MessageType

True

Message type

The following model should come in response OrderStatusResponse:

OrderStatusResponse

Field

Data Type

Description

MisID

Long

External System ID

OrderNumber

String

Application number

LisID

Long

Appointment card ID to LIS

Status

OrderStatusForExternalSystem

Status

Code

ResponseCode

Response code

Error

String

Error

OrderStatusForExternalSystem

Title

Value

Description

OrderNotFound

0

Order is not found

NoMaterial

1

There is no material

HasMaterial

2

The material is collected

TaskMustClarify

3

The task requires clarification

TasksCreated

4

The task has been formed

HasHalfResults

5

Incomplete results were obtained

HasPreResults

6

Preliminary results have been obtained

ResultsHalfApproved

7

The results are partially approved

OrderComplete

8

The order is completed

OrderClosed

9

The order is closed

ResultsIssuedToPatient

10

The results are given to the patient

ResultsSendedToSenderSystem

11

The results are sent to the sender system

OrderIsCanceled

12

Rejection of all order studies

Example of the order status request

http://tempuri.org/ILisService/GetOrderStatus2

Request for:

<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>

Removing an order
/RemoveOrder2

The method accepts the following parameters:

GetOrderStatus2 parameters

Parameter

Data Type

Mandatory

Request

OrderRequest

True

Token

String

True

A model should come in response OrderResponse:

OrderResponse

Field

Data Type

Description

MisID

Long

External System ID

OrderNumber

String

Application number

LisID

Long

Appointment card ID to LIS

Code

ResponseCode

Response code

Error

String

Error

Example of RemoveOrder2 request and response

http://tempuri.org/ILisService/RemoveOrder2

Request example:

<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>

Getting results by order number
/GetOrderResults2

The method accepts the following parameters:

GetOrderResults2 parameters

Parameter

Data Type

Mandatory

Request

OrderRequest

True

Token

String

True

The following model should come in response OrderResultResponse:

OrderResultResponse

Field

Data Type

Description

MisID

Long

External System ID

OrderNumber

String

Application number

LisID

Long

Appointment card ID to LIS

Code

ResponseCode

Response code

Error

String

Error

ReceiveDate

DateTime

Date of receipt/registration

PersonFIO

String

Client's full name

IsManual

Bool

Not used

SenderFuncStructureID

Long

The code of the sender's functional unit

SenderPostID

Long

The sender's doctor's code

OrderStatus

OrderStatusForExternalSystem

Order status

Person

Person

Patient information

Researches

List<OrderRequestResearch>

Studies in order

Materials

List<Material>

Materials in an appointment card

OrderResultXML

String

Result in XML

OrderResultFileID

long

Not used

OrderResultDate

DateTime

Date of the result formation

OrderResultFile

Byte[]

Pdf file with results

ApprovedPostOriginalID

String

Doctor's ID in RMS

ExtInfo

List<KmisAssayData>

Studt data

Request and response example

http://tempuri.org/ILisService/GetOrderResult2

Request for:

<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>

Receiving results of the next completed sender order

The method returns the following finished result to the sender. After receiving the results, the external system should send a Confirmation of receipt of the results in the form of the

/SaveOrderResultSuccessDelivered2

The sequence is shown below.

/GetOrderNextResults2

Accepts the following parameters:

Parameters for GetOrderNextResults2

Parameter

Data Type

Mandatory

Request

RequestBase

True

Token

String

True

RequestBase

Property

Data Type

Mandatory

Description

Sender

String

True

Sender's system code

MessageType

MessageType

True

Message type

A model should come in response OrderResultResponse.

Request and response example

http://tempuri.org/ILisService/GetOrderNextResult2

Request for:

<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>

Confirmation of the results receipt
/SaveOrderResultSuccessDelivered2

Accepts the following parameters:

Parameters for GetOrderNextResults2

Parameter

Data Type

Mandatory

Request

OrderRequest

True

Token

String

True

The following model should come in response ResponseBase:

ResponseBase

Property

Data Type

Description

Code

ResponseCode

Response code

Error

String

Error

Request and response example

http://tempuri.org/ILisService/SaveOrderResultSuccessDelivered2

Request for:

<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>