{"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/patient-triage`    |\n|Production      |`https://api.service.nhs.uk/patient-triage`        |\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"}],"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":{"Continuing a triage that is in progress":{"value":{"id":"5f416042-9156-358d-7453-43a304501d23","input":[{"type":{"text":"skillset"},"valueString":"111 Call Handler"},{"type":{"text":"ageYears"},"valueAge":{"code":"a","system":"http://unitsofmeasure.org","unit":"years","value":35}},{"type":{"text":"ageGroup"},"valueString":"Adult"},{"type":{"text":"gender"},"valueString":"Female"},{"type":{"text":"party"},"valueString":"3"},{"type":{"coding":[{"code":"TX111111"}]},"valueCoding":{"code":"7"}},{"type":{"coding":[{"code":"TX222222"}]},"valueCoding":{"code":"3"}},{"type":{"coding":[{"code":"TX333333"}]},"valueCoding":{"code":"4"}},{"type":{"coding":[{"code":"TX444444"}]},"valueCoding":{"code":"3"}},{"type":{"coding":[{"code":"TX555555"}]},"valueCoding":{"code":"7"}},{"type":{"coding":[{"code":"TX666666"}]},"valueCoding":{"code":"4"}},{"type":{"coding":[{"code":"TX777777"}]},"valueCoding":{"code":"1"}},{"type":{"coding":[{"code":"bodymap"}]},"valueString":"PW123"},{"type":{"coding":[{"code":"TX888888"}]},"valueCoding":{"code":"6"}},{"type":{"coding":[{"code":"TX999999"}]},"valueCoding":{"code":"1"}},{"type":{"coding":[{"code":"TX000000"}]},"valueCoding":{"code":"2"}}],"intent":"plan","resourceType":"Task","status":"in-progress"}},"Starting a new triage":{"value":{"id":"4e416042-9456-458d-8453-53a304501d23","input":[{"type":{"text":"skillset"},"valueString":"111 Call Handler"},{"type":{"text":"ageGroup"},"valueString":"Adult"},{"type":{"text":"ageYears"},"valueAge":{"code":"a","system":"http://unitsofmeasure.org","unit":"years","value":35}},{"type":{"text":"gender"},"valueString":"Female"},{"type":{"text":"party"},"valueString":"3"}],"intent":"plan","resourceType":"Task","status":"requested"}}}}},"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.","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.","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":{"TxCxAndOutcome":{"value":{"entry":[{"resource":{"intent":"plan","resourceType":"Task","status":"in-progress"}},{"resource":{"identifier":[{"type":{"text":"PathwayID.OrderNo"},"use":"old","value":"PW1.100"}],"item":[{"item":[{"answerOption":[{"valueCoding":{"code":"1","display":"yes"}}],"linkId":"TX222222.1.Group","type":"choice"},{"answerOption":[{"valueCoding":{"code":"2","display":"not sure"}}],"linkId":"TX222222.2.Group","type":"choice"},{"answerOption":[{"valueCoding":{"code":"3","display":"no"}}],"linkId":"TX222222.3.Group","type":"choice"}],"linkId":"TX222222","text":"The question text goes here.","type":"group"}],"resourceType":"Questionnaire","status":"active"}},{"resource":{"code":{"text":"Outcome"},"intent":"proposal","orderDetail":[{"coding":[{"code":"SG1111","display":"symptomGroup"}],"text":"The title of the symptom group"},{"coding":[{"code":"SD4444","display":"symptomDiscriminator"}],"text":"The title of the symptom discriminator"},{"coding":[{"code":"Dx000","display":"disposition"}],"text":"The title of the disposition"}],"resourceType":"ServiceRequest","status":"active","subject":{"display":"Triage patient: Female, Adult, 3rd party, Clinician"}}},{"resource":{"payload":[{"contentString":"An item of care advice to be shown right now."},{"contentString":"Another item of care advice to be shown right now."}],"resourceType":"Communication","status":"completed"}}],"resourceType":"Bundle","type":"collection"}},"bodyMap":{"value":{"entry":[{"resource":{"intent":"plan","resourceType":"Task","status":"in-progress"}},{"resource":{"identifier":[{"value":"Bodymap"}],"item":[{"item":[{"item":[{"item":[{"linkId":"back.back.PW1111.doUseText","text":"Guidance on when to select this pathway goes here.\n\nIt may span multiple lines.","type":"display"},{"linkId":"back.back.PW1111.doNotUseText","text":"Guidance on when NOT to select this pathway goes here.","type":"display"}],"linkId":"back.back.PW1111","text":"PW1111: First pathway option's title goes here","type":"group"},{"item":[{"linkId":"back.back.PW2222.doUseText","text":"Guidance on when to select the second pathway","type":"display"}],"linkId":"back.back.PW2222","text":"PW2222: Second pathway option's title goes here","type":"group"},{"item":[],"linkId":"back.back.PW3333","text":"(another back pathway)","type":"group"}],"linkId":"back.back","type":"group"},{"item":[{"item":[],"linkId":"back.flank.PW4444","text":"(back flank pathway)","type":"group"}],"linkId":"back.flank","type":"group"}],"linkId":"back","type":"group"},{"item":[],"linkId":"chest","type":"group"},{"item":[],"linkId":"(other groups)","type":"group"}],"resourceType":"Questionnaire","status":"active"}}],"resourceType":"Bundle","type":"collection"}},"question":{"value":{"entry":[{"resource":{"intent":"plan","resourceType":"Task","status":"in-progress"}},{"resource":{"identifier":[{"type":{"text":"PathwayID.OrderNo"},"use":"old","value":"PW1.0"}],"item":[{"item":[{"linkId":"TX111111.Rationale","text":"The rationale for why this question is being asked.","type":"display"},{"answerOption":[{"valueCoding":{"code":"1","display":"the first possible answer"}}],"item":[{"linkId":"TX111111.1.Hint","text":"Support for when to select the first possible answer.\nMay also include guidance on when not to select this answer.","type":"display"}],"linkId":"TX111111.1.Group","type":"coding"},{"answerOption":[{"valueCoding":{"code":"2","display":"the second possible answer"}}],"item":[{"linkId":"TX111111.2.Hint","text":"Guidance on when to select the second answer.","type":"display"}],"linkId":"TX111111.2.Group","type":"choice"},{"answerOption":[{"valueCoding":{"code":"3","display":"Another possible answer"}}],"linkId":"TX111111.3.Group","type":"choice"}],"linkId":"TX111111","text":"The question goes here","type":"group"}],"resourceType":"Questionnaire","status":"active"}}],"resourceType":"Bundle","type":"collection"}}}}}},"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.","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.","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":{"issue":[{"code":"structure","details":{"coding":[{"code":"e9cde921-e593-4f5d-8446-41f208f42817"}],"text":"Invalid JSON"},"severity":"warning"}],"resourceType":"OperationOutcome"}},"unrecognised-demographics":{"value":{"issue":[{"code":"value","details":{"text":"Party is invalid. Must be '1' or '3'."},"severity":"warning"}],"resourceType":"OperationOutcome"}}}}}},"500":{"description":"Server Error"}},"deprecated":false}}},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"issue":{"maxItems":10,"minItems":1,"type":"array","items":{"required":["severity","code","details"],"type":"object","properties":{"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"}},"severity":{"enum":["error"],"type":"string"}}}},"resourceType":{"enum":["OperationOutcome"],"type":"string"}},"description":"A FHIR OperationOutcome resource describing an error."},"FHIRBundleResourceCommunication":{"type":"object","properties":{"resource":{"type":"object","properties":{"payload":{"maxItems":15,"minItems":1,"type":"array","items":{"type":"object","properties":{"contentString":{"type":"string","example":"An item of care advice to be shown right now."}}}},"resourceType":{"enum":["Communication"],"type":"string"},"status":{"enum":["completed"],"type":"string"}}}},"description":"A FHIR Communication resource holding care advice for the operator."},"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."},"FHIRBundleResourceQuestionnaireAnswer":{"type":"object","properties":{"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":"24 mph"}}}}}},"item":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"linkId":{"type":"string","example":"TX123456.1.Hint"},"text":{"type":"string","example":"Support for when to select this answer.\nMay also include guidance on when not to select this answer."},"type":{"enum":["display"],"type":"string"}}}},"linkId":{"type":"string","example":"TX123456.1.Group"},"type":{"enum":["coding"],"type":"string"}},"description":"A possible answer to the question."},"FHIRBundleResourceQuestionnaireBodyMap":{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"identifier":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"value":{"enum":["Bodymap"],"type":"string"}}}},"item":{"maxItems":1,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireBodyMapGroup"}},"resourceType":{"enum":["Questionnaire"],"type":"string"},"status":{"enum":["active"],"type":"string"}}}},"description":"A FHIR Questionnaire resource holding the body map selections for the operator to choose between."},"FHIRBundleResourceQuestionnaireBodyMapArea":{"type":"object","properties":{"items":{"maxItems":10,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireBodyMapPathway"}},"linkId":{"type":"string","description":"Gives the ordering the area should be presented in.","example":"15"},"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"},"type":{"enum":["group"],"type":"string"}},"description":"Areas within the parent body area group."},"FHIRBundleResourceQuestionnaireBodyMapGroup":{"type":"object","properties":{"items":{"maxItems":10,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireBodyMapArea"}},"linkId":{"type":"string","example":"abdomen"},"type":{"enum":["group"],"type":"string"}},"description":"The highest level groupings of body areas."},"FHIRBundleResourceQuestionnaireBodyMapPathway":{"type":"object","properties":{"items":{"maxItems":2,"type":"array","items":{"type":"object","properties":{"linkId":{"enum":["doUseText","doNotUseText"],"type":"string"},"text":{"type":"string","example":"Guidance on when to select this pathway goes here.\n\nIt may span multiple lines."},"type":{"enum":["display"],"type":"string"}}}},"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"},"text":{"type":"string","example":"Title of the pathway"},"type":{"enum":["group"],"type":"string"}},"description":"One of the options for selection."},"FHIRBundleResourceQuestionnaireQuestion":{"type":"object","properties":{"identifier":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"object","properties":{"text":{"enum":["PathwayID.OrderNo"],"type":"string"}}},"use":{"enum":["old"],"type":"string"},"value":{"type":"string","description":"DEPRECATED. Contains the coordinate of the question","example":"PW1234.567"}}}},"item":{"maxItems":1,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireTxQuestion"}},"resource":{"enum":["Questionnaire"],"type":"string"},"status":{"enum":["active"],"type":"string"}},"description":"A FHIR Questionnaire resource holding a single question to be put to the operator."},"FHIRBundleResourceQuestionnaireQuestionRationale":{"type":"object","properties":{"linkId":{"type":"string","example":"TX123456.Rationale"},"text":{"type":"string","example":"To determine if King Arthur and his knights may proceed on their quest."},"type":{"enum":["display"],"type":"string"}},"description":"The rationale for a question, if required."},"FHIRBundleResourceQuestionnaireTxQuestion":{"type":"object","properties":{"item":{"maxItems":2,"minItems":1,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireQuestionRationale"},{"$ref":"#/components/schemas/FHIRBundleResourceQuestionnaireAnswer"}]}},"linkId":{"type":"string","example":"TX123456"},"text":{"type":"string","example":"What is the average air velocity of an unladen swallow?"},"type":{"enum":["group"],"type":"string"}},"description":"A question to be put to the operator."},"FHIRBundleResourceServiceRequest":{"type":"object","properties":{"resource":{"type":"object","properties":{"code":{"type":"object","properties":{"concept":{"type":"object","properties":{"text":{"enum":["Outcome"],"type":"string"}}}}},"id":{"type":"string","format":"uuid","example":"f6f363db-b297-4721-992c-658bd383feba"},"intent":{"enum":["proposal"],"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":"SG1111"},"display":{"type":"string","example":"symptomGroup"}}}},"text":{"type":"string","example":"Title of the symptom group"}}}},"resourceType":{"enum":["ServiceRequest"],"type":"string"},"status":{"enum":["active"],"type":"string"}}}},"description":"A FHIR ServiceRequest resource holding details of the triage outcome."},"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"},"identifier":{"maxItems":1,"minItems":1,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","example":"Triage17687"}}}},"intent":{"enum":["plan"],"type":"string"},"output":{"maxItems":3,"type":"array","items":{"$ref":"#/components/schemas/FHIRBundleResourceTaskOutput"}},"resourceType":{"enum":["Task"],"type":"string"},"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."}}}},"description":"Represents the triage task."},"FHIRBundleResourceTaskOutput":{"oneOf":[{"$ref":"#/components/schemas/FHIRBundleResourceTaskOutputAssessment"},{"$ref":"#/components/schemas/FHIRBundleResourceTaskOutputSummary"},{"$ref":"#/components/schemas/FHIRBundleResourceTaskOutputAdvice"}]},"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":"A \\n-delimited string of the advice given to the patient.\nThis content should be added to the PEM."}},"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":"A \\n-delimited string of the pathway assessment.\nThis content should be added to the PEM."}},"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":"A \\n-delimited string of the consultation summary.\nThis content should be added to the PEM."}},"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."},"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":"TX123456"}}}}}},"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."},"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."},"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."},"FHIRTaskInputPropertyAgeYears":{"required":["name","valueAge"],"type":"object","properties":{"type":{"type":"object","properties":{"text":{"enum":["ageYears"],"type":"string"}}},"valueAge":{"type":"object","properties":{"code":{"enum":["a"],"type":"string"},"system":{"enum":["http://unitsofmeasure.org"],"type":"string"},"unit":{"enum":["years"],"type":"string"},"value":{"type":"number","description":"Age in years.","example":35}}}},"description":"The age of the patient in years."},"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."},"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."},"ServerResponse":{"type":"object","properties":{"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."},"resourceType":{"enum":["Bundle"],"type":"string"},"type":{"enum":["collection"],"type":"string"}},"description":"The structure of a response from the server when an error has not occurred."},"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"},"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."},"intent":{"enum":["plan"],"type":"string"},"resourceType":{"enum":["Task"],"type":"string"},"status":{"enum":["requested"],"type":"string"}},"description":"The structure of a client patient triage request payload. Takes the form of a FHIR Task resource."}},"securitySchemes":{"app-level0":{"$ref":"https://proxygen.ptl.api.platform.nhs.uk/components/securitySchemes/app-level0"}}},"security":[{"app-level0":[]}]}