PackagesCanonicalsLogsProblems
    Packages
    synapxe.sgcdi@1.0.0
    https://fhir.synapxe.sg/StructureDefinition/profile-medicationstatement
description: null
package_name: synapxe.sgcdi
derivation: constraint
name: MedicationStatement
type: MedicationStatement
elements:
  category: {index: 19}
  dosage:
    index: 58
    elements:
      site: {index: 71}
      asNeeded: {index: 67}
      method: {index: 75}
      patientInstruction: {index: 65}
      maxDosePerLifetime: {index: 87}
      maxDosePerAdministration: {index: 86}
      route:
        type: CodeableConcept
        short: Concept - reference to a terminology or just  text
        index: 72
        extensions: {}
        elements:
          extension: {index: 73}
          coding:
            elements:
              version: {index: 74}
      extension: {index: 60}
      id: {index: 59}
      timing: {index: 66}
      additionalInstruction: {index: 64}
      sequence: {index: 62}
      maxDosePerPeriod: {index: 85}
      asNeededFor:
        type: CodeableConcept
        short: Concept - reference to a terminology or just  text
        index: 68
        extensions: {}
        elements:
          extension: {index: 69}
          coding:
            elements:
              version: {index: 70}
      doseAndRate:
        index: 76
        elements:
          id: {index: 77}
          extension: {index: 78}
          type: {index: 79}
          dose:
            choices: [doseRange]
            index: 81
          doseRange: {type: Range, choiceOf: dose, index: 82}
          rate:
            choices: []
            index: 84
        extensions: {}
        required: [doseRange, dose]
      modifierExtension: {index: 61}
      text: {index: 63}
    extensions: {}
    required: [asNeededFor, doseAndRate, route, text]
  derivedFrom:
    index: 36
    elements:
      id: {index: 37}
      extension: {index: 38}
      reference: {index: 39}
      type: {index: 40}
      identifier: {index: 41}
      display: {index: 42}
    extensions: {}
    required: [reference]
    slicing:
      rules: open
      discriminator:
      - {path: reference, type: type}
      min: 1
      slices:
        MedicationRequest:
          match: {}
          schema:
            type: Reference
            refers: ['https://fhir.synapxe.sg/StructureDefinition/profile-medicationrequest']
            _required: true
            index: 43
            elements:
              id: {index: 44}
              extension: {index: 45}
            extensions: {}
        MedicationDispense:
          match: {}
          schema:
            type: Reference
            refers: ['https://fhir.synapxe.sg/StructureDefinition/profile-medicationdispense']
            _required: true
            index: 46
            elements:
              id: {index: 47}
              extension: {index: 48}
            extensions: {}
  encounter: {index: 31}
  adherence: {index: 88}
  note: {type: Annotation, short: Text node with attribution, index: 55}
  reason:
    index: 49
    elements:
      id: {index: 50}
      extension: {index: 51}
      concept:
        type: CodeableConcept
        short: Concept - reference to a terminology or just  text
        index: 52
        extensions: {}
        elements:
          extension: {index: 53}
          coding:
            elements:
              version: {index: 54}
    extensions: {}
    required: [concept]
  extension:
    array: true
    min: 4
    index: 4
    slicing:
      slices:
        sequenceNo:
          match: {}
          schema: {type: Extension, url: 'https://fhir.synapxe.sg/StructureDefinition/ext-sequenceno', index: 5}
          min: 1
          max: 1
        groupNo:
          match: {}
          schema: {type: Extension, url: 'https://fhir.synapxe.sg/StructureDefinition/ext-sequenceno', index: 6}
          min: 1
          max: 1
        groupSequenceNo:
          match: {}
          schema: {type: Extension, url: 'https://fhir.synapxe.sg/StructureDefinition/ext-sequenceno', index: 7}
          min: 1
          max: 1
        changesMade:
          match: {}
          schema:
            type: Extension
            url: https://fhir.synapxe.sg/StructureDefinition/ext-generic
            index: 8
            elements:
              value:
                choices: [valueString]
                index: 10
              valueString: {type: string, choiceOf: value, index: 11}
        reasonForChange:
          match: {}
          schema:
            type: Extension
            url: https://fhir.synapxe.sg/StructureDefinition/ext-generic
            index: 12
            elements:
              value:
                choices: [valueString]
                index: 14
              valueString: {type: string, choiceOf: value, index: 15}
  contained:
    constraint:
      dom-2: {human: 'If the resource is contained in another resource, it SHALL NOT contain nested Resources', source: 'http://hl7.org/fhir/StructureDefinition/DomainResource', severity: error, expression: contained.contained.empty()}
      dom-4: {human: 'If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated', source: 'http://hl7.org/fhir/StructureDefinition/DomainResource', severity: error, expression: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()}
      dom-3: {human: 'If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource', source: 'http://hl7.org/fhir/StructureDefinition/DomainResource', severity: error, expression: 'contained.where(((''#''+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = ''#'').exists() or descendants().where(ofType(canonical) = ''#'').exists() or descendants().where(ofType(canonical) = ''#'').exists()).not()).trace(''unmatched'', id).empty()'}
      dom-6: {human: A resource should have narrative for robust management, source: 'http://hl7.org/fhir/StructureDefinition/DomainResource', severity: warning, expression: text.`div`.exists()}
      dom-5: {human: 'If a resource is contained in another resource, it SHALL NOT have a security label', source: 'http://hl7.org/fhir/StructureDefinition/DomainResource', severity: error, expression: contained.meta.security.empty()}
      mdd-1: {human: whenHandedOver cannot be before whenPrepared, source: 'http://hl7.org/fhir/StructureDefinition/MedicationDispense', severity: error, expression: whenHandedOver.empty() or whenPrepared.empty() or whenHandedOver >= whenPrepared}
    short: Ordering of medication for patient or group
    index: 0
    slicing:
      rules: open
      discriminator:
      - {path: $this, type: type}
      min: 1
      slices:
        MedicationRequest:
          match: {}
          schema: {type: Resource, short: 'Contained, inline Resources', _required: true, index: 1}
          min: 1
          max: 1
        MedicationDispense:
          match: {}
          schema: {type: Resource, short: 'Contained, inline Resources', _required: true, index: 2}
          min: 1
          max: 1
        Medication:
          match: {}
          schema: {type: Resource, _required: true, index: 3}
          min: 1
          max: 1
  effective:
    choices: []
    index: 33
  identifier: {type: Identifier, short: An identifier intended for computation, index: 17}
  relatedClinicalInformation: {index: 56}
  renderedDosageInstruction: {index: 57}
  dateAsserted: {index: 34}
  partOf: {index: 18}
  informationSource: {index: 35}
  subject:
    type: Reference
    short: A reference from one resource to another
    refers: ['https://fhir.synapxe.sg/StructureDefinition/profile-patient']
    index: 30
  modifierExtension: {index: 16}
  medication:
    elements:
      id: {index: 20}
      extension: {index: 21}
      concept: {index: 22}
      reference:
        index: 23
        elements:
          id: {index: 24}
          extension: {index: 25}
          reference: {index: 26}
          type: {index: 27}
          identifier: {index: 28}
          display: {index: 29}
        extensions: {}
        required: [reference]
    extensions: {}
    required: [reference]
