Postman - Add Group and\or Location to a Patient Record
Purpose: To show how to add a patient group or location to a patient record.
*Note: In this example you will see 2 different routes are being run. The first route will return all the locations and groups in the Noah ES account. You need to run this get route to get the patientGroupId that is needed to run the put location\group route, the second route, that adds that group or location to the patient record.
Precondition:
Generate an Access token
1.) First Route to run is the Get List – This will get you a list of all the groups in locations in your Noah ES account.
Get /{tenantid}/api/PatientGroups
Use Swagger documentation to get more details - https://api.qa.eu.noah-es.com/swagger/index.html
a.) By looking at the get patient groups route in the swagger documentation there are some mandatory fields in the “Params” tab these are Skip, Take and the TenantId. You will probably be fine with Skip at 0 and Take at 200. The tenanted is your Noah ES account’s tenantid.
b.) The Authentication tab – You can see I have selected the token I created.
c.) Headers tab – There is only version 1.0 of the Noah ES API at this time, so that is what I entered. This is a mandatory field.
d.) Status returned of 200 which means route run was successful. As you can see the “size” is 15 in the return body. This means I have 15 locations and groups in this Noah ES account. Also note the “patientGroupId” this is what you will need, the patientGroupID for the group or location you want to add the patient to. This will require you to filter through the returned results to find the group or location you want.
1.) Second Route to run is the Get List – This route will be the one that will add the group or location to the patient record.
Put /{tenantid}/api/PatientGroups/{patientGroupId}/Users/{userAccountId}
Use Swagger documentation to get more details - https://api.qa.eu.noah-es.com/swagger/index.html
a.) By looking at the get patient groups route in the swagger documentation there are some mandatory fields in the “Params” tab. As you can see, they are your Noah ES account tennantid, patientGroupId and patientId. The patientGroupId is what you will have gotten from the first route you run. The patientid you can get by searching for a patient. Please see Postman - Patient Search
b.) The Authentication tab – You can see I have selected the token I created.
c.) Headers tab – There is only version 1.0 of the Noah ES API at this time, so that is what I entered. This is a mandatory field. You will also see the “If-Match” field, this etag is mandatory. The etag can be whatever. I have used the patient group guid. I have used some text I just entered. The main thing to know is the If-Match etag is mandatory but there is no specific value.
d.) Status returned of 204 no content which means it was successful. Since there is nothing returned by the API, the “204 No Content” is returned.
e.) Now I open up Noah ES Client and find the patient, I can see the new group\location. I have highlighted it in yellow.