{
  "resourceType": "StructureDefinition",
  "id": "c26d542f-2f19-4ee9-a4de-fc4c5c6863b3",
  "meta": {
    "lastUpdated": "2020-01-10T14:29:07.629+00:00"
  },
  "url": "http://digen.nublar.de/fhir/StructureDefinition/DigenDocumentReferenceAbstract",
  "name": "DigenDocumentReferenceAbstract",
  "status": "draft",
  "date": "2020-01-10T14:29:07.3896795+00:00",
  "fhirVersion": "3.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/w5",
      "name": "W5 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": true,
  "type": "DocumentReference",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentReference",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DocumentReference.meta",
        "path": "DocumentReference.meta"
      },
      {
        "id": "DocumentReference.meta.tag",
        "path": "DocumentReference.meta.tag",
        "max": "0"
      },
      {
        "id": "DocumentReference.implicitRules",
        "path": "DocumentReference.implicitRules",
        "max": "0"
      },
      {
        "id": "DocumentReference.masterIdentifier",
        "path": "DocumentReference.masterIdentifier",
        "short": "DocumentEntry.uniqeID",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.identifier",
        "path": "DocumentReference.identifier",
        "short": "DocumentEntry.entryUUID",
        "comment": "When the DocumentReference.identifier carries the entryUUID then the DocumentReference.identifier.use shall be ‘official’",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.status",
        "path": "DocumentReference.status",
        "short": "DocumentEntry.availabilityStatus",
        "definition": "approved -> status=current\r\ndeprecated -> status=superseded"
      },
      {
        "id": "DocumentReference.docStatus",
        "path": "DocumentReference.docStatus",
        "max": "0"
      },
      {
        "id": "DocumentReference.type",
        "path": "DocumentReference.type",
        "short": "DocumentEntry.typeCode",
        "definition": "typeCode (XDSDocumentEntry) A low-level classification of XDS Documents within a classCode that describes class, event, specialty, and setting.",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "description": "typeCode (XDSDocumentEntry) A low-level classification of XDS Documents within a classCode that describes class, event, specialty, and setting.",
          "valueSetUri": "http://ihe-d.de/ValueSets/IHEXDStypeCode"
        }
      },
      {
        "id": "DocumentReference.class",
        "path": "DocumentReference.class",
        "short": "DocumentEntry.classCode",
        "definition": "classCode (XDSDocumentEntry) A high-level classification of XDS Documents that indicates the kind of document, e.g., report, summary, note, consent.",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "description": "classCode (XDSDocumentEntry) A high-level classification of XDS Documents that indicates the kind of document, e.g., report, summary, note, consent.",
          "valueSetUri": "http://ihe-d.de/ValueSets/IHEXDSclassCode"
        }
      },
      {
        "id": "DocumentReference.subject",
        "path": "DocumentReference.subject",
        "short": "DocumentEntry.patientId",
        "comment": "Not a contained resource. URL Points to an existing Patient Resource representing the XDS Affinity Domain Patient.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient",
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.created",
        "path": "DocumentReference.created",
        "max": "0"
      },
      {
        "id": "DocumentReference.indexed",
        "path": "DocumentReference.indexed",
        "short": "DocumentEntry.creationTime",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.author",
        "path": "DocumentReference.author",
        "definition": "DocumentEntry.authorPerson, DocumentEntry.authorInstitution, (authorDevice)",
        "comment": "Contained resource of type Practitioner with: authorInstitution: Organization; authorPerson: Practitioner.identifier and Practitioner.name;  authorRole: Not supported in STU3; authorSpecialty: Practitioner.qualification; authorTelecommunication: Practitioner.telecom",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner",
            "aggregation": [
              "contained"
            ]
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization",
            "aggregation": [
              "contained"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.authenticator",
        "path": "DocumentReference.authenticator",
        "short": "DocumentEntry.legalAuthenticator",
        "comment": "Represents a participant within the author institution who has legally authenticated or attested the document. Legal authentication implies that a document has been signed manually or electronically by the legal Authenticator; Contained resource",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner",
            "aggregation": [
              "contained"
            ]
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization",
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.custodian",
        "path": "DocumentReference.custodian",
        "short": "DocumentEntry.homeCommunityId",
        "comment": "Contains the OID of the Home Community ID"
      },
      {
        "id": "DocumentReference.relatesTo",
        "path": "DocumentReference.relatesTo",
        "short": "DocumentEntry.Relationship",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.relatesTo.code",
        "path": "DocumentReference.relatesTo.code",
        "short": "DocumentEntry.RelationshipType",
        "definition": "The type of relationship that this document has with anther document. (replaces | transforms | signs | appends)"
      },
      {
        "id": "DocumentReference.relatesTo.target",
        "path": "DocumentReference.relatesTo.target",
        "short": "DocumentEntry.relationship"
      },
      {
        "id": "DocumentReference.description",
        "path": "DocumentReference.description",
        "short": "DocumentEntry.title"
      },
      {
        "id": "DocumentReference.securityLabel",
        "path": "DocumentReference.securityLabel",
        "short": "DocumentEntry.confidentialityCode",
        "comment": "Note: This is NOT the DocumentReference.meta, as that holds the meta tags for the DocumentReference itself.",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "description": "confidentialityCode (XDSDocumentEntry) The code specifying the level of confidentiality of an XDS Document.",
          "valueSetUri": "http://ihe-d.de/ValueSets/IHEXDSconfidentialityCode"
        }
      },
      {
        "id": "DocumentReference.content",
        "path": "DocumentReference.content",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment",
        "path": "DocumentReference.content.attachment",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment.contentType",
        "path": "DocumentReference.content.attachment.contentType",
        "short": "DocumentEntry.mimeType",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment.language",
        "path": "DocumentReference.content.attachment.language",
        "short": "DocumentEntry.languageCode",
        "example": [
          {
            "label": "General",
            "valueCode": "de-DE"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment.data",
        "path": "DocumentReference.content.attachment.data",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.url",
        "path": "DocumentReference.content.attachment.url",
        "definition": "DocumentEntry: retrievable location of the document",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment.size",
        "path": "DocumentReference.content.attachment.size",
        "short": "DocumentEntry.size",
        "definition": "The size is calculated on the data prior to base64 encoding, if the data is base64 encoded."
      },
      {
        "id": "DocumentReference.content.attachment.hash",
        "path": "DocumentReference.content.attachment.hash",
        "short": "DocumentEntry.hash",
        "definition": "The IHE Document Sharing metadata element hash holds the SHA1 hash of the document. The hash is encoded in FHIR in base64Binary, whereas in XDS hexbinary is used. The hash is calculated on the data prior to base64 encoding, if the data is base64 encoded."
      },
      {
        "id": "DocumentReference.content.attachment.title",
        "path": "DocumentReference.content.attachment.title",
        "short": "DocumentEntry.comments"
      },
      {
        "id": "DocumentReference.content.attachment.creation",
        "path": "DocumentReference.content.attachment.creation",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.format",
        "path": "DocumentReference.content.format",
        "definition": "formatCode (XDSDocumentEntry) Globally unique code specifying the format of an XDS Document. Along with the typeCode, it should provide sufficient information to allow a potential consumer to know if it will be able to process the document.",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "description": "formatCode (XDSDocumentEntry) Globally unique code specifying the format of an XDS Document. Along with the typeCode, it should provide sufficient information to allow a potential consumer to know if it will be able to process the document.",
          "valueSetUri": "http://ihe-d.de/ValueSets/IHEXDSformatCodeDE"
        }
      },
      {
        "id": "DocumentReference.context",
        "path": "DocumentReference.context",
        "short": "DocumentEntry.referenceIdList",
        "definition": "When referenceIdList contains an encounter, and a FHIR Encounter is available, it may be referenced."
      },
      {
        "id": "DocumentReference.context.event",
        "path": "DocumentReference.context.event",
        "short": "DocumentEntry.eventCodeList",
        "definition": "This list of codes represents the main clinical acts being documented in an XDS Document.",
        "binding": {
          "strength": "preferred",
          "valueSetUri": "http://ihe-d.de/ValueSets/IHEXDSeventCodeList"
        }
      },
      {
        "id": "DocumentReference.context.period.start",
        "path": "DocumentReference.context.period.start",
        "short": "DocumentEntry.serviceStartTime"
      },
      {
        "id": "DocumentReference.context.period.end",
        "path": "DocumentReference.context.period.end",
        "short": "DocumentEntry.serviceStopTime"
      },
      {
        "id": "DocumentReference.context.facilityType",
        "path": "DocumentReference.context.facilityType",
        "short": "DocumentEntry.healthcareFacilityTypeCode",
        "definition": "This code for an XDS Document represents the type of organizational setting of the clinical encounter during which the documented act occurred.",
        "binding": {
          "strength": "preferred",
          "valueSetUri": "http://ihe-d.de/ValueSets/IHEXDShealthcareFacilityTypeCode"
        }
      },
      {
        "id": "DocumentReference.context.practiceSetting",
        "path": "DocumentReference.context.practiceSetting",
        "short": "DocumentEntry.practiceSettingCode",
        "definition": "The code for an XDS Document that specifies the clinical specialty where the act that resulted in the document was performed (e.g., Family Practice, Laboratory, Radiology).",
        "binding": {
          "strength": "preferred",
          "valueSetUri": "http://ihe-d.de/ValueSets/IHEXDSpracticeSettingCode"
        }
      },
      {
        "id": "DocumentReference.context.sourcePatientInfo",
        "path": "DocumentReference.context.sourcePatientInfo",
        "short": "DocumentEntry.sourcePatientId",
        "comment": "Contained Patient resource with Patient.identifier.use element set to ‘usual’.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient",
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.context.related.identifier",
        "path": "DocumentReference.context.related.identifier",
        "short": "DocumentEntry.referenceIdList"
      },
      {
        "id": "DocumentReference.context.related.ref",
        "path": "DocumentReference.context.related.ref",
        "short": "DocumentEntry.referenceIdList"
      }
    ]
  }
}