FoundationThis is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions
| 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#>
# ShEx Version 2.2
IMPORT <Uri.shex>
IMPORT <Code.shex>
IMPORT <Ratio.shex>
IMPORT <Coding.shex>
IMPORT <String.shex>
IMPORT <Boolean.shex>
IMPORT <DateTime.shex>
IMPORT <Markdown.shex>
IMPORT <Quantity.shex>
IMPORT <Reference.shex>
IMPORT <Identifier.shex>
IMPORT <Organization.shex>
IMPORT <UsageContext.shex>
IMPORT <ContactDetail.shex>
IMPORT <DomainResource.shex>
IMPORT <BackboneElement.shex>
IMPORT <CodeableConcept.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]?;
fhir:url @<Uri>?; # Canonical identifier for this
# Medication, represented as an
# absolute URI (globally unique)
fhir:identifier @<OneOrMore_Identifier>?; # Business identifier for this
# medication
fhir:version @<String>?; # Business version of the Medication
fhir:versionAlgorithm @<String> OR
@<Coding> ?; # How to compare versions
fhir:name @<String>?; # Name for this Medication (computer
# friendly)
fhir:title @<String>?; # Name for this Medication (human
# friendly)
fhir:code @<CodeableConcept>?; # Codes that identify this medication
fhir:status @<Code> AND
{fhir:v @fhirvs:publication-status}?; # draft | active | retired | unknown
fhir:experimental @<Boolean>?; # For testing only - never for real
# usage
fhir:date @<DateTime>?; # Date last changed
fhir:publisher @<String>?; # Name of the publisher/steward
# (organization or individual)
fhir:contact @<OneOrMore_ContactDetail>?; # Contact details for the publisher
fhir:description @<Markdown>?; # Natural language description of
# the Medication
fhir:useContext @<OneOrMore_UsageContext>?; # The context that the content is
# intended to support
fhir:jurisdiction @<OneOrMore_CodeableConcept>?; # Jurisdiction of the authority that
# maintains the Medication (if
# applicable)
fhir:purpose @<Markdown>?; # Why this Medication is defined
fhir:copyright @<Markdown>?; # Notice about intellectual property
# ownership, can include
# restrictions on use
fhir:copyrightLabel @<String>?; # Copyright holder and year(s)
fhir:marketingAuthorizationHolder @<Reference> AND {fhir:l
@<Organization> ? }?; # Organization that has
# authorization to market medication
fhir:doseForm @<CodeableConcept>?; # E.g. powder, tablets, capsule
fhir: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
}
# 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
}
# 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 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
}
# 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_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_Medication.ingredient> CLOSED {
rdf:first @<Medication.ingredient> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Medication.ingredient>
}
#---------------------- Value Sets ------------------------
# 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.r6.core#6.0.0-snapshot1 generated on Thu, Oct 8, 2026 18:32+0000.
Links: Search |
Version History |
Contents |
Glossary |
QA |
Compare to R4 |
Compare to R5 |
Compare to Last Ballot |
|
Propose a change