F
US-Core CI Build

D.4.1 StructureDefinition: DAF-core-medicationorder

Both the MedicationOrder and MedicationStatement resources can be used to record a patient’s medication. For more information about the context for their usages, refer to the medication domains’s boundaries section. This profile sets minimum expectations for the MedicationOrder resource to record, search and fetch medications associated with a patient. It identifies which core elements, extensions, vocabularies and value sets SHALL be present in the resource when using this profile.

Example Usage Scenarios:

The following are example usage scenarios for the DAF-MedicationOrder profile:

  • Query for medications that have been prescribed to a particular patient
  • Query for all patients who have been prescribed a particular medication
  • Query for all patients who were prescribed a particular medication within a particular time period
Mandatory Data Elements and Terminology

The following data-elements are mandatory (i.e data MUST be present). These are presented below in a simple human-readable explanation. Profile specific guidance and an example are provided as well. The Formal Profile Definition below provides the formal summary, definitions, and terminology requirements.

Each MedicationOrder must have:

  1. a status
  2. a medication
  3. a patient
  4. a date for when written
  5. a prescriber

Profile specific implementation guidance:

  • The MedicationStatement and MedicationOrder resources can represent a medication, using either a code or reference to a Medication resource. The server application can choose one way or both methods, but the client application must support both methods. More specific guidance is provided in the conformance resource for this profile
Example: MedicationOrder Example: example

D.4.1.1 Formal Views of Profile Content

The official URL for this profile is:

http://hl7.org/fhir/us/core/StructureDefinition/daf-core-medicationorder

This profile builds on MedicationOrder.

This profile was published on Mon Aug 01 00:00:00 UTC 2016 as a draft by Health Level Seven International (FHIR-Infrastructure).

Description of Profiles, Differentials, Snapshots, and how the XML and JSON presentations work.

This structure is derived from MedicationOrder

Complete Summary of the Mandatory Requirements

  1. One status in MedicationOrder.status which has an required binding to:
  2. One medication via MedicationOrder.medicationCodeableConcept or MedicationOrder.medicationReference
  3. One patient reference in MedicationOrder.patient
  4. One date in MedicationOrder.dateWritten
  5. One practitioner in MedicationOrder.prescriber
NameFlagsCard.TypeDescription & Constraintsdoco
.. MedicationOrder I0..*Prescription of medication to for patient
... id 0..1idLogical id of this artifact
... meta 0..1MetaMetadata about the resource
... implicitRules ?!0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: Common Languages (extensible)
... text I0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional Content defined by implementations
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... identifier 0..*IdentifierExternal identifier
... definition 0..*Reference(Resource)Protocol or definition
... basedOn 0..*Reference(Resource)What request fulfills
... requisition 0..1IdentifierIdentifier of composite
... status ?!S1..1codeactive | on-hold | completed | entered-in-error | stopped | draft
Binding: MedicationOrderStatus (required)
... stage ?!1..1CodeableConceptproposal | plan | original-order
Binding: MedicationOrderStage (example)
... medication[x] S1..1CodeableConcept, Reference(Profile daf-core-medication)Medication to be taken
Binding: Medication Clinical Drug (RxNorm) (extensible)
... patient S1..1Reference(Profile daf-core-patient)Who prescription is for
... encounter 0..1Reference(Encounter)Created during encounter/admission/stay
... supportingInformation 0..*Reference(Resource)Information to support ordering of the medication
... dateWritten S1..1dateTimeWhen prescription was initially authorized
... prescriber S1..1Reference(DAF Practitioner)Who ordered the initial medication(s)
... reasonCode 0..*CodeableConceptReason or indication for writing the prescription
Binding: Condition/Problem/Diagnosis Codes (example)
... reasonReference 0..*Reference(Condition), Reference(Observation)Condition or Observation that supports why the prescription is being written
... note 0..*AnnotationInformation about the prescription
... category 0..1codeType of medication usage
Binding: MedicationOrderCategory (example)
... dosageInstruction 0..*DosageInstructionHow the medication should be taken
... dispenseRequest I0..1BackboneElementMedication supply authorization
.... id 0..1stringxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
.... validityPeriod 0..1PeriodTime period supply is authorized for
.... numberOfRepeatsAllowed 0..1positiveIntNumber of refills authorized
.... quantity 0..1SimpleQuantityAmount of medication to supply per dispense
.... expectedSupplyDuration 0..1DurationNumber of days supply per dispense
... substitution I0..1BackboneElementAny restrictions on medication substitution
.... id 0..1stringxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
.... allowed 1..1booleanWhether substitution is allowed or not
.... reason 0..1CodeableConceptWhy should (not) substitution be made
Binding: SubstanceAdminSubstitutionReason (example)
... priorPrescription 0..1Reference(MedicationOrder)An order/prescription that this supersedes
... eventHistory 0..*Reference(Provenance)A list of events of interest in the lifecycle

