Add cancellation process#38
Merged
trawlinson-kainos merged 19 commits intoJun 26, 2026
Merged
Conversation
🔬 FHIR Validation Results
|
| Severity | Location | Message |
|---|---|---|
ℹ️ information |
— |
All OK |
observation_non_reactive.example.json
| Severity | Location | Message |
|---|---|---|
ℹ️ information |
— |
All OK |
observation_non_definitive_result.example.json
| Severity | Location | Message |
|---|---|---|
ℹ️ information |
— |
All OK |
get_test_results_non_reactive.example.json
| Severity | Location | Message |
|---|---|---|
ℹ️ information |
Bundle |
No types could be determined from the search string, so the types can't be checked |
task_update_received-at-lab.example.json
| Severity | Location | Message |
|---|---|---|
warning |
Task.statusReason.text |
value should not start or finish with whitespace ' Test kit has been received at the lab and is being processed' |
warning |
Task |
Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation) |
ℹ️ information |
Task.statusReason |
Binding for path Task.statusReason in profile StructureDefinition[http://hl7.org/fhir/StructureDefinition/Task |
ℹ️ information |
Task.businessStatus |
Binding for path Task.businessStatus in profile StructureDefinition[http://hl7.org/fhir/StructureDefinition/Task |
observation_reactive_without_contact.example.json
| Severity | Location | Message |
|---|---|---|
ℹ️ information |
— |
All OK |
ordereligibility_ineligible_operationoutcome.example.json
| Severity | Location | Message |
|---|---|---|
ℹ️ information |
— |
All OK |
task_update_test-processed.example.json
| Severity | Location | Message |
|---|---|---|
warning |
Task.statusReason.text |
value should not start or finish with whitespace ' Test kit has been processed' |
warning |
Task |
Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation) |
ℹ️ information |
Task.statusReason |
Binding for path Task.statusReason in profile StructureDefinition[http://hl7.org/fhir/StructureDefinition/Task |
ℹ️ information |
Task.businessStatus |
Binding for path Task.businessStatus in profile StructureDefinition[http://hl7.org/fhir/StructureDefinition/Task |
ordereligibility_servicerequest.example.json
| Severity | Location | Message |
|---|---|---|
ℹ️ information |
— |
All OK |
task_update_dispatched.example.json
| Severity | Location | Message |
|---|---|---|
ℹ️ information |
Task.statusReason |
Binding for path Task.statusReason in profile StructureDefinition[http://hl7.org/fhir/StructureDefinition/Task |
ℹ️ information |
Task.businessStatus |
Binding for path Task.businessStatus in profile StructureDefinition[http://hl7.org/fhir/StructureDefinition/Task |
order_cancelled.example.json
| Severity | Location | Message |
|---|---|---|
ℹ️ information |
— |
All OK |
order_servicerequest.example.json
| Severity | Location | Message |
|---|---|---|
ℹ️ information |
— |
All OK |
operationoutcome_business_rule.example.json
| Severity | Location | Message |
|---|---|---|
ℹ️ information |
— |
All OK |
Full HTML report available in the workflow run artifacts.
Needed to make 'contained' no longer required, as we don't have enough information to fully populate the patient at that point, and can only use a reference
Some other minor changes to align the examples within the spec to the JSON examples.
f06e067 to
9bbe90f
Compare
Generally removing references to order rejection, and clarifying that the failure of the order eligibility check is the only supported way for the suppliers to reject orders based on eligibility.
…t a raw string. This caused a FHIR validator error
Contributor
Author
|
@ElldanLimited - I think I've managed to get the allowed businessStatus values as an enum, but it would be useful to check that's worked for you (not 100% confident in the inheritance parts of OpenAPI!). I've also removed references to 'order rejection', and clarified in the documentation (status-transitions.md) that the Pre-Eligibility Check is where any patient eligibility decisions by the supplier will be made. |
lewisbirks
reviewed
Jun 24, 2026
Also added specific failure codes for some obvious possible errors (order not found, order already processed)
clarify wording of first order needing to go to supplier before being moved to dispatch Co-authored-by: Lewis Birks <22620804+lewisbirks@users.noreply.github.com>
lewisbirks
approved these changes
Jun 26, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Update the API specs to add in the route for sending cancellations to the suppliers.
Also updated the FHIR Task status a little to demonstrate how the 'order-rejected' update would work.
Context
There is clarification needed between order cancellation (user-driven) and rejection (supplier-driven).
An API spec update was needed for order cancellation, and a similar update also helps to clarify how order rejection is expected to work.
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.