{
  "resourceType": "StructureDefinition",
  "url": "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Provenance_Metadata",
  "version": "1.0.0",
  "name": "KBV_PR_MIO_PS_Provenance_Metadata",
  "status": "draft",
  "publisher": "Kassenärztliche Bundesvereinigung (KBV)",
  "description": "Dieses Profil bildet die Herkunft-Metadaten ab.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w3c.prov",
      "uri": "http://www.w3.org/ns/prov",
      "name": "W3C PROV"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "fhirauditevent",
      "uri": "http://hl7.org/fhir/auditevent",
      "name": "FHIR AuditEvent Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Provenance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Provenance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Provenance.meta",
        "path": "Provenance.meta",
        "min": 1
      },
      {
        "id": "Provenance.meta.versionId",
        "path": "Provenance.meta.versionId",
        "max": "0"
      },
      {
        "id": "Provenance.meta.lastUpdated",
        "path": "Provenance.meta.lastUpdated",
        "max": "0"
      },
      {
        "id": "Provenance.meta.source",
        "path": "Provenance.meta.source",
        "max": "0"
      },
      {
        "id": "Provenance.meta.profile",
        "path": "Provenance.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Provenance_Metadata|1.0.0"
      },
      {
        "id": "Provenance.meta.security",
        "path": "Provenance.meta.security",
        "max": "0"
      },
      {
        "id": "Provenance.meta.tag",
        "path": "Provenance.meta.tag",
        "max": "0"
      },
      {
        "id": "Provenance.implicitRules",
        "path": "Provenance.implicitRules",
        "max": "0"
      },
      {
        "id": "Provenance.language",
        "path": "Provenance.language",
        "max": "0"
      },
      {
        "id": "Provenance.contained",
        "path": "Provenance.contained",
        "max": "0"
      },
      {
        "id": "Provenance.target",
        "path": "Provenance.target",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Medication_Statement_Administration_Instruction|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Allergy_Intolerance_Immunization|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Allergy_Intolerance_Medication|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Allergy_Intolerance_Environment|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Allergy_Intolerance_Food|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Allergy_Intolerance_Free|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Care_Plan_Free|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Condition_Disability_Free|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Consent_Advance_Directive_Free|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Consent_Advance_Directive_Health_Care_Proxy|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Consent_Advance_Directive_Organ_Donation_Statement|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Consent_Advance_Directive_Living_Will|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Device_Use_Statement_Implant|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Diagnostic_Report_Current_Pregnancy|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Episode_Of_Care_Problem|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Immunization_Free|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Diagnostic_Report_Previous_Pregnancies|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Diagnostic_Report_Result|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Immunization_Vaccination_Record|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Observation_Blood_Pressure|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Observation_Body_Height|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Observation_Body_Temperature|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Observation_Body_Weight|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Observation_Care_Level|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Observation_Functional_Assessment_Free|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Observation_Head_Circumference|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Observation_Heart_Rate|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Observation_Life_Style_Factor_Free|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Observation_Peripheral_Oxygen_Saturation|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Observation_Respiratory_Rate|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Procedure_EHDSI|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Procedure_Free|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Procedure_OPS|1.0.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Provenance.target.reference",
        "path": "Provenance.target.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Provenance.target.type",
        "path": "Provenance.target.type",
        "max": "0"
      },
      {
        "id": "Provenance.target.identifier",
        "path": "Provenance.target.identifier",
        "max": "0"
      },
      {
        "id": "Provenance.target.display",
        "path": "Provenance.target.display",
        "max": "0"
      },
      {
        "id": "Provenance.occurred[x]",
        "path": "Provenance.occurred[x]",
        "max": "0"
      },
      {
        "id": "Provenance.recorded",
        "path": "Provenance.recorded",
        "mustSupport": true
      },
      {
        "id": "Provenance.policy",
        "path": "Provenance.policy",
        "max": "0"
      },
      {
        "id": "Provenance.location",
        "path": "Provenance.location",
        "max": "0"
      },
      {
        "id": "Provenance.reason",
        "path": "Provenance.reason",
        "max": "0"
      },
      {
        "id": "Provenance.activity",
        "path": "Provenance.activity",
        "mustSupport": true
      },
      {
        "id": "Provenance.activity.coding",
        "path": "Provenance.activity.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.kbv.de/ValueSet/KBV_VS_MIO_PS_Information_gathering"
        }
      },
      {
        "id": "Provenance.activity.coding.system",
        "path": "Provenance.activity.coding.system",
        "min": 1
      },
      {
        "id": "Provenance.activity.coding.version",
        "path": "Provenance.activity.coding.version",
        "min": 1
      },
      {
        "id": "Provenance.activity.coding.code",
        "path": "Provenance.activity.coding.code",
        "min": 1
      },
      {
        "id": "Provenance.activity.coding.display",
        "path": "Provenance.activity.coding.display",
        "min": 1
      },
      {
        "id": "Provenance.activity.coding.display.extension",
        "path": "Provenance.activity.coding.display.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Provenance.activity.coding.display.extension:anzeigenameActivity",
        "path": "Provenance.activity.coding.display.extension",
        "sliceName": "anzeigenameActivity",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Terminology_German"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Provenance.activity.coding.display.extension:anzeigenameActivity.extension",
        "path": "Provenance.activity.coding.display.extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Provenance.activity.coding.display.extension:anzeigenameActivity.extension:content",
        "path": "Provenance.activity.coding.display.extension.extension",
        "sliceName": "content",
        "mustSupport": true
      },
      {
        "id": "Provenance.activity.coding.display.extension:anzeigenameActivity.extension:content.value[x]",
        "path": "Provenance.activity.coding.display.extension.extension.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "closed"
        },
        "mustSupport": true
      },
      {
        "id": "Provenance.activity.coding.display.extension:anzeigenameActivity.extension:content.value[x]:valueString",
        "path": "Provenance.activity.coding.display.extension.extension.valueString",
        "sliceName": "valueString",
        "definition": "In diesem Attribut sollen die entsprechende deutsche Bezeichnung des Loinc oder Snomed-Codes aus der Conceptmap eingetragen werden, also in diesem Fall den Displaynamen des Targetsystems aus https://fhir.kbv.de/ConceptMap/KBV_CM_MIO_PS_Information_gathering_German|1.0.0",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Provenance.activity.coding.userSelected",
        "path": "Provenance.activity.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Provenance.activity.text",
        "path": "Provenance.activity.text",
        "max": "0"
      },
      {
        "id": "Provenance.agent",
        "path": "Provenance.agent",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Provenance.agent.type",
        "path": "Provenance.agent.type",
        "max": "0"
      },
      {
        "id": "Provenance.agent.role",
        "path": "Provenance.agent.role",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Provenance.agent.role.coding",
        "path": "Provenance.agent.role.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Provenance.agent.role.coding.system",
        "path": "Provenance.agent.role.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/contractsignertypecodes"
      },
      {
        "id": "Provenance.agent.role.coding.version",
        "path": "Provenance.agent.role.coding.version",
        "min": 1,
        "fixedString": "4.0.1"
      },
      {
        "id": "Provenance.agent.role.coding.code",
        "path": "Provenance.agent.role.coding.code",
        "min": 1,
        "fixedCode": "PRIMAUTH"
      },
      {
        "id": "Provenance.agent.role.coding.display",
        "path": "Provenance.agent.role.coding.display",
        "min": 1,
        "fixedString": "Primary Author"
      },
      {
        "id": "Provenance.agent.role.coding.userSelected",
        "path": "Provenance.agent.role.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Provenance.agent.role.text",
        "path": "Provenance.agent.role.text",
        "max": "0"
      },
      {
        "id": "Provenance.agent.who",
        "path": "Provenance.agent.who",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Practitioner|1.0.0",
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Practitioner_Role|1.0.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Provenance.agent.who.reference",
        "path": "Provenance.agent.who.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Provenance.agent.who.type",
        "path": "Provenance.agent.who.type",
        "max": "0"
      },
      {
        "id": "Provenance.agent.who.identifier",
        "path": "Provenance.agent.who.identifier",
        "max": "0"
      },
      {
        "id": "Provenance.agent.who.display",
        "path": "Provenance.agent.who.display",
        "max": "0"
      },
      {
        "id": "Provenance.agent.onBehalfOf",
        "path": "Provenance.agent.onBehalfOf",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Patient|1.0.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Provenance.agent.onBehalfOf.reference",
        "path": "Provenance.agent.onBehalfOf.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Provenance.agent.onBehalfOf.type",
        "path": "Provenance.agent.onBehalfOf.type",
        "max": "0"
      },
      {
        "id": "Provenance.agent.onBehalfOf.identifier",
        "path": "Provenance.agent.onBehalfOf.identifier",
        "max": "0"
      },
      {
        "id": "Provenance.agent.onBehalfOf.display",
        "path": "Provenance.agent.onBehalfOf.display",
        "max": "0"
      },
      {
        "id": "Provenance.entity",
        "path": "Provenance.entity",
        "mustSupport": true
      },
      {
        "id": "Provenance.entity.role",
        "path": "Provenance.entity.role",
        "fixedCode": "source",
        "mustSupport": true
      },
      {
        "id": "Provenance.entity.what",
        "path": "Provenance.entity.what",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.kbv.de/StructureDefinition/KBV_PR_MIO_PS_Document_Reference_ePa_Reference|1.0.0"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Provenance.entity.what.reference",
        "path": "Provenance.entity.what.reference",
        "mustSupport": true
      },
      {
        "id": "Provenance.entity.what.type",
        "path": "Provenance.entity.what.type",
        "max": "0"
      },
      {
        "id": "Provenance.entity.what.identifier",
        "path": "Provenance.entity.what.identifier",
        "max": "0"
      },
      {
        "id": "Provenance.entity.what.display",
        "path": "Provenance.entity.what.display",
        "mustSupport": true
      },
      {
        "id": "Provenance.entity.agent",
        "path": "Provenance.entity.agent",
        "max": "0"
      },
      {
        "id": "Provenance.signature",
        "path": "Provenance.signature",
        "max": "0"
      }
    ]
  }
}