diff --git a/sandbox/src/mocks/stu3/acceptReferral/responses/ExampleResponse.json b/sandbox/src/mocks/stu3/acceptReferral/responses/ExampleResponse.json index 8d19573be..a1b851ef5 100644 --- a/sandbox/src/mocks/stu3/acceptReferral/responses/ExampleResponse.json +++ b/sandbox/src/mocks/stu3/acceptReferral/responses/ExampleResponse.json @@ -249,6 +249,32 @@ "value": "103264992985" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556111" + } + } } ], "contentType": "image/png", diff --git a/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/MinimalExampleDBS.json b/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/MinimalExampleDBS.json index 9147c8ff9..ab0e2fc66 100644 --- a/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/MinimalExampleDBS.json +++ b/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/MinimalExampleDBS.json @@ -249,7 +249,33 @@ "value": "103264992985" } } - } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556111" + } + } + } ], "contentType": "image/png", "url": "Binary/857b901d-1491-47d3-90e2-6c9f13f744dc", diff --git a/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/MinimalExampleIBS.json b/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/MinimalExampleIBS.json index 3abb2af52..a19c8cbe3 100644 --- a/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/MinimalExampleIBS.json +++ b/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/MinimalExampleIBS.json @@ -240,7 +240,24 @@ "value": "021600556514" } } - } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + } ], "contentType": "image/png", "url": "Binary/857b901d-1491-47d3-90e2-6c9f13f744dc", diff --git a/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/PriorityChangeAndWithAttachmentsDBS.json b/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/PriorityChangeAndWithAttachmentsDBS.json index f172d1fc0..52ff71abb 100644 --- a/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/PriorityChangeAndWithAttachmentsDBS.json +++ b/sandbox/src/mocks/stu3/cancelAppointmentActionLater/responses/PriorityChangeAndWithAttachmentsDBS.json @@ -249,7 +249,24 @@ "value": "103264992985" } } - } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "PENDING" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + } ], "contentType": "image/png", "url": "Binary/857b901d-1491-47d3-90e2-6c9f13f744dc", @@ -293,7 +310,24 @@ "value": "021600556514" } } - } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + } ], "contentType": "application/pdf", "url": "Binary/89d0521b-057e-4d5c-8630-f5ba2728843e", @@ -337,7 +371,24 @@ "value": "021600556514" } } - } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + } ], "contentType": "application/pdf", "url": "Binary/badaf6fc-90f4-411d-999f-04ccd79fa166", diff --git a/sandbox/src/mocks/stu3/cancelReferral/responses/CancelledReferralResolvedDeferralIntendPrivateWithComment.json b/sandbox/src/mocks/stu3/cancelReferral/responses/CancelledReferralResolvedDeferralIntendPrivateWithComment.json index c19f808da..e7575898f 100644 --- a/sandbox/src/mocks/stu3/cancelReferral/responses/CancelledReferralResolvedDeferralIntendPrivateWithComment.json +++ b/sandbox/src/mocks/stu3/cancelReferral/responses/CancelledReferralResolvedDeferralIntendPrivateWithComment.json @@ -239,6 +239,23 @@ "value": "103264992985" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "text/plain", diff --git a/sandbox/src/mocks/stu3/changeShortlist/requests/NonMixedShortlistWithDocument.json b/sandbox/src/mocks/stu3/changeShortlist/requests/NonMixedShortlistWithDocument.json new file mode 100644 index 000000000..40b855028 --- /dev/null +++ b/sandbox/src/mocks/stu3/changeShortlist/requests/NonMixedShortlistWithDocument.json @@ -0,0 +1,105 @@ +{ + "resourceType": "Parameters", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlist-Parameters-1" + ] + }, + "parameter": [ + { + "name": "intentionToAddReferralLetter", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1", + "code": "NOT_INTENDING_TO_ADD" + } + }, + { + "name": "firstReminderLetterFollowUpDays", + "valueUnsignedInt": 1 + }, + { + "name": "shortlist", + "resource": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ] + }, + "resourceType": "List", + "status": "current", + "mode": "snapshot", + "contained": [ + { + "resourceType": "Parameters", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ] + }, + "id": "ServiceSearchCriteria-1", + "parameter": [ + { + "name": "priority", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1", + "code": "ROUTINE" + } + }, + { + "name": "specialty", + "valueCoding": { + "system": "_baseUrl_/STU3/CodeSystem/SPECIALTY", + "code": "CARDIOLOGY" + } + }, + { + "name": "clinicType", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1", + "code": "HEART_FAILURE" + } + }, + { + "name": "commissioningProvisioning", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1", + "code": "ALL_AVAILABLE_FOR_BOOKING" + } + }, + { + "name": "ageAndGenderAppropriate", + "valueBoolean": false + } + ] + } + ], + "entry": [ + { + "item": { + "identifier": { + "system": "http://fhir.nhs.net/Id/ers-service", + "value": "11004" + } + } + }, + { + "item": { + "identifier": { + "system": "http://fhir.nhs.net/Id/ers-service", + "value": "11002" + } + } + } + ], + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1", + "valueReference": { + "reference": "#ServiceSearchCriteria-1" + } + } + ] + } + } + ] +} diff --git a/sandbox/src/mocks/stu3/changeShortlist/responses/NonMixedShortlistWithDocument.json b/sandbox/src/mocks/stu3/changeShortlist/responses/NonMixedShortlistWithDocument.json new file mode 100644 index 000000000..d7e65a9b1 --- /dev/null +++ b/sandbox/src/mocks/stu3/changeShortlist/responses/NonMixedShortlistWithDocument.json @@ -0,0 +1,211 @@ +{ + "id": "000000070000", + "meta": { + "versionId": "9", + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ] + }, + "resourceType": "ReferralRequest", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1", + "valueDateTime": "2024-11-21T11:08:22.299Z" + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1", + "valueCodeableConcept": { + "coding": [ + { + "code": "ROUTINE", + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1", + "display": "Routine" + } + ] + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1", + "valueReference": { + "reference": "#shortlist" + } + }, + { + "extension": [ + { + "url": "state", + "valueCoding": { + "code": "NOT_BOOKED", + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1", + "display": "Not Booked" + } + } + ], + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1", + "valueIdentifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + ], + "contained": [ + { + "id": "serviceSearchCriteria", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ] + }, + "resourceType": "Parameters", + "parameter": [ + { + "name": "priority", + "valueCoding": { + "code": "ROUTINE", + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + } + }, + { + "name": "specialty", + "valueCoding": { + "code": "CARDIOLOGY", + "system": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + } + }, + { + "name": "clinicType", + "valueCoding": { + "code": "HEART_FAILURE", + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + } + }, + { + "name": "ageAndGenderAppropriate", + "valueBoolean": false + }, + { + "name": "commissioningProvisioning", + "valueCoding": { + "code": "ALL_AVAILABLE_FOR_BOOKING", + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + } + } + ] + }, + { + "id": "shortlist", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ] + }, + "resourceType": "List", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1", + "valueReference": { + "reference": "#serviceSearchCriteria" + } + } + ], + "status": "current", + "mode": "snapshot", + "entry": [ + { + "item": { + "identifier": { + "system": "http://fhir.nhs.net/Id/ers-service", + "value": "11004" + }, + "display": "Cardiology Triage Business Service" + } + }, + { + "item": { + "identifier": { + "system": "http://fhir.nhs.net/Id/ers-service", + "value": "11002" + }, + "display": "Good Cardiology Business Service" + } + } + ] + }, + { + "id": "DocumentReference-70000", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] + }, + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "code": "REFERRER", + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "display": "Referrer" + } + ] + }, + "status": "current", + "indexed": "2024-11-21T11:08:24.956Z", + "description": "Description for TXT File", + "content": [ + { + "attachment": { + "id": "70000", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "103264992985" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "code": "AVAILABLE", + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + } + ], + "contentType": "text/plain", + "url": "Binary/bb3db85f-21a1-4fa8-a490-6da6b06c0e06", + "size": 4, + "title": "sample-txt-attachment-2.0.0.txt", + "creation": "2024-11-21" + } + } + ] + } + ], + "status": "active", + "subject": { + "identifier": { + "system": "http://fhir.nhs.net/Id/nhs-number", + "value": "1000000001" + } + }, + "supportingInfo": [ + { + "reference": "#DocumentReference-70000" + } + ], + "intent": "plan" +} diff --git a/sandbox/src/mocks/stu3/changeShortlistAndSendForTriage/responses/MinimalRequest.json b/sandbox/src/mocks/stu3/changeShortlistAndSendForTriage/responses/MinimalRequest.json index aca30aaa5..231bda140 100644 --- a/sandbox/src/mocks/stu3/changeShortlistAndSendForTriage/responses/MinimalRequest.json +++ b/sandbox/src/mocks/stu3/changeShortlistAndSendForTriage/responses/MinimalRequest.json @@ -251,6 +251,32 @@ } }, "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556111" + } + } } ], "size": 4, diff --git a/sandbox/src/mocks/stu3/convertAdviceAndGuidanceToReferral/responses/NoAttachments.json b/sandbox/src/mocks/stu3/convertAdviceAndGuidanceToReferral/responses/NoAttachments.json index 5d589d7e9..be68688b1 100644 --- a/sandbox/src/mocks/stu3/convertAdviceAndGuidanceToReferral/responses/NoAttachments.json +++ b/sandbox/src/mocks/stu3/convertAdviceAndGuidanceToReferral/responses/NoAttachments.json @@ -235,6 +235,23 @@ "value": "103264994981" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", diff --git a/sandbox/src/mocks/stu3/convertAdviceAndGuidanceToReferral/responses/WithAttachments.json b/sandbox/src/mocks/stu3/convertAdviceAndGuidanceToReferral/responses/WithAttachments.json index 33b0c0247..a148626e4 100644 --- a/sandbox/src/mocks/stu3/convertAdviceAndGuidanceToReferral/responses/WithAttachments.json +++ b/sandbox/src/mocks/stu3/convertAdviceAndGuidanceToReferral/responses/WithAttachments.json @@ -224,6 +224,23 @@ "value": "103264994981" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", @@ -265,7 +282,33 @@ "valueReference": { "identifier": { "system": "http://fhir.nhs.net/Id/sds-user-id", - "value": "103264992985" + "value": "103264994345" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "103264994989" } } } @@ -312,6 +355,23 @@ "value": "103264994981" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", @@ -409,6 +469,23 @@ "value": "103264994981" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", @@ -453,6 +530,23 @@ "value": "103264992985" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "PENDING" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "image/png", diff --git a/sandbox/src/mocks/stu3/createAdviceAndGuidance/responses/ExampleRCAWithAttachments.json b/sandbox/src/mocks/stu3/createAdviceAndGuidance/responses/ExampleRCAWithAttachments.json index bb0a91bd7..f5c6c86e0 100644 --- a/sandbox/src/mocks/stu3/createAdviceAndGuidance/responses/ExampleRCAWithAttachments.json +++ b/sandbox/src/mocks/stu3/createAdviceAndGuidance/responses/ExampleRCAWithAttachments.json @@ -242,6 +242,43 @@ "content": [ { "attachment": { + "id": "70002", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "103264992985" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } + } + ], "contentType": "text/plain", "url": "Binary/e1015896-92f4-4073-ad3c-5f30fca76448", "size": 23, @@ -379,4 +416,4 @@ } } ] -} \ No newline at end of file +} diff --git a/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithMultipleDocumentReferences.json b/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithMultipleDocumentReferences.json index 75c363cfe..9cacadb08 100644 --- a/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithMultipleDocumentReferences.json +++ b/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithMultipleDocumentReferences.json @@ -163,6 +163,23 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", @@ -207,6 +224,23 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", diff --git a/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithSingleDocumentReference.json b/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithSingleDocumentReference.json index 2636c49d7..6cf82750a 100644 --- a/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithSingleDocumentReference.json +++ b/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithSingleDocumentReference.json @@ -159,6 +159,23 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", diff --git a/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithUpdatedDocumentReferences.json b/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithUpdatedDocumentReferences.json index 977be20b2..679d9f8b7 100644 --- a/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithUpdatedDocumentReferences.json +++ b/sandbox/src/mocks/stu3/maintainReferralLetter/responses/ReferralRequestWithUpdatedDocumentReferences.json @@ -163,6 +163,23 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", diff --git a/sandbox/src/mocks/stu3/recordTriageOutcome/responses/AcceptReferBookLater.json b/sandbox/src/mocks/stu3/recordTriageOutcome/responses/AcceptReferBookLater.json index d6fa9633a..906f1eb83 100644 --- a/sandbox/src/mocks/stu3/recordTriageOutcome/responses/AcceptReferBookLater.json +++ b/sandbox/src/mocks/stu3/recordTriageOutcome/responses/AcceptReferBookLater.json @@ -240,6 +240,23 @@ "value": "103264992985" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "image/png", diff --git a/sandbox/src/mocks/stu3/recordTriageOutcome/responses/AttachmentIncluded.json b/sandbox/src/mocks/stu3/recordTriageOutcome/responses/AttachmentIncluded.json index 101b494e2..351690ae3 100644 --- a/sandbox/src/mocks/stu3/recordTriageOutcome/responses/AttachmentIncluded.json +++ b/sandbox/src/mocks/stu3/recordTriageOutcome/responses/AttachmentIncluded.json @@ -240,6 +240,23 @@ "value": "103264992985" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "PENDING" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "image/png", @@ -284,6 +301,23 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", diff --git a/sandbox/src/mocks/stu3/recordTriageOutcome/responses/ReturnToReferrerWithAdvice.json b/sandbox/src/mocks/stu3/recordTriageOutcome/responses/ReturnToReferrerWithAdvice.json index 0e87f993f..5ab20c876 100644 --- a/sandbox/src/mocks/stu3/recordTriageOutcome/responses/ReturnToReferrerWithAdvice.json +++ b/sandbox/src/mocks/stu3/recordTriageOutcome/responses/ReturnToReferrerWithAdvice.json @@ -240,6 +240,23 @@ "value": "103264992985" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "image/png", diff --git a/sandbox/src/mocks/stu3/rejectReferral/responses/ExampleResponseDbs.json b/sandbox/src/mocks/stu3/rejectReferral/responses/ExampleResponseDbs.json index f883c6241..d49c6a2ec 100644 --- a/sandbox/src/mocks/stu3/rejectReferral/responses/ExampleResponseDbs.json +++ b/sandbox/src/mocks/stu3/rejectReferral/responses/ExampleResponseDbs.json @@ -255,7 +255,33 @@ "value": "021600556514" } } - } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556111" + } + } + } ], "contentType": "image/png", "url": "Binary/3816ca48-897a-4be0-907d-a4e830b4e213", diff --git a/sandbox/src/mocks/stu3/rejectReferral/responses/ExampleResponseIbs.json b/sandbox/src/mocks/stu3/rejectReferral/responses/ExampleResponseIbs.json index 2799bdc64..78ad659c3 100644 --- a/sandbox/src/mocks/stu3/rejectReferral/responses/ExampleResponseIbs.json +++ b/sandbox/src/mocks/stu3/rejectReferral/responses/ExampleResponseIbs.json @@ -238,6 +238,23 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "PENDING" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "image/png", diff --git a/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceConversation/AttachmentPresentInEachDirection.json b/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceConversation/AttachmentPresentInEachDirection.json index c2d92e38b..7b24a261d 100644 --- a/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceConversation/AttachmentPresentInEachDirection.json +++ b/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceConversation/AttachmentPresentInEachDirection.json @@ -266,6 +266,13 @@ "attachment": { "id": "70000", "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, { "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", "valueReference": { @@ -274,6 +281,24 @@ "value": "921600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "004377014925" + } + } } ], "contentType": "application/pdf", @@ -316,6 +341,13 @@ "attachment": { "id": "70001", "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, { "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", "valueReference": { @@ -324,6 +356,24 @@ "value": "103264994981" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "004377014925" + } + } } ], "contentType": "application/pdf", diff --git a/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceConversation/AttachmentUploadedFromRCS.json b/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceConversation/AttachmentUploadedFromRCS.json index bc7930811..699c84aba 100644 --- a/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceConversation/AttachmentUploadedFromRCS.json +++ b/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceConversation/AttachmentUploadedFromRCS.json @@ -256,6 +256,13 @@ "attachment": { "id": "70000", "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, { "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", "valueReference": { @@ -264,6 +271,24 @@ "value": "103264992985" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "004377014925" + } + } } ], "contentType": "image/png", diff --git a/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceConversation/UnavailableAttachments.json b/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceConversation/UnavailableAttachments.json new file mode 100644 index 000000000..b0f4bc7f7 --- /dev/null +++ b/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceConversation/UnavailableAttachments.json @@ -0,0 +1,473 @@ +{ + "id": "87b2902f-5f2b-4e15-b678-b65951fab131", + "meta": { + "lastUpdated": "2021-09-24T11:50:11.000Z", + "profile": [ + "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" + ] + }, + "resourceType": "Bundle", + "type": "searchset", + "total": 2, + "link": [ + { + "relation": "self", + "url": "_baseUrl_/STU3/Communication?based-on=CommunicationRequest/000000070003/_history/2&_include=Communication:requester-practitionerrole:PractitionerRole&_include=Communication:sender-practitionerrole:PractionerRole&_include=Communication:content-reference:DocumentReference" + } + ], + "entry": [ + { + "fullUrl": "_baseUrl_/STU3/Communication/70000", + "resource": { + "id": "70000", + "meta": { + "versionId": "0", + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1" + ] + }, + "resourceType": "Communication", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-Communication-Requester-1", + "valueReference": { + "reference": "PractitionerRole/921600556514.R68.REFERRING-CLINICIAN" + } + } + ], + "basedOn": [ + { + "reference": "CommunicationRequest/000000070003/_history/2" + } + ], + "status": "completed", + "category": [ + { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1", + "code": "REQUESTER" + } + ] + } + ], + "recipient": [ + { + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/ers-service", + "value": "11014" + } + } + } + ] + } + ], + "sent": "2021-09-23T14:43:45.869Z", + "sender": { + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1", + "valueReference": { + "reference": "PractitionerRole/921600556514.R68.REFERRING-CLINICIAN" + } + } + ] + }, + "payload": [ + { + "contentReference": { + "reference": "DocumentReference/70000" + } + } + ], + "note": [ + { + "text": "Please advise me on this patient who ...(information about patient)" + } + ] + }, + "search": { + "mode": "match" + } + }, + { + "fullUrl": "_baseUrl_/STU3/Communication/70003", + "resource": { + "id": "70003", + "meta": { + "versionId": "0", + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1" + ] + }, + "resourceType": "Communication", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-Communication-Requester-1", + "valueReference": { + "reference": "PractitionerRole/103264994981.R69.SERVICE-PROVIDER-CLINICIAN" + } + } + ], + "basedOn": [ + { + "reference": "CommunicationRequest/000000070001/_history/6" + } + ], + "status": "completed", + "category": [ + { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1", + "code": "RESPONDER" + } + ] + } + ], + "recipient": [ + { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + ], + "sent": "2021-09-23T14:43:46.991Z", + "sender": { + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1", + "valueReference": { + "reference": "PractitionerRole/103264994981.R69.SERVICE-PROVIDER-CLINICIAN" + } + } + ] + }, + "payload": [ + { + "contentReference": { + "reference": "DocumentReference/70001" + } + }, + { + "contentReference": { + "reference": "DocumentReference/70002" + } + } + ], + "note": [ + { + "text": "Please perform xxx test and send me the results" + } + ] + }, + "search": { + "mode": "match" + } + }, + { + "fullUrl": "_baseUrl_/STU3/PractitionerRole/103264994981.R69.SERVICE-PROVIDER-CLINICIAN", + "resource": { + "id": "103264994981.R69.SERVICE-PROVIDER-CLINICIAN", + "meta": { + "profile": [ + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + ] + }, + "resourceType": "PractitionerRole", + "practitioner": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "103264994981" + } + }, + "organization": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + }, + "code": [ + { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1", + "code": "SERVICE_PROVIDER_CLINICIAN" + } + ] + } + ] + }, + "search": { + "mode": "include" + } + }, + { + "fullUrl": "_baseUrl_/STU3/PractitionerRole/921600556514.R68.REFERRING-CLINICIAN", + "resource": { + "id": "921600556514.R68.REFERRING-CLINICIAN", + "meta": { + "profile": [ + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + ] + }, + "resourceType": "PractitionerRole", + "practitioner": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "921600556514" + } + }, + "organization": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R68" + } + }, + "code": [ + { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1", + "code": "REFERRING_CLINICIAN" + } + ] + } + ] + }, + "search": { + "mode": "include" + } + }, + { + "fullUrl": "_baseUrl_/STU3/DocumentReference/70000", + "resource": { + "id": "70000", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] + }, + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "code": "ADVICE_REQUEST", + "display": "Advice Request" + } + ] + }, + "status": "current", + "indexed": "2021-09-23T14:43:49.565Z", + "description": "test results A", + "content": [ + { + "attachment": { + "id": "70000", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "PENDING" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "921600556514" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "004377014925" + } + } + } + ], + "contentType": "application/pdf", + "url": "Binary/3816ca48-897a-4be0-907d-a4e830b4e213", + "size": 6, + "title": "testResultsA.pdf", + "creation": "2021-09-23" + } + } + ] + }, + "search": { + "mode": "include" + } + }, + { + "fullUrl": "_baseUrl_/STU3/DocumentReference/70001", + "resource": { + "id": "70001", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] + }, + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "code": "GUIDANCE_RESPONSE", + "display": "Guidance Response" + } + ] + }, + "status": "current", + "indexed": "2021-09-24T11:21:00.000Z", + "description": "test xxx info", + "content": [ + { + "attachment": { + "id": "70001", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "THREATS_FOUND" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "103264994981" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "004377014925" + } + } + } + ], + "contentType": "application/pdf", + "url": "Binary/719f6045-e791-4029-8e0f-1201c02b0a55", + "size": 11, + "title": "testXXXInfo.pdf", + "creation": "2021-09-24" + } + } + ] + }, + "search": { + "mode": "include" + } + }, + { + "fullUrl": "_baseUrl_/STU3/DocumentReference/70002", + "resource": { + "id": "70002", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] + }, + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "code": "GUIDANCE_RESPONSE", + "display": "Guidance Response" + } + ] + }, + "status": "current", + "indexed": "2021-09-24T11:21:00.000Z", + "description": "test xxx info", + "content": [ + { + "attachment": { + "id": "70002", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "VALIDATION_FAILED" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "103264994981" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "004377014925" + } + } + } + ], + "contentType": "application/pdf", + "url": "Binary/874ef853-131a-48e9-8a0a-1417eaa79d8d", + "size": 11, + "title": "moreTestXXXInfo.pdf", + "creation": "2021-09-24" + } + } + ] + }, + "search": { + "mode": "include" + } + } + ] +} diff --git a/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceRequest/responses/WithAttachmentFileReference.json b/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceRequest/responses/WithAttachmentFileReference.json index 4152ae99c..b408afb47 100644 --- a/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceRequest/responses/WithAttachmentFileReference.json +++ b/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceRequest/responses/WithAttachmentFileReference.json @@ -173,6 +173,13 @@ "attachment": { "id": "70002", "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, { "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", "valueReference": { @@ -181,6 +188,24 @@ "value": "103264992985" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } } ], "contentType": "image/png", diff --git a/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceRequest/responses/WithUnavailableAttachments.json b/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceRequest/responses/WithUnavailableAttachments.json new file mode 100644 index 000000000..404740cec --- /dev/null +++ b/sandbox/src/mocks/stu3/retrieveAdviceAndGuidanceRequest/responses/WithUnavailableAttachments.json @@ -0,0 +1,430 @@ +{ + "id": "000000070002", + "meta": { + "versionId": "5", + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" + ] + }, + "resourceType": "CommunicationRequest", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1", + "code": "ROUTINE", + "display": "Routine" + } + ] + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1", + "code": "AUTHORISED_TO_CONVERT", + "display": "Referrer has allowed the Service Provider to convert the Advice and Guidance to a Referral" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1", + "valueReference": { + "reference": "#shortlist" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1", + "valueCoding": { + "system": "_baseUrl_/STU3/CodeSystem/SPECIALTY", + "code": "CARDIOLOGY", + "display": "Cardiology" + } + } + ], + "contained": [ + { + "id": "serviceSearchCriteria", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ] + }, + "resourceType": "Parameters", + "parameter": [ + { + "name": "priority", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1", + "code": "ROUTINE" + } + }, + { + "name": "specialty", + "valueCoding": { + "system": "_baseUrl_/STU3/CodeSystem/SPECIALTY", + "code": "CARDIOLOGY" + } + }, + { + "name": "clinicType", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1", + "code": "HEART_FAILURE" + } + }, + { + "name": "ageAndGenderAppropriate", + "valueBoolean": true + }, + { + "name": "commissioningProvisioning", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1", + "code": "ALL_AVAILABLE_FOR_BOOKING" + } + } + ] + }, + { + "id": "shortlist", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ] + }, + "resourceType": "List", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1", + "valueReference": { + "reference": "#serviceSearchCriteria" + } + } + ], + "status": "current", + "mode": "snapshot", + "entry": [ + { + "item": { + "identifier": { + "system": "http://fhir.nhs.net/Id/ers-service", + "value": "11014" + }, + "display": "Cardiology Advice Service" + } + } + ] + }, + { + "id": "PractitionerRole.103264992985.R69.REFERRING-CLINICIAN", + "meta": { + "profile": [ + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + ] + }, + "resourceType": "PractitionerRole", + "practitioner": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "103264992985" + } + }, + "organization": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + }, + "code": [ + { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1", + "code": "REFERRING_CLINICIAN" + } + ] + } + ] + }, + { + "id": "DocumentReference-70002", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] + }, + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "code": "REFERRER", + "display": "Referrer" + } + ] + }, + "status": "current", + "indexed": "2021-09-17T12:20:00.742Z", + "description": "upload.png", + "content": [ + { + "attachment": { + "id": "70000", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "PENDING" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "103264992985" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } + } + ], + "contentType": "image/png", + "url": "Binary/719f6045-e791-4029-8e0f-1201c02b0a55", + "size": 18592, + "title": "upload1.png", + "creation": "2021-09-17" + } + } + ] + }, + { + "id": "DocumentReference-70000", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] + }, + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "code": "REFERRER", + "display": "Referrer" + } + ] + }, + "status": "current", + "indexed": "2021-09-17T12:20:00.742Z", + "description": "upload.png", + "content": [ + { + "attachment": { + "id": "70001", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "THREATS_FOUND" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "103264992985" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } + } + ], + "contentType": "image/png", + "url": "Binary/9eb7224-dff3-4730-a5cb-67eac811f1a5", + "size": 18592, + "title": "upload2.png", + "creation": "2021-09-17" + } + } + ] + }, + { + "id": "DocumentReference-70001", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] + }, + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "code": "REFERRER", + "display": "Referrer" + } + ] + }, + "status": "current", + "indexed": "2021-09-17T12:20:00.742Z", + "description": "upload.png", + "content": [ + { + "attachment": { + "id": "70002", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "VALIDATION_FAILED" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "103264992985" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } + } + ], + "contentType": "image/png", + "url": "Binary/2a8b042f-e12e-4249-9478-37b2426a4d65", + "size": 18592, + "title": "upload3.png", + "creation": "2021-09-17" + } + } + ] + } + ], + "status": "active", + "category": [ + { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1", + "code": "PROVIDER_RESPONSE_REQUIRED" + } + ] + } + ], + "subject": { + "identifier": { + "system": "http://fhir.nhs.net/Id/nhs-number", + "value": "9912003888" + } + }, + "recipient": [ + { + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/ers-service", + "value": "11014" + } + } + } + ] + } + ], + "sender": { + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1", + "valueReference": { + "reference": "#PractitionerRole.103264992985.R69.REFERRING-CLINICIAN" + } + } + ] + }, + "requester": { + "agent": { + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1", + "valueReference": { + "reference": "#PractitionerRole.103264992985.R69.REFERRING-CLINICIAN" + } + } + ] + } + }, + "payload": [ + { + "contentReference": { + "reference": "#DocumentReference-70000" + } + }, + { + "contentReference": { + "reference": "#DocumentReference-70001" + } + }, + { + "contentReference": { + "reference": "#DocumentReference-70002" + } + } + ] +} \ No newline at end of file diff --git a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/BookedDBS.json b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/BookedDBS.json index 0c79cf83b..24d428fbb 100644 --- a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/BookedDBS.json +++ b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/BookedDBS.json @@ -232,6 +232,13 @@ "attachment": { "id": "80000", "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, { "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", "valueReference": { @@ -240,6 +247,15 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", diff --git a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/BookedIBS.json b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/BookedIBS.json index 532a09cb3..73a2daf5e 100644 --- a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/BookedIBS.json +++ b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/BookedIBS.json @@ -219,6 +219,14 @@ "attachment": { "id": "80000", "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, { "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", "valueReference": { @@ -227,6 +235,15 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", diff --git a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/ConvertedFromAdviceAndGuidance.json b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/ConvertedFromAdviceAndGuidance.json index 0b649f67b..e3803aef2 100644 --- a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/ConvertedFromAdviceAndGuidance.json +++ b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/ConvertedFromAdviceAndGuidance.json @@ -175,6 +175,13 @@ "attachment": { "id": "80002", "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, { "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", "valueReference": { @@ -183,6 +190,15 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "image/png", @@ -218,6 +234,13 @@ "attachment": { "id": "80003", "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, { "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", "valueReference": { @@ -226,191 +249,232 @@ "value": "021600556514" } } - } - ], - "contentType": "application/pdf", - "url": "Binary/d7f9fba4-3c57-4dec-a274-94dab9fd4518", - "size": 3807, - "title": "Advice and guidance conversation - 000000070004.pdf", - "creation": "2021-06-11" - } - } - ] - }, - { - "id": "appointment", - "meta": { - "versionId": "1", - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ] - }, - "language": "en", - "resourceType": "Appointment", - "status": "proposed", - "reason": [ - { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1", - "code": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "display": "Provider Converted Advice and Guidance, Admin to Refer" - } - ] - } - ], - "description": "e-Referral Appointment", - "created": "2021-06-11T14:04:48.217Z", - "comment": "Actually I'd rather not", - "incomingReferral": [ - { - "reference": "ReferralRequest/000000070004/_history/5" - } - ], - "participant": [ - { - "actor": { - "identifier": { - "system": "http://fhir.nhs.net/Id/ers-service", - "value": "11014" - }, - "display": "Advice Only" - }, - "status": "accepted" - }, - { - "actor": { - "identifier": { - "system": "http://fhir.nhs.net/Id/nhs-number", - "value": "9912003888" - } - }, - "status": "accepted" - } - ] - }, - { - "id": "DocumentReference-80000", - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ] - }, - "resourceType": "DocumentReference", - "type": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", - "code": "ADVICE_REQUEST", - "display": "Advice Request" - } - ] - }, - "status": "current", - "indexed": "2021-06-11T14:04:48.987Z", - "description": "advice png", - "content": [ - { - "attachment": { - "id": "80000", - "extension": [ + }, { - "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", "valueReference": { "identifier": { - "system": "http://fhir.nhs.net/Id/sds-user-id", - "value": "921600556514" + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" } } } ], - "contentType": "image/png", - "url": "Binary/80245c92-d28a-4d1f-9b8d-c31f8ab9e322", - "size": 6, - "title": "advice.png", - "creation": "2021-06-11" - } + "contentType": "application/pdf", + "url": "Binary/d7f9fba4-3c57-4dec-a274-94dab9fd4518", + "size": 3807, + "title": "Advice and guidance conversation - 000000070004.pdf", + "creation": "2021-06-11" } + } + ] + }, + { + "id": "appointment", + "meta": { + "versionId": "1", + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" ] }, - { - "id": "DocumentReference-80001", - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ] - }, - "resourceType": "DocumentReference", - "type": { + "language": "en", + "resourceType": "Appointment", + "status": "proposed", + "reason": [ + { "coding": [ { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", - "code": "GUIDANCE_RESPONSE", - "display": "Guidance Response" + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1", + "code": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "display": "Provider Converted Advice and Guidance, Admin to Refer" } ] + } + ], + "description": "e-Referral Appointment", + "created": "2021-06-11T14:04:48.217Z", + "comment": "Actually I'd rather not", + "incomingReferral": [ + { + "reference": "ReferralRequest/000000070004/_history/5" + } + ], + "participant": [ + { + "actor": { + "identifier": { + "system": "http://fhir.nhs.net/Id/ers-service", + "value": "11014" + }, + "display": "Advice Only" + }, + "status": "accepted" }, - "status": "current", - "indexed": "2021-06-11T14:04:48.987Z", - "description": "provider png", - "content": [ - { - "attachment": { - "id": "80001", - "extension": [ - { - "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", - "valueReference": { - "identifier": { - "system": "http://fhir.nhs.net/Id/sds-user-id", - "value": "021600556514" - } - } - } - ], - "contentType": "image/png", - "url": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5", - "size": 6, - "title": "provider.png", - "creation": "2021-06-11" + { + "actor": { + "identifier": { + "system": "http://fhir.nhs.net/Id/nhs-number", + "value": "9912003888" } + }, + "status": "accepted" + } + ] + }, + { + "id": "DocumentReference-80000", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] + }, + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "code": "ADVICE_REQUEST", + "display": "Advice Request" } ] - } - ], - "status": "active", - "specialty": { - "coding": [ + }, + "status": "current", + "indexed": "2021-06-11T14:04:48.987Z", + "description": "advice png", + "content": [ { - "system": "_baseUrl_/STU3/CodeSystem/SPECIALTY", - "code": "CARDIOLOGY", - "display": "Cardiology" + "attachment": { + "id": "80000", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "921600556514" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R68" + } + } + } + ], + "contentType": "image/png", + "url": "Binary/80245c92-d28a-4d1f-9b8d-c31f8ab9e322", + "size": 6, + "title": "advice.png", + "creation": "2021-06-11" + } } ] }, - "subject": { - "identifier": { - "system": "http://fhir.nhs.net/Id/nhs-number", - "value": "9912003888" - } - }, - "supportingInfo": [ - { - "reference": "#DocumentReference-80003" - }, - { - "reference": "#DocumentReference-80000" - }, - { - "reference": "#DocumentReference-80001" + { + "id": "DocumentReference-80001", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] }, - { - "reference": "#DocumentReference-80002" + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "code": "GUIDANCE_RESPONSE", + "display": "Guidance Response" + } + ] }, + "status": "current", + "indexed": "2021-06-11T14:04:48.987Z", + "description": "provider png", + "content": [ + { + "attachment": { + "id": "80001", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + } + ], + "contentType": "image/png", + "url": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5", + "size": 6, + "title": "provider.png", + "creation": "2021-06-11" + } + } + ] + } +], +"status": "active", +"specialty": { + "coding": [ { - "reference": "CommunicationRequest/000000070004" + "system": "_baseUrl_/STU3/CodeSystem/SPECIALTY", + "code": "CARDIOLOGY", + "display": "Cardiology" } - ], - "intent": "plan" -} + ] +}, +"subject": { + "identifier": { + "system": "http://fhir.nhs.net/Id/nhs-number", + "value": "9912003888" + } +}, +"supportingInfo": [ + { + "reference": "#DocumentReference-80003" + }, + { + "reference": "#DocumentReference-80000" + }, + { + "reference": "#DocumentReference-80001" + }, + { + "reference": "#DocumentReference-80002" + }, + { + "reference": "CommunicationRequest/000000070004" + } +], +"intent": "plan" +} \ No newline at end of file diff --git a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/DeferredToProvider.json b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/DeferredToProvider.json index fbf278c73..8e0b317b7 100644 --- a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/DeferredToProvider.json +++ b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/DeferredToProvider.json @@ -226,6 +226,13 @@ "attachment": { "id": "80000", "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, { "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", "valueReference": { @@ -234,6 +241,15 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", diff --git a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/Unbooked.json b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/Unbooked.json index bf3074a4e..58d089b99 100644 --- a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/Unbooked.json +++ b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/Unbooked.json @@ -151,6 +151,13 @@ "attachment": { "id": "80000", "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, { "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", "valueReference": { @@ -159,6 +166,24 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "004377014925" + } + } } ], "contentType": "application/pdf", @@ -184,4 +209,4 @@ } ], "intent": "plan" -} +} \ No newline at end of file diff --git a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/WithAdditionalRequirements.json b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/WithAdditionalRequirements.json index 8a1070f3a..60d101a31 100644 --- a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/WithAdditionalRequirements.json +++ b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/WithAdditionalRequirements.json @@ -47,9 +47,9 @@ { "url": "state", "valueCoding": { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1", - "code": "BOOKED", - "display": "Booked" + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1", + "code": "BOOKED", + "display": "Booked" } } ] @@ -179,6 +179,13 @@ "attachment": { "id": "80000", "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "AVAILABLE" + } + }, { "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", "valueReference": { @@ -187,6 +194,15 @@ "value": "021600556514" } } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } } ], "contentType": "application/pdf", @@ -200,13 +216,15 @@ } ], "status": "active", - "specialty" : { - "coding" : [ { - "code" : "CARDIOLOGY", - "system" : "_baseUrl_/STU3/v1/CodeSystem/SPECIALTY", - "display" : "Cardiology" - } ] - }, + "specialty": { + "coding": [ + { + "code": "CARDIOLOGY", + "system": "_baseUrl_/STU3/v1/CodeSystem/SPECIALTY", + "display": "Cardiology" + } + ] + }, "subject": { "identifier": { "system": "http://fhir.nhs.net/Id/nhs-number", @@ -219,4 +237,4 @@ } ], "intent": "plan" -} +} \ No newline at end of file diff --git a/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/WithUnavailableAttachments.json b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/WithUnavailableAttachments.json new file mode 100644 index 000000000..e1a7849d4 --- /dev/null +++ b/sandbox/src/mocks/stu3/retrieveReferralRequest/responses/WithUnavailableAttachments.json @@ -0,0 +1,356 @@ +{ + "id": "000000070012", + "meta": { + "versionId": "5", + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ] + }, + "resourceType": "ReferralRequest", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1", + "valueDateTime": "2021-06-11T12:09:08.667Z" + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1", + "code": "ROUTINE", + "display": "Routine" + } + ] + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1", + "valueReference": { + "reference": "#shortlist" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1", + "valueIdentifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1", + "extension": [ + { + "url": "state", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1", + "code": "NOT_BOOKED", + "display": "Not Booked" + } + } + ] + } + ], + "contained": [ + { + "id": "serviceSearchCriteria", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ] + }, + "resourceType": "Parameters", + "parameter": [ + { + "name": "priority", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1", + "code": "ROUTINE" + } + }, + { + "name": "specialty", + "valueCoding": { + "system": "_baseUrl_/STU3/CodeSystem/SPECIALTY", + "code": "CARDIOLOGY" + } + }, + { + "name": "clinicType", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1", + "code": "HEART_FAILURE" + } + }, + { + "name": "postcode", + "valueString": "LS1 2TW" + }, + { + "name": "distanceLimit", + "valueUnsignedInt": 123 + }, + { + "name": "ageAndGenderAppropriate", + "valueBoolean": true + } + ] + }, + { + "id": "shortlist", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ] + }, + "resourceType": "List", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1", + "valueReference": { + "reference": "#serviceSearchCriteria" + } + } + ], + "status": "current", + "mode": "snapshot", + "entry": [ + { + "item": { + "identifier": { + "system": "http://fhir.nhs.net/Id/ers-service", + "value": "11002" + }, + "display": "Good Cardiology Business Service" + } + } + ] + }, + { + "id": "DocumentReference-80000", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] + }, + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "code": "REFERRER", + "display": "Referrer" + } + ] + }, + "status": "current", + "indexed": "2021-06-11T12:09:09.459Z", + "description": "referralletter pdf", + "content": [ + { + "attachment": { + "id": "80000", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "PENDING" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } + } + ], + "contentType": "application/pdf", + "url": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5", + "size": 6, + "title": "referralletter1.pdf", + "creation": "2021-06-11" + } + } + ] + }, + { + "id": "DocumentReference-80001", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] + }, + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "code": "REFERRER", + "display": "Referrer" + } + ] + }, + "status": "current", + "indexed": "2021-06-11T12:09:09.459Z", + "description": "referralletter png", + "content": [ + { + "attachment": { + "id": "80001", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "THREATS_FOUND" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } + } + ], + "contentType": "image/png", + "url": "Binary/adda8c72-4a91-4dc7-a918-b6d12fb28085", + "size": 6, + "title": "referralletter2.png", + "creation": "2021-06-11" + } + } + ] + }, + { + "id": "DocumentReference-80002", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ] + }, + "resourceType": "DocumentReference", + "type": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1", + "code": "REFERRER", + "display": "Referrer" + } + ] + }, + "status": "current", + "indexed": "2021-06-11T12:09:09.459Z", + "description": "referralletter doc", + "content": [ + { + "attachment": { + "id": "80002", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1", + "valueCoding": { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1", + "code": "VALIDATION_FAILED" + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1", + "valueReference": { + "identifier": { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "R69" + } + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1", + "valueReference": { + "identifier": { + "system": "http://fhir.nhs.net/Id/sds-user-id", + "value": "021600556514" + } + } + } + ], + "contentType": "application/msword", + "url": "Binary/9e554611-3378-425c-9cab-700b697e52d3", + "size": 6, + "title": "referralletter3.doc", + "creation": "2021-06-11" + } + } + ] + } + ], + "status": "active", + "subject": { + "identifier": { + "system": "http://fhir.nhs.net/Id/nhs-number", + "value": "9912003888" + } + }, + "supportingInfo": [ + { + "reference": "#DocumentReference-80000" + }, + { + "reference": "#DocumentReference-80001" + }, + { + "reference": "#DocumentReference-80002" + } + ], + "intent": "plan" +} \ No newline at end of file diff --git a/sandbox/src/routes/stu3/services/mockResponseProvider.js b/sandbox/src/routes/stu3/services/mockResponseProvider.js index e07279f98..95dabcd5d 100644 --- a/sandbox/src/routes/stu3/services/mockResponseProvider.js +++ b/sandbox/src/routes/stu3/services/mockResponseProvider.js @@ -169,11 +169,11 @@ module.exports = { const attachmentId = request.params.attachmentLogicalID if (attachmentId) { - + if (attachmentId.startsWith('att-')) { return { responsePath: 'stu3/retrieveAttachment/responses/example_attachment.pdf', filename: 'example_attachment.pdf', responseCode: 200 } } - + if (attachmentId === 'c5d2d200-7613-4a69-9c5f-1bb68e04b8d8') { return { responsePath: 'stu3/retrieveAttachment/responses/example_attachment.pdf', filename: 'example_attachment.pdf', responseCode: 200 } } @@ -185,42 +185,30 @@ module.exports = { const ubrn = request.params.ubrn; const version = request.params.version - // Scenario 1 - Unbooked ReferralRequest - if (ubrn === '000000070000' && (version === undefined || version === '5')) { - return { responsePath: 'stu3/retrieveReferralRequest/responses/Unbooked.json', responseCode: 200 } - } - - // Scenario 2 - ReferralRequest booked to directly-bookable service - if (ubrn === '000000070001' && (version === undefined || version === '5')) { - return { responsePath: 'stu3/retrieveReferralRequest/responses/BookedDBS.json', responseCode: 200 } - } - - // Scenario 3 - ReferralRequest booked to indirectly-bookable service - if (ubrn === '000000070002' && (version === undefined || version === '5')) { - return { responsePath: 'stu3/retrieveReferralRequest/responses/BookedIBS.json', responseCode: 200 } - } - - // Scenario 4 - ReferralRequest deferred to service provider for booking - if (ubrn === '000000070003' && (version === undefined || version === '5')) { - return { responsePath: 'stu3/retrieveReferralRequest/responses/DeferredToProvider.json', responseCode: 200 } - } - - // Scenario 5 - ReferralRequest that was converted from an Advice and Guidance Request - if (ubrn === '000000070004' && (version === undefined || version === '5')) { - return { responsePath: 'stu3/retrieveReferralRequest/responses/ConvertedFromAdviceAndGuidance.json', responseCode: 200 } - } - - // Scenario 6 - ReferralRequest with related ReferralRequest - if (ubrn === '000000070005' && (version === undefined || version === '5')) { - return { responsePath: 'stu3/retrieveReferralRequest/responses/WithRelatedReferral.json', responseCode: 200 } - } - - // Scenario 7 - ReferralRequest with additional requirements - if (ubrn === '000000070011' && (!version || version === '5')) { - return { responsePath: 'stu3/retrieveReferralRequest/responses/WithAdditionalRequirements.json', responseCode: 200 } + if (version === undefined || version === '5') { + var json = { + // Scenario 1 - Unbooked ReferralRequest + '000000070000': 'stu3/retrieveReferralRequest/responses/Unbooked.json', + // Scenario 2 - ReferralRequest booked to directly-bookable service + '000000070001': 'stu3/retrieveReferralRequest/responses/BookedDBS.json', + // Scenario 3 - ReferralRequest booked to indirectly-bookable service + '000000070002': 'stu3/retrieveReferralRequest/responses/BookedIBS.json', + // Scenario 4 - ReferralRequest deferred to service provider for booking + '000000070003': 'stu3/retrieveReferralRequest/responses/DeferredToProvider.json', + // Scenario 5 - ReferralRequest that was converted from an Advice and Guidance Request + '000000070004': 'stu3/retrieveReferralRequest/responses/ConvertedFromAdviceAndGuidance.json', + // Scenario 6 - ReferralRequest with related ReferralRequest + '000000070005': 'stu3/retrieveReferralRequest/responses/WithRelatedReferral.json', + // Scenario7 - ReferralRequest with additional requirements + '000000070011': 'stu3/retrieveReferralRequest/responses/WithAdditionalRequirements.json', + // Scenario 8 - ReferralRequest with attachments unavailable to download + '000000070012': 'stu3/retrieveReferralRequest/responses/WithUnavailableAttachments.json' + }[ubrn]; + if (json) { + return {responsePath: json, responseCode: 200 }; + } } - - return {} + return {}; }, getExampleResponseForMaintainReferralLetter: function (request) { @@ -241,7 +229,7 @@ module.exports = { return mapExampleResponse(request, responseMap) } - return {} + return {}; }, @@ -276,7 +264,7 @@ module.exports = { getExampleResponseForRetrieveAdviceAndGuidanceOverviewPdf: function () { return { responsePath: 'stu3/retrieveAdviceAndGuidanceOverviewPdf/responses/000049146177_Advice_And_Guidance_20220610143044.pdf', filename: '000049146177_Advice_And_Guidance_20220610143044.pdf', responseCode: 200 } - }, + }, getExampleResponseForRetrieveWorklist: function (request) { var responseMap = { @@ -307,50 +295,50 @@ module.exports = { getResponseForRetrieveAdviceAndGuidanceRequest: function (request) { const ubrn = request.params.ubrn; - const version = request.params.version - - // Scenario 1 - Minimum example - if (ubrn === '000000070000' && (version === undefined || version === '5')) { - return { responsePath: 'stu3/retrieveAdviceAndGuidanceRequest/responses/MinimalExample.json', responseCode: 200 } - } - - // Scenario 2 - With attachment file reference - if (ubrn === '000000070001' && (version === undefined || version === '5')) { - return { responsePath: 'stu3/retrieveAdviceAndGuidanceRequest/responses/WithAttachmentFileReference.json', responseCode: 200 } + const version = request.params.version; + + if (version === undefined || version === '5') { + var json = { + // Scenario 1 - Minimum example + '000000070000': 'stu3/retrieveAdviceAndGuidanceRequest/responses/MinimalExample.json', + // Scenario 2 - With attachment file reference + '000000070001': 'stu3/retrieveAdviceAndGuidanceRequest/responses/WithAttachmentFileReference.json', + // Scenario 3 - With attachements unavailable to download + '000000070002': 'stu3/retrieveAdviceAndGuidanceRequest/responses/WithUnavailableAttachments.json' + }[ubrn]; + if (json) { + return { responsePath: json, responseCode: 200 }; + } } - return {} + return {}; }, getResponseForRetrieveAdviceAndGuidanceConversation: function (request) { - const basedOn = request.query["based-on"] - - // Scenario 1 - Single message from referrer - if (basedOn === 'CommunicationRequest/000000070000/_history/1') { - return { responsePath: 'stu3/retrieveAdviceAndGuidanceConversation/SingleMessageFromReferrer.json', responseCode: 200, version: 1 } - } - - // Scenario 2 - One message each way - if (basedOn === 'CommunicationRequest/000000070000/_history/2') { - return { responsePath: 'stu3/retrieveAdviceAndGuidanceConversation/OneMessageEachWay.json', responseCode: 200, version: 2 } - } - - // Scenario 3 - Attachment present in each direction - if (basedOn === 'CommunicationRequest/000000070001/_history/6') { - return { responsePath: 'stu3/retrieveAdviceAndGuidanceConversation/AttachmentPresentInEachDirection.json', responseCode: 200, version: 6 } - } - - // Scenario 4 - Multi-way conversation - if (basedOn === 'CommunicationRequest/000000070002/_history/1') { - return { responsePath: 'stu3/retrieveAdviceAndGuidanceConversation/MultiWayConversation.json', responseCode: 200, version: 6 } - } - - // Scenario 5 - Attachment uploaded from RCS before A&G creation - if (basedOn === 'CommunicationRequest/000000070003/_history/7') { - return { responsePath: 'stu3/retrieveAdviceAndGuidanceConversation/AttachmentUploadedFromRCS.json', responseCode: 200, version: 7 } - } - - return {} + const basedOn = request.query["based-on"]; + + const json = { + // Scenario 1 - Single message from referrer + 'CommunicationRequest/000000070000/_history/1': + { responsePath: 'stu3/retrieveAdviceAndGuidanceConversation/SingleMessageFromReferrer.json', responseCode: 200, version: 1 }, + // Scenario 2 - One message each way + 'CommunicationRequest/000000070000/_history/2': + { responsePath: 'stu3/retrieveAdviceAndGuidanceConversation/OneMessageEachWay.json', responseCode: 200, version: 2 }, + // Scenario 3 - Attachment present in each direction + 'CommunicationRequest/000000070001/_history/6': + { responsePath: 'stu3/retrieveAdviceAndGuidanceConversation/AttachmentPresentInEachDirection.json', responseCode: 200, version: 6 }, + // Scenario 4 - Multi-way conversation + 'CommunicationRequest/000000070002/_history/1': + { responsePath: 'stu3/retrieveAdviceAndGuidanceConversation/MultiWayConversation.json', responseCode: 200, version: 6 }, + // Scenario 5 - Attachment uploaded from RCS before A&G creation + 'CommunicationRequest/000000070003/_history/7': + { responsePath: 'stu3/retrieveAdviceAndGuidanceConversation/AttachmentUploadedFromRCS.json', responseCode: 200, version: 7 }, + // Scenario 6 - Attachment files unavailable for download + 'CommunicationRequest/000000070004/_history/3': + { responsePath: 'stu3/retrieveAdviceAndGuidanceConversation/UnavailableAttachments.json', responseCode: 200, version: 3 } + }[basedOn]; + + return json || {}; }, getResponseForSendAdviceAndGuidanceResponse: function (request) { @@ -395,7 +383,8 @@ module.exports = { if (ubrn === '000000070000') { return { responsePath: 'stu3/acceptReferral/responses/ExampleResponse.json', responseCode: 200 } } - return {} + + return {}; }, @@ -409,7 +398,7 @@ module.exports = { 'src/mocks/stu3/cancelReferral/requests/IntendPrivateWithComment.json': 'stu3/cancelReferral/responses/CancelledReferralResolvedDeferralIntendPrivateWithComment.json' } - return mapExampleResponse(request, responseMap) + return mapExampleResponse(request, responseMap); }, getResponseForRejectReferral: function (request) { @@ -474,7 +463,8 @@ module.exports = { var responseMap = { 'src/mocks/stu3/changeShortlist/requests/UnbookedReferral.json': 'stu3/changeShortlist/responses/UnbookedReferral.json', 'src/mocks/stu3/changeShortlist/requests/UnbookedReferralMultipleServices.json': 'stu3/changeShortlist/responses/UnbookedReferralMultipleServices.json', - 'src/mocks/stu3/changeShortlist/requests/UnbookedReferralMixedShortlist.json': 'stu3/changeShortlist/responses/UnbookedReferralMixedShortlist.json' + 'src/mocks/stu3/changeShortlist/requests/UnbookedReferralMixedShortlist.json': 'stu3/changeShortlist/responses/UnbookedReferralMixedShortlist.json', + 'src/mocks/stu3/changeShortlist/requests/NonMixedShortlistWithDocument.json': 'stu3/changeShortlist/responses/NonMixedShortlistWithDocument.json' } return mapExampleResponse(request, responseMap) @@ -485,7 +475,7 @@ module.exports = { 'src/mocks/stu3/changeShortlistAndSendForTriage/requests/MinimalRequest.json': 'stu3/changeShortlistAndSendForTriage/responses/MinimalRequest.json' } - return mapExampleResponse(request, responseMap) + return mapExampleResponse(request, responseMap); }, getExampleResponseForRetrieveAppointment: function (request) { diff --git a/specification/components/stu3/schemas/DocumentReference.yaml b/specification/components/stu3/schemas/DocumentReference.yaml index f7be6925b..aabe24f2b 100644 --- a/specification/components/stu3/schemas/DocumentReference.yaml +++ b/specification/components/stu3/schemas/DocumentReference.yaml @@ -114,24 +114,19 @@ properties: example: '2021-04-22' extension: type: array - minItems: 1 - maxItems: 1 + minItems: 3 + maxItems: 4 + description: | + + | Field | Cardinality | Notes | + | --------------------------------------- | ----------- | ------------------------------------------ | + | `eRS-AvailabilityStatus` | `1..1` | | + | `eRS-AttachedBy` | `1..1` | | + | `eRS-AttachedByOrganisation` | `1..1` | | + | `AttachedOnBehalfOf` | `0..1` | | items: - type: object - required: - - url - - valueReference - properties: - url: - type: string - enum: - - 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1' - example: 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1' - valueReference: - type: object - required: - - identifier - properties: - identifier: - $ref: identifiers/STU3_UserId.yaml - + oneOf: + - $ref: extensions/Extension-eRS-AvailabilityStatus.yaml + - $ref: extensions/Extension-eRS-AttachedBy.yaml + - $ref: extensions/Extension-eRS-AttachedByOrganisation.yaml + - $ref: extensions/Extension-eRS-AttachedOnBehalfOf.yaml diff --git a/specification/components/stu3/schemas/codings/AvailabilityStatus.yaml b/specification/components/stu3/schemas/codings/AvailabilityStatus.yaml new file mode 100644 index 000000000..fce7c7d25 --- /dev/null +++ b/specification/components/stu3/schemas/codings/AvailabilityStatus.yaml @@ -0,0 +1,19 @@ +type: object +required: + - system + - code +properties: + system: + type: string + enum: + - 'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1' + example: 'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1' + code: + type: string + enum: + - AVAILABLE + - PENDING + - THREATS_FOUND + - VALIDATION_FAILED + example: AVAILABLE + diff --git a/specification/components/stu3/schemas/endpoints/a005-retrieve-referral-request-versioned.yaml b/specification/components/stu3/schemas/endpoints/a005-retrieve-referral-request-versioned.yaml index 033da1887..012fa82f8 100644 --- a/specification/components/stu3/schemas/endpoints/a005-retrieve-referral-request-versioned.yaml +++ b/specification/components/stu3/schemas/endpoints/a005-retrieve-referral-request-versioned.yaml @@ -9,19 +9,34 @@ description: | - Application-restricted access - Healthcare worker, user-restricted access - ## Important notes when receiving an e-Referral Pathway Start Date - The e-Referral Pathway Start Date is a derived value of when the Referral To Treatment (RTT) clock starts. Find out how e-RS derives the pathway start date [[HYPERLINK_PATHWAY_START]]. - - If a referral was created with an alternate pathway start date, then this will be available in the referral request response. - - Service providers must always ensure the correct start date is recorded in line with [[HYPERLINK_RTT_RULES]]. - ## Pre-requisites The pre-requisites for this endpoint are the same as for endpoint [[HYPERLINK_A005]]. Note: e-RS only supports the retrieval of the most recent version of `ReferralRequest`. You cannot retrieve earlier versions. + ## Important notes + ### Attachment availability + + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information. + + The availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A005]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below. + + | eRS-AvailabilityStatus-1 code | Description / Guidance | + |-------------------------------|-------------------------------------------------------------------------------------------------------------------| + | AVAILABLE | The file is available for download. | + | PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again | + | THREATS FOUND | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. | + | VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: | + + ### Receiving an e-Referral Pathway Start Date + + The e-Referral Pathway Start Date is a derived value of when the Referral To Treatment (RTT) clock starts. Find out how e-RS derives the pathway start date [[HYPERLINK_PATHWAY_START]]. + + If a referral was created with an alternate pathway start date, then this will be available in the referral request response. + + Service providers must always ensure the correct start date is recorded in line with [[HYPERLINK_RTT_RULES]]. + ## Use case See [[HYPERLINK_A005]]. @@ -42,6 +57,7 @@ description: | | `ReferralRequest` that was converted from an Advice and Guidance Request | `ubrn`=`000000070004`, `version`=`5` | | `ReferralRequest` with related `ReferralRequest` | `ubrn`=`000000070005`, `version`=`5` | | `ReferralRequest` with additional requirements listed | `ubrn`=`000000070011`, `version`=`5` | + | `ReferralRequest` with attachments unavailable to download | `ubrn`=`000000070012`, `version`=`5` | summary: Retrieve referral request (versioned) (A005, FHIR STU3) operationId: a005-retrieve-referral-request-versioned diff --git a/specification/components/stu3/schemas/endpoints/a005-retrieve-referral-request.yaml b/specification/components/stu3/schemas/endpoints/a005-retrieve-referral-request.yaml index 92addf87b..503278f9e 100644 --- a/specification/components/stu3/schemas/endpoints/a005-retrieve-referral-request.yaml +++ b/specification/components/stu3/schemas/endpoints/a005-retrieve-referral-request.yaml @@ -36,13 +36,6 @@ description: | - Application-restricted access - Healthcare worker, user-restricted access - ## Important notes when receiving an e-Referral Pathway Start Date - The e-Referral Pathway Start Date is a derived value of when the Referral To Treatment (RTT) clock starts. Find out how e-RS derives the pathway start date [[HYPERLINK_PATHWAY_START]]. - - If a referral was created with an alternate pathway start date, then this will be available in the referral request response. - - Service providers must always ensure the correct start date is recorded in line with [[HYPERLINK_RTT_RULES]]. - ## Pre-requisites ### Application-restricted access In order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation. @@ -56,8 +49,30 @@ description: | You need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to retrieve details of a referral. - ## Use case + ## Important notes + ### Attachment availability + + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information. + + The availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A005]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below. + | eRS-AvailabilityStatus-1 code | Description / Guidance | + |-------------------------------|-------------------------------------------------------------------------------------------------------------------| + | AVAILABLE | The file is available for download. | + | PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again | + | THREATS FOUND | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. | + | VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: | + + ### Receiving an e-Referral Pathway Start Date + + The e-Referral Pathway Start Date is a derived value of when the Referral To Treatment (RTT) clock starts. Find out how e-RS derives the pathway start date [[HYPERLINK_PATHWAY_START]]. + + If a referral was created with an alternate pathway start date, then this will be available in the referral request response. + + Service providers must always ensure the correct start date is recorded in line with [[HYPERLINK_RTT_RULES]]. + + ## Use case + As an authenticated user or application I want to read details of a referral @@ -68,6 +83,8 @@ description: | You can retrieve attachments that are associated with the referral using [[HYPERLINK_A006]] + You can retrieve attachments that are associated with the referral using [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]. Attachments can only be retrieved where the eRS-AvailabilityStatus-1 code returned is 'AVAILABLE' + You can retrieve a clinical information summary for the referral using [[HYPERLINK_A007]] You can search for services appropriate to a referral to form a shortlist using [[HYPERLINK_A010]] @@ -91,6 +108,7 @@ description: | | `ReferralRequest` that was converted from an Advice and Guidance Request | `ubrn`=`000000070004` | | `ReferralRequest` with related `ReferralRequest` | `ubrn`=`000000070005` | | `ReferralRequest` with additional requirements listed | `ubrn`=`000000070011` | + | `ReferralRequest` with attachments unavailable to download | `ubrn`=`000000070012` | summary: Retrieve referral request (A005, FHIR STU3) operationId: a005-retrieve-referral-request diff --git a/specification/components/stu3/schemas/endpoints/a012-maintain-referral-letter.yaml b/specification/components/stu3/schemas/endpoints/a012-maintain-referral-letter.yaml index ee78b7962..16fa0f1ac 100644 --- a/specification/components/stu3/schemas/endpoints/a012-maintain-referral-letter.yaml +++ b/specification/components/stu3/schemas/endpoints/a012-maintain-referral-letter.yaml @@ -17,7 +17,7 @@ description: | All new files to be associated with a referral must be uploaded first using [[HYPERLINK_A020]] and then linked to the referral using this endpoint. - ## Important information about using this endpoint + ## Important notes This endpoint can be used to associate attachments to a referral that has no existing referral letter attachments. In this case you must upload the file first using [[HYPERLINK_A020]] and then associate it to the referral using this endpoint. @@ -54,6 +54,11 @@ description: | Note: It is not permissible to remove *all* referral letter attachments leaving zero attachments associated. There must be at least one referral letter attachment associated. + + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. + The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. + + Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. ## Use case As an authenticated user diff --git a/specification/components/stu3/schemas/endpoints/a013-accept-referral.yaml b/specification/components/stu3/schemas/endpoints/a013-accept-referral.yaml index 0480eeebd..69aebd228 100644 --- a/specification/components/stu3/schemas/endpoints/a013-accept-referral.yaml +++ b/specification/components/stu3/schemas/endpoints/a013-accept-referral.yaml @@ -12,6 +12,13 @@ description: | - `SERVICE_PROVIDER_CLINICIAN` - `SERVICE_PROVIDER_CLINICIAN_ADMIN` + ## Important notes + + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. + The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. + + Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. + You need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Referrals For Review' worklist. [[HYPERLINK_A013]] can only be used for referrals booked into bookable services, and not the referrals sent into triage services. diff --git a/specification/components/stu3/schemas/endpoints/a014-reject-referral.yaml b/specification/components/stu3/schemas/endpoints/a014-reject-referral.yaml index 34e89edd3..4ec7c6c2e 100644 --- a/specification/components/stu3/schemas/endpoints/a014-reject-referral.yaml +++ b/specification/components/stu3/schemas/endpoints/a014-reject-referral.yaml @@ -31,6 +31,13 @@ description: | - `effectiveFrom` must be in the past, and - `effectiveTo` must not be in the past + ## Important notes + + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. + The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. + + Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. + ## Use cases As an authenticated user diff --git a/specification/components/stu3/schemas/endpoints/a022-cancel-appointment-action-later.yaml b/specification/components/stu3/schemas/endpoints/a022-cancel-appointment-action-later.yaml index ba867802a..6ce0d9e7b 100644 --- a/specification/components/stu3/schemas/endpoints/a022-cancel-appointment-action-later.yaml +++ b/specification/components/stu3/schemas/endpoints/a022-cancel-appointment-action-later.yaml @@ -47,6 +47,9 @@ description: | - When this endpoint is successfully used, an entry will be added to the service providers 'Appointments For Booking' worklist for the admin team to action the task. The provider admin team will only be able to progress the referral via the e-RS Professional Application user interface (e.g. shortlisting appropriate services for the patient). + - In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. + The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. + - Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. summary: Cancel appointment, action later (A022, FHIR STU3) operationId: a022-cancel-appointment-action-later diff --git a/specification/components/stu3/schemas/endpoints/a024-retrieve-advice-and-guidance-versioned.yaml b/specification/components/stu3/schemas/endpoints/a024-retrieve-advice-and-guidance-versioned.yaml index 3ab6279ae..80509ab82 100644 --- a/specification/components/stu3/schemas/endpoints/a024-retrieve-advice-and-guidance-versioned.yaml +++ b/specification/components/stu3/schemas/endpoints/a024-retrieve-advice-and-guidance-versioned.yaml @@ -34,6 +34,7 @@ description: | | ------------------------------------------------------------------------ | ------------------------------------- | | Simple summary `CommunicationRequest` | `ubrn`=`000000070000`, `version`=`5` | | Attachment file reference present | `ubrn`=`000000070001`, `version`=`5` | + | `CommunicationRequest` with attachments unavailable for download | `ubrn`=`000000070002`, `version`=`5` | summary: Retrieve advice and guidance request summary (versioned) (A024, FHIR STU3) operationId: a024-retrieve-advice-and-guidance-versioned diff --git a/specification/components/stu3/schemas/endpoints/a024-retrieve-advice-and-guidance.yaml b/specification/components/stu3/schemas/endpoints/a024-retrieve-advice-and-guidance.yaml index c724b4d19..665d508ed 100644 --- a/specification/components/stu3/schemas/endpoints/a024-retrieve-advice-and-guidance.yaml +++ b/specification/components/stu3/schemas/endpoints/a024-retrieve-advice-and-guidance.yaml @@ -37,7 +37,7 @@ description: | So I can understand all of the relevant context for the request. - ## Important note + ## Important notes The summary includes an indicator of whether the referrer has authorised the providing organisation to convert the advice and guidance request into an appointment request. @@ -53,6 +53,17 @@ description: | the advice and guidance summary ([[HYPERLINK_A024]]), attachments ([[HYPERLINK_A006]]), advice and guidance conversation ([[HYPERLINK_A025]]) and clinical information ([[HYPERLINK_A043]]) which took place before such a conversion still forms part of the clinical information and can still be retrieved. + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or [[HYPERLINK_A006]] endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information. + + The availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A024]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below. + + | eRS-AvailabilityStatus-1 code | Description / Guidance | + |-------------------------------|--------------------------------------------------------------------------------------------------------------------| + | AVAILABLE | The file is available for download. | + | PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again. | + | THREATS_FOUND | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. | + | VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: | + ## Related endpoints After using this endpoint, use [[HYPERLINK_A025]] to retrieve the Advice and Guidance conversation itself. @@ -65,6 +76,8 @@ description: | | ------------------------------------------------------------------------ | ----------------------- | | Simple summary `CommunicationRequest` | `ubrn`=`000000070000` | | Attachment file reference present | `ubrn`=`000000070001` | + | Attachment files unavailable for download | `ubrn`=`000000070002` | + summary: Retrieve advice and guidance request summary (A024, FHIR STU3) operationId: a024-retrieve-advice-and-guidance diff --git a/specification/components/stu3/schemas/endpoints/a025-retrieve-advice-and-guidance-conversation.yaml b/specification/components/stu3/schemas/endpoints/a025-retrieve-advice-and-guidance-conversation.yaml index 2c4fdc197..a4a532293 100644 --- a/specification/components/stu3/schemas/endpoints/a025-retrieve-advice-and-guidance-conversation.yaml +++ b/specification/components/stu3/schemas/endpoints/a025-retrieve-advice-and-guidance-conversation.yaml @@ -39,7 +39,7 @@ description: | So that I can review the conversation and potentially contribute further to it. - ## Important note + ## Important notes The conversation returned includes links to any attachments associated with the conversation. This can be done via endpoint [[HYPERLINK_A006]]. @@ -53,6 +53,19 @@ description: | clinical information ([[HYPERLINK_A043]]) which took place before such a conversion still forms part of the clinical information and can still be retrieved. The conversation also gets included in the form of a PDF file returned by [[HYPERLINK_A007]]. + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information. + + The availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A025]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below. + + | eRS-AvailabilityStatus-1 code | Description / Guidance | + |-------------------------------|--------------------------------------------------------------------------------------------------------------------| + | AVAILABLE | The file is available for download. | + | PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again. | + | THREATS_FOUND | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. | + | VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: | + + + ## Related endpoints After using this endpoint: @@ -72,6 +85,7 @@ description: | | Attachment present in each direction | `based-on`=`CommunicationRequest/000000070001/_history/6` | | Multi-way conversation | `based-on`=`CommunicationRequest/000000070002/_history/1` | | Attachment uploaded from RCS before A&G creation | `based-on`=`CommunicationRequest/000000070003/_history/7` | + | Attachment files unavailable for download | `based-on`=`CommunicationRequest/000000070004/_history/3` | summary: Retrieve advice and guidance conversation (A025, FHIR STU3) operationId: a025-retrieve-advice-and-guidance-conversation diff --git a/specification/components/stu3/schemas/endpoints/a026-send-a&g-response.yaml b/specification/components/stu3/schemas/endpoints/a026-send-a&g-response.yaml index 7ad3e4950..309ac5e53 100644 --- a/specification/components/stu3/schemas/endpoints/a026-send-a&g-response.yaml +++ b/specification/components/stu3/schemas/endpoints/a026-send-a&g-response.yaml @@ -27,6 +27,13 @@ description: | You need to use [[HYPERLINK_A025]] to retrieve the conversation within an advice and guidance request. If you want to include attachments with the response, you need to use [[HYPERLINK_A020]] so they are ready to be associated with the response. + + ## Important notes + + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. + The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. + + Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. ## Use case As an authenticated user diff --git a/specification/components/stu3/schemas/endpoints/a027-convert-a&g-to-referral.yaml b/specification/components/stu3/schemas/endpoints/a027-convert-a&g-to-referral.yaml index aaca20501..cd7995156 100644 --- a/specification/components/stu3/schemas/endpoints/a027-convert-a&g-to-referral.yaml +++ b/specification/components/stu3/schemas/endpoints/a027-convert-a&g-to-referral.yaml @@ -44,6 +44,11 @@ description: | Appointments For Booking worklist for the admin team to action the task. The provider admin team will currently only be able to progress the referral via the e-RS Professional Application user interface (e.g. shortlisting appropriate services for the patient). + + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. + The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. + + Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. ## Related endpoints diff --git a/specification/components/stu3/schemas/endpoints/a028-record-triage-outcome.yaml b/specification/components/stu3/schemas/endpoints/a028-record-triage-outcome.yaml index e9f539615..5f047b47f 100644 --- a/specification/components/stu3/schemas/endpoints/a028-record-triage-outcome.yaml +++ b/specification/components/stu3/schemas/endpoints/a028-record-triage-outcome.yaml @@ -64,6 +64,9 @@ description: | an entry will be added to the service providers Appointments For Booking worklist for the admin team to action the task. The provider admin team will only be able to progress the referral via the e-RS Professional Application user interface (e.g. shortlisting appropriate services for the patient). + - In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. + The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. + - Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. summary: Record triage outcome (A028, FHIR STU3) operationId: a028-record-triage-outcome diff --git a/specification/components/stu3/schemas/endpoints/a031-change-shortlist.yaml b/specification/components/stu3/schemas/endpoints/a031-change-shortlist.yaml index 1a38b9826..af222b652 100644 --- a/specification/components/stu3/schemas/endpoints/a031-change-shortlist.yaml +++ b/specification/components/stu3/schemas/endpoints/a031-change-shortlist.yaml @@ -25,6 +25,11 @@ description: | If you are changing services to send the patient to a triage service, the triaging service will not support additional requirements but will need to consider if the patient has any additional requirements as part of their decision for future care. You can view additional requirements on a referral via the e-RS web application or by fetching [[HYPERLINK_A005]]. + + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. + The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. + + Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. ## Pre-requisites In order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles: @@ -85,6 +90,11 @@ requestBody: description: Changing the shortlist of an unbooked `ReferralRequest` (multiple services shortlist) value: $ref: '../../examples/changeShortlist/requests/UnbookedReferralMixedShortlist.json' + nonMixedShortlistWithDocument: + summary: ReferralRequest with non Mixed service and Document Reference + description: Changing the shortlist of an `ReferralRequest` with document reference. + value: + $ref: '../../examples/changeShortlist/requests/NonMixedShortlistWithDocument.json' responses: '200': $ref: '../responses/changeShortlist/200Response.yaml' diff --git a/specification/components/stu3/schemas/endpoints/a032-change-shortlist-and-send-for-triage.yaml b/specification/components/stu3/schemas/endpoints/a032-change-shortlist-and-send-for-triage.yaml index 96a294b20..32e57363e 100644 --- a/specification/components/stu3/schemas/endpoints/a032-change-shortlist-and-send-for-triage.yaml +++ b/specification/components/stu3/schemas/endpoints/a032-change-shortlist-and-send-for-triage.yaml @@ -32,6 +32,11 @@ description: | You need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to use this endpoint. You need to have found services that meet the referral needs of a patient using [[HYPERLINK_A010]]. + + ## Important Notes + + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. + Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. ## Use case As an authenticated user diff --git a/specification/components/stu3/schemas/endpoints/a036-cancel-referral.yaml b/specification/components/stu3/schemas/endpoints/a036-cancel-referral.yaml index e90bae100..33be73ab0 100644 --- a/specification/components/stu3/schemas/endpoints/a036-cancel-referral.yaml +++ b/specification/components/stu3/schemas/endpoints/a036-cancel-referral.yaml @@ -57,6 +57,13 @@ description: | You need to use [[HYPERLINK_A005]] to retrieve details of the referral in order to make this clinical decision. + ## Important notes + + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. + The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. + + Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. + ## Use case As an authenticated user diff --git a/specification/components/stu3/schemas/endpoints/a044-create-advice-and-guidance-request.yaml b/specification/components/stu3/schemas/endpoints/a044-create-advice-and-guidance-request.yaml index 44ccf00ef..fbfdced15 100644 --- a/specification/components/stu3/schemas/endpoints/a044-create-advice-and-guidance-request.yaml +++ b/specification/components/stu3/schemas/endpoints/a044-create-advice-and-guidance-request.yaml @@ -16,6 +16,11 @@ description: | ## Important notes The maximum number of services allowed on a given shortlist is 1. + + In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. + The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. + + Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. ## Pre-requisites To use this endpoint, you must be an authenticated e-RS user and use one of the following e-RS roles: diff --git a/specification/components/stu3/schemas/extensions/Extension-eRS-AttachedBy.yaml b/specification/components/stu3/schemas/extensions/Extension-eRS-AttachedBy.yaml new file mode 100644 index 000000000..10244df42 --- /dev/null +++ b/specification/components/stu3/schemas/extensions/Extension-eRS-AttachedBy.yaml @@ -0,0 +1,19 @@ +title: Extension-eRS-AttachedBy +description: Extension to indicate the individual who attached a file within e-RS. +type: object +required: + - url + - valueReference +properties: + url: + type: string + enum: + - 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1' + example: 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1' + valueReference: + type: object + required: + - identifier + properties: + identifier: + $ref: ../identifiers/STU3_UserId.yaml diff --git a/specification/components/stu3/schemas/extensions/Extension-eRS-AttachedByOrganisation.yaml b/specification/components/stu3/schemas/extensions/Extension-eRS-AttachedByOrganisation.yaml new file mode 100644 index 000000000..bff906d7c --- /dev/null +++ b/specification/components/stu3/schemas/extensions/Extension-eRS-AttachedByOrganisation.yaml @@ -0,0 +1,19 @@ +title: Extension-eRS-AttachedByOrganisation +description: Extension to indicate the organisation that attached a file within e-RS. +type: object +required: + - url + - valueReference +properties: + url: + type: string + enum: + - 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1' + example: 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1' + valueReference: + type: object + required: + - identifier + properties: + identifier: + $ref: ../identifiers/Organisation.yaml diff --git a/specification/components/stu3/schemas/extensions/Extension-eRS-AttachedOnBehalfOf.yaml b/specification/components/stu3/schemas/extensions/Extension-eRS-AttachedOnBehalfOf.yaml new file mode 100644 index 000000000..8a367f220 --- /dev/null +++ b/specification/components/stu3/schemas/extensions/Extension-eRS-AttachedOnBehalfOf.yaml @@ -0,0 +1,19 @@ +title: Extension-eRS-OnBehalfOf +description: Extension to indicate the individual on whose behalf a file was attached within e-RS. +type: object +required: + - url + - valueReference +properties: + url: + type: string + enum: + - 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1' + example: 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1' + valueReference: + type: object + required: + - identifier + properties: + identifier: + $ref: ../identifiers/STU3_UserId.yaml diff --git a/specification/components/stu3/schemas/extensions/Extension-eRS-AvailabilityStatus.yaml b/specification/components/stu3/schemas/extensions/Extension-eRS-AvailabilityStatus.yaml new file mode 100644 index 000000000..da462fc3f --- /dev/null +++ b/specification/components/stu3/schemas/extensions/Extension-eRS-AvailabilityStatus.yaml @@ -0,0 +1,31 @@ +title: Extension-eRS-AvailabilityStatus +description: Details whether a file is available to be downloaded. See the Important note section for further information +type: object +required: + - url + - valueCoding +properties: + url: + type: string + enum: + - 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1' + example: 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1' + valueCoding: + type: object + required: + - system + - code + properties: + system: + type: string + enum: + - 'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1' + example: 'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1' + code: + type: string + enum: + - AVAILABLE + - PENDING + - THREATS_FOUND + - VALIDATION_FAILED + example: AVAILABLE \ No newline at end of file diff --git a/specification/components/stu3/schemas/responses/changeShortlist/200Response.yaml b/specification/components/stu3/schemas/responses/changeShortlist/200Response.yaml index 67208fdaa..e57aee32b 100644 --- a/specification/components/stu3/schemas/responses/changeShortlist/200Response.yaml +++ b/specification/components/stu3/schemas/responses/changeShortlist/200Response.yaml @@ -28,4 +28,9 @@ content: description: Changing the shortlist of an unbooked `ReferralRequest` (bookable and triage service shortlist) value: $ref: '../../../examples/changeShortlist/responses/UnbookedReferralMixedShortlist.json' + nonMixedShortlistWithDocument: + summary: ReferralRequest with non Mixed service and Document Reference + description: Changing the shortlist of an `ReferralRequest` with document reference. + value: + $ref: '../../../examples/changeShortlist/responses/NonMixedShortlistWithDocument.json' diff --git a/specification/components/stu3/schemas/responses/changeShortlistAndSendForTriage/200Response.yaml b/specification/components/stu3/schemas/responses/changeShortlistAndSendForTriage/200Response.yaml index d34f5778d..587779d70 100644 --- a/specification/components/stu3/schemas/responses/changeShortlistAndSendForTriage/200Response.yaml +++ b/specification/components/stu3/schemas/responses/changeShortlistAndSendForTriage/200Response.yaml @@ -16,4 +16,4 @@ content: description: Changing the service list of an unbooked `ReferralRequest` and send for Triage value: $ref: '../../../examples/changeShortlistAndSendForTriage/responses/MinimalRequest.json' - + diff --git a/specification/components/stu3/schemas/responses/maintainReferralLetter/200Response.yaml b/specification/components/stu3/schemas/responses/maintainReferralLetter/200Response.yaml index 6bf01a4ce..982dfc346 100644 --- a/specification/components/stu3/schemas/responses/maintainReferralLetter/200Response.yaml +++ b/specification/components/stu3/schemas/responses/maintainReferralLetter/200Response.yaml @@ -17,3 +17,8 @@ content: summary: "`ReferralRequest` with clinical information (2 files)" value: $ref: '../../../examples/maintainReferralLetter/responses/ReferralRequestWithMultipleDocumentReferences.json' + withClinicalInformationFirstTime: + summary: "`ReferralRequest` with clinical information (1 file)" + value: + $ref: '../../../examples/maintainReferralLetter/responses/ReferralRequestWithSingleDocumentReference.json' + diff --git a/specification/components/stu3/schemas/responses/retrieveAdviceAndGuidanceConversation/200Response.yaml b/specification/components/stu3/schemas/responses/retrieveAdviceAndGuidanceConversation/200Response.yaml index 3ce3a84b5..aee4f2664 100644 --- a/specification/components/stu3/schemas/responses/retrieveAdviceAndGuidanceConversation/200Response.yaml +++ b/specification/components/stu3/schemas/responses/retrieveAdviceAndGuidanceConversation/200Response.yaml @@ -31,3 +31,7 @@ content: summary: Attachment uploaded from RCS value: $ref: '../../../examples/retrieveAdviceAndGuidanceConversation/AttachmentUploadedFromRCS.json' + unavailable-attachments: + summary: Attachment files unavailable for download + value: + $ref: '../../../examples/retrieveAdviceAndGuidanceConversation/UnavailableAttachments.json' diff --git a/specification/components/stu3/schemas/responses/retrieveAdviceAndGuidanceRequest/200Response.yaml b/specification/components/stu3/schemas/responses/retrieveAdviceAndGuidanceRequest/200Response.yaml index 07e6e7e5a..8b422052b 100644 --- a/specification/components/stu3/schemas/responses/retrieveAdviceAndGuidanceRequest/200Response.yaml +++ b/specification/components/stu3/schemas/responses/retrieveAdviceAndGuidanceRequest/200Response.yaml @@ -21,3 +21,8 @@ content: summary: "`CommunicationRequest` with attachment file reference" value: $ref: '../../../examples/retrieveAdviceAndGuidanceRequest/responses/WithAttachmentFileReference.json' + with-unavailable-attachments: + summary: "`CommunicationRequest` with attachments unavailable for download" + value: + $ref: '../../../examples/retrieveAdviceAndGuidanceRequest/responses/WithUnavailableAttachments.json' + diff --git a/specification/components/stu3/schemas/responses/retrieveReferralRequest/200Response.yaml b/specification/components/stu3/schemas/responses/retrieveReferralRequest/200Response.yaml index 3f669cb5f..72f31991c 100644 --- a/specification/components/stu3/schemas/responses/retrieveReferralRequest/200Response.yaml +++ b/specification/components/stu3/schemas/responses/retrieveReferralRequest/200Response.yaml @@ -41,3 +41,7 @@ content: summary: "`ReferralRequest` with additional requirements" value: $ref: '../../../examples/retrieveReferralRequest/responses/WithAdditionalRequirements.json' + with-unavailable-attachments: + summary: "Unbooked `ReferralRequest` with attachments unavailable for download" + value: + $ref: '../../../examples/retrieveReferralRequest/responses/WithUnavailableAttachments.json' \ No newline at end of file