The admission endpoint (api/integration/admissions/) is typically called with the details of the admission - the site and the room, bed & ward details - e.g. this type of payload:
{ "patient_external_id":"123456", "site_external_id": "112233", "start": "2017-11-24T08:21:00+10", "room": "123", "bed": "A", "ward": "East" }
That payload would cause PainChek to check the current admission and
-
if the details are accurate, do nothing
-
if there was no existing admission, or if the details were different:
- end the current admission (if any)
- create a new admission
It is also permissible to pass just the "patient_external_id" to delete the current admission (if any). e.g:
{ "patient_external_id":"123456" }
That said, there is generally no reason to end an admission. If the resident is being admitted elsewhere, then simply call the endpoint with the new details (the old admission will be automatically ended).
If the resident is no longer considered active (e.g. the leave the facility or are deceased), you should archive the resident (and leave the admission record as-is).