In late February 2023, the UK government announced that they would make taking hormone replacements cheaper. Their Hormonal Replacement Therapy (HRT) Prepayment Certificate (PPC) is set to help around 400,000 women save hundreds of pounds a year.
The kicker: this new scheme was going live on 1st April 2023, just over 5 weeks following the announcement, and this left pharmacies across the country scrambling.
This is the story about how we rapidly turned a new Government scheme into a usable feature for our users — ready by day one of the scheme.
When first announced, the scheme lacked detail, but we knew the overall goal: to make this new exemption accessible to our users as soon as it was available to purchase.
The project followed a familiar pattern of how requirements develop at LloydsDirect: we start from the goal, and then, as people from across the business contribute, we gradually flesh out how it will work in practice.
The first discussion of the HRT PPC at LloydsDirect was between our product and professional standards teams, where we determined our first (quite obvious) requirement: for those with the HRT PPC, we will not charge for HRT medications covered by the exemption.
This, along with the headline paragraph from the government announcement, sat at the top of a fresh new project document — and so started a series of exchanges in comments between engineers and the product manager, developing an understanding of what a solution might look like.
At first glance, this feature is nothing new: we implement many categories of exemptions that cover the cost of prescriptions, so this is just another to add. But what makes it different is that exemptions as we knew them previously applied to all prescription charges, whereas the HRT PPC covers only a specific list of items. “Don’t we already not charge for contraceptives though?” a comment asked - “Maybe we can look at how we already implement this?”.
This initial technical exploration is all about feeling out the implementation, especially with a timeline needing a quick turnaround — we’re thinking about what skills we’ll need and who’s available. As this feature was on no team’s roadmap it was clear from the outset that we’d need to do some clever juggling to get this out in time.
With an idea of what parts of the system we’d need to modify, we got together with our professional standards team again to answer some new high priority questions.
The first question is about an important detail regarding the items covered under the new exemption: the list provided by the government are all branded — but we often get medicines prescribed as generics (non-branded) — are all brands covered?
The second concerns a more fundamental structure in pharmacy: the prescription. Under the hood we transact with the NHS in terms of complete prescriptions we dispense and this is where we apply any exemptions — so the question is: What happens if the prescription contains an exempt and non-exempt item?
It turns out these two questions were also ringing across community pharmacies in England. In light of branded items we discovered that there were some brands not covered, which posed us a problem of what to do when non-branded HRTs are prescribed.
In the question of a mixture of exempt and non-exempt items on a single prescription (known as a mixed HRT prescription) a week after our first sit-down on the topic there was a further release of some regulations surrounding the scheme. These suggested that we could either refuse to dispense it, dispense either the exempt HRT component OR the non-exempt component, or ask the holder to pay for the entire prescription and provide a refund for the HRT component.
In tandem with the developing requirements of the mixed-HRT and unbranded cases, design work continued for the happy-path of all-HRT exempt prescriptions. This had developed its own, now complete and implementable, sub-requirement: for those with the HRT PPC, we will not charge for prescriptions containing all branded HRT medications covered by the exemption, and we weren’t going to hang about in implementing it.
We developed new code in three key areas of our system:
We applied these changes in an incremental way: first we added the new HRT PPC exemption type, while blocking any being created on our live system behind a feature flag. This allowed us to write all the new code for the HRT PPC but have it sitting dormant until release day.
We also made the design decision to flag the HRT PPC distinctly from any of the existing exemptions, as the conditions for removing charges are more selective. This has a secondary benefit that we only wrote new code for the new HRT PPC path - as shown in the visualisation below. The vast majority of prescriptions moving through our system will never touch this new code which reduces the risk profile on go-live day.
Our development process relies heavily on use of unit testing to ensure complete feature coverage. We then work alongside data analysts to ensure we’re producing appropriate event data for the new feature, which the analyst will transform into a monitoring dashboard to show it in action on a more macro scale.
Once the code changes are complete and reviewed, we deploy to our staging environment, where we use some internal tooling to mock our live system with some artificial data (with some very creatively named staging users) - doing more end-to-end style tests. Any issues identified in the staging environment are first investigated using tracing data that helps us playback what code exactly has been fired — and once the criteria is understood this is fed back into our unit tests.
Back to the mixed-HRT case — there were further recommendations coming out that GPs should be prescribing HRT medications on a separate prescription. It was clear however that the systems on the GP side might not be best set up for this, and even then it might take time for prescribers to adapt to this recommendation.
We however had a desire for a fantastic user experience from day 1 — so we looked to develop a process for those without their HRT medications prescribed on a separate prescription. An option we had was partial dispensing of either the HRT medications, or non-exempt medications - though this would mean having to go back and request another prescription — only pushing the problem back to the GP. So we decided to go for an approach whereby we send out all the prescribed items, but then refund appropriately for the ones that should be exempt.
This mixes our automated process with more manual process needing to be carried out by our Patient Care team - what was key was that from the user perspective the experience remains smooth - so this handover all happens quietly in the background.
No one ever said the HRT PPC was simple - and we've definitely demonstrated that here! To aid our users through the process we also pulled in our content designers who did an update on our help site content as well as designed the prompts within the app to make it clear how the process worked and applied to different prescription types.
Finally, the question of non-branded medications — once again ideally on the GP side exempt brands would be prescribed — but sometimes they might not be and we want a good user experience for these cases too. We decided to take the onus on our side to attempt to dispense an exempted brand, and importantly for user experience no charge taken if they have the HRT PPC in these cases.
Our data dashboard showed over the first weekend (1st April fell on a Saturday) we had users adding purchased HRT PPCs from early Saturday morning, and there was a great sense of satisfaction in the team that our service allowed them to be used straight away.
Over the first fortnight we tracked hundreds of HRT PPC exempted orders make their way through our dispensary, and our Patient Care team were hot on refunding those unfortunate to not have all their HRT items on one prescription.
Releases are rarely without niggling bugs that are only found when the feature is used in practice - but our approach to limiting new code only for the new path and extensive monitoring made these easy to discover and resolve.
We as a whole LloydsDirect team are extremely proud of our agility to adapt to and implement new features for these schemes fast - using technology to put user experience at the forefront.