{
  "resourceType": "StructureDefinition",
  "id": "profile-DwDocumentReferenceClinicalNote",
  "url": "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwDocumentReferenceClinicalNote",
  "version": "2.0.0",
  "name": "DwDocumentReferenceClinicalNote",
  "status": "draft",
  "date": "2026-05-29",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "DocumentReference",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentReference",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DocumentReference.id",
        "path": "DocumentReference.id",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.meta.lastUpdated",
        "path": "DocumentReference.meta.lastUpdated",
        "min": 1
      },
      {
        "id": "DocumentReference.meta.source",
        "path": "DocumentReference.meta.source",
        "min": 1
      },
      {
        "id": "DocumentReference.meta.security",
        "path": "DocumentReference.meta.security",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.text",
        "path": "DocumentReference.text",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.identifier",
        "path": "DocumentReference.identifier",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.status",
        "path": "DocumentReference.status",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.docStatus",
        "path": "DocumentReference.docStatus",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.type",
        "path": "DocumentReference.type",
        "comment": "Usage note: Use Loinc code 11506-3 Progress note\r\n\r\nKey metadata element describing the document that describes he exact type of document. Helps humans to assess whether the document is of interest when viewing a list of documents.",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.subject",
        "path": "DocumentReference.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPatient",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitioner"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.date",
        "path": "DocumentReference.date",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.author",
        "path": "DocumentReference.author",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitioner",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitionerRole",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwOrganization",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPatient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content",
        "path": "DocumentReference.content",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment.contentType",
        "path": "DocumentReference.content.attachment.contentType",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment.data",
        "path": "DocumentReference.content.attachment.data",
        "min": 1
      },
      {
        "id": "DocumentReference.content.attachment.size",
        "path": "DocumentReference.content.attachment.size",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment.hash",
        "path": "DocumentReference.content.attachment.hash",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment.title",
        "path": "DocumentReference.content.attachment.title",
        "comment": "Usage note: MA - provide the title of the template prefixed with \"visit\"\r\nPSS - Provide title as \"Progress note\". If it is categorized note also provide the category where avaiable eg \"progress note - 'category name'\"\r\n\r\nNote that FHIR strings SHALL NOT exceed 1MB in size",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment.creation",
        "path": "DocumentReference.content.attachment.creation",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context.encounter",
        "path": "DocumentReference.context.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwEncounter"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}