<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="cio-RegistrationInformation" />
  <url value="http://nictiz.nl/fhir/StructureDefinition/cio-RegistrationInformation" />
  <version value="1.0.0-beta.5" />
  <name value="CioRegistrationInformation" />
  <title value="cio RegistrationInformation" />
  <status value="draft" />
  <publisher value="Nictiz" />
  <contact>
    <name value="Nictiz" />
    <telecom>
      <system value="url" />
      <value value="https://www.nictiz.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="Registration information contains the information that originates during the registration process of data in the patient record, such as, for instance, when and by whom the information was registered." />
  <purpose value="This Provenance resource mostly represents several concepts within the RegistrationInformation building block for implementations following the information standard [CiO](https://informatiestandaarden.nictiz.nl/wiki/Landingspagina_Contra-indicaties_en_Overgevoeligheden), but is also used for some concepts present in the other building blocks within CiO. This profile is largely based on the Dutch zib ('Zorginformatiebouwsteen', i.e. Health and Care Information Model) RegistrationData that is part of the 2024 prepublication. Therefore it has no dependency on a corresponding nl-core profile and mappings to zib concepts are not defined. Instead mappings to the CiO data set have been added. Note that there are minor conceptual differences between the zib RegistrationData and the RegistrationInformation building block in the CiO data set. It is the intention to replace this profile by a more general nl-core profile in the future." />
  <copyright value="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 value="4.0.1" />
  <mapping>
    <identity value="cio-dataset-200-beta2-20231214" />
    <uri value="https://decor.nictiz.nl/pub/cio/cio-html-20231214T100742/ds-2.16.840.1.113883.2.4.3.11.60.26.1.2-2020-04-02T000000.html" />
    <name value="ART-DECOR Dataset Contraindications and hypersensitivities 2.0.0-beta.2 20231214" />
  </mapping>
  <mapping>
    <identity value="cio-dataset-200-beta3-20241023" />
    <uri value="https://decor.nictiz.nl/pub/cio/cio-html-20241023T071643/ds-2.16.840.1.113883.2.4.3.11.60.26.1.2-2020-04-02T000000.html" />
    <name value="ART-DECOR Dataset Contraindications and hypersensitivities 2.0.0-beta.3 20241023" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Provenance" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Provenance" />
  <derivation value="constraint" />
  <differential>
    <element id="Provenance">
      <path value="Provenance" />
      <short value="RegistrationInformation" />
      <comment value="Many other FHIR resources contain some elements that represent information about how the resource was obtained, and therefore they overlap with the functionality of the Provenance resource. Examples of such elements are `AllergyIntolerance.recordedDate` and `Flag.author`, which overlap with `.recorded` and `.agent` in this resource, respectively. These elements in other resources should always be used in preference to the Provenance resource. This means that, if a concept from the functional data model is mapped to an element in the Provenance resource, as well as an element in another resource, the information on that concept SHALL be included in the other resource, and MAY be added to the Provenance resource (the obvious exception being an element that is mandatory in the Provenance resource, such as `.recorded`; in that case the latter conformance changes to a SHALL as well).&#xD;&#xA;&#xD;&#xA;Note that the IdentificationNumber concept (cio-dataelement-20-780) is part of the RegistrationInformation building block, but is not mapped within this profile. Instead it is mapped to `Resource.identifier` in the profiles referenced by `.target`." />
      <alias value="RegistratieInformatie" />
      <constraint>
        <key value="cio-RegistrationInformation-1" />
        <severity value="error" />
        <human value="If the Provenance is related to a non-proposal medication contraindication or surveillance decision, Provenance.agent:performer SHALL exist." />
        <expression value="((target.resolve().conformsTo('http://nictiz.nl/fhir/StructureDefinition/cio-MedicationContraIndication') and target.resolve().meta.tag.where(system = 'http://terminology.hl7.org/CodeSystem/common-tags' and code = 'actionable').exists().not()) or target.resolve().conformsTo('http://nictiz.nl/fhir/StructureDefinition/cio-SurveillanceDecision')) implies agent.type.coding.where($this.system = 'http://terminology.hl7.org/CodeSystem/provenance-participant-type' and $this.code = 'performer').exists()" />
      </constraint>
      <constraint>
        <key value="cio-RegistrationInformation-2" />
        <severity value="error" />
        <human value="If the Provenance is related to a (reply) proposal medication contraindication, Provenance.agent:author SHALL exist." />
        <expression value="((target.resolve().conformsTo('http://nictiz.nl/fhir/StructureDefinition/cio-MedicationContraIndication') and target.resolve().meta.tag.where(system = 'http://terminology.hl7.org/CodeSystem/common-tags' and code = 'actionable').exists()) or target.resolve().conformsTo('http://nictiz.nl/fhir/StructureDefinition/cio-ReplyProposalContraIndication')) implies agent.type.coding.where($this.system = 'http://terminology.hl7.org/CodeSystem/provenance-participant-type' and $this.code = 'author').exists()" />
      </constraint>
      <mapping>
        <identity value="cio-dataset-200-beta2-20231214" />
        <map value="cio-dataelement-20-779" />
        <comment value="RegistrationData [DEPRECATED]" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-779" />
        <comment value="RegistrationInformation" />
      </mapping>
    </element>
    <element id="Provenance.target">
      <path value="Provenance.target" />
      <comment value="Please note that on a functional level, the building blocks MedicationContraIndication, SurveillanceDecision, HypersensitivityIntolerance, Reaction, Symptom and Condition reference the building block RegistrationInformation, but in FHIR this direction is reversed." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/cio-MedicationContraIndication" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/cio-SurveillanceDecision" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/cio-HypersensitivityIntolerance" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/cio-Reaction" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/cio-Symptom" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/cio-Condition" />
      </type>
      <condition value="cio-RegistrationInformation-1" />
      <condition value="cio-RegistrationInformation-2" />
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-883" />
        <comment value="Reversed reference for MedicationContraIndication.RegistrationInformation" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-822" />
        <comment value="Reversed reference for SurveillanceDecision.RegistrationInformation" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-798" />
        <comment value="Reversed reference for HypersensitivityIntolerance.RegistrationInformation" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-819" />
        <comment value="Reversed reference for Reaction.RegistrationInformation" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-934" />
        <comment value="Reversed reference for Symptom.RegistrationInformation" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-920" />
        <comment value="Reversed reference for Condition.RegistrationInformation" />
      </mapping>
    </element>
    <element id="Provenance.occurred[x]">
      <path value="Provenance.occurred[x]" />
      <mapping>
        <identity value="cio-dataset-200-beta2-20231214" />
        <map value="cio-dataelement-20-756" />
        <comment value="DecisionDateTime [DEPRECATED]" />
      </mapping>
    </element>
    <element id="Provenance.recorded">
      <path value="Provenance.recorded" />
      <short value="CreationDateTime" />
      <definition value="Date and time when the information about the patient was registered." />
      <alias value="OntstaansDatumTijd" />
      <mapping>
        <identity value="cio-dataset-200-beta2-20231214" />
        <map value="cio-dataelement-20-783" />
        <comment value="RegistrationDateTime [DEPRECATED]" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-783" />
        <comment value="CreationDateTime" />
      </mapping>
    </element>
    <element id="Provenance.agent">
      <path value="Provenance.agent" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="type" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Provenance.agent:author">
      <path value="Provenance.agent" />
      <sliceName value="author" />
      <max value="1" />
      <condition value="cio-RegistrationInformation-2" />
    </element>
    <element id="Provenance.agent:author.type">
      <path value="Provenance.agent.type" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/provenance-participant-type" />
          <code value="author" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Provenance.agent:author.who">
      <path value="Provenance.agent.who" />
      <short value="Author" />
      <definition value="The person who has registered or had someone else register the information in the patient record." />
      <alias value="Auteur" />
      <type>
        <code value="Reference" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/pattern-NlCoreHealthProfessionalReference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole" />
      </type>
      <condition value="cio-RegistrationInformation-2" />
      <mapping>
        <identity value="cio-dataset-200-beta2-20231214" />
        <map value="cio-dataelement-20-781" />
        <comment value="Author [DEPRECATED]" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-781" />
        <comment value="Author" />
      </mapping>
    </element>
    <element id="Provenance.agent:informationSource">
      <path value="Provenance.agent" />
      <sliceName value="informationSource" />
      <max value="1" />
    </element>
    <element id="Provenance.agent:informationSource.type">
      <path value="Provenance.agent.type" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/provenance-participant-type" />
          <code value="informant" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Provenance.agent:informationSource.who">
      <path value="Provenance.agent.who" />
      <short value="InformationSource" />
      <definition value="If the recorded information has not been assessed by the attending physician, the source of the information can be recorded." />
      <alias value="Informatiebron" />
      <type>
        <code value="Reference" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/pattern-NlCoreHealthProfessionalReference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-Patient" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-ContactPerson" />
      </type>
      <mapping>
        <identity value="cio-dataset-200-beta2-20231214" />
        <map value="cio-dataelement-20-784" />
        <comment value="InformationSource" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-784" />
        <comment value="InformationSource" />
      </mapping>
    </element>
    <element id="Provenance.agent:performer">
      <path value="Provenance.agent" />
      <sliceName value="performer" />
      <max value="1" />
      <condition value="cio-RegistrationInformation-1" />
    </element>
    <element id="Provenance.agent:performer.type">
      <path value="Provenance.agent.type" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/provenance-participant-type" />
          <code value="performer" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Provenance.agent:performer.who">
      <path value="Provenance.agent.who" />
      <short value="DecisionMaker" />
      <definition value="The person that carried out the activity, for instance:&#xD;&#xA;* The health professional who is responsible for setting the alert.&#xD;&#xA;* The health professional who made the surveillance decision." />
      <alias value="Beslisser" />
      <alias value="Vaststeller" />
      <type>
        <code value="Reference" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/pattern-NlCoreHealthProfessionalReference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole" />
      </type>
      <condition value="cio-RegistrationInformation-1" />
      <mapping>
        <identity value="cio-dataset-200-beta2-20231214" />
        <map value="cio-dataelement-20-776" />
        <comment value="DecisionMaker [DEPRECATED]" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-776" />
        <comment value="DecisionMaker" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta2-20231214" />
        <map value="cio-dataelement-20-763" />
        <comment value="DecisionMaker [DEPRECATED]" />
      </mapping>
      <mapping>
        <identity value="cio-dataset-200-beta3-20241023" />
        <map value="cio-dataelement-20-763" />
        <comment value="DecisionMaker" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>