Required Element Is Missing for This Resource
The base FHIR definition for this resource marks an element with minimum cardinality 1, but it is absent. For example Observation requires status and code; MedicationRequest requires status, intent, and subject.
FHIR · Error
The error
element is required for this resource typeWhy it happens
Building the resource from a partial source, omitting a status while drafting, or assuming an element is optional when the spec makes it mandatory (the 1..1 cardinality).
How to fix it
Add the missing element with a valid value. Check the resource definition for which elements have a minimum cardinality of 1. For Observation that is status and code; for Encounter it is status and class.
Example
The snippet below triggers the error:
{
"resourceType": "Observation",
"code": { "text": "Glucose" }
}The corrected version:
{
"resourceType": "Observation",
"status": "final",
"code": { "text": "Glucose" }
}Frequently asked questions
How do I know which elements are required?
Required elements have a minimum cardinality of 1 (shown as 1..1 or 1..*) in the FHIR resource definition. The validator names the exact element and resource so you can populate it.
Is this the same as a US Core requirement?
No. This is a base FHIR requirement that applies to every instance of the resource. US Core adds extra requirements on top, which the Profile Coverage tool checks separately.
Related
- Open the FHIR Validator
- All validation errors
- resourceType Is Required
- Unknown FHIR R4 Resource Type
- gender Must Be male, female, other, or unknown
- birthDate Must Be YYYY, YYYY-MM, or YYYY-MM-DD
- instant Must Include a Timezone
- Resource id Has an Invalid Format
- subject Must Be a Reference Object, Not a String
- Reference Should Be Type/id, urn:uuid, or an Absolute URL