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.