{
  "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.extension:cmisAvailability",
        "path": "List.extension",
        "sliceName": "cmisAvailability",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/ext-cmis-availability"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "List.extension:resourceDerivationReference",
        "path": "List.extension",
        "sliceName": "resourceDerivationReference",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/derivation-reference"
            ]
          }
        ]
      },
      {
        "id": "List.identifier",
        "path": "List.identifier",
        "definition": "Unique list identifier for the patient medication list.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-identifier-record-id"
            ]
          }
        ]
      },
      {
        "id": "List.status",
        "path": "List.status",
        "definition": "Status of the patient medication list."
      },
      {
        "id": "List.mode",
        "path": "List.mode",
        "patternCode": "working"
      },
      {
        "id": "List.title",
        "path": "List.title",
        "max": "0"
      },
      {
        "id": "List.code",
        "path": "List.code",
        "definition": "Type of this list.",
        "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.encounter.identifier",
        "path": "List.encounter.identifier",
        "definition": "Identifier of the encounter."
      },
      {
        "id": "List.date",
        "path": "List.date",
        "definition": "Date and time at which the patient medication list was reviewed.",
        "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",
        "definition": "Source or sources of information used to create or update the patient medication list.",
        "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": "*",
        "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.note.text",
        "path": "List.note.text",
        "definition": "Carries these NEHR XML elements of putPatientMedicationList:\n\n- `list/notesforPatient`: Notes entered for the patient to note during the patient medication list review.\n- `list/notesforHCP/comments`: Notes entered for other healthcare professionals to note.\n- `list/notesforHCP/medicationManagementIssues`: Patient medication-management issues identified during the review.\n- `list/notesforHCP/interventions`: Interventions performed to address medication-management issues.\n- `list/notesforHCP/assessmentOfMedicationKnowledge`: Healthcare professional assessment of the patient's medication knowledge.\n- `list/notesforHCP/monitoringPlan`: Monitoring plan created for the patient based on issues identified during review."
      },
      {
        "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",
        "definition": "Date and time when this item was added to the list.",
        "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"
      }
    ]
  }
}