Create and Manage Patients
Create, get, list and delete the patients of a Context Engine workspace.
Every submission, session and read in the Context Engine targets a patient, so you need to create the patient first. Each patient is identified by a patient ID that you choose, as described in Patient Records and Identifiers.
Before you start
You need a workspace access token with the write scope to create or delete patients and the read scope to get or list them, as described in Authentication and Credentials.
Create a patient
curl -X PUT "https://<workspace-id>.w.clinia.cloud/v1/patients/{patientId}" \
-H "Authorization: Bearer <access-token>"The create call is idempotent, which means calling it for an existing patient returns that patient unchanged.
A new patient ID that uses characters outside the allowed set returns a 400.
Get a patient
curl "https://<workspace-id>.w.clinia.cloud/v1/patients/{patientId}" \
-H "Authorization: Bearer <access-token>"The response holds the patient's demographic information, read from its records, and counts of its facts, clinical events and relationships. A 404 means no patient exists with that patient ID.
List patients
curl "https://<workspace-id>.w.clinia.cloud/v1/patients?page=0&perPage=100" \
-H "Authorization: Bearer <access-token>"Patients come back 100 per page by default, sorted by patient ID. The response's meta.total gives the number of patients in the workspace. Page sizes and the other parameters are documented in List patients.
Delete a patient
Deleting a patient removes everything the Context Engine holds about that patient and cannot be undone.
curl -X DELETE "https://<workspace-id>.w.clinia.cloud/v1/patients/{patientId}" \
-H "Authorization: Bearer <access-token>"The delete call returns 204 once the data is removed, or 404 if no patient exists with that patient ID. You can delete a patient while a submission is still in progress.
Next steps
- Ingest a FHIR Bundle to submit a FHIR R4 or R5 bundle for the patient.
- Ingest a CDA Document to submit a C-CDA R2 document for the patient.
- Track an Ingestion to follow a submission until it settles.