{
  "resourceType": "StructureDefinition",
  "url": "https://medico-emr.net/medico/r4/sd/ti/DocumentReference_KIMAttachment_1",
  "name": "DocumentReference_KIMAttachment_1",
  "status": "draft",
  "description": "A resource of this profile represents an document that was attached to a TI KIM message.\r\nThe references documents can be of many different format types. The most common ones are word, rtf, pdf, plain text, images as jpg or tiff.",
  "fhirVersion": "4.0.0",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "fhircomposition",
      "uri": "http://hl7.org/fhir/composition",
      "name": "FHIR Composition"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "xds",
      "uri": "http://ihe.net/xds",
      "name": "XDS metadata equivalent"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "DocumentReference",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentReference",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DocumentReference.meta",
        "path": "DocumentReference.meta"
      },
      {
        "id": "DocumentReference.meta.id",
        "path": "DocumentReference.meta.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.meta.versionId",
        "path": "DocumentReference.meta.versionId",
        "max": "0"
      },
      {
        "id": "DocumentReference.meta.lastUpdated",
        "path": "DocumentReference.meta.lastUpdated",
        "max": "0"
      },
      {
        "id": "DocumentReference.meta.source",
        "path": "DocumentReference.meta.source",
        "max": "0"
      },
      {
        "id": "DocumentReference.meta.profile",
        "path": "DocumentReference.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "https://medico-emr.net/medico/r4/sd/ti/DocumentReference_KIMAttachment_1"
      },
      {
        "id": "DocumentReference.meta.security",
        "path": "DocumentReference.meta.security",
        "max": "0"
      },
      {
        "id": "DocumentReference.meta.tag",
        "path": "DocumentReference.meta.tag",
        "max": "0"
      },
      {
        "id": "DocumentReference.implicitRules",
        "path": "DocumentReference.implicitRules",
        "max": "0"
      },
      {
        "id": "DocumentReference.language",
        "path": "DocumentReference.language",
        "max": "0"
      },
      {
        "id": "DocumentReference.text",
        "path": "DocumentReference.text",
        "max": "0"
      },
      {
        "id": "DocumentReference.masterIdentifier",
        "path": "DocumentReference.masterIdentifier",
        "max": "0"
      },
      {
        "id": "DocumentReference.identifier",
        "path": "DocumentReference.identifier",
        "max": "0"
      },
      {
        "id": "DocumentReference.docStatus",
        "path": "DocumentReference.docStatus",
        "max": "0"
      },
      {
        "id": "DocumentReference.type",
        "path": "DocumentReference.type",
        "max": "0"
      },
      {
        "id": "DocumentReference.category",
        "path": "DocumentReference.category",
        "max": "0"
      },
      {
        "id": "DocumentReference.subject",
        "path": "DocumentReference.subject",
        "max": "0"
      },
      {
        "id": "DocumentReference.author",
        "path": "DocumentReference.author",
        "max": "0"
      },
      {
        "id": "DocumentReference.authenticator",
        "path": "DocumentReference.authenticator",
        "max": "0"
      },
      {
        "id": "DocumentReference.custodian",
        "path": "DocumentReference.custodian",
        "max": "0"
      },
      {
        "id": "DocumentReference.description",
        "path": "DocumentReference.description",
        "max": "0"
      },
      {
        "id": "DocumentReference.securityLabel",
        "path": "DocumentReference.securityLabel",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.id",
        "path": "DocumentReference.content.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.id",
        "path": "DocumentReference.content.attachment.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.language",
        "path": "DocumentReference.content.attachment.language",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.size",
        "path": "DocumentReference.content.attachment.size",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.hash",
        "path": "DocumentReference.content.attachment.hash",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.title",
        "path": "DocumentReference.content.attachment.title",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.format",
        "path": "DocumentReference.content.format",
        "max": "0"
      },
      {
        "id": "DocumentReference.context",
        "path": "DocumentReference.context",
        "min": 1
      },
      {
        "id": "DocumentReference.context.id",
        "path": "DocumentReference.context.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.encounter",
        "path": "DocumentReference.context.encounter",
        "min": 1,
        "max": "1"
      },
      {
        "id": "DocumentReference.context.encounter.id",
        "path": "DocumentReference.context.encounter.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.encounter.reference",
        "path": "DocumentReference.context.encounter.reference",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.encounter.type",
        "path": "DocumentReference.context.encounter.type",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.encounter.identifier",
        "path": "DocumentReference.context.encounter.identifier",
        "min": 1
      },
      {
        "id": "DocumentReference.context.encounter.identifier.id",
        "path": "DocumentReference.context.encounter.identifier.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.encounter.identifier.use",
        "path": "DocumentReference.context.encounter.identifier.use",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.encounter.identifier.type",
        "path": "DocumentReference.context.encounter.identifier.type",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.encounter.identifier.system",
        "path": "DocumentReference.context.encounter.identifier.system",
        "definition": "The resulting value will be https://medico-emr.net/medico/%KUNDE%/sid1/*   \r\n - where * is the in code.code  - see below\r\n - and %KUNDE& is a tenant specific 2-3 character id\r\nfor automatic calculation the Code with the system \"https://medico-emr.net/medico/cs/customerdefinedsystem\" is used",
        "min": 1
      },
      {
        "id": "DocumentReference.context.encounter.identifier.value",
        "path": "DocumentReference.context.encounter.identifier.value",
        "definition": "medico's internal id for this type of medico resource\r\nThis value must be unique within medico - for a given value of \"system\"",
        "min": 1
      },
      {
        "id": "DocumentReference.context.encounter.identifier.period",
        "path": "DocumentReference.context.encounter.identifier.period",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.encounter.identifier.assigner",
        "path": "DocumentReference.context.encounter.identifier.assigner",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.encounter.display",
        "path": "DocumentReference.context.encounter.display",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.event",
        "path": "DocumentReference.context.event",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.period",
        "path": "DocumentReference.context.period",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.facilityType",
        "path": "DocumentReference.context.facilityType",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.practiceSetting",
        "path": "DocumentReference.context.practiceSetting",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.sourcePatientInfo",
        "path": "DocumentReference.context.sourcePatientInfo",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.related",
        "path": "DocumentReference.context.related",
        "max": "0"
      }
    ]
  }
}