Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sandbox/src/routes/stu3/changeShortlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = [
method: 'POST',
path: '/FHIR/STU3/ReferralRequest/{ubrn}/$ers.changeShortlist',
handler: (request, h) => {
const allowedBusinessFunctions = ["REFERRING_CLINICIAN", "REFERRING_CLINICIAN_ADMIN"]
const allowedBusinessFunctions = ["REFERRING_CLINICIAN", "REFERRING_CLINICIAN_ADMIN", "SERVICE_PROVIDER_CLINICIAN", "SERVICE_PROVIDER_CLINICIAN_ADMIN"]
const validationResult = validationUtils.validateBusinessFunction(request, h, allowedBusinessFunctions)

if (validationResult) {
Expand All @@ -24,4 +24,4 @@ module.exports = [
return h.file(responsePath, { etagMethod: false }).code(200).type('application/fhir+json').etag("3", { weak: true })
}
}
]
]
2 changes: 1 addition & 1 deletion sandbox/src/routes/stu3/retrieveAppointmentSlots.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = [
path: '/FHIR/STU3/Slot',
handler: (request, h) => {

const allowedBusinessFunctions = ["REFERRING_CLINICIAN", "REFERRING_CLINICIAN_ADMIN"]
const allowedBusinessFunctions = ["REFERRING_CLINICIAN", "REFERRING_CLINICIAN_ADMIN", "SERVICE_PROVIDER_CLINICIAN", "SERVICE_PROVIDER_CLINICIAN_ADMIN"]

const validationResult = validationUtils.validateBusinessFunction(request, h, allowedBusinessFunctions)
if (validationResult) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ description: |
In order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:
- `REFERRING_CLINICIAN`
- `REFERRING_CLINICIAN_ADMIN`
- `SERVICE_PROVIDER_CLINICIAN`
- `SERVICE_PROVIDER_CLINICIAN_ADMIN`

You need to have identified a directly bookable `service` that is on the current referral shortlist. You can do this by using [[HYPERLINK_A005]].

Expand Down Expand Up @@ -65,6 +67,7 @@ parameters:
- $ref: '../headers/request/BusinessFunction.yaml'
- $ref: '../headers/request/CorrelationID.yaml'
- $ref: '../headers/request/ErsCommRuleOrg.yaml'
- $ref: '../headers/request/OnBehalfOfUserID.yaml'
- $ref: '../queryParameters/ServiceId.yaml'
- $ref: '../queryParameters/Priority.yaml'
- $ref: '../queryParameters/Status.yaml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ description: |
In order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:
- `REFERRING_CLINICIAN`
- `REFERRING_CLINICIAN_ADMIN`
- `SERVICE_PROVIDER_CLINICIAN`
- `SERVICE_PROVIDER_CLINICIAN_ADMIN`

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]].


Where a `SERVICE_PROVIDER_CLINICIAN_ADMIN` (SPCA) is acting on behalf of a `SERVICE_PROVIDER_CLINICIAN` (SPC), the 'on behalf of' user ID must be that of an appropriate SPC.

## Use case
As an authenticated user

Expand All @@ -59,6 +63,8 @@ description: |
For the referral to be processed by the service provider, you must ensure appropriate referral letter information has been added to the referral. You can add/manage referrer letter information by using [[HYPERLINK_A012]].

You can check to see what referral letter information has already been added to a referral by using [[HYPERLINK_A005]], [[HYPERLINK_A007]], and [[HYPERLINK_A006]] endpoints where necessary.

When making a request as a `SERVICE_PROVIDER_CLINICIAN_ADMIN` (SPCA), use endpoint [[HYPERLINK_A040]] to determine which `SERVICE_PROVIDER_CLINICIAN` (SPC) the SPCA is allowed to act 'on behalf of'.

## Known Issues

Expand All @@ -75,6 +81,7 @@ parameters:
- $ref: '../headers/request/BusinessFunction.yaml'
- $ref: '../headers/request/CorrelationID.yaml'
- $ref: '../headers/request/IfMatch.yaml'
- $ref: '../headers/request/OnBehalfOfUserID.yaml'
- $ref: '../pathParameters/Ubrn.yaml'
requestBody:
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ description: |
| INVALID_CODE | The input provided for a field is not one of the defined legal values. |
| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |
| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |
| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |
| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |
| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |
| DUPLICATE_SERVICE | Unique service value expected. |
Expand Down
2 changes: 2 additions & 0 deletions tests/sandbox/stu3/test_a015_get_appointment_slots.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class TestGetAdviceAndGuidanceConversation(SandboxTest):
allowed_business_function_data = [
"REFERRING_CLINICIAN",
"REFERRING_CLINICIAN_ADMIN",
"SERVICE_PROVIDER_CLINICIAN",
"SERVICE_PROVIDER_CLINICIAN_ADMIN",
]

authorised_actor_data = Actor.all(
Expand Down
2 changes: 2 additions & 0 deletions tests/sandbox/stu3/test_a031_change_shortlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class TestChangeShortlist(SandboxTest):
allowed_business_function_data = [
"REFERRING_CLINICIAN",
"REFERRING_CLINICIAN_ADMIN",
"SERVICE_PROVIDER_CLINICIAN",
"SERVICE_PROVIDER_CLINICIAN_ADMIN",
]

authorised_actor_data = Actor.all(
Expand Down
Loading