App-Restricted Access Mode - Is it possible to get a list of Valid Service IDs for my Trust?

TL;DR - Trying to build an unattended service that downloads attachments for Referrals for Review, Retrieve referral worklist (A008) requires Service IDs in app-based and I am struggling to find a way to retrieve these.

The Context:
I am a Developer working in a large Foundation Trust, we have Oracle Millennium deployed as an EPR with a Bespoke document management system heavily integrated.
With the rapidly approaching deprecation of CIS1 Authentication for eRs we need to either upgrade or replace our existing referral document retrieval service with one using the new CIS2 Authentication.
While reading through the eRs API Docs we learned that the eRs Team have made a subset of the API’s endpoints available to call using application-restricted access mode. We want to use this additional functionality to build an unattended service that downloads all of the documents for incoming referrals and upload them to our document management system.

The Issue:
In application restricted access mode the Retrieve referral worklist (A008) requires the calling application to specify the Service (by Service ID) which we want the referral worklist for, rather than just giving our NHSD-End-User-Organisation-ODS and getting all Referrals for Review back like we are able to using the A008 endpoint in the user-restricted access mode.
I have been advised the list of services we support as a trust is not static, so to avoid our team having to take on the ongoing task of maintain this list of Service IDs I am trying to find a way that the complete list for our trust can be fetched programmatically.

The Question:
Does eRs expose an endpoint, either in app-restricted or user-restricted access modes, that would allow us to fetch this list of Service IDs? And if not, how is it recommend that service providing organisations keep track of the Service IDs associated with our ODS Code so that we can make use of the A008 endpoint in the application-restricted access mode.

Hi @david.plummer - Welcome to the community and thanks for reaching out to us.

We don’t provide an API that lists all the Services IDs under a given organisation.

In the scenario you describe using the user-restricted access mode, the referrals are not associated to the ODS organisation as such. The user is part of a workgroup which is associated to a service, and that relates to a referral. The service is part of the organisation but the access to view/manage a referral is controlled at the service level through e-RS workgroups or legitimate relationship (LR) as it’s also known as.

The Service Definer role in e-RS manages this process and would account for the flux in services and who needs access.

Similarly, the same role should be able to provide you with a list of Service IDs and any changes when they occur.

If you feel a new ‘Service ID’ endpoint would be a useful addition to our API, then please raise a new user request here.

Hi @zubeir.tai,
Thank you so much for your kind and informative response!
I will investigate our options for maintaining this list manually with support from an end user with the Service Definer role in e-RS.
I will also raise a request for an endpoint to be added that could support this functionality without interaction with an end user in our organisation, as I do think that this would allow the document fetching workflow to be fully automated with the manual step you have described above.
Many Thanks,
Dave

1 Like