Save encounter workflow
Overview
This transaction allows a PoC system to save encounter to the SHR. The transaction is verified and validated against the other registries before it is saved in the SHR. The following sequence diagram shows the steps involved.
Technical details
Ref | Interaction | Endpoint | Data | Transaction Specification |
---|---|---|---|---|
1 | Send encounter to be stored | POST /ws/rest/v1/patient/$<pat-ID>/encounters | HL7 v2.5 ORU_R01 | Save Patient Encounter |
2 | Resolve client identifier | POST openempi-admin/openempi-ws-rest/person-query-resource/findPersonById | OpenEMPI XML | Get Enterprise Client ID - Internal |
3 | Return person record | HTTP 200 OK | Get Enterprise Client ID - Internal | |
4 | Extract ECID and enrich message | none | ||
5 | Resolve provider identifier | GET webservices/lookupbyid/nid/?id_type=ECID&id_number=xxx | HTTP request | Get Enterprise Professional ID - Internal |
6 | Return provider EPID | HTTP 200 OK - (plain text identifier) | Get Enterprise Professional ID - Internal | |
7 | Enrich message with EPID if provider exists, else error | none | ||
8 | Query facility details | GET api/collections/$<resmap.collection.id>.rss?fosaid=xxx | HTTP Request | Get HC Facility - Internal |
9 | Return facility details | HTTP 200 OK - ResMap RSS feed with custom XML | Get HC Facility - Internal | |
10 | If facility exists continue, else error | none | ||
11 | Validate term | GET /validate.php?namespaceCode=CODE&conceptCode=CODE | HTTP Request | Verify Code - Internal |
12 | Return valid: true or false | HTTP 200 OK - Custom TS-browser XML | Verify Code - Internal | |
13 | If not valid error, else continue | none | ||
14 | Save encounter | POST /openmrs/ws/rest/RHEA/patient/encounters?patientId=1234&idType=ECID | HL7 v2.5 ORU_R01 | Save Patient Encounter - Internal |
15 | Acknowledge encounter saved | HTTP 201 Created | Save Patient Encounter - Internal | |
16 | Acknowledge encounter saved | HTTP 201 Created | Save Patient Encounter |