FoundationThis is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions
| Responsible Owner: Orders and Observations Work Group | Standards Status: Informative | Compartments: No defined compartments |
ShEx statement for observationdefinition
PREFIX fhir: <http://hl7.org/fhir/>
PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
# ShEx Version 2.2
IMPORT <Uri.shex>
IMPORT <Code.shex>
IMPORT <Date.shex>
IMPORT <Range.shex>
IMPORT <String.shex>
IMPORT <Coding.shex>
IMPORT <Period.shex>
IMPORT <Device.shex>
IMPORT <Boolean.shex>
IMPORT <DateTime.shex>
IMPORT <Markdown.shex>
IMPORT <Canonical.shex>
IMPORT <Reference.shex>
IMPORT <Identifier.shex>
IMPORT <UsageContext.shex>
IMPORT <ContactDetail.shex>
IMPORT <Questionnaire.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <DeviceDefinition.shex>
IMPORT <CodeableReference.shex>
IMPORT <SpecimenDefinition.shex>
start=@<ObservationDefinition> AND {fhir:nodeRole [fhir:treeRoot]}
# Definition of an observation
<ObservationDefinition> EXTENDS @<DomainResource> CLOSED {
a [fhir:ObservationDefinition]?;fhir:nodeRole [fhir:treeRoot]?;
fhir:url @<Uri>?; # Logical canonical URL to reference
# this ObservationDefinition
# (globally unique)
fhir:identifier @<Identifier>?; # Business identifier of the
# ObservationDefinition
fhir:version @<String>?; # Business version of the
# ObservationDefinition
fhir:versionAlgorithm @<String> OR
@<Coding> ?; # How to compare versions
fhir:name @<String>?; # Name for this
# ObservationDefinition (computer
# friendly)
fhir:title @<String>?; # Name for this
# ObservationDefinition (human
# friendly)
fhir:status @<Code> AND
{fhir:v @fhirvs:publication-status}; # draft | active | retired | unknown
fhir:experimental @<Boolean>?; # If For testing only - never for
# real usage
fhir:date @<DateTime>?; # Date last changed
fhir:publisher @<String>?; # The name of the individual or
# organization that published the
# ObservationDefinition
fhir:contact @<OneOrMore_ContactDetail>?; # Contact details for the publisher
fhir:description @<Markdown>?; # Natural language description of
# the ObservationDefinition
fhir:useContext @<OneOrMore_UsageContext>?; # Content intends to support these
# contexts
fhir:jurisdiction @<OneOrMore_CodeableConcept>?; # Jurisdiction of the authority that
# maintains the this
# ObservationDefinition (if
# applicable)
fhir:purpose @<Markdown>?; # Why this ObservationDefinition is
# defined
fhir:copyright @<Markdown>?; # Notice about intellectual property
# ownership, can include
# restrictions on use
fhir:copyrightLabel @<String>?; # Copyright holder and year(s)
fhir:approvalDate @<Date>?; # When ObservationDefinition was
# approved by publisher
fhir:lastReviewDate @<Date>?; # Date on which the asset content
# was last reviewed by the publisher
fhir:effectivePeriod @<Period>?; # The effective date range for the
# ObservationDefinition
fhir:derivedFromCanonical @<OneOrMore_Canonical>?; # Based on FHIR definition of
# another observation
fhir:derivedFromUri @<OneOrMore_Uri>?; # Based on external definition
fhir:subject @<OneOrMore_CodeableConcept>?; # Type of subject for the defined
# observation
fhir:performerType @<CodeableConcept>?; # Desired kind of performer for such
# kind of observation
fhir:category @<OneOrMore_CodeableConcept>?; # General type of observation
fhir:code @<CodeableConcept>; # Type of observation
fhir:permittedDataType @<OneOrMore_Code> AND
{fhir:v @fhirvs:permitted-data-type}?; # Quantity | CodeableConcept |
# string | boolean | integer | Range
# | Ratio | SampledData | time |
# dateTime | Period
fhir:multipleResultsAllowed @<Boolean>?; # Multiple results allowed for
# conforming observations
fhir:bodyStructure @<CodeableReference>?; # Body structure to be observed
fhir:method @<CodeableConcept>?; # Method used to produce the
# observation
fhir:specimen @<OneOrMore_Reference_SpecimenDefinition>?; # Kind of specimen used by this type
# of observation
fhir:device (@<Reference> AND {fhir:l @<Device> }) OR
(@<Canonical> AND {fhir:l @<DeviceDefinition> }) ?; # Measurement device or model of
# device
fhir:preferredReportName @<String>?; # The preferred name to be used when
# reporting the observation results
fhir:permittedUnit @<OneOrMore_Coding>?; # Unit for quantitative results
fhir:qualifiedValue @<OneOrMore_ObservationDefinition.qualifiedValue>?; # Set of qualified values for
# observation results
fhir:hasMember @<OneOrMore_Reference_ObservationDefinition_OR_Questionnaire>?; # Definitions of related resources
# belonging to this kind of
# observation group
fhir:component @<OneOrMore_ObservationDefinition.component>?; # Component results
}
# Component results
<ObservationDefinition.component> EXTENDS @<BackboneElement> CLOSED {
fhir:code @<CodeableConcept>; # Type of observation
fhir:permittedDataType @<OneOrMore_Code> AND
{fhir:v @fhirvs:permitted-data-type}?; # Quantity | CodeableConcept |
# string | boolean | integer | Range
# | Ratio | SampledData | time |
# dateTime | Period
fhir:permittedUnit @<OneOrMore_Coding>?; # Unit for quantitative results
fhir:qualifiedValue @<OneOrMore_ObservationDefinition.qualifiedValue>?; # Set of qualified values for
# observation results
}
# Set of qualified values for observation results
<ObservationDefinition.qualifiedValue> EXTENDS @<BackboneElement> CLOSED {
fhir:context @<CodeableConcept>?; # Context qualifier for the set of
# qualified values
fhir:appliesTo @<OneOrMore_CodeableConcept>?; # Targetted population for the set
# of qualified values
fhir:sexParameterForClinicalUse @<Code> AND
{fhir:v @fhirvs:administrative-gender}?; # male | female | other | unknown
fhir:age @<Range>?; # Applicable age range for the set
# of qualified values
fhir:gestationalAge @<Range>?; # Applicable gestational age range
# for the set of qualified values
fhir:condition @<String>?; # Validity criterion for the
# qualified value
fhir:rangeCategory @<Code> AND
{fhir:v @fhirvs:observation-range-category}?; # reference | critical | absolute
fhir:range @<Range>?; # The range for continuous or
# ordinal observations
fhir:validCodedValueSet @<Canonical>?; # Value set of valid coded values as
# part of this set of qualified
# values
fhir:normalCodedValueSet @<Canonical>?; # Value set of normal coded values
# as part of this set of qualified
# values
fhir:abnormalCodedValueSet @<Canonical>?; # Value set of abnormal coded values
# as part of this set of qualified
# values
fhir:criticalCodedValueSet @<Canonical>?; # Value set of critical coded values
# as part of this set of qualified
# values
fhir:interpretation @<OneOrMore_CodeableConcept>?; # Expected coded interpretation
# values
}
#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_ContactDetail> CLOSED {
rdf:first @<ContactDetail> ;
rdf:rest [rdf:nil] OR @<OneOrMore_ContactDetail>
}
<OneOrMore_UsageContext> CLOSED {
rdf:first @<UsageContext> ;
rdf:rest [rdf:nil] OR @<OneOrMore_UsageContext>
}
<OneOrMore_CodeableConcept> CLOSED {
rdf:first @<CodeableConcept> ;
rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept>
}
<OneOrMore_Canonical> CLOSED {
rdf:first @<Canonical> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Canonical>
}
<OneOrMore_Uri> CLOSED {
rdf:first @<Uri> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Uri>
}
<OneOrMore_Code> CLOSED {
rdf:first @<Code> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Code>
}
<OneOrMore_Reference_SpecimenDefinition> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<SpecimenDefinition> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_SpecimenDefinition>
}
<OneOrMore_Coding> CLOSED {
rdf:first @<Coding> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Coding>
}
<OneOrMore_ObservationDefinition.qualifiedValue> CLOSED {
rdf:first @<ObservationDefinition.qualifiedValue> ;
rdf:rest [rdf:nil] OR @<OneOrMore_ObservationDefinition.qualifiedValue>
}
<OneOrMore_Reference_ObservationDefinition_OR_Questionnaire> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<ObservationDefinition> OR
@<Questionnaire> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_ObservationDefinition_OR_Questionnaire>
}
<OneOrMore_ObservationDefinition.component> CLOSED {
rdf:first @<ObservationDefinition.component> ;
rdf:rest [rdf:nil] OR @<OneOrMore_ObservationDefinition.component>
}
#---------------------- Value Sets ------------------------
# The gender of a person used for administrative purposes.
fhirvs:administrative-gender ["male" "female" "other" "unknown"]
# Codes identifying the category of observation range.
fhirvs:observation-range-category ["reference" "critical" "absolute"]
# Permitted data type for observation value.
fhirvs:permitted-data-type ["Quantity" "CodeableConcept" "string" "boolean" "integer" "Range" "Ratio" "SampledData" "time" "dateTime" "Period"]
# The lifecycle status of an artifact.
fhirvs:publication-status ["draft" "active" "retired" "unknown"]
Usage note: every effort has been made to ensure that the ShEx files are correct and useful, but they are not a normative part of the specification.
FHIR ®© HL7.org 2011+. FHIR R6 hl7.fhir.core#6.0.0-ballot3 generated on Fri, Nov 21, 2025 00:02+0000.
Links: Search |
Version History |
Contents |
Glossary |
QA |
Compare to R4 |
Compare to R5 |
Compare to Last Ballot |
|
Propose a change