package_version: 1.0.0
extensions:
  sequenceNo: {url: 'https://fhir.synapxe.sg/StructureDefinition/ext-sequenceno', min: 1, max: 1, type: Extension, index: 5}
  groupNo: {url: 'https://fhir.synapxe.sg/StructureDefinition/ext-sequenceno', min: 1, max: 1, type: Extension, index: 6}
  groupSequenceNo: {url: 'https://fhir.synapxe.sg/StructureDefinition/ext-sequenceno', min: 1, max: 1, type: Extension, index: 7}
  changesMade:
    url: https://fhir.synapxe.sg/StructureDefinition/ext-generic
    type: Extension
    index: 8
    elements:
      value:
        choices: [valueString]
        index: 10
      valueString: {type: string, choiceOf: value, index: 11}
  reasonForChange:
    url: https://fhir.synapxe.sg/StructureDefinition/ext-generic
    type: Extension
    index: 12
    elements:
      value:
        choices: [valueString]
        index: 14
      valueString: {type: string, choiceOf: value, index: 15}
class: profile
kind: resource
url: https://fhir.synapxe.sg/StructureDefinition/profile-medicationstatement
base: http://hl7.org/fhir/StructureDefinition/MedicationStatement
version: null
required: [derivedFrom, dosage, note, identifier, dateAsserted, reason, contained]