{"openapi":"3.0.3","info":{"title":"Patient Triage API","description":"## Overview\n\nUse this API to triage a patient using the NHS Pathways product.\n\n[NHS Pathways](https://digital.nhs.uk/services/nhs-pathways) is a clinical decision support system (CDSS) supporting the  assessment of patients by urgent and emergency services. It consists of an interlinked series of algorithms, known as _pathways_, that link questions and items of care advice, leading to clinical endpoints known as _dispositions_.\n\nEach request made to this API will return some combination of\n* a new question and its associated answers\n* any number of care advice items\n* a triage outcome\n\nThe next action is determined by\n* the age and gender of the patient\n* the party involved in the triage (i.e. 1st or 3rd party)\n* the skillset of the user conducting the triage (e.g. call handler or clinician)\n* the previous answers selected by the user\n* national/regional policies (e.g. about ongoing epidemics)\n\nAn outcome is reached when enough information has been gathered to determine the clinically approved recommended disposition. The disposition (Dx) identifies the appropriate care setting (e.g. 999 ambulance, emergency department, primary care, or self-care) and the timeframe in which care should be delivered. The triage outcome guides service selection via the Directory of Services (DoS). Note that this API does not integrate directly with the DoS.\n\nThis API is stateless. The host system calling the API is responsible for tracking the triage journey and maintaining state.\n\nA typical triage with this API consists of an initial client request including the patient's age, gender, and party, and the operator's skillset, which will yield an initial question and a selection of answers to be presented to the patient. The client will continue with a identical request but including the selected answer to the previous question. Responses will include all of the information needed by the client to progress the triage, including care advice that must be presented to the patient, a disposition on which the client must act, and if the triage has not concluded then the next question to be asked.\n\n## Who can use this API\n\nThis API can only be used where there is a legal basis to do so. Make sure you have a valid use case before you go too far with your development. You must demonstrate you have a valid use case as part of [digital onboarding](https://digital.nhs.uk/developer/guides-and-documentation/digital-onboarding).\n\nYou must do this before you can go live.\n\n## Access modes\n\nThis API is [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis), meaning we authenticate and authorise the calling application but not the end user.\n\nTo use this access mode, use this security pattern:\n\n* [Application-restricted RESTful APIs - signed JWT authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication)\n\n## Service level\n\nWhen live, this API will be a Platinum service. For more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).\n\n## Rate limits\n\nThe default rate limit is 5 TPS (Transactions Per Second), per app. If you require a higher rate limit please [contact us](https://digital.nhs.uk/developer/help-and-support), or raise this during the onboarding process.\n\n## Technology\n\nThis API is [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#basic-rest).\n\nIt conforms to the [FHIR](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#fhir) global standard for health care data exchange, specifically to [FHIR R4 (v4.0.1)](https://hl7.org/fhir/r4/). You do not need to know much about FHIR to use this API - FHIR APIs are just RESTful APIs that follow specific rules.\n\n## Network access\n\nThis API is available on the internet.\n\nFor more details, see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis).\n\n## Open source\n\nYou might find the following [open source](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#open-source) resources useful:\n\n|Resource|Description|Links|\n|-------|-------|-------|\n|FHIR libraries and SDKs|Various open source libraries for integrating with FHIR APIs.|[FHIR libraries and SDKs](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks)|\n\n## Environments and testing\n\n|Environment     |Base URL                                           |\n|----------------|---------------------------------------------------|\n|Sandbox         |`https://sandbox.api.service.nhs.uk/patient-triage`|\n|Integration test|`https://int.api.service.nhs.uk/TBD`               |\n|Production      |`https://api.service.nhs.uk/TBD`                   |\n\n### Sandbox testing\n\nOur [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing):\n\n* is for early developer testing\n* is open access, so does not allow you to test authorisation\n* includes ready-to-use test data - for details contact us\n* underpins our `Try this API` feature; see the documentation for each endpoint for more details\n\n### Integration testing\n\nOur [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing):\n\n* is for formal integration testing\n* includes authorisation\n* includes ready-to-use test data - for details contact us\n* For more details see [integration testing with our RESTful APIs](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing-with-our-restful-apis).\n\n## Onboarding\n\nYou need to get your software approved by us before it can go live with this API. We call this onboarding. The onboarding process can sometimes be quite long, so it's worth planning well ahead. To onboard for this API, [contact us](https://digital.nhs.uk/developer/help-and-support).\n\nAs part of this process, you need to demonstrate your technical conformance to the requirements for this API. In addition you need to demonstrate that the user interface adheres to Pathways user interface guidelines.\n\nTo understand how our online digital onboarding process works, see [digital onboarding](https://digital.nhs.uk/developer/guides-and-documentation/digital-onboarding).\n\n## Errors\n\nWe use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:\n\n* 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action\n* 400 to 499 if it failed because of a client error by your application\n* 500 to 599 if it failed because of an error on our server\n\nErrors specific to each API are shown in the Endpoints section, under Response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.\n\n## Related APIs\n\n### Urgent and emergency care continuous quality improvement API\n\nUse the [Urgent and emergency care continuous quality improvement API](https://digital.nhs.uk/developer/api-catalogue/urgent-and-emergency-care-continuous-quality-improvement-api) to submit triage data to us for quality monitoring purposes following an NHS Pathways patient triage using the Triage API.\n\nYou must do this to comply with the Continuous Quality Improvement (CQI) requirement of the Pathways licence agreement.","license":{"name":"Private Internal Use Only"},"version":"draft"},"servers":[{"url":"https://sandbox.api.service.nhs.uk/patient-triage","description":"Sandbox environment."},{"url":"https://dep.api.service.nhs.uk/patient-triage","description":"Deployment environment."}],"paths":{"/FHIR/R4/triage":{"post":{"summary":"Triage a patient","description":"## Overview\n\nUse this endpoint to triage a patient.\n\nA typical triage consists of an initial call to the endpoint which will return the first question and one or more answers to be presented to the user. When the user answers this question the consuming system will call this endpoint again to receive the next question.  The consuming system will continue to call the endpoint until an outcome is reached.\n\nThe information that you will need to provide in each request will depend on whether you are making the first request  to the endpoint to start a new triage, or making a subsequent request to continue a triage.\n\nEach request to the endpoint must include an identifier.  This is generated by you, and can be used to uniquely identify a triage.\n\n### Starting a new triage\n\nTo start a new triage, you must provide the following information in the request:\n* the skillset of the operator\n* the age-group of the patient\n* the gender of the patient\n* the party of the patient\n\n### Continuing a triage\n\nEvery call to the endpoint after the triage has been started must include:\n* the skillset of the operator\n* the age-group of the patient\n* the gender of the patient\n* the party of the patient\n* **the answers to all previous questions in this triage**\n\n### Data returned by the endpoint\n\nEach successful triage request will return a combination of the following:\n  * a single question to be presented to the operator, and selection of possible answers\n  * one or more care advice items\n  * one triage outcome\n  * a body map, although this is usually returned on its own\n\nEvery response will contain a pathways assessment and consultation summary.\n\n#### Questions and answers\nWhen a question is presented, a selection of possible answers will also be given. The question will have an identity (Tx), and each answer a number. When supplying previous answers to supplement the initial skillset and demographics details, these conceptually take the form of key-value pairs from Tx to answer number.\n\nThe rationale for the question will be included, along with any hint texts for answers. Note that questions given entirely in UPPERCASE should be displayed to the call handler, but should not be communicated to the patient.\n\n#### Care advice items\n\nAny care advice items must be presented to the operator prior to any questions.\n\n#### Triage outcome\n\nThe triage outcome supplies enough information for the operator to search the directory of services for an appropriate next action, if required, or to request an ambulance.\n\n#### Body map\n\nThe body map provides a way to narrow down the patient's chief complaint to a particular area of the body, and then to a specific pathway related to that area. As this does not follow the typical question and answer format, it has its own representation in the response.\n\n#### Pathways assessment and Consultation summary\n\nA summary of the consultation, and detailed pathways assessment will be provided with every response.\n\n### FHIR resources\n\nA request to the endpoint will always contain a Task resource.\n\nA successful response will always contain a Task resource, and may also contain:\n*  a Questionnaire resource containing the next question,\n*  a Communication resource for care advice items,\n*  a ServiceRequest resource to return the triage outcomes.\n\nThese resource will be grouped in a Bundle if more than one resource needs to be sent in the response. The Bundle will have a maximum of:\n*  one Task,\n*  one Questionnaire,\n*  one Communication, and\n*  one ServiceRequest.\n\nThe FHIR resources used by the Triage endpoint are described in more detail below.\n\n#### Task\n\n<https://hl7.org/fhir/R4/task.html>\n\nThe task represents the triage itself. Requests to this endpoint should use a task as the root resource, and contain the operator skillset, patient demographics, and answers to previous questions as [inputs](https://hl7.org/fhir/R4/task-definitions.html#Task.input).\n\nThe initial triage request should have a status of \"requested\". Subsequent triage requests (where at least one answer is supplied) should have a status of \"in-progress\".\n\nResponses will include a task resource in the bundle to indicate explicitly if there are more actions required by the client, with a status of \"in-progress\", or that triage is complete with a status of \"completed\".\n\n#### Questionnaire\n\n<https://hl7.org/fhir/R4/questionnaire.html>\n\nWhen a questionnaire is supplied in a server response, it will contain exactly 1 question to be presented to the operator. All supplementary information such as rationales will be included with a type of \"display\".\n\nThe body map is also presented as a questionnaire resource.\n\n#### ServiceRequest\n\n<https://hl7.org/fhir/R4/servicerequest.html>\n\nTriage outcomes are provided in service request resources. The enclosed [order detail](https://hl7.org/fhir/R4/servicerequest-definitions.html#ServiceRequest.orderDetail) will include parameters with code types (e.g. \"symptomGroup\"), corresponding codes (e.g., \"SG1158\") and a textual description (e.g., \"Sunburn\").\n\n#### Communication\n\n<https://hl7.org/fhir/R4/communication.html>\n\nCare advice is provided in communication resources. These are provided as a list of natural language text in the payload.\n\n#### Bundle\n\n<https://hl7.org/fhir/R4/bundle.html>\n\nWraps the various other resources in the server responses.\n\n#### OperationOutcome\n\n<https://hl7.org/fhir/R4/operationoutcome.html>\n\nErrors are returned in operation outcome resources.","parameters":[{"name":"X-Clinical-Version","in":"header","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"number","example":"48.2.0"}},{"name":"Accept","in":"header","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"application/json; version=1"}},{"name":"apikey","in":"header","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriageClientRequest"},"examples":{"Starting a new triage":{"value":{"id":"4e416042-9456-458d-8453-53a304501d23","resourceType":"Task","status":"requested","intent":"plan","input":[{"type":{"text":"skillset"},"valueString":"111 Call Handler"},{"type":{"text":"ageGroup"},"valueString":"Adult"},{"type":{"text":"ageYears"},"valueAge":{"value":35,"unit":"years","system":"http://unitsofmeasure.org","code":"a"}},{"type":{"text":"gender"},"valueString":"Female"},{"type":{"text":"party"},"valueString":"3"}]}},"Continuing a triage that is in progress":{"value":{"id":"5f416042-9156-358d-7453-43a304501d23","resourceType":"Task","status":"in-progress","intent":"plan","input":[{"type":{"text":"skillset"},"valueString":"111 Call Handler"},{"type":{"text":"ageYears"},"valueAge":{"value":35,"unit":"years","system":"http://unitsofmeasure.org","code":"a"}},{"type":{"text":"ageGroup"},"valueString":"Adult"},{"type":{"text":"gender"},"valueString":"Female"},{"type":{"text":"party"},"valueString":"3"},{"type":{"coding":[{"code":"TX22074"}]},"valueCoding":{"code":"7"}},{"type":{"coding":[{"code":"TX225775"}]},"valueCoding":{"code":"3"}},{"type":{"coding":[{"code":"TX130011"}]},"valueCoding":{"code":"4"}},{"type":{"coding":[{"code":"TX61025"}]},"valueCoding":{"code":"3"}},{"type":{"coding":[{"code":"TX223440"}]},"valueCoding":{"code":"7"}},{"type":{"coding":[{"code":"TX220032"}]},"valueCoding":{"code":"4"}},{"type":{"coding":[{"code":"TX223142"}]},"valueCoding":{"code":"1"}},{"type":{"coding":[{"code":"bodymap"}]},"valueString":"PW123"},{"type":{"coding":[{"code":"TX222984"}]},"valueCoding":{"code":"6"}},{"type":{"coding":[{"code":"TX222985"}]},"valueCoding":{"code":"1"}},{"type":{"coding":[{"code":"TX220667"}]},"valueCoding":{"code":"2"}}]}}}}},"required":true},"responses":{"200":{"description":"OK","headers":{"Content-Type":{"name":"","in":"header","description":"The format of the response and the API version used. If this does not match the client expectation, triage must stop.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"application/json; version=2"}},"X-Clinical-Version":{"name":"","in":"header","description":"The version of the clinical content used. If this does not match the client expectation, triage must stop.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"48.2.0"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerResponse"},"examples":{"question":{"value":{"resourceType":"Bundle","type":"collection","entry":[{"resource":{"resourceType":"Task","status":"in-progress","intent":"plan"}},{"resource":{"resourceType":"Questionnaire","identifier":[{"use":"old","type":{"text":"PathwayID.OrderNo"},"value":"PW1827.0"}],"status":"active","item":[{"linkId":"TX220074","text":"What is the reason for the contact?","type":"group","item":[{"linkId":"TX220074.Rationale","type":"display","text":"To find out the reason for the contact and where to direct it."},{"linkId":"TX220074.1.Group","type":"coding","answerOption":[{"valueCoding":{"code":"1","display":"an injury or other health problem"}}],"item":[{"linkId":"TX220074.1.Hint","type":"display","text":"This means a new health problem or any existing problem that has worsened.\nAn increase in the use of medication may hide an existing problem that is worsening.\nThis means an individual who has swallowed or breathed in something potentially poisonous but is symptom-free.\nThis does not mean an individual who is symptom-free but requires information."}]},{"linkId":"TX220074.2.Group","type":"choice","answerOption":[{"valueCoding":{"code":"2","display":"labour or childbirth"}}],"item":[{"linkId":"TX220074.2.Hint","type":"display","text":"This means waters breaking, increasingly frequent contractions, seeing or feeling the baby coming. This also means that a baby has just been born. DO NOT SELECT THIS ANSWER if the individual has gone into labour following an injury to the abdomen, lower back, groin or genitals. Select ''an injury or other health problem'' instead."}]},{"linkId":"TX220074.3.Group","type":"choice","answerOption":[{"valueCoding":{"code":"3","display":"a community service"}}],"item":[{"linkId":"TX220074.3.Hint","type":"display","text":"This means a palliative care team, community nurses, district nurses, community midwives, falls team, rapid response team or another OOH service."}]},{"linkId":"TX220074.4.Group","type":"choice","answerOption":[{"valueCoding":{"code":"4","display":"a healthcare professional requesting contact with another clinician"}}],"item":[{"linkId":"TX220074.4.Hint","type":"display","text":"This means that a healthcare professional needs to speak with another clinician."}]},{"linkId":"TX220074.5.Group","type":"choice","answerOption":[{"valueCoding":{"code":"5","display":"a report of results or tests"}}],"item":[{"linkId":"TX220074.5.Hint","type":"display","text":"This means a report of results of blood tests, X-rays, ECGs, or any other test.\nThis does not mean a contact about an individual who has symptoms."}]},{"linkId":"TX220074.6.Group","type":"choice","answerOption":[{"valueCoding":{"code":"6","display":"a possible failure of contraception"}}],"item":[{"linkId":"TX220074.6.Hint","type":"display","text":"This means the individual is concerned about accidental pregnancy. They may have failed to use contraception, run out of/missed pills, or a condom may have split or come off, or had a problem with a contraceptive device.\nThis does not mean an individual with symptoms such as vaginal bleeding or discharge. Select illness or injury option."}]},{"linkId":"TX220074.7.Group","type":"choice","answerOption":[{"valueCoding":{"code":"7","display":"more"}}],"item":[{"linkId":"TX220074.7.Hint","type":"display","text":"This will take you to a further menu:\nChild protection or vulnerable adult concern, social or domestic emergency, prescription or appointment request and a request for health information."}]}]}]}}]}},"TxCxAndOutcome":{"value":{"resourceType":"Bundle","type":"collection","entry":[{"resource":{"resourceType":"Task","status":"in-progress","intent":"plan"}},{"resource":{"resourceType":"Questionnaire","identifier":[{"use":"old","type":{"text":"PathwayID.OrderNo"},"value":"PW1827.100"}],"status":"active","item":[{"linkId":"TX220357","text":"Does she seem generally unwell, apart from the sunburn?","type":"group","item":[{"linkId":"TX220357.Rationale","type":"display","text":"To find out if the child seems to be unwell, as well as sunburned."},{"linkId":"TX220357.1.Group","type":"choice","answerOption":[{"valueCoding":{"code":"1","display":"yes"}}]},{"linkId":"TX220357.2.Group","type":"choice","answerOption":[{"valueCoding":{"code":"2","display":"not sure"}}]},{"linkId":"TX220357.3.Group","type":"choice","answerOption":[{"valueCoding":{"code":"3","display":"no"}}]}]}]}},{"resource":{"resourceType":"ServiceRequest","status":"active","intent":"proposal","code":{"text":"Outcome"},"subject":{"display":"Triage patient: Female, Adult, 3rd party, Clinician"},"orderDetail":[{"coding":[{"code":"SG1158","display":"symptomGroup"}],"text":"Sunburn"},{"coding":[{"code":"SD4049","display":"symptomDiscriminator"}],"text":"AMB heat stroke"},{"coding":[{"code":"Dx012","display":"disposition"}],"text":"Emergency Ambulance Response (Category 3)"}]}},{"resource":{"resourceType":"Communication","status":"completed","payload":[{"contentString":"Rest somewhere cool."},{"contentString":"Cool the skin by sponging with lukewarm water or having a tepid (not cold) bath or shower. Don''t use ice. Take care not to get too cold."},{"contentString":"Have plenty of non-alcoholic drinks to help cool down and to prevent dehydration."}]}}]}},"bodyMap":{"value":{"resourceType":"Bundle","type":"collection","entry":[{"resource":{"resourceType":"Task","status":"in-progress","intent":"plan"}},{"resource":{"resourceType":"Questionnaire","identifier":[{"value":"Bodymap"}],"status":"active","item":[{"linkId":"back","type":"group","item":[{"linkId":"back.back","type":"group","item":[{"linkId":"back.back.PW1575","type":"group","text":"PW1575: Bites and Stings","item":[{"linkId":"back.back.PW1575.doUseText","type":"display","text":"A bite by a human, animal or insect\n\nA sting by an animal, insect or water creature\n\nA deliberate self-injury"},{"linkId":"back.back.PW1575.doNotUseText","type":"display","text":"Suspected scabies (Skin Problems)"}]},{"linkId":"back.back.PW987","type":"group","text":"Burn, Sun","item":[{"linkId":"back.back.PW987.doUseText","type":"display","text":"A burn caused by the sun, or a sunbed or lamp"},{"linkId":"back.back.PW987.doNotUseText","type":"display","text":"A burn from a heat source such as a solid object, liquid or gas (Burn, Thermal)\\n\\nA burn that is caused by a chemical (Burn, Chemical)\\n\\nExposure to a hot environment or overexertion (or both) but WITHOUT sunburn (Heat Exposure)"}]},{"linkId":"back.back.PW580","type":"group","text":"(another back pathway)","item":[]}]},{"linkId":"back.flank","type":"group","item":[{"linkId":"back.back.PW982","type":"group","text":"(back flank pathway)","item":[]}]}]},{"linkId":"chest","type":"group","item":[]},{"linkId":"(other groups)","type":"group","item":[]}]}}]}}}}}},"400":{"description":"Bad Request","headers":{"Content-Type":{"name":"","in":"header","description":"The format of the response and the API version used, if the process got that far.\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"application/json; version=2"}},"X-Clinical-Version":{"name":"","in":"header","description":"The version of the clinical content used, if the process got that far.\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"48.2.2"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"parse-failed":{"value":{"resourceType":"OperationOutcome","issue":[{"severity":"warning","code":"structure","details":{"text":"Invalid JSON","coding":[{"code":"e9cde921-e593-4f5d-8446-41f208f42817"}]}}]}},"unrecognised-demographics":{"value":{"resourceType":"OperationOutcome","issue":[{"severity":"warning","code":"value","details":{"text":"Party is invalid. Must be '1' or '3'."}}]}}}}}},"500":{"description":"Server Error"}},"deprecated":false}}},"components":{"schemas":{"TriageClientRequest":{"required":["id","resourceType","status","intent","input"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Task - the triage request. This is created by the client and should persist for the lifetime of the triage.","format":"uuid"},"resourceType":{"enum":["Task"],"type":"string"},"status":{"enum":["requested"],"type":"string"},"intent":{"enum":["plan"],"type":"string"},"input":{"maxItems":30,"minItems":4,"type":"array","items":{"$ref":"#/components/schemas/FHIRTaskInput"},"description":"Must contain age, gender, party and skillset, at minimum. Also includes the selected answers to any previously received questions."}},"description":"The structure of a client patient triage request payload. Takes the form of a FHIR Task resource."},"FHIRTaskInput":{"type":"object","oneOf":[{"$ref":"#/components/schemas/FHIRTaskInputProperty"},{"$ref":"#/components/schemas/FHIRTaskInputAnswer"}],"description":"An individual input may either be a triage property (such as patient demographics) or the answer to a question."},"FHIRTaskInputProperty":{"type":"object","oneOf":[{"$ref":"#/components/schemas/FHIRTaskInputPropertyAge"},{"$ref":"#/components/schemas/FHIRTaskInputPropertyGender"},{"$ref":"#/components/schemas/FHIRTaskInputPropertyParty"},{"$ref":"#/components/schemas/FHIRTaskInputPropertySkillset"},{"$ref":"#/components/schemas/FHIRTaskInputPropertyBodyMap"}],"description":"A triage property."},"FHIRTaskInputPropertyAge":{"type":"object","oneOf":[{"$ref":"#/components/schemas/FHIRTaskInputPropertyAgeYears"},{"$ref":"#/components/schemas/FHIRTaskInputPropertyAgeGroup"}],"description":"The age of the patient."},"FHIRTaskInputPropertyAgeYears":{"required":["name","valueAge"],"type":"object","properties":{"type":{"type":"object","properties":{"text":{"enum":["ageYears"],"type":"string"}}},"valueAge":{"type":"object","properties":{"value":{"type":"number","description":"Age in years.","example":35},"unit":{"enum":["years"],"type":"string"},"system":{"enum":["http://unitsofmeasure.org"],"type":"string"},"code":{"enum":["a"],"type":"string"}}}},"description":"The age of the patient in years."},"FHIRTaskInputPropertyAgeGroup":{"required":["type","valueString"],"type":"object","properties":{"type":{"type":"object","properties":{"text":{"enum":["ageGroup"],"type":"string"}}},"valueString":{"enum":["Neonate","Toddler","Infant","Child","Adult"],"type":"string","description":"Adult: 16 years and over. Child: 5 to under 16 years. Toddler: 1 to under 5 years. Infant and Neonate: Under 1 year."}},"description":"The age of the patient in terms of age group."},"FHIRTaskInputPropertyGender":{"required":["type","valueString"],"type":"object","properties":{"type":{"type":"object","properties":{"text":{"enum":["gender"],"type":"string"}}},"valueString":{"enum":["Male","Female"],"type":"string","description":"Use Female when gender is unknown. Case-insensitive."}},"description":"The gender of the patient as assigned at birth."},"FHIRTaskInputPropertyParty":{"required":["type","valueString"],"type":"object","properties":{"type":{"required":["text"],"type":"object","properties":{"text":{"enum":["party"],"type":"string"}}},"valueString":{"enum":["1","3"],"type":"string"}},"description":"The party of the patient interaction. I.e., if the patient is the one contacting the service, then it is 1st party. If someone else is contacting the service on behalf of the patient, then it is 3rd party."},"FHIRTaskInputPropertySkillset":{"required":["type","valueString"],"type":"object","properties":{"type":{"required":["text"],"type":"object","properties":{"text":{"enum":["skillset"],"type":"string"}}},"valueString":{"enum":["OOH Call Handler","OOH Clinician","999 Call Handler","999 Clinician","111 Call Handler","111 Clinician","Reception Point Call Handler","Attend Incident","Repeat Prescription","Dental","HCP Callback","Senior Clinician Module","PaCCS","Injury Module","ED Streaming and Redirection","111 Online","Injury Module Entry"],"type":"string","description":"Case-insensitive."}},"description":"The skillset of the operator of the service handling the triage."},"FHIRTaskInputPropertyBodyMap":{"required":["type","valueString"],"type":"object","properties":{"type":{"required":["text"],"type":"object","properties":{"text":{"enum":["bodymap"],"type":"string"}}},"valueString":{"type":"string","example":"PW1234"}},"description":"The clinical area selected from the body map."},"FHIRTaskInputAnswer":{"required":["type","valueCoding"],"type":"object","properties":{"type":{"required":["coding"],"type":"object","properties":{"coding":{"maxItems":1,"minItems":1,"type":"array","items":{"required":["code"],"type":"object","properties":{"code":{"type":"string","description":"The ID of the question, as provided in a response. Case-insensitive.","example":"TX220074"}}}}}},"valueCoding":{"required":["code"],"type":"object","properties":{"code":{"type":"string","description":"The ID of the selected answer, as provided in a response.","example":"7"}}}},"description":"An answer already provided in this triage."},"ServerResponse":{"type":"object","properties":{"resourceType":{"enum":["Bundle"],"type":"string"},"type":{"enum":["collection"],"type":"string"},"entry":{"maxItems":4,"minItems":1,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/FHIRBundleResourceTask"},{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaire"},{"$ref":"#/components/schemas/FHIRBundleResourceServiceRequest"},{"$ref":"#/components/schemas/FHIRBundleResourceCommunication"}]},"description":"At most one of each of the below."}},"description":"The structure of a response from the server when an error has not occurred."},"FHIRBundleResourceTask":{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string","description":"The client generated ID for this triage, echoed back.","format":"uuid","example":"8e1758a1-57b3-45be-9c27-64e4cf255cd2"},"resourceType":{"enum":["Task"],"type":"string"},"identifier":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","example":"Triage17687"}}}},"status":{"enum":["in-progress","completed"],"type":"string","description":"\"in-progress\" when more actions are requested of the client. \"completed\" when there are no more questions to be answered by the client."},"intent":{"enum":["plan"],"type":"string"},"output":{"maxItems":3,"type":"array","items":{"$ref":"#/components/schemas/FHIRBundleResourceTaskOutput"}}}}},"description":"Represents the triage task."},"FHIRBundleResourceTaskOutput":{"oneOf":[{"$ref":"#/components/schemas/FHIRBundleResourceTaskOutputAssessment"},{"$ref":"#/components/schemas/FHIRBundleResourceTaskOutputSummary"},{"$ref":"#/components/schemas/FHIRBundleResourceTaskOutputAdvice"}]},"FHIRBundleResourceTaskOutputAssessment":{"type":"object","properties":{"type":{"type":"object","properties":{"text":{"enum":["Pathways Assessment"],"type":"string"}},"description":"Defines the type of output being listed as a Pathways Assessment"},"valueString":{"type":"string","description":"The text of the Pathways Assessment. When multiple items are included they are separated with new lines."}},"example":{"type":{"text":"Pathways Assessment"},"valueString":"There was blood loss.\nHeavy bleeding had not occurred in the previous 2 hours.\nA social or domestic emergency was the main problem.\nThere was an immediate risk of violence."}},"FHIRBundleResourceTaskOutputSummary":{"type":"object","properties":{"type":{"type":"object","properties":{"text":{"enum":["Consultation Summary"],"type":"string"}},"description":"Defines the type of output being listed as a Consultation Summary"},"valueString":{"type":"string","description":"The text of the Consultation Summary. When multiple items are included they are separated with new lines."}},"example":{"type":{"text":"Consultation Summary"},"valueString":"Blood loss\nSocial or domestic emergency"}},"FHIRBundleResourceTaskOutputAdvice":{"type":"object","properties":{"type":{"type":"object","properties":{"text":{"enum":["Advice Given"],"type":"string"}},"description":"Defines the type of output being listed as the Advice Given"},"valueString":{"type":"string","description":"The text of the Advice Given. When multiple items are included they are separated with new lines."}},"example":{"type":{"text":"Advice Given"},"valueString":"If there are any new symptoms, or if the condition gets worse, changes or you have any other concerns call 999.\nRemember to take a list of any current medications if you go to the out of hours surgery."}},"FHIRBundleResourceQuestionnaire":{"oneOf":[{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireQuestion"},{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireBodyMap"}],"description":"A FHIR Questionnaire resource holding either a single question to be put to the operator, or the body map for clinical area selection."},"FHIRBundleResourceQuestionnaireQuestion":{"type":"object","properties":{"resource":{"enum":["Questionnaire"],"type":"string"},"identifier":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"use":{"enum":["old"],"type":"string"},"type":{"type":"object","properties":{"text":{"enum":["PathwayID.OrderNo"],"type":"string"}}},"value":{"type":"string","description":"DEPRECATED. Contains the coordinate of the question","example":"PW1827.100"}}}},"status":{"enum":["active"],"type":"string"},"item":{"maxItems":1,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireTxQuestion"}}},"description":"A FHIR Questionnaire resource holding a single question to be put to the operator."},"FHIRBundleResourceQuestionnaireTxQuestion":{"type":"object","properties":{"linkId":{"type":"string","example":"TX220074"},"text":{"type":"string","example":"What is the reason for the contact?"},"type":{"enum":["group"],"type":"string"},"item":{"maxItems":2,"minItems":1,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireQuestionRationale"},{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireAnswer"}]}}},"description":"A question to be put to the operator."},"FHIRBundleResourceQuestionnaireQuestionRationale":{"type":"object","properties":{"linkId":{"type":"string","example":"TX220074.Rationale"},"type":{"enum":["display"],"type":"string"},"text":{"type":"string","example":"To find out the reason for the contact and where to direct it."}},"description":"The rationale for a question, if required."},"FHIRBundleResourceQuestionnaireAnswer":{"type":"object","properties":{"linkId":{"type":"string","example":"TX220074.1.Group"},"type":{"enum":["coding"],"type":"string"},"answerOption":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"valueCoding":{"type":"object","properties":{"code":{"type":"string","description":"The ID of the answer to use if this is selected.","example":"1"},"display":{"type":"string","example":"an injury or other health problem"}}}}}},"item":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"linkId":{"type":"string","example":"TX220074.1.Hint"},"type":{"enum":["display"],"type":"string"},"text":{"type":"string","example":"This means a new health problem or any existing problem that has worsened.\nAn increase in the use of medication may hide an existing problem that is worsening.\nThis means an individual who has swallowed or breathed in something potentially poisonous but is symptom-free.\nThis does not mean an individual who is symptom-free but requires information.'"}}}}},"description":"A possible answer to the question."},"FHIRBundleResourceQuestionnaireBodyMap":{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"resourceType":{"enum":["Questionnaire"],"type":"string"},"identifier":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"value":{"enum":["Bodymap"],"type":"string"}}}},"status":{"enum":["active"],"type":"string"},"item":{"maxItems":1,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireBodyMapGroup"}}}}},"description":"A FHIR Questionnaire resource holding the body map selections for the operator to choose between."},"FHIRBundleResourceQuestionnaireBodyMapGroup":{"type":"object","properties":{"linkId":{"type":"string","example":"abdomen"},"type":{"enum":["group"],"type":"string"},"items":{"maxItems":10,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireBodyMapArea"}}},"description":"The highest level groupings of body areas."},"FHIRBundleResourceQuestionnaireBodyMapArea":{"type":"object","properties":{"linkId":{"type":"string","description":"Gives the ordering the area should be presented in.","example":"15"},"type":{"enum":["group"],"type":"string"},"text":{"type":"string","description":"The identifier for the bodymap area, composed of the parent group, a dot, and the name of the area.","example":"abdomen.groin"},"items":{"maxItems":10,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireBodyMapPathway"}}},"description":"Areas within the parent body area group."},"FHIRBundleResourceQuestionnaireBodyMapPathway":{"type":"object","properties":{"linkId":{"type":"string","description":"The identifier for the bodymap item selected, composed of the parent group and area, another dot, and the selection to be used as the answer to the bodymap question.","example":"abdomen.groin.PW500"},"type":{"enum":["group"],"type":"string"},"text":{"type":"string","example":"Abdominal or Flank Injury, Blunt"},"items":{"maxItems":2,"type":"array","items":{"type":"object","properties":{"linkId":{"enum":["doUseText","doNotUseText"],"type":"string"},"type":{"enum":["display"],"type":"string"},"text":{"type":"string","example":"An injury to the abdomen or flank within the last 7 days that has not broken the skin\n\n(The abdomen is the area between the bottom of the rib cage and the groin)\n\n(The flank is the fleshy part of the back at the side between the bottom of the rib cage and the top of the hips)\n\nA deliberate self-inflicted injury"}}}}},"description":"One of the options for selection."},"ErrorResponse":{"type":"object","properties":{"resourceType":{"enum":["OperationOutcome"],"type":"string"},"issue":{"maxItems":10,"minItems":1,"type":"array","items":{"required":["severity","code","details"],"type":"object","properties":{"severity":{"enum":["error"],"type":"string"},"code":{"enum":["invalid"],"type":"string"},"details":{"type":"object","properties":{"text":{"type":"string","description":"A human-readable explanation of what went wrong","example":"Missing required value"}}},"location":{"maxItems":10,"minItems":1,"type":"array","items":{"type":"string","description":"Identifiers to the problematic values in the input.","example":"input[2].valueString"}}}}}},"description":"A FHIR OperationOutcome resource describing an error."},"FHIRBundleResourceServiceRequest":{"type":"object","properties":{"resource":{"type":"object","properties":{"resourceType":{"enum":["ServiceRequest"],"type":"string"},"id":{"type":"string","format":"uuid","example":"f6f363db-b297-4721-992c-658bd383feba"},"status":{"enum":["active"],"type":"string"},"intent":{"enum":["proposal"],"type":"string"},"code":{"type":"object","properties":{"concept":{"type":"object","properties":{"text":{"enum":["Outcome"],"type":"string"}}}}},"orderDetail":{"maxItems":10,"minItems":1,"type":"array","items":{"type":"object","properties":{"coding":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","example":"SG1158"},"display":{"type":"string","example":"symptomGroup"}}}},"text":{"type":"string","example":"Sunburn"}}}}}}},"description":"A FHIR ServiceRequest resource holding details of the triage outcome."},"FHIRBundleResourceCommunication":{"type":"object","properties":{"resource":{"type":"object","properties":{"resourceType":{"enum":["Communication"],"type":"string"},"status":{"enum":["completed"],"type":"string"},"payload":{"maxItems":15,"minItems":1,"type":"array","items":{"type":"object","properties":{"contentString":{"type":"string","example":"Have plenty of non-alcoholic drinks to help cool down and to prevent dehydration."}}}}}}},"description":"A FHIR Communication resource holding care advice for the operator."}},"securitySchemes":{"app-level0":{"$ref":"https://proxygen.ptl.api.platform.nhs.uk/components/securitySchemes/app-level0"}}},"security":[{"app-level0":[]}]}