{
    "resourceType": "MessageDefinition",
    "id": "11882ae2-211f-49ee-acbe-e319304d80cd",
    "url": "https://fhir.nhs.uk/MessageDefinition/bars-message-servicerequest-request-referral",
    "version": "1.0.0-beta",
    "name": "BARS Message Definition ServiceRequest - Request Referral",
    "title": "BARS Message Definition ServiceRequest - Request Referral",
    "status": "active",
    "date": "2025-03-24",
    "useContext":  [
        {
            "code": {
                "system": "http://terminology.hl7.org/CodeSystem/usage-context-type",
                "code": "workflow"
            },
            "valueCodeableConcept": {
                "coding":  [
                    {
                        "system": "https://fhir.nhs.uk/Id/dos-service-id",
                        "code": "dos-id"
                    }
                ]
            }
        },
        {
            "code": {
                "system": "http://terminology.hl7.org/CodeSystem/usage-context-type",
                "code": "workflow"
            },
            "valueCodeableConcept": {
                "coding":  [
                    {
                        "system": "https://fhir.nhs.uk/CodeSystem/usecases-categories-bars",
                        "code": "a6t3",
                        "display": "CAD to CAD Mutual Aid Request"
                    }
                ]
            }
        },
        {
            "code": {
                "system": "http://terminology.hl7.org/CodeSystem/usage-context-type",
                "code": "workflow"
            },
            "valueCodeableConcept": {
                "coding":  [
                    {
                        "system": "https://fhir.nhs.uk/CodeSystem/usecases-categories-bars",
                        "code": "a6t2",
                        "display": "CAD to CAD Call Assist Request"
                    }
                ]
            }
        },
        {
            "code": {
                "system": "http://terminology.hl7.org/CodeSystem/usage-context-type",
                "code": "workflow"
            },
            "valueCodeableConcept": {
                "coding":  [
                    {
                        "system": "https://fhir.nhs.uk/CodeSystem/usecases-categories-bars",
                        "code": "a6t1",
                        "display": "CAD to CAD Out of Area Request"
                    }
                ]
            }
        }
    ],
    "eventCoding": {
        "system": "https://fhir.nhs.uk/CodeSystem/message-events-bars",
        "code": "servicerequest-request"
    },
    "focus":  [
        {
            "code": "Bundle",
            "profile": "https://fhir.nhs.uk/StructureDefinition/BARSBundleMessage",
            "min": 1,
            "max": "1"
        },
        {
            "code": "MessageHeader",
            "profile": "https://fhir.nhs.uk/StructureDefinition/BARSMessageHeader-servicerequest-request",
            "min": 1,
            "max": "1"
        },
        {
            "code": "ServiceRequest",
            "profile": "https://fhir.nhs.uk/StructureDefinition/BARSServiceRequest-request-referral",
            "min": 1,
            "max": "1"
        },
        {
            "code": "Patient",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient",
            "min": 1,
            "max": "1"
        },
        {
            "code": "Encounter",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Encounter",
            "min": 1,
            "max": "1"
        },
        {
            "code": "CarePlan",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-CarePlan",
            "min": 1,
            "max": "1"
        },
        {
            "code": "Location",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/BARSLocation-incident-location",
            "min": 0,
            "max": "1"
        },
        {
            "code": "Location",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location",
            "min": 0,
            "max": "*"
        },
        {
            "code": "Organization",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization",
            "min": 2,
            "max": "*"
        },
        {
            "code": "Practitioner",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner",
            "min": 1,
            "max": "*"
        },
        {
            "code": "PractitionerRole",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole",
            "min": 1,
            "max": "*"
        },
        {
            "code": "Observation",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation",
            "min": 0,
            "max": "*"
        },
        {
            "code": "Flag",
            "profile": "https://fhir.nhs.uk/StructureDefinition/BARSFlag-scene-safety",
            "min": 0,
            "max": "*"
        },
        {
            "code": "Flag",
            "profile": "http://hl7.org/fhir/StructureDefinition/Flag",
            "min": 0,
            "max": "*"
        },
        {
            "code": "MedicationStatement",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-MedicationStatement",
            "min": 0,
            "max": "*"
        },
        {
            "code": "AllergyIntolerance",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-AllergyIntolerance",
            "min": 0,
            "max": "*"
        },
        {
            "code": "Questionnaire",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Questionnaire",
            "min": 0,
            "max": "*"
        },
        {
            "code": "QuestionnaireResponse",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-QuestionnaireResponse",
            "min": 0,
            "max": "*"
        },
        {
            "code": "Consent",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Consent",
            "min": 1,
            "max": "*"
        },
        {
            "code": "HealthcareService",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-HealthcareService",
            "min": 1,
            "max": "1"
        },
        {
            "code": "Condition",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Condition",
            "min": 0,
            "max": "*"
        },
        {
            "code": "Task",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Task",
            "min": 0,
            "max": "*"
        },
        {
            "code": "Communication",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Communication",
            "min": 0,
            "max": "*"
        },
        {
            "code": "Procedure",
            "profile": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Procedure",
            "min": 0,
            "max": "*"
        }
    ]
}