@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:type[ code ] ; # 1..1 The type of the required data
fhir:profile ( [ canonical(StructureDefinition) ] ... ) ; # 0..* The profile of the required data
# subject[x]: 0..1 E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device. One of these 2
fhir:subject[ a fhir:CodeableConcept ; CodeableConcept ]
fhir:subject[ a fhir:Reference ; Reference(Group) ]
fhir:mustSupport ( [ string ] ... ) ; # 0..* Indicates specific structure elements that are referenced by the knowledge module
fhir:codeFilter( [ # 0..* What codes are expected
fhir:path[ string ] ; # 0..1 IA code-valued attribute to filter on
fhir:searchParam[ string ] ; # 0..1 IA coded (token) parameter to search on
fhir:valueSet[ canonical(ValueSet) ] ; # 0..1 ValueSet for the filter
fhir:code ( [ Coding ] ... ) ; # 0..* What code is expected
] ... ) ;
fhir:dateFilter( [ # 0..* What dates/date ranges are expected
fhir:path[ string ] ; # 0..1 IA date-valued attribute to filter on
fhir:searchParam[ string ] ; # 0..1 IA date valued parameter to search on
# value[x]: 0..1 The value of the filter, as a Period, DateTime, or Duration value. One of these 3
fhir:value[ a fhir:dateTime ; dateTime ]
fhir:value[ a fhir:Period ; Period ]
fhir:value[ a fhir:Duration ; Duration ]
] ... ) ;
fhir:valueFilter( [ # 0..* What values are expected
fhir:path[ string ] ; # 0..1 An attribute to filter on
fhir:searchParam[ string ] ; # 0..1 A parameter to search on
fhir:comparator[ code ] ; # 0..1 eq | gt | lt | ge | le | sa | eb
# value[x]: 0..1 The value of the filter, as a Period, DateTime, or Duration value. One of these 3
fhir:value[ a fhir:dateTime ; dateTime ]
fhir:value[ a fhir:Period ; Period ]
fhir:value[ a fhir:Duration ; Duration ]
] ... ) ;
fhir:limit[ positiveInt ] ; # 0..1 Number of results
fhir:sort( [ # 0..* Order of the results
fhir:path[ string ] ; # 1..1 The name of the attribute to perform the sort
fhir:direction[ code ] ; # 1..1 ascending | descending
] ... ) ;
]
@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:type[ code ] ; # 1..1 The type of the required data
fhir:profile ( [ canonical(StructureDefinition) ] ... ) ; # 0..* The profile of the required data
# subject[x]: 0..1 E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device. One of these 2
fhir:subject[ a fhir:CodeableConcept ; CodeableConcept ]
fhir:subject[ a fhir:Reference ; Reference(Group) ]
fhir:mustSupport ( [ string ] ... ) ; # 0..* Indicates specific structure elements that are referenced by the knowledge module
fhir:codeFilter( [ # 0..* What codes are expected
fhir:path[ string ] ; # 0..1 IA code-valued attribute to filter on
fhir:searchParam[ string ] ; # 0..1 IA coded (token) parameter to search on
fhir:valueSet[ canonical(ValueSet) ] ; # 0..1 ValueSet for the filter
fhir:code ( [ Coding ] ... ) ; # 0..* What code is expected
] ... ) ;
fhir:dateFilter( [ # 0..* What dates/date ranges are expected
fhir:path[ string ] ; # 0..1 IA date-valued attribute to filter on
fhir:searchParam[ string ] ; # 0..1 IA date valued parameter to search on
# value[x]: 0..1 The value of the filter, as a Period, DateTime, or Duration value. One of these 3
fhir:value[ a fhir:dateTime ; dateTime ]
fhir:value[ a fhir:Period ; Period ]
fhir:value[ a fhir:Duration ; Duration ]
] ... ) ;
fhir:valueFilter( [ # 0..* What values are expected
fhir:path[ string ] ; # 0..1 An attribute to filter on
fhir:searchParam[ string ] ; # 0..1 A parameter to search on
fhir:comparator[ code ] ; # 0..1 eq | gt | lt | ge | le | sa | eb
# value[x]: 0..1 The value of the filter, as a Period, DateTime, or Duration value. One of these 3
fhir:value[ a fhir:dateTime ; dateTime ]
fhir:value[ a fhir:Period ; Period ]
fhir:value[ a fhir:Duration ; Duration ]
] ... ) ;
fhir:limit[ positiveInt ] ; # 0..1 Number of results
fhir:sort( [ # 0..* Order of the results
fhir:path[ string ] ; # 1..1 The name of the attribute to perform the sort
fhir:direction[ code ] ; # 1..1 ascending | descending
] ... ) ;
]
The possible sort directions, ascending or descending.
A DataRequirement differs from a parameter in that it specifies the data to be provided in terms of the type of data, and specific filters on code-valued and/or date-valued attributes. Data requirements are not named because they are referenced by type within the evaluation context.
DataRequirements are used by knowledge modules to communicate the set of required data to a consumer in a way that is computable (as opposed to a set of named parameters which must be integrated by hand based on the meaning of the parameter as communicated through the documentation).
DataRequirements are typically used to communicate patient-dependent information such as MedicationStatements and Encounters, whereas Parameters are typically used to communicate patient-independent information such as configuration values.
For example, consider the following CQL expression:
define "Total Colectomy Procedures":
[Procedure: "Total Colectomy Value Set"] P
where P.performedPeriod during "Measurement Period"
The criteria is looking for procedures matching the "Total Colectomy Value Set" that were performed during the "Measurement Period". In this case, "Measurement Period" is a parameter, referenced by name, whereas the reference to Procedure uses the name of the resource type, and so constitutes a data requirement of the criteria:
If a resource type has multiple date attributes, then it may be necessary to include multiple date criteria. For instance, in the example above the Procedure resource is using the performedPeriod date attribute. However, the Procedure resource also provides a performedDateTime (specific date and/or time when procedure was performed) attribute. Therefore, if the date criteria for the Procedure in the example was recorded using the performedDateTime attribute, the date criteria would be incomplete. To account for this additional date attribute, the example could be expanded as follows:
define "Total Colectomy Procedures":
[Procedure: "Total Colectomy Value Set"] P
where exists (P.performedPeriod during "Measurement Period")
or exists (P.performedDateTime during "Measurement Period")
The ParameterDefinition structure defines a parameter to a knowledge asset such as a decision support rule or quality measure.
Parameters are typically used to communicate patient-independent information such as configuration values, whereas DataRequirements are typically used to communicate patient-dependent information such as MedicationStatements and Encounters.
@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:name[ code ] ; # 0..1 Name used to access the parameter value
fhir:use[ code ] ; # 1..1 in | out
fhir:min[ integer ] ; # 0..1 Minimum cardinality
fhir:max[ string ] ; # 0..1 Maximum cardinality (a number of *)
fhir:documentation[ string ] ; # 0..1 A brief description of the parameter
fhir:type[ code ] ; # 1..1 What type of value
fhir:profile[ canonical(StructureDefinition) ] ; # 0..1 What profile the value is expected to be
]
@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:name[ code ] ; # 0..1 Name used to access the parameter value
fhir:use[ code ] ; # 1..1 in | out
fhir:min[ integer ] ; # 0..1 Minimum cardinality
fhir:max[ string ] ; # 0..1 Maximum cardinality (a number of *)
fhir:documentation[ string ] ; # 0..1 A brief description of the parameter
fhir:type[ code ] ; # 1..1 What type of value
fhir:profile[ canonical(StructureDefinition) ] ; # 0..1 What profile the value is expected to be
]
The RelatedArtifact structure defines resources related to an artifact such as previous and next versions of documents, documentation, citations, etc. Note that the name artifact here is being used in a general sense; The related artifact may be a FHIR resource, or it may be another type of resource, represented using the Attachment datatype.
The following examples illustrate the use of relatedArtifact elements to provide citations:
<relatedArtifact>
<label value="1"/>
<type value="citation"/>
<citation value="Linder, J.A., D.W. Bates, G.M. Lee, J.A. Finkelstein. 2005. _Antibiotic treatment of children with sore throat_ JAMA 294(18):2315-2322. "/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<label value="2"/>
<citation value="Infectious Diseases Society of America. 2012. _Clinical Practice Guideline for the Diagnosis and Management of Group A Streptococcal Pharyngitis: 2012 Update._ "/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<label value="3"/>
<citation value="Roberts, R.R., B. Hota, I. Ahmad, et al. _Hospital and Societal Costs of Antimicrobial-Resistant Infections in a Chicago Teaching Hospital: Implications for Antibiotic Stewardship._ Clin Infect Dis. Oct 2009; 49(8):1175-84."/>
</relatedArtifact>
2.1.28.5.0.4.0.1 Interpretation of RelatedArtifact in different contexts
The RelatedArtifact type is used in a variety of contexts, and supports flexible description of relationships between artifacts. For example, the type can be used to describe both successor and predecessor relationships. This flexibility is needed to support use cases where only one side or other of the relationship is represented in FHIR. In practice, this datatype SHALL NOT be used to create bi-directional linking between FHIR resources.
The TriggerDefinition structure defines when a knowledge artifact is expected to be evaluated. The structure can represent three main kinds of triggering events,
depending on the value of type:
Named Event
Scheduled Event
Data Event
A named event is an event identified by the implementation environment. This allows
any event generated within the implementation environment to be used as a trigger,
but it requires pre-coordination of the names involved with the consuming environments.
HL7 V2 events are assigned the URI http://terminology.hl7.org/CodeSystem/v2-0003#[code]
e.g. http://terminology.hl7.org/CodeSystem/v2-0003/A01, and reference any data change that would trigger
the sending of the matching HL7 V2 version, if the application providing the FHIR API
supports v2 events internally.
A scheduled event occurs on a fixed or periodic schedule.
And finally, a data event occurs in response to some data-related event in the
integrated environment such as a record being added or updated. The data-of-interest
for a data event is described using a DataRequirement.
This allows for systems to automatically invoke based on data activity occurring within the system.
A condition may also be specified to further refine the trigger
Defines an expected trigger for a module + Rule: Either timing, or a data requirement, but not both + Rule: A condition only if there is a data requirement + Rule: A named event requires a name, a periodic event requires timing, and a data event requires data
Defines an expected trigger for a module + Rule: Either timing, or a data requirement, but not both + Rule: A condition only if there is a data requirement + Rule: A named event requires a name, a periodic event requires timing, and a data event requires data
An expression that can be used to generate a value + Rule: An expression or a reference must be provided + Rule: The name must be a valid variable name in most computer languages
@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:description[ string ] ; # 0..1 Natural language description of the condition
fhir:name[ code ] ; # 0..1 IShort name assigned to expression for reuse
fhir:language[ code ] ; # 0..1 text/cql | text/fhirpath | application/x-fhir-query | etc.
fhir:expression[ string ] ; # 0..1 IExpression in specified language
fhir:reference[ uri ] ; # 0..1 IWhere the expression is found
]
An expression that can be used to generate a value + Rule: An expression or a reference must be provided + Rule: The name must be a valid variable name in most computer languages
@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:description[ string ] ; # 0..1 Natural language description of the condition
fhir:name[ code ] ; # 0..1 IShort name assigned to expression for reuse
fhir:language[ code ] ; # 0..1 text/cql | text/fhirpath | application/x-fhir-query | etc.
fhir:expression[ string ] ; # 0..1 IExpression in specified language
fhir:reference[ uri ] ; # 0..1 IWhere the expression is found
]
While the expression data type supports any language, a few
specific languages defined by HL7 at particularly of interest
for the purposes of this specification:
This value set defines a base set of codes that can be used to indicate that the content in a resource was developed with a focus and intent of supporting use within particular contexts.
The ExtendedContactDetail structure defines extended contact details for a named, or unnamed individual/purpose.
These are extensively used in provider directory resources where contact information is
often very rich in nature, and requires additional metadata around their usage.
This datatype permits the context of the contact informations use to be provided, and
groups them together with other important metadata.
Not all properties are expected to be present in all instances, and only the ones that apply.
e.g. A website contact will only have the telecom included, but might also include a purpose
and possibly a period if required. Whereas an accounts contact detail could include their name,
postal address and telephone number (and possibly Organization if it was an outsourced capability)
The period provides the general start and end of the contact's applicability for usage.
This is not intended to store a history of usages over time, but a convenient way to
record upcoming relevant changes to the content when it is being published.
This permits a contact to be marked as becoming available from X, or is expected
to no longer be available from Y. An extension may be used to mark a contact's general
availability times (9am - 5pm) and also exceptions where the contact is not available
(e.g. Public holidays)
@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:purpose[ CodeableConcept ] ; # 0..1 The type of contact
fhir:name ( [ HumanName ] ... ) ; # 0..* Name of an individual to contact
fhir:telecom ( [ ContactPoint ] ... ) ; # 0..* Contact details (e.g.phone/fax/url)
fhir:address[ Address ] ; # 0..1 Address for the contact
fhir:organization[ Reference(Organization) ] ; # 0..1 This contact detail is handled/monitored by a specific organization
fhir:period[ Period ] ; # 0..1 Period that this contact was valid for usage
]
@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:purpose[ CodeableConcept ] ; # 0..1 The type of contact
fhir:name ( [ HumanName ] ... ) ; # 0..* Name of an individual to contact
fhir:telecom ( [ ContactPoint ] ... ) ; # 0..* Contact details (e.g.phone/fax/url)
fhir:address[ Address ] ; # 0..1 Address for the contact
fhir:organization[ Reference(Organization) ] ; # 0..1 This contact detail is handled/monitored by a specific organization
fhir:period[ Period ] ; # 0..1 Period that this contact was valid for usage
]
@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:period[ Period ] ; # 0..1 When the availability applies
fhir:availableTime( [ # 0..* Times the {item} is available
fhir:daysOfWeek ( [ code ] ... ) ; # 0..* mon | tue | wed | thu | fri | sat | sun
fhir:allDay[ boolean ] ; # 0..1 IAlways available? i.e. 24 hour service
fhir:availableStartTime[ time ] ; # 0..1 IOpening time of day (ignored if allDay = true)
fhir:availableEndTime[ time ] ; # 0..1 IClosing time of day (ignored if allDay = true)
] ... ) ;
fhir:notAvailableTime( [ # 0..* Not available during this time due to provided reason
fhir:description[ string ] ; # 0..1 Reason presented to the user explaining why time not available
fhir:during[ Period ] ; # 0..1 Service not available during this period
] ... ) ;
]
@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:period[ Period ] ; # 0..1 When the availability applies
fhir:availableTime( [ # 0..* Times the {item} is available
fhir:daysOfWeek ( [ code ] ... ) ; # 0..* mon | tue | wed | thu | fri | sat | sun
fhir:allDay[ boolean ] ; # 0..1 IAlways available? i.e. 24 hour service
fhir:availableStartTime[ time ] ; # 0..1 IOpening time of day (ignored if allDay = true)
fhir:availableEndTime[ time ] ; # 0..1 IClosing time of day (ignored if allDay = true)
] ... ) ;
fhir:notAvailableTime( [ # 0..* Not available during this time due to provided reason
fhir:description[ string ] ; # 0..1 Reason presented to the user explaining why time not available
fhir:during[ Period ] ; # 0..1 Service not available during this period
] ... ) ;
]
The MonetaryComponent structure defines a the set of properties across the financial resources.
This component is typically used in a list where each value provides a different type of value
contributing to the final value used in line items on a financial transaction.
For example, a line item for a product might include the net price, the tax amount, and the
surcharge amount as separate components.
@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:type[ code ] ; # 1..1 base | surcharge | discount | tax | informational
fhir:code[ CodeableConcept ] ; # 0..1 Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.
fhir:factor[ decimal ] ; # 0..1 Factor used for calculating this component
fhir:amount[ Money ] ; # 0..1 Explicit value amount to be used
]
@prefix fhir: <http://hl7.org/fhir/> .
[
# from Element: Element.extension
fhir:type[ code ] ; # 1..1 base | surcharge | discount | tax | informational
fhir:code[ CodeableConcept ] ; # 0..1 Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.
fhir:factor[ decimal ] ; # 0..1 Factor used for calculating this component
fhir:amount[ Money ] ; # 0..1 Explicit value amount to be used
]