Skip to content

Commit 5e8968d

Browse files
Merge pull request #139 from NHSDigital/apm-000-odsapi-updgrade-changes
Updated specs to remove stu3 as required and updated specs to fix examples rendering issue.
2 parents 05bde17 + dd12ae7 commit 5e8968d

File tree

3 files changed

+271
-19
lines changed

3 files changed

+271
-19
lines changed

specification/patient-care-aggregator-api-consumer-api.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.0.3
22
info:
33
title: Wayfinder Patient Care Aggregator API
4-
version: v3.7.0
4+
version: v3.8.0
55
description: |
66
<div class="nhsd-m-emphasis-box nhsd-m-emphasis-box--emphasis nhsd-!t-margin-bottom-6" aria-label="Highlighted Information">
77
<div class="nhsd-a-box nhsd-a-box--border-blue">
@@ -580,7 +580,7 @@ components:
580580
description: Code system used for the specialty.
581581
type: string
582582
enum:
583-
- https://fhir.nhs.uk/STU3/CodeSystem/Specialty-1
583+
- https://fhir.nhs.uk/CodeSystem/Specialty-1
584584
display:
585585
description: The specialty itself, in plain text.
586586
type: string
@@ -2530,7 +2530,7 @@ components:
25302530
code: bookable
25312531
- url: https://fhir.nhs.uk/StructureDefinition/Extension-Specialty
25322532
valueCoding:
2533-
system: https://fhir.nhs.uk/STU3/CodeSystem/Specialty-1
2533+
system: https://fhir.nhs.uk/CodeSystem/Specialty-1
25342534
display: Ear, Nose & Throat
25352535
description: ENT - Specialist Otology - Freeman - Newcastle FT - RTD
25362536
scheduledPeriod:
@@ -2584,7 +2584,7 @@ components:
25842584
code: bookableWasCancelled
25852585
- url: https://fhir.nhs.uk/StructureDefinition/Extension-Specialty
25862586
valueCoding:
2587-
system: https://fhir.nhs.uk/STU3/CodeSystem/Specialty-1
2587+
system: https://fhir.nhs.uk/CodeSystem/Specialty-1
25882588
display: Rheumatology
25892589
description: Early Inflammatory Arthritis Service - Cheltenham General Hospital - RTE
25902590
scheduledPeriod:
@@ -2613,7 +2613,7 @@ components:
26132613
code: inReview
26142614
- url: https://fhir.nhs.uk/StructureDefinition/Extension-Specialty
26152615
valueCoding:
2616-
system: https://fhir.nhs.uk/STU3/CodeSystem/Specialty-1
2616+
system: https://fhir.nhs.uk/CodeSystem/Specialty-1
26172617
display: Urology
26182618
description: Urology - General Telephone Clinic - Clatterbridge Hospital RBL
26192619
scheduledPeriod:
@@ -2645,7 +2645,7 @@ components:
26452645
code: inReview
26462646
- url: https://fhir.nhs.uk/StructureDefinition/Extension-Specialty
26472647
valueCoding:
2648-
system: https://fhir.nhs.uk/STU3/CodeSystem/Specialty-1
2648+
system: https://fhir.nhs.uk/CodeSystem/Specialty-1
26492649
display: Neurology
26502650
description: Neurology - University Hospitals Sussex - St Richard's Chichester - RYR
26512651
scheduledPeriod:
@@ -2670,7 +2670,7 @@ components:
26702670
code: bookable
26712671
- url: https://fhir.nhs.uk/StructureDefinition/Extension-Specialty
26722672
valueCoding:
2673-
system: https://fhir.nhs.uk/STU3/CodeSystem/Specialty-1
2673+
system: https://fhir.nhs.uk/CodeSystem/Specialty-1
26742674
display: Dermatology
26752675
description: Dermatology General (WHH Ashford)-East Kent Hospitals Trust-RVV
26762676
scheduledPeriod:

specification/patient-care-aggregator-api-producer-api-standards.yaml

