{
  "resourceType": "StructureDefinition",
  "url": "https://fhir.synapxe.sg/StructureDefinition/profile-medication",
  "name": "Medication",
  "status": "active",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Medication",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Medication",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Medication.contained",
        "path": "Medication.contained",
        "max": "0"
      },
      {
        "id": "Medication.extension",
        "path": "Medication.extension",
        "max": "0"
      },
      {
        "id": "Medication.modifierExtension",
        "path": "Medication.modifierExtension",
        "max": "0"
      },
      {
        "id": "Medication.identifier",
        "path": "Medication.identifier",
        "max": "0"
      },
      {
        "id": "Medication.code",
        "path": "Medication.code",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.synapxe.sg/ValueSet/med-code"
        }
      },
      {
        "id": "Medication.code.extension",
        "path": "Medication.code.extension",
        "max": "0"
      },
      {
        "id": "Medication.code.coding.system",
        "path": "Medication.code.coding.system",
        "fixedUri": "https://fhir.synapxe.sg/CodeSystem/med-code"
      },
      {
        "id": "Medication.code.coding.version",
        "path": "Medication.code.coding.version",
        "max": "0"
      },
      {
        "id": "Medication.status",
        "path": "Medication.status",
        "max": "0"
      },
      {
        "id": "Medication.marketingAuthorizationHolder",
        "path": "Medication.marketingAuthorizationHolder",
        "max": "0"
      },
      {
        "id": "Medication.doseForm",
        "path": "Medication.doseForm",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ],
        "binding": {
          "strength": "required"
        }
      },
      {
        "id": "Medication.doseForm.extension",
        "path": "Medication.doseForm.extension",
        "max": "0"
      },
      {
        "id": "Medication.doseForm.coding.version",
        "path": "Medication.doseForm.coding.version",
        "max": "0"
      },
      {
        "id": "Medication.totalVolume",
        "path": "Medication.totalVolume",
        "max": "0"
      },
      {
        "id": "Medication.ingredient",
        "path": "Medication.ingredient",
        "max": "1"
      },
      {
        "id": "Medication.ingredient.id",
        "path": "Medication.ingredient.id",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.extension",
        "path": "Medication.ingredient.extension",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.modifierExtension",
        "path": "Medication.ingredient.modifierExtension",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.item",
        "path": "Medication.ingredient.item",
        "type": [
          {
            "code": "CodeableReference",
            "targetProfile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-medication"
            ]
          }
        ]
      },
      {
        "id": "Medication.ingredient.item.id",
        "path": "Medication.ingredient.item.id",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.item.extension",
        "path": "Medication.ingredient.item.extension",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.item.concept",
        "path": "Medication.ingredient.item.concept",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.synapxe.sg/ValueSet/med-code"
        }
      },
      {
        "id": "Medication.ingredient.item.concept.extension",
        "path": "Medication.ingredient.item.concept.extension",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.item.concept.coding.system",
        "path": "Medication.ingredient.item.concept.coding.system",
        "fixedUri": "https://fhir.synapxe.sg/CodeSystem/med-code"
      },
      {
        "id": "Medication.ingredient.item.concept.coding.version",
        "path": "Medication.ingredient.item.concept.coding.version",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.item.reference",
        "path": "Medication.ingredient.item.reference",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.isActive",
        "path": "Medication.ingredient.isActive",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.strength[x]",
        "path": "Medication.ingredient.strength[x]",
        "min": 1,
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Medication.ingredient.strength[x].id",
        "path": "Medication.ingredient.strength[x].id",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.strength[x].extension",
        "path": "Medication.ingredient.strength[x].extension",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.strength[x].value",
        "path": "Medication.ingredient.strength[x].value",
        "min": 1
      },
      {
        "id": "Medication.ingredient.strength[x].comparator",
        "path": "Medication.ingredient.strength[x].comparator",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.strength[x].unit",
        "path": "Medication.ingredient.strength[x].unit",
        "min": 1
      },
      {
        "id": "Medication.ingredient.strength[x].system",
        "path": "Medication.ingredient.strength[x].system",
        "min": 1,
        "patternUri": "http://hl7.org/fhir/CodeSystem/medication-ingredientstrength"
      },
      {
        "id": "Medication.ingredient.strength[x].code",
        "path": "Medication.ingredient.strength[x].code",
        "min": 1,
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/medication-ingredientstrength"
        }
      },
      {
        "id": "Medication.batch",
        "path": "Medication.batch",
        "max": "0"
      },
      {
        "id": "Medication.definition",
        "path": "Medication.definition",
        "max": "0"
      }
    ]
  }
}