admission_delete ()
Function prototype | admission_delete (session, admission) |
---|---|
API Version | All |
SOAP, REST |
Description
Deletes an ADMISSION
The patient account will also be deleted if the following conditions concur:
The ADMISSION being deleted is in stage “INCOMPLETE”
The patient does not have other ADMISSIONS
The patient has never activated his account
The reason to do so is because when there exists only one ADMISSION in stage “INCOMPLETE”, it means that there is necessary personal data that has not been provided so the ADMISSION has never arrived to be enrolled.
When this happens, in most cases the patient was specifically created by a professional to enroll him in a PROGRAM, but if we delete the ADMISSION, it makes no sense to keep his account.
Required permissions: This action is only permitted to users with ROLE "CASE MANAGER" or "SERVICE" in the SUBSCRIPTION of the ADMISSION
Input parameters: |
|
Output parameters: |
|
Request example
admission_delete ( “LCAAAAAAAAAAAA”, 3423);
Response
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 delete the ADMISSION in the SUBSCRIPTION |
ADMISSION.NOT_FOUND | The ADMISSION reference provided in parameter admission does not correspond to an existing ADMISSION |