doco Documentation for this format

yet to be done: Xml template

yet to be done: Json template

This structure is derived from MedicationOrder

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. MedicationOrder I0..*Prescription of medication to for patient
... id 0..1idLogical id of this artifact
... meta 0..1MetaMetadata about the resource
... implicitRules ?!0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: Common Languages (extensible)
... text I0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional Content defined by implementations
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... identifier 0..*IdentifierExternal identifier
... definition 0..*Reference(Resource)Protocol or definition
... basedOn 0..*Reference(Resource)What request fulfills
... requisition 0..1IdentifierIdentifier of composite
... status ?!S1..1codeactive | on-hold | completed | entered-in-error | stopped | draft
Binding: MedicationOrderStatus (required)
... stage ?!1..1CodeableConceptproposal | plan | original-order
Binding: MedicationOrderStage (example)
... medication[x] S1..1CodeableConcept, Reference(Profile daf-core-medication)Medication to be taken
Binding: Medication Clinical Drug (RxNorm) (extensible)
... patient S1..1Reference(Profile daf-core-patient)Who prescription is for
... encounter 0..1Reference(Encounter)Created during encounter/admission/stay
... supportingInformation 0..*Reference(Resource)Information to support ordering of the medication
... dateWritten S1..1dateTimeWhen prescription was initially authorized
... prescriber S1..1Reference(DAF Practitioner)Who ordered the initial medication(s)
... reasonCode 0..*CodeableConceptReason or indication for writing the prescription
Binding: Condition/Problem/Diagnosis Codes (example)
... reasonReference 0..*Reference(Condition), Reference(Observation)Condition or Observation that supports why the prescription is being written
... note 0..*AnnotationInformation about the prescription
... category 0..1codeType of medication usage
Binding: MedicationOrderCategory (example)
... dosageInstruction 0..*DosageInstructionHow the medication should be taken
... dispenseRequest I0..1BackboneElementMedication supply authorization
.... id 0..1stringxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
.... validityPeriod 0..1PeriodTime period supply is authorized for
.... numberOfRepeatsAllowed 0..1positiveIntNumber of refills authorized
.... quantity 0..1SimpleQuantityAmount of medication to supply per dispense
.... expectedSupplyDuration 0..1DurationNumber of days supply per dispense
... substitution I0..1BackboneElementAny restrictions on medication substitution
.... id 0..1stringxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
.... allowed 1..1booleanWhether substitution is allowed or not
.... reason 0..1CodeableConceptWhy should (not) substitution be made
Binding: SubstanceAdminSubstitutionReason (example)
... priorPrescription 0..1Reference(MedicationOrder)An order/prescription that this supersedes
... eventHistory 0..*Reference(Provenance)A list of events of interest in the lifecycle

doco Documentation for this format

XML Template

yet to be done: Xml template

JSON Template

yet to be done: Json template

Downloads: StructureDefinition: (XML, JSON), Schema: XML Schematron

 

D.4.1.2 Terminology Bindings

Terminology Bindings

PathNameConformanceValueSet
MedicationOrder.languageCommon LanguagesextensibleCommon Languages
MedicationOrder.statusMedicationOrderStatusrequiredMedicationOrderStatus
MedicationOrder.stageMedicationOrderStageexampleMedicationOrderStage
MedicationOrder.medication[x]Medication Clinical Drug (RxNorm)extensibleMedication Clinical Drug (RxNorm)
MedicationOrder.reasonCodeCondition/Problem/Diagnosis CodesexampleCondition/Problem/Diagnosis Codes
MedicationOrder.categoryMedicationOrderCategoryexampleMedicationOrderCategory
MedicationOrder.substitution.reasonSubstanceAdminSubstitutionReasonexampleSubstanceAdminSubstitutionReason

D.4.1.3 Constraints

Constraints

IdPathDetailsRequirements
dom-2MedicationOrderIf the resource is contained in another resource, it SHALL NOT contain nested Resources
XPath: not(parent::f:contained and f:contained)
dom-1MedicationOrderIf the resource is contained in another resource, it SHALL NOT contain any narrative
XPath: not(parent::f:contained and f:text)
dom-4MedicationOrderIf a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
XPath: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
dom-3MedicationOrderIf the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource
XPath: not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))
ele-1MedicationOrder.dispenseRequestAll FHIR elements must have a @value or children
XPath: @value|f:*|h:div
ele-1MedicationOrder.substitutionAll FHIR elements must have a @value or children
XPath: @value|f:*|h:div
.