Catalog › Interpelări › GetTreatmentTickets
GetTreatmentTickets Interpelări
Interpelarea ”GetTreatmentTickets” returnează lista biletelor de tratament sau a compensațiilor acordate persoanei fizice identificate în baza IDNP-ului
SOAP · GetTreatmentTickets(IDNP: string) : TreatmentTickets
Date de intrare — Request
| Câmp | Tip | Oblig. | Exemplu | Descriere |
|---|---|---|---|---|
| IDNP | string(13) | Da | 2000000000001 | Numărul unic de identificare al persoanei (IDNP). Poate lipsi, în cazul persoanelor care au renunțat la IDNP |
Date de intrare — RequestHeaders
| Câmp | Tip | Oblig. | Exemplu | Descriere |
|---|---|---|---|---|
| CallingUser | string(13) | Da | Numărul de identificare (IDNP) al utilizatorului sau identificatorul (ID-ul) sistemului care procesează datele cu caracter personal | |
| CallingEntity | string(13) | Da | Numărul de identificare (IDNO) al persoanei juridice din care face parte utilizatorul care procesează datele cu caracter personal, sau care gestionează sistemul informațional | |
| CallBasis | string(256) | Da | Temeiul legal al apelului | |
| CallReason | string(512) | Da | Scopul legal al apelului |
Date de ieșire — Response
| Câmp | Tip | Oblig. | Exemplu | Descriere |
|---|---|---|---|---|
| TreatmentTickets | object | — | Date despre biletul de tratament | |
| · TreatmentTickets | array<object> | — | Biletul de tratament | |
| ·· IDNP | string(13) | Da | 2000000000001 | Numărul unic de identificare al beneficiarului (IDNP). Poate lipsi, în cazul persoanelor care au renunțat la IDNP |
| ·· RegistrationNumber | integer | Da | 33 | Numărul de rând |
| ·· RegistrationDate | Date | Da | 2015-09-17 | Data înregistrării cererii |
| ·· ArrivalDate | Date | Da | 2019-04-13 | Data sosirii la sanatoriu |
| ·· DepartureDate | Date | Da | 2028-11-01 | Data plecării de la sanatoriu |
| ·· Sanatorium | string | Da | Date generate (mock) | Codul sanatoriului |
| ·· YearFrom | integer | Da | 60 | Anul de început al perioadei |
| ·· YearTo | integer | Da | 16 | Anul de sfârșit al perioadei |
| ·· Category | string | Da | Salariat | Codul categoriei beneficiarului |
| ·· Amount | number | Da | 50.34 | Costul biletului sau suma transferată |
| ·· ServiceType | integer | Da | 2 | Tipul serviciului. Poate primi valorile: 1 - compensație, 2 - bilet |
| ·· TransferDate | Date | Da | 2022-03-06 | Data transferării compensației |
Exemple de apel SOAP
Apel reușit
Cerere validă cu RequestHeaders complete → date sample.
Cerere
curl -X POST https://mconnect.evisoft.com/ConsumerService.svc \
-H 'Content-Type: text/xml; charset=utf-8' \
-H 'SOAPAction: http://mconnect.gov.md/consumer/GetTreatmentTickets' \
--data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetTreatmentTickets xmlns="http://mconnect.gov.md/consumer">
<Request>
<IDNP>2000000000001</IDNP>
</Request>
<RequestHeaders>
<CallingUser>2000000000001</CallingUser>
<CallingEntity>1002600024777</CallingEntity>
<CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
<CallReason>Prestare serviciu public</CallReason>
</RequestHeaders>
</GetTreatmentTickets>
</soap:Body>
</soap:Envelope>'
Răspuns
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetTreatmentTicketsResponse xmlns="http://mconnect.gov.md/consumer">
<Response>
<TreatmentTickets>
<TreatmentTickets>
<IDNP>2000000000001</IDNP>
<RegistrationNumber>33</RegistrationNumber>
<RegistrationDate>2015-09-17</RegistrationDate>
<ArrivalDate>2019-04-13</ArrivalDate>
<DepartureDate>2028-11-01</DepartureDate>
<Sanatorium>Date generate (mock)</Sanatorium>
<YearFrom>60</YearFrom>
<YearTo>16</YearTo>
<Category>Salariat</Category>
<Amount>50.34</Amount>
<ServiceType>2</ServiceType>
<TransferDate>2022-03-06</TransferDate>
</TreatmentTickets>
</TreatmentTickets>
</Response>
</GetTreatmentTicketsResponse>
</soap:Body>
</soap:Envelope>
Eroare: lipsesc RequestHeaders
Fără CallingUser/CallingEntity → fault (headerele MConnect sunt obligatorii).
Cerere
curl -X POST https://mconnect.evisoft.com/ConsumerService.svc \
-H 'Content-Type: text/xml; charset=utf-8' \
-H 'SOAPAction: http://mconnect.gov.md/consumer/GetTreatmentTickets' \
--data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetTreatmentTickets xmlns="http://mconnect.gov.md/consumer">
<Request>
<IDNP>2000000000001</IDNP>
</Request>
</GetTreatmentTickets>
</soap:Body>
</soap:Envelope>'
Răspuns (fault)
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Missing RequestHeaders: CallingUser and CallingEntity are required by MConnect.</faultstring>
<detail>
<MConnectFault xmlns="http://mconnect.gov.md/consumer">
<Code>Client</Code>
<Message>Missing RequestHeaders: CallingUser and CallingEntity are required by MConnect.</Message>
</MConnectFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Eroare: subiect inexistent (IDNP …0000)
IDNP cu sufix …0000 → fault NotFound.
Cerere
curl -X POST https://mconnect.evisoft.com/ConsumerService.svc \
-H 'Content-Type: text/xml; charset=utf-8' \
-H 'SOAPAction: http://mconnect.gov.md/consumer/GetTreatmentTickets' \
--data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetTreatmentTickets xmlns="http://mconnect.gov.md/consumer">
<Request>
<IDNP>2000000000000</IDNP>
</Request>
<RequestHeaders>
<CallingUser>2000000000001</CallingUser>
<CallingEntity>1002600024777</CallingEntity>
<CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
<CallReason>Prestare serviciu public</CallReason>
</RequestHeaders>
</GetTreatmentTickets>
</soap:Body>
</soap:Envelope>'
Răspuns (fault)
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>No data found for the requested subject '2000000000000'.</faultstring>
<detail>
<MConnectFault xmlns="http://mconnect.gov.md/consumer">
<Code>NotFound</Code>
<Message>No data found for the requested subject '2000000000000'.</Message>
</MConnectFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Eroare: eroare server (IDNP …0009)
IDNP cu sufix …0009 → fault ServerError.
Cerere
curl -X POST https://mconnect.evisoft.com/ConsumerService.svc \
-H 'Content-Type: text/xml; charset=utf-8' \
-H 'SOAPAction: http://mconnect.gov.md/consumer/GetTreatmentTickets' \
--data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetTreatmentTickets xmlns="http://mconnect.gov.md/consumer">
<Request>
<IDNP>2000000000009</IDNP>
</Request>
<RequestHeaders>
<CallingUser>2000000000001</CallingUser>
<CallingEntity>1002600024777</CallingEntity>
<CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
<CallReason>Prestare serviciu public</CallReason>
</RequestHeaders>
</GetTreatmentTickets>
</soap:Body>
</soap:Envelope>'
Răspuns (fault)
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Simulated server error.</faultstring>
<detail>
<MConnectFault xmlns="http://mconnect.gov.md/consumer">
<Code>ServerError</Code>
<Message>Simulated server error.</Message>
</MConnectFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>