{
  "resourceType": "StructureDefinition",
  "id": "mp-ProposalMedicationAgreement-Bundle",
  "url": "http://nictiz.nl/fhir/StructureDefinition/mp-ProposalMedicationAgreement-Bundle",
  "version": "2.0.0-rc.7",
  "name": "MpProposalMedicationAgreementBundle",
  "title": "mp ProposalMedicationAgreement Bundle",
  "status": "active",
  "publisher": "Nictiz",
  "contact": [
    {
      "name": "Nictiz",
      "telecom": [
        {
          "system": "url",
          "value": "https://www.nictiz.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "The proposal medication agreement is a proposal by a healthcare professional or the patient to the prescriber regarding the prescribing of medication. The proposal may involve stopping, starting, changing or continuing medication.",
  "purpose": "To define the body of the Send ProposalMedicationAgreement transaction.",
  "copyright": "Copyright and related rights waived via CC0, https://creativecommons.org/publicdomain/zero/1.0/. This does not apply to information from third parties, for example a medical terminology system. The implementer alone is responsible for identifying and obtaining any necessary licenses or authorizations to utilize third party IP in connection with the specification or otherwise.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "mp-dataset-mp9-300-rc1-20250522",
      "uri": "https://decor.nictiz.nl/pub/medicatieproces/mp-html-20250522T132618/ds-2.16.840.1.113883.2.4.3.11.60.20.77.1.4-2022-06-30T000000.html",
      "name": "ART-DECOR Dataset MP9 3.0.0-rc.1 20250522"
    },
    {
      "identity": "mp-dataset-mp9-300-rc2-20260213",
      "uri": "https://decor.nictiz.nl/pub/medicatieproces/mp-html-20260213T112547/ds-2.16.840.1.113883.2.4.3.11.60.20.77.1.4-2022-06-30T000000.html",
      "name": "ART-DECOR Dataset MP9 3.0.0-rc.2 20260213"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "fixedCode": "transaction"
      },
      {
        "id": "Bundle.identifier",
        "path": "Bundle.identifier",
        "short": "ProposalIdentification",
        "definition": "The identification of the proposal (transaction). This identification is generated by the system of the person who registers the proposal and is globally unique and eternally persistent.",
        "comment": "Leading identifier for the proposal transaction. For backwards compatibility, the same identification is also allowed (and mapped) on Bundle.entry:proposalMedicationAgreement.resource.identifier, but implementers SHOULD prefer Bundle.identifier.",
        "min": 1,
        "max": "1",
        "mapping": [
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-528",
            "comment": "Identification"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-528",
            "comment": "Identification"
          }
        ]
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "resource"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Bundle.entry:proposalMedicationAgreement",
        "path": "Bundle.entry",
        "sliceName": "proposalMedicationAgreement",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:proposalMedicationAgreement.resource",
        "path": "Bundle.entry.resource",
        "short": "Proposal",
        "definition": "Data of the proposal medication agreement.",
        "alias": [
          "Voorstel"
        ],
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://nictiz.nl/fhir/StructureDefinition/mp-MedicationAgreement"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-527",
            "comment": "Proposal"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-527",
            "comment": "Proposal"
          }
        ]
      },
      {
        "id": "Bundle.entry:proposalMedicationAgreement.resource.meta",
        "path": "Bundle.entry.resource.meta"
      },
      {
        "id": "Bundle.entry:proposalMedicationAgreement.resource.meta.tag",
        "path": "Bundle.entry.resource.meta.tag",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Bundle.entry:proposalMedicationAgreement.resource.meta.tag:actionable",
        "path": "Bundle.entry.resource.meta.tag",
        "sliceName": "actionable",
        "min": 1,
        "max": "1",
        "patternCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/common-tags",
          "code": "actionable"
        }
      },
      {
        "id": "Bundle.entry:proposalMedicationAgreement.resource.extension:proposalComment",
        "path": "Bundle.entry.resource.extension",
        "sliceName": "proposalComment",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://nictiz.nl/fhir/StructureDefinition/ext-Comment"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:proposalMedicationAgreement.resource.extension:proposalComment.value[x]",
        "path": "Bundle.entry.resource.extension.value[x]",
        "short": "Comment",
        "definition": "Comments regarding the proposal.",
        "alias": [
          "Toelichting"
        ],
        "mapping": [
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-538",
            "comment": "Comment"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-538",
            "comment": "Comment"
          }
        ]
      },
      {
        "id": "Bundle.entry:proposalMedicationAgreement.resource.identifier",
        "path": "Bundle.entry.resource.identifier",
        "definition": "The identification of the proposal. This identification is generated by the system of the person who registers the proposal and is globally unique and eternally persistent.",
        "comment": "Backwards compatibility: historically this identifier carried the proposal identification. Going forward, implementers SHOULD use Bundle.identifier as the leading identifier for the proposal transaction. Systems MAY populate both with the same value during transition.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-528",
            "comment": "Identification"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-528",
            "comment": "Identification"
          }
        ]
      },
      {
        "id": "Bundle.entry:proposalMedicationAgreement.resource.intent",
        "path": "Bundle.entry.resource.intent",
        "comment": "Set to _plan_ because this Proposal Medication Agreement is intended to be acted upon by a patient, pharmacist, professional administrator et cetera.",
        "fixedCode": "plan"
      },
      {
        "id": "Bundle.entry:proposalMedicationAgreement.resource.authoredOn",
        "path": "Bundle.entry.resource.authoredOn",
        "short": "ProposalDate",
        "definition": "Date of the proposal.",
        "comment": "The MedicationAgreementDateTime does not exist within the proposal. The fact that it is overwritten by the ProposalDate here, therefore does not cause any issues.",
        "alias": [
          "VoorstelDatum"
        ],
        "min": 1,
        "mapping": [
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-529",
            "comment": "ProposalDate"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-529",
            "comment": "ProposalDate"
          }
        ]
      },
      {
        "id": "Bundle.entry:proposalMedicationAgreement.resource.requester",
        "path": "Bundle.entry.resource.requester",
        "short": "Author",
        "definition": "Author of the proposal.",
        "comment": "The Prescriber (of the MedicationAgreement building block, mp-dataelement9x-44) does not exist within the proposal. The fact that it is overwritten by the Author (of the proposal) here, therefore does not cause any issues.",
        "alias": [
          "Auteur"
        ],
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
              "http://hl7.org/fhir/StructureDefinition/Device",
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole",
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-Patient",
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthcareProvider-Organization"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-530",
            "comment": "Author"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-530",
            "comment": "Author"
          },
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-531",
            "comment": "AuthorIsPatient (implicit; AuthorIsPatient = true when this element refers to the same Patient as subject)"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-531",
            "comment": "AuthorIsPatient (implicit; AuthorIsPatient = true when this element refers to the same Patient as subject)"
          },
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-532",
            "comment": "AuthorIsHealthProfessional"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-532",
            "comment": "AuthorIsHealthProfessional"
          },
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-1366",
            "comment": "AuthorIsHealthcareProvider"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-1366",
            "comment": "AuthorIsHealthcareProvider"
          }
        ]
      },
      {
        "id": "Bundle.entry:patient",
        "path": "Bundle.entry",
        "sliceName": "patient",
        "max": "1"
      },
      {
        "id": "Bundle.entry:patient.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-Patient"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-1",
            "comment": "Patient"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-1",
            "comment": "Patient"
          }
        ]
      },
      {
        "id": "Bundle.entry:pharmaceuticalProduct",
        "path": "Bundle.entry",
        "sliceName": "pharmaceuticalProduct"
      },
      {
        "id": "Bundle.entry:pharmaceuticalProduct.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://nictiz.nl/fhir/StructureDefinition/mp-PharmaceuticalProduct"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-260",
            "comment": "PharmaceuticalProduct"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-260",
            "comment": "PharmaceuticalProduct"
          }
        ]
      },
      {
        "id": "Bundle.entry:healthProfessional-PractitionerRole",
        "path": "Bundle.entry",
        "sliceName": "healthProfessional-PractitionerRole"
      },
      {
        "id": "Bundle.entry:healthProfessional-PractitionerRole.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:healthProfessional-Practitioner",
        "path": "Bundle.entry",
        "sliceName": "healthProfessional-Practitioner"
      },
      {
        "id": "Bundle.entry:healthProfessional-Practitioner.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-Practitioner"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:healthcareProvider",
        "path": "Bundle.entry",
        "sliceName": "healthcareProvider"
      },
      {
        "id": "Bundle.entry:healthcareProvider.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthcareProvider"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:healthcareProvider-Organization",
        "path": "Bundle.entry",
        "sliceName": "healthcareProvider-Organization"
      },
      {
        "id": "Bundle.entry:healthcareProvider-Organization.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthcareProvider-Organization"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:bodyHeight",
        "path": "Bundle.entry",
        "sliceName": "bodyHeight",
        "max": "1"
      },
      {
        "id": "Bundle.entry:bodyHeight.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-BodyHeight"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-448",
            "comment": "BodyHeight"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-448",
            "comment": "BodyHeight"
          }
        ]
      },
      {
        "id": "Bundle.entry:bodyWeight",
        "path": "Bundle.entry",
        "sliceName": "bodyWeight",
        "max": "1"
      },
      {
        "id": "Bundle.entry:bodyWeight.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-BodyWeight"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "mp-dataset-mp9-300-rc1-20250522",
            "map": "mp-dataelement9x-453",
            "comment": "BodyWeight"
          },
          {
            "identity": "mp-dataset-mp9-300-rc2-20260213",
            "map": "mp-dataelement9x-453",
            "comment": "BodyWeight"
          }
        ]
      }
    ]
  }
}