Update patient record
Updates a specific client's record.
Transaction Specification
URL: PUT /ws/rest/v1/patient/$<pat-ID>
Description: Updates a client’s record in the client registry. This transaction sends a acknowledgement or an error in return if the transaction succeeds or fails.
Request
HTTP request body will contain the HL7 v2.5 message, that describes the patient's record, as defined below. The PUT request also contains 1 parameter in the URL that identifies the patient to update.
Parameters
$<pat-ID>
This parameter represents a patient's ID. It must be specified in the following format:
<ID-type>-<ID-number>
Where <ID-type> is one of the following:
- NID - for a national identification number
- APN - for an application number
- PPN - for passport number
- SSN - for social security number
Eg. PUT /ws/rest/v1/patient/NID-1234567890123
Data
See UC01.002 Maintain Client Registry for the latest data structure for this section.
Messaging specification
The HL7 message will be a HL7 v2.5 ADT_A31 message with the following structure:
See UpdateClient
Response
HTTP 200 - OK - If the client record was updated successfully.
Error
HTTP 500 - Server Error - If the server encountered an error.
HTTP 400 - Bad Request - If the HL7 v2.5 message is malformed.
Orchestration
This section describes how this transaction is orchestrated through the HIM (interoperability layer) in order to complete this transaction.
- Call Update client record
Sample Messaging Implementation
Scenario 1
Updates a specific client's record.
User Interface
TODO
Sample Request Message
(@Ishimwe, can you please insert a more complete message here generated from OpenMRS)
Note: This message is very incomplete and requires revision:
PUT https://hie.jembi.org:5000/ws/rest/v1/patient/1234567890 HTTP/1.1
<?xml version="1.0"?> <ADT_A05 xmlns="urn:hl7-org:v2xml"> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.7> <TS.1>20120322120119.918+0200</TS.1> </MSH.7> <MSH.9> <MSG.1>ADT</MSG.1> <MSG.2>A31</MSG.2> <MSG.3>ADT_A05</MSG.3> </MSH.9> <MSH.10>4</MSH.10> <MSH.11> <PT.1>T</PT.1> </MSH.11> <MSH.12> <VID.1>2.5</VID.1> </MSH.12> </MSH> </ADT_A05>
Sample Response Message
HTTP/1.1 201 Created