Staff searched a large BSO medicine codebook to identify and enter the code for each prescription item. Repeating this work across prescriptions consumed time, with part-time staff used to help handle the workload. Endorsements and amendments added further administrative work.
What we built
A connected software workflow.
We built a medicine-matching database and a three-stage algorithm: identifier mapping, exact-name matching, then vector similarity. The workflow supports coding from prescription information, including handwritten prescriptions, as reported by the delivery team.
Workflow
Follow the information through the system.
Implementation flow · based on the delivery team’s account
01 →
dm+d identifier mapping
Start with scanned pack information, resolve the dm+d identifier and use stored AMPP or VMPP mappings to find the linked BSO record.
02 →
Exact-name fallback
If identifier mapping does not resolve the item, compare the prescription medicine name with stored AMPP and VMPP names linked to BSO codes.
03 →
Vector fallback
If exact matching does not resolve it, use Sentence Transformers and pgvector to find similar medicine records.
04 →
Coding result
Surface the mapped code or candidate match for the coding workflow. Similarity alone is not evidence of clinical equivalence.
Inside the implementation
Deterministic matches first. Similarity when needed.
A connected medicine database
The implementation links dm+d identifiers and medicine names with BSO code records. AMPP and VMPP describe actual and virtual medicinal product packs in the NHS dm+d model; AMP and VMP describe products without the pack level.
Handwritten prescription support
Prescription text may not be an exact match to a catalogue name. Vector matching uses Sentence Transformers to represent text and pgvector to compare it with stored records, providing a fallback for the handwritten-prescription workflow described by the team.
Payment reconciliation
Pharmacies also need to understand whether reimbursement matches what they should receive. Alongside coding, the system identifies payment discrepancies for the pharmacy team to investigate, improving visibility into reimbursement and reducing manual checking.
Coding, endorsements and amendments
BSO’s Northern Ireland guidance covers item coding, supporting endorsements and use of current codebook information. This case study focuses on medicine-to-code matching within that wider administrative workflow.
Coding workspaceIllustrative interface
Workflow example
Medicine-to-code matching
Prescription item
Illustrative handwritten item
Identifier match
No mapped identifier
Exact-name match
No exact match
Vector fallback
Candidate medicine record
BSO result
Illustrative code withheld
Concept layout · not a production screenshot. Example content only.
Illustrative workflow view, not a production screenshot.
Delivered capabilities & outcomes
Less manual coding. Clearer payment visibility.
Implementation and workflow outcomes reported by the Tranz delivery team.
Delivered capability
Three-stage matching connects scanned identifiers, exact medicine names and vector candidates to stored BSO records.
Team-reported outcome
Handwritten prescription support and automated lookups reduce staff effort spent searching and entering medicine codes.
Payment visibility
Reconciliation identifies reimbursement discrepancies for investigation, helping pharmacies check whether they have been paid correctly.
Context & references
Clear terminology. A defined scope.
BSO is the Business Services Organisation in Northern Ireland. Its coding guidance describes the codebook, current codes, quantities and supporting endorsements. This is a Northern Ireland reimbursement workflow, rather than a single coding process for the whole UK. The workflow connects scanned pack information with stored medicine mappings, then uses name and similarity fallbacks when needed.
Where does your pharmacy team repeat the same work?
Bring us the handoffs, document entry or verification steps that need attention. We can explore the integrations, review points and evidence needed for a useful implementation.