admission_discharge ()
Function prototype | admission_discharge (session, admission, type, [date]) |
---|---|
API Version | 2.7.26 and higher |
SOAP, REST |
Description
Discharges an ADMISSION
Sets the admission in ‘discharged’ status. This involves the following actions:
If the ADMISSION was already discharged, then do nothing
Insert a new SYSTEM task with task code = "DISCHARGE"
Update all open TASKs and set its status to “CANCELLED”
Input parameters: |
|
Output parameters: |
|
Request sample: | api_function ( “LCAAAAAAAAAAAA”, "xxx", "yyy" ); |
Request example
admission_discharge ( “LCAAAAAAAAAAAA”, 32131, "DISCONTINUED")
Reponse
The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API
Return Error codes
ERROR CODE | |
---|---|
INVALID_TOKEN | The session token provided is not valid |
INSUFFICIENT_PRIVILEGES | The session user does not have the necessary privileges to change the status of the ADMISSION |
ADMISSION.NOT_FOUND | The requested ADMISSION was not found |