{
  "resourceType": "StructureDefinition",
  "id": "profile-list-medicationstatement",
  "url": "https://fhir.synapxe.sg/StructureDefinition/profile-list-medicationstatement",
  "name": "PatientMedicationList",
  "title": "Medication Statement List Profile",
  "status": "active",
  "publisher": "Synapxe",
  "description": "A List of MedicationStatement resources is used to store a list of medications that are consumed by a patient.",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "List",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/List",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "List.identifier",
        "path": "List.identifier",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-identifier-record-id"
            ]
          }
        ]
      },
      {
        "id": "List.mode",
        "path": "List.mode",
        "patternCode": "working"
      },
      {
        "id": "List.title",
        "path": "List.title",
        "max": "0"
      },
      {
        "id": "List.code",
        "path": "List.code",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.synapxe.sg/ValueSet/list-codes"
        }
      },
      {
        "id": "List.subject",
        "path": "List.subject",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-reference-patient"
            ],
            "targetProfile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-patient"
            ]
          }
        ]
      },
      {
        "id": "List.encounter",
        "path": "List.encounter",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-reference-encounter"
            ],
            "targetProfile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-encounter"
            ]
          }
        ]
      },
      {
        "id": "List.date",
        "path": "List.date",
        "min": 1
      },
      {
        "id": "List.source",
        "path": "List.source",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-practitionerrole"
            ],
            "aggregation": [
              "bundled"
            ]
          }
        ]
      },
      {
        "id": "List.source.extension",
        "path": "List.source.extension",
        "min": 1
      },
      {
        "id": "List.source.extension:type",
        "path": "List.source.extension",
        "sliceName": "type",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-type"
            ]
          }
        ]
      },
      {
        "id": "List.orderedBy",
        "path": "List.orderedBy",
        "max": "0"
      },
      {
        "id": "List.note",
        "path": "List.note",
        "max": "1",
        "type": [
          {
            "code": "Annotation",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-annotation"
            ]
          }
        ]
      },
      {
        "id": "List.note.extension",
        "path": "List.note.extension",
        "min": 1
      },
      {
        "id": "List.note.extension:annotationType",
        "path": "List.note.extension",
        "sliceName": "annotationType",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/annotationType"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "List.note.extension:annotationType.value[x]",
        "path": "List.note.extension.value[x]",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.synapxe.sg/ValueSet/annotation-type"
        }
      },
      {
        "id": "List.entry",
        "path": "List.entry",
        "min": 1
      },
      {
        "id": "List.entry.id",
        "path": "List.entry.id",
        "max": "0"
      },
      {
        "id": "List.entry.extension",
        "path": "List.entry.extension",
        "max": "0"
      },
      {
        "id": "List.entry.modifierExtension",
        "path": "List.entry.modifierExtension",
        "max": "0"
      },
      {
        "id": "List.entry.flag",
        "path": "List.entry.flag",
        "max": "0"
      },
      {
        "id": "List.entry.deleted",
        "path": "List.entry.deleted",
        "max": "0"
      },
      {
        "id": "List.entry.date",
        "path": "List.entry.date",
        "min": 1
      },
      {
        "id": "List.entry.item",
        "path": "List.entry.item",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-medicationstatement"
            ],
            "aggregation": [
              "bundled"
            ]
          }
        ]
      },
      {
        "id": "List.emptyReason",
        "path": "List.emptyReason",
        "max": "0"
      }
    ]
  }
}