Community

Read blogs, news and events; participate in forums

Categories

Key Words

Ideas for using the EPS Prescription Tracker RESTful API

  • Rob Gooch
  • 2 Feb 2017

Documentation for the EPS Prescription Tracker API is published on GitHub. In due course this API will be also published here on the Health Developer Network. With this API now available how could it be used? Here are some ideas.

Prescribing Systems – Query for prescribed medication dispensing status

The API could be used to query for the status of any electronic prescription known to the prescribing system, i.e. where the EPS Prescription ID is known. Has the prescription been dispensed? When and by which pharmacy? A query to show this could be triggered by a user’s request: imagine a right-click context option for “View dispensing record”. Alternatively dispensing data could be queried in the background on opening the patient record with key information shown on the main patient medication history screen in an extra column to show if the medication has been dispensed. The user could then click further to request more detailed information when required.

To implement this, use the retrieve prescription request to get the metadata for the given prescription.

GET https://mm-sync.national.ncrs.nhs.uk/mm/prescriptions/{prescriptionId}?format=trace

Within the JSON response there will be a “statusCode” for each prescribed medication item. The “id” will be the medication item GUID from the prescription so this provides the link back to the local patient medical record. The implementer can choose to either display the native EPS status text from the “statusText” or display equivalent text that may be more meaningful to their end users.

Prescribing Systems – Query for ‘current’ repeat dispensing issue for improved cancellation processes

The API could be used to solve the problem of not knowing which repeat dispensing issues have been dispensed when a repeat dispensing authorisation needs to be cancelled. Currently, systems make an educated guess based on time elapsed since the repeat dispensing prescription was authorised. Instead use the API to query for the ‘current’ issue of the repeat dispensing prescription. By omitting the “issueNumber” parameter, the current issue is returned in the JSON response. The prescribing system can then accurately record which issues will be cancelled, making for a more accurate patient medical record and more accurate QOF payments.

Dispensing Systems – For prescription reconciliation

The API could be used to address the problem of prescription reconciliation: A dispensing system has downloaded a batch of electronic prescriptions including 3 for Mrs Smith. Are there any more prescriptions expected for Mrs Smith or is this everything?

To answer this question use the API to search for prescriptions for Mrs Smith, using her NHS Number as an input parameter.

GET https://mm-sync.national.ncrs.nhs.uk/mm/prescriptions?nhsNumber={nhsNumber}&format=trace-summary

Either filter the JSON response for just the prescriptions of status either “To Be Dispensed” (code=0001) or “With Dispenser” (code=0002), or call the request twice, adding the “prescriptionStatus” parameter to pre-filter then combine the results.

GET https://mm-sync.national.ncrs.nhs.uk/mm/prescriptions?nhsNumber={nhsNumber}&format=trace-summary&prescriptionStatus={prescriptionStatus}

Then use the retrieve prescription request to get the metadata for each prescription.

GET https://mm-sync.national.ncrs.nhs.uk/mm/prescriptions/{prescriptionId}?format=trace

Any prescriptions shown as “To Be Dispensed” where the user organisation is the “nominatedDispenserODS” have not yet been downloaded so either make another request for nominated prescriptions or request this prescription individually by ID.

For “With Dispenser” prescriptions where the “dispensingOrganisationODS” is your organisation, then these should have been downloaded and available. If they cannot be found locally then this points to a local message handling problem which can then be investigated.