PREFIX fhir: PREFIX fhirvs: PREFIX xsd: BASE start=@ AND {fhir:nodeRole [fhir:treeRoot]} # Record of medication being taken by a patient CLOSED { a [fhir:MedicationStatement]; fhir:nodeRole [fhir:treeRoot]?; fhir:Resource.id id?; # Logical id of this artifact fhir:Resource.meta @?; # Metadata about the resource fhir:Resource.implicitRules @?; # A set of rules under which this # content was created fhir:Resource.language @?; # Language of the resource content fhir:DomainResource.text @?; # Text summary of the resource, for # human interpretation fhir:DomainResource.contained @*; # Contained, inline Resources fhir:DomainResource.extension @*; # Additional content defined by # implementations fhir:DomainResource.modifierExtension @*; # Extensions that cannot be ignored fhir:MedicationStatement.identifier @*; # External identifier fhir:MedicationStatement.basedOn @*; # Fulfils plan, proposal or order fhir:MedicationStatement.partOf @*; # Part of referenced event fhir:MedicationStatement.status @ AND {fhir:value @fhirvs:medication-statement-status}; # active | completed | # entered-in-error | intended | # stopped | on-hold | unknown | # not-taken fhir:MedicationStatement.statusReason @*; # Reason for current status fhir:MedicationStatement.category @?; # Type of medication usage ( # What medication was taken fhir:MedicationStatement.medicationCodeableConcept @ | fhir:MedicationStatement.medicationReference @ ); fhir:MedicationStatement.subject @; # Who is/was taking the medication fhir:MedicationStatement.context @?; # Encounter / Episode associated # with MedicationStatement ( # The date/time or interval when the # medication is/was/will be taken fhir:MedicationStatement.effectiveDateTime @ | fhir:MedicationStatement.effectivePeriod @ )?; fhir:MedicationStatement.dateAsserted @?; # When the statement was asserted? fhir:MedicationStatement.informationSource @?; # Person or organization that # provided the information about the # taking of this medication fhir:MedicationStatement.derivedFrom @*; # Additional supporting information fhir:MedicationStatement.reasonCode @*; # Reason for why the medication is # being/was taken fhir:MedicationStatement.reasonReference @*; # Condition or observation that # supports why the medication is # being/was taken fhir:MedicationStatement.note @*; # Further information about the # statement fhir:MedicationStatement.dosage @*; # Details of how medication is/was # taken or should be taken fhir:index xsd:integer? # Relative position in a list } #---------------------- Data Types ------------------- # Primitive Type dateTime CLOSED { fhir:Element.id string?; # xml:id (or equivalent in JSON) fhir:Element.extension @*; # Additional content defined by # implementations fhir:value dateTime?; # Primitive value for dateTime fhir:index xsd:integer? # Relative position in a list } # Metadata about a resource CLOSED { fhir:Element.id id?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:Meta.versionId @?; # Version specific identifier fhir:Meta.lastUpdated @?; # When the resource version last # changed fhir:Meta.source @?; # Identifies where the resource # comes from fhir:Meta.profile @*; # Profiles this resource claims to # conform to fhir:Meta.security @*; # Security Labels applied to this # resource fhir:Meta.tag @*; # Tags applied to this resource fhir:index xsd:integer? # Relative position in a list } # Primitive Type code CLOSED { fhir:Element.id string?; # xml:id (or equivalent in JSON) fhir:Element.extension @*; # Additional content defined by # implementations fhir:value code?; # Primitive value for code fhir:index xsd:integer? # Relative position in a list } # A reference from one resource to another CLOSED { fhir:link IRI?; fhir:Element.id id?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:Reference.reference @?; # Literal reference, Relative, # internal or absolute URL fhir:Reference.type @?; # Type the reference refers to (e.g. # "Patient") fhir:Reference.identifier @?; # Logical reference, when literal # reference is not known fhir:Reference.display @?; # Text alternative for the resource fhir:index xsd:integer? # Relative position in a list } # Base Resource {a .+; fhir:Resource.id id?; # Logical id of this artifact fhir:Resource.meta @?; # Metadata about the resource fhir:Resource.implicitRules @?; # A set of rules under which this # content was created fhir:Resource.language @?; # Language of the resource content fhir:index xsd:integer? } # Time range defined by start and end date/time CLOSED { fhir:Element.id id?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:Period.start @?; # Starting time with inclusive # boundary fhir:Period.end @?; # End time with inclusive boundary, # if not ongoing fhir:index xsd:integer? # Relative position in a list } # How the medication is/was taken or should be taken CLOSED { fhir:Element.id id?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:Dosage.sequence @?; # The order of the dosage # instructions fhir:Dosage.text @?; # Free text dosage instructions e.g. # SIG fhir:Dosage.additionalInstruction @*; # Supplemental instruction or # warnings to the patient - e.g. # "with meals", "may cause # drowsiness" fhir:Dosage.patientInstruction @?; # Patient or consumer oriented # instructions fhir:Dosage.timing @?; # When medication should be # administered ( # Take "as needed" (for x) fhir:Dosage.asNeededBoolean @ | fhir:Dosage.asNeededCodeableConcept @ )?; fhir:Dosage.site @?; # Body site to administer to fhir:Dosage.route @?; # How drug should enter body fhir:Dosage.method @?; # Technique for administering # medication fhir:Dosage.doseAndRate @*; # Amount of medication administered fhir:Dosage.maxDosePerPeriod @?; # Upper limit on medication per unit # of time fhir:Dosage.maxDosePerAdministration @?; # Upper limit on medication per # administration fhir:Dosage.maxDosePerLifetime @?; # Upper limit on medication per # lifetime of the patient fhir:index xsd:integer? # Relative position in a list } # Primitive Type uri CLOSED { fhir:Element.id string?; # xml:id (or equivalent in JSON) fhir:Element.extension @*; # Additional content defined by # implementations fhir:value uri?; # Primitive value for uri fhir:index xsd:integer? # Relative position in a list } # Text node with attribution CLOSED { fhir:Element.id id?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations ( # Individual responsible for the # annotation fhir:Annotation.authorReference @ | fhir:Annotation.authorString @ )?; fhir:Annotation.time @?; # When the annotation was made fhir:Annotation.text @; # The annotation - text content (as # markdown) fhir:index xsd:integer? # Relative position in a list } # Optional Extensions Element CLOSED { fhir:Element.id id?; fhir:Element.extension @*; fhir:Extension.url uri; ( fhir:Extension.valueBase64Binary @ | fhir:Extension.valueBoolean @ | fhir:Extension.valueCanonical @ | fhir:Extension.valueCode @ | fhir:Extension.valueDate @ | fhir:Extension.valueDateTime @ | fhir:Extension.valueDecimal @ | fhir:Extension.valueId @ | fhir:Extension.valueInstant @ | fhir:Extension.valueInteger @ | fhir:Extension.valueMarkdown @ | fhir:Extension.valueOid @ | fhir:Extension.valuePositiveInt @ | fhir:Extension.valueString @ | fhir:Extension.valueTime @