Send Patient Data¶
Send patient information to Unomed before opening the PopApp. You only need to do this once when the patient is first accessed.
See the API Documentation for full endpoint details.
Subscription Required
Organizations created via the API don't automatically have a subscription. If you receive:
{
"detail": "Cannot add a new patient: patients limit reached (0/0).",
"error_code": "limit_exceeded"
}
Create Patient¶
curl -X POST https://api.dev.unomed.ch/fhir/r4/Patient \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Patient",
"identifier": [{
"system": "https://your-system.ch/",
"value": "patient-123"
}],
"name": [{
"family": "Muster",
"given": ["Max"]
}],
"gender": "male",
"birthDate": "1985-04-12",
"managingOrganization": {
"reference": "Organization/YOUR_ORG_UUID"
}
}'
Required Fields¶
| Field | Description |
|---|---|
managingOrganization |
Reference to the Organization UUID |
Recommended Fields¶
| Field | Description |
|---|---|
identifier.system |
A URI identifying your primary system (e.g., https://your-system.ch/) |
identifier.value |
The patient's ID in your system (e.g., patient-123) |
name |
Patient name (family, given) |
birthDate |
Date of birth (YYYY-MM-DD) |
Response¶
Save the id - use it to launch the PopApp.
Update Existing Patient¶
curl -X PUT https://api.dev.unomed.ch/fhir/r4/Patient/PATIENT_UUID \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/fhir+json" \
-d '{ ... }'
Check if Patient Exists¶
Query by identifier value (not system|value):
curl "https://api.dev.unomed.ch/fhir/r4/Patient?identifier=patient-123" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
This returns patients matching the identifier value within your accessible organizations.