Foundation
This
page
is
part
of
the
Continuous
Integration
Build
of
FHIR
Specification
(v5.0.0:
R5
-
STU
).
This
is
the
current
published
version
in
it's
permanent
home
(it
will
always
(will
be
available
incorrect/inconsistent
at
this
URL).
For
a
full
list
of
available
versions,
see
times).
See
the
Directory
of
published
versions
.
Page
versions:
R5
R4B
R4
R3
| Responsible Owner: Pharmacy Work Group | Standards Status : Informative | Compartments : No defined compartments |
ShEx statement for medication
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#>IMPORT <code.shex># ShEx Version 2.2 IMPORT <Code.shex> IMPORT <Ratio.shex>IMPORT <string.shex> IMPORT <boolean.shex>IMPORT <String.shex> IMPORT <Boolean.shex> IMPORT <Quantity.shex>IMPORT <dateTime.shex>IMPORT <DateTime.shex> IMPORT <Reference.shex> IMPORT <Identifier.shex> IMPORT <Organization.shex> IMPORT <DomainResource.shex> IMPORT <CodeableConcept.shex> IMPORT <BackboneElement.shex> IMPORT <CodeableReference.shex> IMPORT <PackagedProductDefinition.shex> IMPORT <ManufacturedItemDefinition.shex> IMPORT <MedicinalProductDefinition.shex> IMPORT <AdministrableProductDefinition.shex> start=@<Medication> AND {fhir:nodeRole [fhir:treeRoot]} # Definition of a Medication <Medication> EXTENDS @<DomainResource> CLOSED {a [fhir:Medication]?; fhir:nodeRole [fhir:treeRoot]?;a [fhir:Medication]?;fhir:nodeRole [fhir:treeRoot]?; fhir:identifier @<OneOrMore_Identifier>?; # Business identifier for this # medication fhir:code @<CodeableConcept>?; # Codes that identify this medicationfhir:status @<code> ANDfhir:status @<Code> AND {fhir:v @fhirvs:medication-status}?; # active | inactive | # entered-in-errorfhir:marketingAuthorizationHolder @<Reference> AND {fhir:linkfhir:marketingAuthorizationHolder @<Reference> AND {fhir:l @<Organization> ? }?; # Organization that has # authorization to market medication fhir:doseForm @<CodeableConcept>?; # powder | tablets | capsule +fhir:totalVolume @<Quantity>?; # When the specified product code # does not infer a package size, # this is the specific amount of # drug in the product fhir:ingredient @<OneOrMore_Medication.ingredient>?; # Active or inactive ingredient fhir:batch @<Medication.batch>?; # Details about packaged medications fhir:definition @<Reference> AND {fhir:link @<MedicationKnowledge> ? }?; # Knowledge about this medicationfhir:packageSize @<Medication.packageSize>?; # When the code does not specify the # package size, this backbone # element can be used to specify the # overall amount of medication in # the package fhir:ingredient @<OneOrMore_Medication.ingredient>?; # Components of a medication. These # can be ingredient substances or # other medications, in the case of # combination packaged medications fhir:instance @<Medication.instance>?; # Details about packaged medications fhir:definition @<Reference> AND {fhir:l @<AdministrableProductDefinition> OR @<ManufacturedItemDefinition> OR @<MedicinalProductDefinition> OR @<PackagedProductDefinition> ? }?; # Formal definition of the medication }# Details about packaged medications <Medication.batch> EXTENDS @<BackboneElement> CLOSED { fhir:lotNumber @<string>?; # Identifier assigned to batch fhir:expirationDate @<dateTime>?; # When batch will expire# When the code does not specify the package size, this backbone element can be used to specify the overall amount of medication in the package <Medication.packageSize> EXTENDS @<BackboneElement> CLOSED { fhir:numberOfItems @<Quantity>?; # The number of items in the package # that are represented by the code fhir:amountPerItem @<Ratio>?; # The amount per each item }# Active or inactive ingredient# Components of a medication. These can be ingredient substances or other medications, in the case of combination packaged medications <Medication.ingredient> EXTENDS @<BackboneElement> CLOSED {fhir:item @<CodeableReference>; # The ingredient (substance or # medication) that the # ingredient.strength relates to fhir:isActive @<boolean>?; # Active ingredient indicatorfhir:item @<CodeableReference>; # The specific substance or # medication that is the ingredient fhir:isActive @<Boolean>?; # Active ingredient indicator fhir:role @<CodeableConcept>?; # A code that defines the type of # ingredient, active, base, etc. fhir:strength @<Ratio> OR @<CodeableConcept> OR @<Quantity> ?; # Quantity of ingredient present }#---------------------- Cardinality Types (OneOrMore) -------------------# Details about packaged medications <Medication.instance> EXTENDS @<BackboneElement> CLOSED { fhir:identifier @<OneOrMore_Identifier>?; # Identifier for the physical # instance, typically a serial # number fhir:lotNumber @<String>?; # Identifier assigned to batch fhir:expirationDate @<DateTime>?; # When instance will expire } #---------------------- Cardinality Types (OneOrMore) ------------------- <OneOrMore_Identifier> CLOSED { rdf:first @<Identifier> ; rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> } <OneOrMore_Medication.ingredient> CLOSED { rdf:first @<Medication.ingredient> ; rdf:rest [rdf:nil] OR @<OneOrMore_Medication.ingredient> } #---------------------- Value Sets ------------------------ # Medication Status Codes fhirvs:medication-status ["active" "inactive" "entered-in-error"]
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
R5
hl7.fhir.core#5.0.0
R6
hl7.fhir.core#6.0.0-ballot3
generated
on
Sun,
Mar
26,
2023
15:25+1100.
Nov
9,
2025
00:48+0000.
Links:
Search
|
Version
History
|
Contents
|
Glossary
|
QA
|
Compare
to
R4
|
Compare
to
R4B
R5
|
Compare
to
Last
Ballot
|
|
Propose
a
change