SlimSlim/Patient

Get patient

  • Sandbox: available
  • Staging: available
  • Production: unknown
GET
/v1/slim/patient/{id}

Returns one resident (patient) by id, with their names, resident state and current placement. The response is the shape PUT /v1/slim/patient/{id} accepts back.

Auth: Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant Patient:read (an admin or super admin who holds no access policy skips this check). Scope: The resident is read with the caller's own token, so you get any patient your Medplum access lets you read. There is no extra project check on this route.

Behaviour

  • Read-only.
  • deviceId is one device id, or null when the resident has no device. If the resident is on several devices, it is the most recently updated one. locationId, floor, room, bed and organizationId describe that same device's placement.
  • residentState is active, discharged-recent (discharged within the last 30 days), discharged or archived.
  • admissionDate and dischargeDate are returned as stored.
  • A name entry without a use is returned as official.

Example

curl -X GET 'https://api.sandbox.ovok.com/v1/slim/patient/c3499c27-2973-0a7f-807e-fb8676a92dcb' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'

Authorization

bearer
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Patient retrieved successfully.

application/json
  1. response
id*string
name*array<>
gender?string
Value in"male""female""other""unknown"
birthDate?string
deviceId*string
organizationId?string
locationId?string
floor?string
room?string
bed?string
residentState*string
Value in"active""discharged-recent""discharged""archived"
admissionDate?string
dischargeDate?string
Example Request
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/patient/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "string",  "name": [    {      "use": "official",      "given": [        "string"      ],      "family": "string"    }  ],  "gender": "male",  "birthDate": "string",  "deviceId": "string",  "organizationId": "string",  "locationId": "string",  "floor": "string",  "room": "string",  "bed": "string",  "residentState": "active",  "admissionDate": "string",  "dischargeDate": "string"}

Get patient $everything GET

Returns a FHIR `Bundle` with the resident and every resource that references them, using the FHIR `Patient/$everything` operation. Use it to export or inspect a resident's full record. **Auth:** Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant `Patient:read` (an admin or super admin who holds no access policy skips this check). **Scope:** The resident must belong to the caller's project (from the token) or one of its sub-projects. A resident in the parent project is refused. ## Behaviour - Read-only. - The bundle is produced by Medplum and read with the caller's own token, so it contains only resources that token can read. - The response is a raw FHIR `Bundle`, not a Slim DTO. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/patient/c3499c27-2973-0a7f-807e-fb8676a92dcb/$everything' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```

Delete patient DELETE

Deletes a resident (patient) who has no device. **Auth:** Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant `Patient:delete` and `Device:update` (an admin or super admin who holds no access policy skips this check). **Scope:** The resident must belong to the caller's project (from the token). ## Behaviour - A resident who still has a device is refused with 409 `Resident still has device <serial>. Unassign it first.`, and nothing is changed. Take the device off the resident first (`PUT /v1/slim/patient/{id}` without `locationId`), then delete. - Only the Patient resource is deleted. This route does not delete the resident's other records. - Archived residents cannot be deleted. - A change-history entry records the delete. - The response has no body. ## Example ```bash curl -X DELETE 'https://api.sandbox.ovok.com/v1/slim/patient/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```