Skip to content

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.

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
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)

For patients, each system and value combination must be unique within an organization. The same identifier can exist in different organizations.

Response

{
  "resourceType": "Patient",
  "id": "660e8400-e29b-41d4-a716-446655440001",
  ...
}

Save the id - use it to launch the PopApp.

Update Existing Patient

Use PATCH for partial updates - only the fields you want to change are necessary:

curl -X PATCH https://api.dev.unomed.ch/fhir/r4/Patient/PATIENT_UUID \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "name": [{
      "family": "Muster",
      "given": ["Max", "Updated"]
    }]
  }'

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.