{
  "resourceType": "StructureDefinition",
  "id": "profile-documentreference",
  "url": "https://fhir.synapxe.sg/StructureDefinition/profile-documentreference",
  "title": "Document Reference Profile",
  "description": "This resource is used as a reference to any kind of document for any purpose. Instances of DocumentReference can mingle metadata from the document being described with metadata from the documenting it, but not replace metadata from the source document.",
  "name": "DocumentReference",
  "publisher": "Synapxe",
  "status": "active",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "DocumentReference",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentReference",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DocumentReference.identifier",
        "path": "DocumentReference.identifier",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-identifier"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.modality",
        "path": "DocumentReference.modality",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.type",
        "path": "DocumentReference.type",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.type.coding.version",
        "path": "DocumentReference.type.coding.version",
        "max": "0"
      },
      {
        "id": "DocumentReference.category",
        "path": "DocumentReference.category",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.subject.id",
        "path": "DocumentReference.subject.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.subject.reference",
        "path": "DocumentReference.subject.reference",
        "max": "0"
      },
      {
        "id": "DocumentReference.subject.type",
        "path": "DocumentReference.subject.type",
        "min": 1,
        "patternUri": "Patient"
      },
      {
        "id": "DocumentReference.subject.identifier",
        "path": "DocumentReference.subject.identifier",
        "min": 1,
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-identifier"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.subject.identifier.system",
        "path": "DocumentReference.subject.identifier.system",
        "min": 1,
        "patternUri": "https://fhir.synapxe.sg/NamingSystem/nric"
      },
      {
        "id": "DocumentReference.subject.display",
        "path": "DocumentReference.subject.display",
        "max": "0"
      },
      {
        "id": "DocumentReference.context",
        "path": "DocumentReference.context",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-patient",
              "https://fhir.synapxe.sg/StructureDefinition/profile-encounter"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.event.concept",
        "path": "DocumentReference.event.concept",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.bodySite.concept",
        "path": "DocumentReference.bodySite.concept",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.facilityType",
        "path": "DocumentReference.facilityType",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.practiceSetting",
        "path": "DocumentReference.practiceSetting",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.author",
        "path": "DocumentReference.author",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-practitioner",
              "https://fhir.synapxe.sg/StructureDefinition/profile-organization"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.attester.mode",
        "path": "DocumentReference.attester.mode",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.custodian",
        "path": "DocumentReference.custodian",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-organization"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.relatesTo.code",
        "path": "DocumentReference.relatesTo.code",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.securityLabel",
        "path": "DocumentReference.securityLabel",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.content.id",
        "path": "DocumentReference.content.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.extension",
        "path": "DocumentReference.content.extension",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.modifierExtension",
        "path": "DocumentReference.content.modifierExtension",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment",
        "path": "DocumentReference.content.attachment",
        "type": [
          {
            "code": "Attachment",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-attachment"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.content.profile",
        "path": "DocumentReference.content.profile",
        "max": "0"
      }
    ]
  }
}