{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2019-02-01T19:01:57.218+00:00"
  },
  "url": "https://api-careconnect.healthbc.org/fhir/StructureDefinition/DocumentReference",
  "name": "DocumentReference",
  "status": "draft",
  "date": "2019-02-01T19:01:56.30858+00:00",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "DocumentReference",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentReference",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DocumentReference.masterIdentifier",
        "path": "DocumentReference.masterIdentifier",
        "max": "0"
      },
      {
        "id": "DocumentReference.identifier",
        "path": "DocumentReference.identifier",
        "requirements": "This is the business identifier of document given by the upstream system.",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.identifier.use",
        "path": "DocumentReference.identifier.use",
        "max": "0"
      },
      {
        "id": "DocumentReference.identifier.type",
        "path": "DocumentReference.identifier.type",
        "max": "0"
      },
      {
        "id": "DocumentReference.identifier.system",
        "path": "DocumentReference.identifier.system",
        "comment": "Source code system where the document coming from.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.identifier.period",
        "path": "DocumentReference.identifier.period",
        "max": "0"
      },
      {
        "id": "DocumentReference.identifier.assigner",
        "path": "DocumentReference.identifier.assigner",
        "max": "0"
      },
      {
        "id": "DocumentReference.status",
        "path": "DocumentReference.status",
        "requirements": "Only return current documents",
        "fixedCode": "current",
        "mustSupport": false
      },
      {
        "id": "DocumentReference.docStatus",
        "path": "DocumentReference.docStatus",
        "max": "0"
      },
      {
        "id": "DocumentReference.type",
        "path": "DocumentReference.type",
        "requirements": "Document Type given by the source systems.",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.type.coding",
        "path": "DocumentReference.type.coding",
        "max": "0"
      },
      {
        "id": "DocumentReference.type.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.type.text",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.class.coding",
        "path": "DocumentReference.class.coding",
        "max": "0"
      },
      {
        "id": "DocumentReference.subject",
        "path": "DocumentReference.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient",
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.author",
        "path": "DocumentReference.author",
        "max": "0"
      },
      {
        "id": "DocumentReference.authenticator",
        "path": "DocumentReference.authenticator",
        "max": "0"
      },
      {
        "id": "DocumentReference.custodian",
        "path": "DocumentReference.custodian",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization",
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.relatesTo",
        "path": "DocumentReference.relatesTo",
        "max": "0"
      },
      {
        "id": "DocumentReference.securityLabel",
        "path": "DocumentReference.securityLabel",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.contentType",
        "path": "DocumentReference.content.attachment.contentType",
        "fixedCode": "application/pdf"
      },
      {
        "id": "DocumentReference.content.attachment.language",
        "path": "DocumentReference.content.attachment.language",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.data",
        "path": "DocumentReference.content.attachment.data",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment.url",
        "path": "DocumentReference.content.attachment.url",
        "mustSupport": true
      },
      {
        "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",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.content.attachment.title",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.creation",
        "path": "DocumentReference.content.attachment.creation",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.format",
        "path": "DocumentReference.content.format",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.encounter",
        "path": "DocumentReference.context.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter",
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.context.event",
        "path": "DocumentReference.context.event",
        "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"
      }
    ]
  }
}