Lines changed: 237 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
openapi: '3.0.3'
44
info:
55
title: "Patient Care Aggregator Get Appointments, Documents and Questionnaires API Standard"
6-
version: "3.7.0"
6+
version: "3.8.0"
77
description: |
88
## Overview
99
![Patient Care Aggregator Get Appointments, Documents and Questionnaires API Standard context diagram](https://digital.nhs.uk/binaries/content/gallery/website/developer/api-catalogue/patient-care-aggregator-fhir-api/patient-care-aggregator-get-appointments-api-standard.svg?raw=true)
@@ -482,6 +482,7 @@ components:
482482
description: Coding system for the specialty code.
483483
enum:
484484
- "https://fhir.nhs.uk/STU3/CodeSystem/Specialty-1"
485+
- "https://fhir.nhs.uk/CodeSystem/Specialty-1"
485486
code:
486487
description: "Three-digit NHS specialty code. Equivalent to NHS Data Dictionary Treatment Function Code"
487488
type: string
@@ -1536,19 +1537,250 @@ components:
15361537
outpatientAppointment:
15371538
summary: 200 Example Patient with a Outpatient Appointment
15381539
value:
1539-
$ref: "./components/examples/GetAppointmentResponseHappyPath.json"
1540+
resourceType: Bundle
1541+
type: searchset
1542+
total: 1
1543+
entry:
1544+
- fullUrl: "https://fhir.patientportal.co.uk/Appointment/d9df1326-1008-45df-b9dd-a920b64ec043"
1545+
search:
1546+
mode: match
1547+
resource:
1548+
resourceType: Appointment
1549+
id: "d9df1326-1008-45df-b9dd-a920b64ec043"
1550+
extension:
1551+
- url: "https://fhir.nhs.uk/StructureDefinition/Extension-ServiceRequest-Priority"
1552+
valueCoding:
1553+
system: "https://fhir.nhs.uk/CodeSystem/eRS-Priority"
1554+
code: "ROUTINE"
1555+
- url: "https://fhir.nhs.uk/StructureDefinition/Extension-Appointment-RequestStatus"
1556+
valueCode: "Pending Reschedule"
1557+
- url: "https://fhir.nhs.uk/StructureDefinition/Extension-Consultation-Medium"
1558+
valueCode: "VIRTUAL"
1559+
- url: "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link"
1560+
valueUrl: "https://my.patientportal.co.uk/Appointment/d9df1326-1008-45df-b9dd-a920b64ec043"
1561+
identifier:
1562+
- system: "https://fhir.myclinicalsystem.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment"
1563+
value: "4817508"
1564+
- system: "https://prod.myportal.com/fhir/Appointment"
1565+
value: "3a146c43-2b21-44e9-95bc-6f4849e504c8"
1566+
status: "booked"
1567+
description: "Dermatology"
1568+
start: "2021-06-13T12:30:00+00:00"
1569+
end: "2021-06-13T12:45:00+00:00"
1570+
basedOn:
1571+
- identifier:
1572+
- system: "https://fhir.nhs.uk/Id/UBRN"
1573+
value: "000000000001"
1574+
- system: "https://fhir.myclinicalsystem.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest"
1575+
value: "265413"
1576+
- system: "https://fhir.nhs.uk/Id/PathwayId"
1577+
value: "RBH5644312231"
1578+
participant:
1579+
- actor:
1580+
type: "Patient"
1581+
identifier:
1582+
system: "https://fhir.nhs.uk/Id/nhs-number"
1583+
value: "9000000009"
1584+
status: "accepted"
1585+
- actor:
1586+
type: "Location"
1587+
identifier:
1588+
system: "https://fhir.nhs.uk/Id/ods-organization-code"
1589+
value: "RFF"
1590+
status: "accepted"
1591+
- actor:
1592+
type: "Location"
1593+
display: "Chapel Allerton Hospital, Dentistry Dept, 2nd Floor"
1594+
status: "accepted"
15401595
inpatientAdmission:
15411596
summary: 200 Example Patient with a Inpatient Admission and a pre assessment appointment
15421597
value:
1543-
$ref: "./components/examples/GetInpatientAdmissionResponseHappyPath.json"
1598+
resourceType: Bundle
1599+
type: searchset
1600+
total: 2
1601+
entry:
1602+
- fullUrl: "https://fhir.patientportal.co.uk/Appointment/06844193-7064-4d98-86c2-442d0209ca60"
1603+
search:
1604+
mode: match
1605+
resource:
1606+
resourceType: Appointment
1607+
id: "06844193-7064-4d98-86c2-442d0209ca60"
1608+
extension:
1609+
- url: "https://fhir.nhs.uk/StructureDefinition/Extension-ServiceRequest-Priority"
1610+
valueCoding:
1611+
system: "https://fhir.nhs.uk/CodeSystem/eRS-Priority"
1612+
code: "ROUTINE"
1613+
- url: "https://fhir.nhs.uk/StructureDefinition/Extension-Consultation-Medium"
1614+
valueCode: "FACE_TO_FACE"
1615+
- url: "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link"
1616+
valueUrl: "https://my.patientportal.co.uk/Appointment/06844193-7064-4d98-86c2-442d0209ca60"
1617+
identifier:
1618+
- system: "https://fhir.myclinicalsystem.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment"
1619+
value: "4817501"
1620+
- system: "https://prod.myportal.com/fhir/Appointment"
1621+
value: "06844193-7064-4d98-86c2-442d0209ca60"
1622+
status: "booked"
1623+
description: "Pre-assessment appointment"
1624+
start: "2025-05-20T12:30:00+00:00"
1625+
end: "2025-05-20T12:45:00+00:00"
1626+
basedOn:
1627+
- identifier:
1628+
- system: "https://fhir.myclinicalsystem.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest"
1629+
value: "265413"
1630+
- system: "https://fhir.nhs.uk/Id/PathwayId"
1631+
value: "RBH5644312231"
1632+
participant:
1633+
- actor:
1634+
type: "Patient"
1635+
identifier:
1636+
system: "https://fhir.nhs.uk/Id/nhs-number"
1637+
value: "9000000009"
1638+
status: "accepted"
1639+
- actor:
1640+
type: "Location"
1641+
identifier:
1642+
system: "https://fhir.nhs.uk/Id/ods-organization-code"
1643+
value: "RFF"
1644+
status: "accepted"
1645+
- actor:
1646+
type: "Location"
1647+
display: "Chapel Allerton Hospital, Dentistry Dept, 2nd Floor"
1648+
status: "accepted"
1649+
- fullUrl: "https://fhir.patientportal.co.uk/Appointment/cf3686d3-dda5-4e61-9245-6220da02eaf6"
1650+
search:
1651+
mode: match
1652+
resource:
1653+
resourceType: Appointment
1654+
id: "cf3686d3-dda5-4e61-9245-6220da02eaf6"
1655+
extension:
1656+
- url: "https://fhir.nhs.uk/StructureDefinition/Extension-Portal-Link"
1657+
valueUrl: "https://my.patientportal.co.uk/Appointment/cf3686d3-dda5-4e61-9245-6220da02eaf6"
1658+
identifier:
1659+
- system: "https://fhir.myclinicalsystem.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Appointment"
1660+
value: "4817509"
1661+
- system: "https://prod.myportal.com/fhir/Appointment"
1662+
value: "6a79f7d4-6c92-4b41-9020-349fab9a52da"
1663+
appointmentType:
1664+
coding:
1665+
- system: "http://terminology.hl7.org/CodeSystem/v3-ActCode"
1666+
code: "IMP"
1667+
display: "inpatient encounter"
1668+
status: "booked"
1669+
description: "Dermatology Procedure"
1670+
start: "2025-06-13T08:00:00+00:00"
1671+
end: "2025-06-16T17:00:00+00:00"
1672+
basedOn:
1673+
- identifier:
1674+
- system: "https://fhir.myclinicalsystem.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest"
1675+
value: "265414"
1676+
- system: "https://fhir.nhs.uk/Id/PathwayId"
1677+
value: "RBH5644312231"
1678+
participant:
1679+
- actor:
1680+
type: "Patient"
1681+
identifier:
1682+
system: "https://fhir.nhs.uk/Id/nhs-number"
1683+
value: "9000000009"
1684+
status: "accepted"
1685+
- actor:
1686+
type: "Location"
1687+
identifier:
1688+
system: "https://fhir.nhs.uk/Id/ods-organization-code"
1689+
value: "RFF"
1690+
status: "accepted"
1691+
- actor:
1692+
type: "Location"
1693+
display: "Chapel Allerton Hospital, Dentistry Dept, 2nd Floor"
1694+
status: "accepted"
15441695
document:
15451696
summary: 200 Example Patient with a Document
15461697
value:
1547-
$ref: "./components/examples/GetDocumentReferencesResponseHappyPath.json"
1698+
resourceType: Bundle
1699+
type: searchset
1700+
total: 1
1701+
entry:
1702+
- fullUrl: "https://my.patientportal.co.uk/DocumentReference/d9df1326-1008-45df-b9dd-a920b64ec043"
1703+
search:
1704+
mode: match
1705+
resource:
1706+
resourceType: DocumentReference
1707+
id: "2f02f7ac-0de5-4271-81ad-92b69ead27e9"
1708+
extension:
1709+
- url: "https://fhir.nhs.uk/StructureDefinition/Extension-Document-ReadReceipt"
1710+
valueCode: "Read"
1711+
identifier:
1712+
- system: "https://fhir.myclinicalsystem.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference"
1713+
value: "4817508"
1714+
- system: "https://my.portal.com/fhir/DocumentReference"
1715+
value: "3a146c43-2b21-44e9-95bc-6f4849e504c8"
1716+
status: "current"
1717+
docStatus: "final"
1718+
subject:
1719+
type: "Patient"
1720+
identifier:
1721+
system: "https://fhir.nhs.uk/Id/nhs-number"
1722+
value: "9000000001"
1723+
context:
1724+
related:
1725+
- type: "Appointment"
1726+
reference: "https://my.portal.com/fhir/R4/Appointment/0448E4C8-DD12-4BAD-9B59-6091C9484701"
1727+
date: "2021-06-13T12:30:00+00:00"
1728+
custodian:
1729+
type: "Organization"
1730+
identifier:
1731+
system: "https://fhir.nhs.uk/Id/ods-organization-code"
1732+
value: "RFF"
1733+
display: "Barnsley Hospital NHS Foundation Trust"
1734+
description: "Dermatology cancellation letter"
1735+
content:
1736+
- attachment:
1737+
contentType: "application/pdf"
1738+
url: "https://my.portal.com/Document/2f02f7ac-0de5-4271-81ad-92b69ead27e9"
15481739
questionnaire:
15491740
summary: 200 Example Patient with a Questionnaire
15501741
value:
1551-
$ref: "./components/examples/GetTasksResponseHappyPath.json"
1742+
resourceType: Bundle
1743+
type: searchset
1744+
total: 1
1745+
entry:
1746+
- fullUrl: "https://my.patientportal.co.uk/Task/d9df1326-1008-45df-b9dd-a920b64ec043"
1747+
search:
1748+
mode: match
1749+
resource:
1750+
resourceType: Task
1751+
id: "cdb83383-f17e-4bf7-8f40-342f7f7c7d8d"
1752+
basedOn:
1753+
- type: "CarePlan"
1754+
identifier:
1755+
system: "https://fhir.nhs.uk/Id/PathwayId"
1756+
value: "RBH5644312231"
1757+
status: "requested"
1758+
intent: "plan"
1759+
description: "Dermatology Pre-consultation Health Survey"
1760+
focus:
1761+
type: "Appointment"
1762+
reference: "https://my.portal.com/fhir/R4/Appointment/ec2458f2-1e24-41c8-b71b-0e701af7583d"
1763+
for:
1764+
type: "Patient"
1765+
identifier:
1766+
system: "https://fhir.nhs.uk/Id/nhs-number"
1767+
value: "9000000001"
1768+
authoredOn: "2021-06-13T12:30:00+00:00"
1769+
reasonReference:
1770+
type: "Questionnaire"
1771+
reference: "https://my.portal.com/Questionnaire/cdb83383-f17e-4bf7-8f40-342f7f7c7d8d"
1772+
owner:
1773+
type: "Organization"
1774+
identifier:
1775+
system: "https://fhir.nhs.uk/Id/ods-organization-code"
1776+
value: "RFF"
1777+
display: "Barnsley Hospital NHS Foundation Trust"
1778+
reasonCode:
1779+
coding:
1780+
- system: "https://fhir.nhs.uk/StructureDefinition/Extension-Questionnaire-Type"
1781+
code: "CONS-Survey"
1782+
display: "Consultation Survey"
1783+
text: "Pre-consultation Survey"
15521784
missingNhsNumber:
15531785
summary: 400 Missing patient:identifier search parameter
15541786
description: No patient:identifier as a search parameter.

specification/patient-care-aggregator-api-record-service-api.yaml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
openapi: '3.0.0'
55
info:
66
title: "Patient Care Aggregator Record Service API"
7-
version: "1.0.1"
7+
version: "1.0.2"
88
description: |
99
## Overview
1010
![Patient Care Aggregator Get Appointments, Documents and Questionnaires API Standard context diagram](https://digital.nhs.uk/binaries/content/gallery/website/developer/api-catalogue/patient-care-aggregator-fhir-api/patient-care-aggregator-record-service-api-context-diagram.svg?raw=true)
@@ -168,8 +168,9 @@ paths:
168168
type: string
169169
pattern: '^[1-9][0-9]{9}$'
170170
example: '9000000009'
171-
example:
172-
$ref: components/examples/RecordServiceSendPatientListRequest.json
171+
examples:
172+
default:
173+
$ref: "#/components/examples/RecordServiceSendPatientListRequest"
173174
responses:
174175
'200':
175176
description: OK
@@ -182,8 +183,9 @@ paths:
182183
type: string
183184
enum:
184185
- success
185-
example:
186-
$ref: components/examples/RecordServiceSendPatientListResponseHappyPath.json
186+
examples:
187+
default:
188+
$ref: "#/components/examples/RecordServiceSendPatientListResponseHappyPath"
187189
'4XX':
188190
description: |
189191
An error occurred as follows:
@@ -206,10 +208,28 @@ paths:
206208
data:
207209
type: string
208210
example: 'clientId mismatch'
209-
example:
210-
$ref: components/examples/RecordServiceSendPatientListResponseError.json
211+
examples:
212+
default:
213+
$ref: "#/components/examples/RecordServiceSendPatientListResponseError"
211214
components:
212215
securitySchemes:
213216
bearerAuth:
214217
type: http
215218
scheme: bearer
219+
examples:
220+
RecordServiceSendPatientListRequest:
221+
summary: Example request to send a list of NHS numbers
222+
value:
223+
clientId: "pep-01"
224+
nhsNumbers:
225+
- "9000000009"
226+
- "9000000018"
227+
RecordServiceSendPatientListResponseHappyPath:
228+
summary: Example successful response
229+
value:
230+
result: "success"
231+
RecordServiceSendPatientListResponseError:
232+
summary: Example error response
233+
value:
234+
code: "error.bad-request"
235+
data: "\"nhsNumbers[1]\" with value \"abc\" fails to match the required pattern: /^[1-9][0-9]{9}$/. \"nhsNumbers[2]\" with value \"0123456789\" fails to match the required pattern: /^[1-9][0-9]{9}$/. \"nhsNumbers[3]\" with value \"012345678a\" fails to match the required pattern: /^[1-9][0-9]{9}$/. \"nhsNumbers[4]\" with value \"0123456789\" fails to match the required pattern: /^[1-9][0-9]{9}$/"

0 commit comments

Comments
 (0)