{
  "resourceType": "StructureDefinition",
  "id": "patient-referral",
  "url": "https://bghmc.org/fhir/StructureDefinition/PatientReferral",
  "name": "PatientReferral",
  "status": "draft",
  "date": "2023-11-06T05:13:24.0142349+00:00",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "ServiceRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ServiceRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ServiceRequest.identifier",
        "path": "ServiceRequest.identifier",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ServiceRequest.instantiatesCanonical",
        "path": "ServiceRequest.instantiatesCanonical",
        "max": "0"
      },
      {
        "id": "ServiceRequest.instantiatesUri",
        "path": "ServiceRequest.instantiatesUri",
        "max": "0"
      },
      {
        "id": "ServiceRequest.basedOn",
        "path": "ServiceRequest.basedOn",
        "max": "0"
      },
      {
        "id": "ServiceRequest.replaces",
        "path": "ServiceRequest.replaces",
        "max": "0"
      },
      {
        "id": "ServiceRequest.requisition",
        "path": "ServiceRequest.requisition",
        "max": "0"
      },
      {
        "id": "ServiceRequest.status",
        "path": "ServiceRequest.status",
        "fixedCode": "active"
      },
      {
        "id": "ServiceRequest.intent",
        "path": "ServiceRequest.intent",
        "fixedCode": "order"
      },
      {
        "id": "ServiceRequest.category",
        "path": "ServiceRequest.category",
        "min": 1,
        "max": "1",
        "fixedCodeableConcept": {
          "text": "referral"
        }
      },
      {
        "id": "ServiceRequest.orderDetail",
        "path": "ServiceRequest.orderDetail",
        "max": "1"
      },
      {
        "id": "ServiceRequest.subject",
        "path": "ServiceRequest.subject",
        "short": "The patient being referred",
        "definition": "This is a reference to a Patient resource.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://bghmc.org/fhir/StructureDefinition/BGHMCPatient"
            ],
            "aggregation": [
              "contained",
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.encounter",
        "path": "ServiceRequest.encounter",
        "min": 1
      },
      {
        "id": "ServiceRequest.authoredOn",
        "path": "ServiceRequest.authoredOn",
        "short": "Date of the referral",
        "min": 1
      },
      {
        "id": "ServiceRequest.requester",
        "path": "ServiceRequest.requester",
        "min": 1
      },
      {
        "id": "ServiceRequest.requester.reference",
        "path": "ServiceRequest.requester.reference",
        "min": 1
      },
      {
        "id": "ServiceRequest.requester.type",
        "path": "ServiceRequest.requester.type",
        "min": 1,
        "fixedUri": "HealthFacility"
      },
      {
        "id": "ServiceRequest.requester.display",
        "path": "ServiceRequest.requester.display",
        "min": 1
      },
      {
        "id": "ServiceRequest.performerType",
        "path": "ServiceRequest.performerType",
        "max": "0"
      },
      {
        "id": "ServiceRequest.performer",
        "path": "ServiceRequest.performer",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ServiceRequest.reasonReference",
        "path": "ServiceRequest.reasonReference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ServiceRequest.insurance",
        "path": "ServiceRequest.insurance",
        "max": "0"
      },
      {
        "id": "ServiceRequest.supportingInfo",
        "path": "ServiceRequest.supportingInfo",
        "short": "Medical condition info",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://bghmc.org/fhir/StructureDefinition/ReferralMedicalCondition"
            ]
          }
        ]
      }
    ]
  }
}