A patient can be archived by issuing a PATCH command to the patient record, updating the deleted_reason field as required:
curl -X PATCH \
-H "Content-Type: application/json" \
https://ua.ap.painchek.com/api/patients/10d7f773-0f67-4de8-8324-769c652312c5/ -d @- << EOF
{
"deleted_reason": "Transferred"
}
EOF
Notes:
- The UUID of the patient to archive is included in the URL - in this case it is "10d7f773-0f67-4de8-8324-769c652312c5"
-
Standard PainChek archive reasons (deleted_reason) are "Deceased", "Discharged", "Transferred" or "Other". You can, however, supply any text (up to 250 characters in length).
Unarchiving Patients
A patient can be unarchived by issuing a PATCH command to the patient record, setting the deleted_reason field to null:
curl -X PATCH \
-H "Content-Type: application/json" \
https://ua.ap.painchek.com/api/patients/10d7f773-0f67-4de8-8324-769c652312c5/ -d @- << EOF
{
"deleted_reason": null
}
EOF
Notes:
- The UUID of the patient to archive is included in the URL - in this case it is "10d7f773-0f67-4de8-8324-769c652312c5"