SPEC CHANGE - WPP-11130 - Proposed changes to API specs for Invite to Book - #166
SPEC CHANGE - WPP-11130 - Proposed changes to API specs for Invite to Book#166simeonparris-nhs wants to merge 26 commits into
Conversation
so that it is suitable for a variety of tasks rather than just questionnaire responses
so that a variety of task details, such as booking invites and questionnaire responses can be communicated
for allAppointmentBookingInvitationStates
…hile backwards compatible
|
Just want to check this has been aligned with kevin/sachit? |
The design has been run through with Sachit yes, we collaborated on that, but not this specific spec change. Reaching out to David Rabbich in Sachit and Kevin's absence. |
Definitely think this will be a positive change as the line between tasks and questionnaires is currently quite blurry. |
…nts and only trigger after an API spec change
| example: "RBH5644312231" | ||
| status: | ||
| description: "Status of the Task for the completion of the Questionnaire. See: https://build.fhir.org/valueset-task-status.html" | ||
| description: "Status of the task. See: https://build.fhir.org/valueset-task-status.html" |
There was a problem hiding this comment.
Expand on link details, description on what each status means etc...
There was a problem hiding this comment.
I think this will need some input from the PIFU / Questionnaires team so we describe each of these statuses correctly.
KazeemHamzat
left a comment
There was a problem hiding this comment.
Please reach out to us via our Teams email to progress the review. However, the underlisted issues have been noted.
- What is the discovery point for the "Invitation to Book Appointment" concept? Does a proposed appointment already exist, or are only the organisation's available slots/schedules exposed to the patient for selection?
- Some FHIR conventions have been misrepresented and require correction.
- Some non-existent FHIR artefacts have also been referenced and need to be defined.
- The mapping table needs to be properly aligned with the spec.
| description: FHIR extension type. | ||
| type: string | ||
| enum: | ||
| - https://fhir.nhs.uk/StructureDefinition/Extension-Client-id |
There was a problem hiding this comment.
Extension-Client-id does not exist. It needs to be defined
| - code | ||
| properties: | ||
| system: | ||
| description: Coding system for treatment function. |
There was a problem hiding this comment.
There is need to explore some of the Task element of type CodeableConcept before creating Extension-Task-TreatmentFunction. We will explore this with you.
| display: "COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST" | ||
| reasonCode: | ||
| coding: | ||
| - system: "https://fhir.nhs.uk/StructureDefinition/Extension-Questionnaire-Type" |
| description: URI to identifier Questionnaire types | ||
| description: URI to identify Task types | ||
| enum: | ||
| - https://fhir.nhs.uk/StructureDefinition/Extension-Questionnaire-Type |
| @@ -1820,6 +1862,57 @@ components: | |||
| system: "https://fhir.nhs.uk/CodeSystem/Specialty-1" | |||
There was a problem hiding this comment.
CodeSystem definition and associated valueset?
| basedOn: | ||
| - type: "CarePlan" | ||
| identifier: | ||
| system: "https://fhir.nhs.uk/Id/PathwayId" |
There was a problem hiding this comment.
definition? https://fhir.nhs.uk/Id/PathwayId
| @@ -1820,6 +1862,57 @@ components: | |||
| system: "https://fhir.nhs.uk/CodeSystem/Specialty-1" | |||
There was a problem hiding this comment.
Should we align this with UK CORE ? Dual run and switch over to align BaRS
|
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket: APM-000 |
API Spec HTML DocsBuilt from commit Download HTML API Specs: api-specs-html-docs-9bda68e.zip |
API Spec HTML DocsBuilt from commit Download HTML API Specs: api-specs-html-docs-456a736.zip |
API Spec HTML DocsBuilt from commit Download HTML API Specs: api-specs-html-docs-333acb5.zip |
API Spec HTML DocsBuilt from commit Download HTML API Specs: api-specs-html-docs-536a269.zip |
as reasonReference.reference carries the same URL value
API Spec HTML DocsBuilt from commit Download HTML API Specs: api-specs-html-docs-e682726.zip |
as latest invite to book designs do not make use of it
of the new Task resource in the consumer spec as I forgot to remove then when I removed that extension
API Spec HTML DocsBuilt from commit Download HTML API Specs: api-specs-html-docs-6cb7f63.zip |
❌ Branch Name Validation FailedBranch format is invalid. Expected format: Ensure JIRA ticket key is included. Allowed prefixes: feat, feature, chore, spike, hotfix, bugfix, release, revert |
API Spec HTML DocsBuilt from commit Download HTML API Specs: api-specs-html-docs-1543182.zip |
Invite to Book - Task Resource Alignment Summary
Overview
To support the Invite to Book changes, the design has been made to uplift the existing Task resource to support both Invitations to Book and Questionnaires, along with being extensible for further use cases.
The Consumer spec Task resource has been updated to align with the Producer spec's generic FHIR-based Task implementation. This enables the Task resource to support multiple use cases (questionnaires, appointment booking invites, and future task types) while maintaining backwards compatibility with the existing Questionnaire resource.
Why This Change?
Previous Implementation
kindenum was rigid and required updates for each new task typeNew Implementation
status,intent,reasonCode,reasonReferencereasonCodeand extensions for new task typesKey Changes
Removed Fields
kind→ Replaced byreasonCode(FHIR standard, provides more semantic meaning)scheduledPeriod→ Replaced byrestriction.period(FHIR standard)performer→ Replaced byowner(FHIR standard terminology)Added Fields
ididentifierintentauthoredlastModifiedrestriction.periodfocusforownerbasedOnreasonCodereasonReferenceModified Fields
status: Changed from["not-started", "in-progress", "completed", "cancelled"]to FHIR-compliant["requested", "rejected", "cancelled", "in-progress", "completed"]description: Enhanced with clearer guidance for both questionnaires and invitesextension: Streamlined to include Client ID and Treatment Function (for PIFU only)Task Type Classification
Using
reasonCodeto Distinguish Task TypesThe new
reasonCodestructure replaces the oldkindenum and provides semantic clarity:For Questionnaires:
For Appointment Booking Invites:
Backwards Compatibility
Questionnaire Resource Preserved
Questionnaireresource remains unchangedMigration Path
Data Models
Appointment Booking Invite (Task)
Questionnaire (Task)
Implementation Notes
For Consumer API Users
For Portal Providers (Producer API)
For the Aggregator Service
Status Values Mapping
not-startedrequestedin-progressin-progresscompletedcompletedcancelledcancelledrejectedExtension Framework
The streamlined extensions provide:
Client ID (optional)
https://fhir.nhs.uk/StructureDefinition/Extension-Client-idTreatment Function (conditional)
https://fhir.nhs.uk/StructureDefinition/Extension-Task-TreatmentFunctionQuestions & Clarifications
Q: When will the Questionnaire resource be deprecated?
A: No immediate deprecation. The Questionnaire resource will remain supported during a transition period (to be determined). We'll provide advance notice before any deprecation.
Q: Do I need to update my system immediately?
A: No. Existing implementations using Questionnaire continue to work. Adopt Task resource for new implementations or when ready to migrate.
Q: How do I distinguish between task types?
A: Use the
reasonCode.coding.systemfield:Extension-Questionnaire-TypeExtension-Task-TypeQ: What about linked appointments?
A: Use the
focusfield to reference an appointment:focus.referencepoints to the booked appointmentfocusmay be empty or optionalQ: Can I store custom data in Task?
A: Yes, use extensions (array) to add custom fields following FHIR extension patterns.