FHIR R4 Patient resource example
Patient holds who the person is: identifiers, names, contact details and demographics. Clinical facts live in other resources that point back to it through subject or patient.
The Patient in JSON
{
"resourceType": "Patient",
"id": "example",
"identifier": [
{
"use": "usual",
"system": "https://springfield-hospital.test/fhir/sid/mrn",
"value": "MRN-004521"
}
],
"active": true,
"name": [
{
"use": "official",
"family": "Doe",
"given": [
"Jane",
"Marie"
]
}
],
"telecom": [
{
"system": "phone",
"value": "+1 555 0100",
"use": "mobile"
},
{
"system": "email",
"value": "[email protected]"
}
],
"gender": "female",
"birthDate": "1984-07-19",
"address": [
{
"use": "home",
"line": [
"742 Evergreen Terrace"
],
"city": "Springfield",
"state": "IL",
"postalCode": "62704",
"country": "US"
}
],
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "en-US",
"display": "English (United States)"
}
]
},
"preferred": true
}
]
}
Validator result: raw JSON ยท open the validator
- informationNo errors: this Patient matches the FHIR R4 structure checked here.
The elements that matter
| Element | Cardinality | Notes |
|---|---|---|
identifier | 0..* | Business identifiers such as a medical record number; system says who issued the value. |
name | 0..* | family is a string, given is an array of strings. |
gender | 0..1 | Administrative gender, one of male, female, other, unknown. |
birthDate | 0..1 | A FHIR date: YYYY, YYYY-MM or YYYY-MM-DD, no time. |
telecom | 0..* | Phone, email and other contact points. |
communication | 0..* | Languages, coded with BCP 47 tags. |
Every element of Patient is optional in the base specification; national profiles such as US Core add requirements (for example identifier, name and gender).
The full definition is in the FHIR R4 Patient specification.
Common mistakes and the errors they cause
Family as an array
In DSTU2 family was an array; in R4 it is a single string.
- error
Patient.name[0].familyExpected a string.
Gender as a letter
Gender uses a required value set, so F or M is rejected.
- error
Patient.genderPatient.gender 'F' is not in the required value set (female, male, other, unknown).
Unpadded birth date
Months and days need two digits.
- error
Patient.birthDateNot a FHIR date: YYYY, YYYY-MM or YYYY-MM-DD.
Store it in a real FHIR R4 serverA free sandbox key gives you 30 synthetic patients and the full API, including
Get a free API keyPOST /fhir/R4/Patient and $validate.More examples
- Observation example: blood pressure
- Observation example: laboratory result
- DiagnosticReport example: lab panel
- Condition resource example
- MedicationStatement example
- AllergyIntolerance example
- Immunization resource example
- Encounter resource example
Related guides
- How to store medical records using FHIR R4Tutorial: create a Patient, a blood-pressure Observation and a Condition, use a transaction, search, update with history and read provenance โ every request with curl and the real response, on the free sandbox.
- FHIR platformHL7 FHIR R4 explained and how Anpheros implements it as a managed FHIR database: 26 resource types, search, history, transactions, $everything, the International Patient Summary and the simpler REST view of the same data.