Community pharmacy · Playbook 73

Online prescribing safeguards

Stronger checks on every online prescription, inconsistencies and risky patterns put in front of the prescriber, and evidence ready for any inspection. AI strengthens the safeguards; it never replaces them.

  • Predictive ML
  • Document AI
  • Agents with tools
  • Human in the loop
  • GPhC
  • CQC
  • MHRA
  • ASA
  • UK GDPR

At a glance

The problem
Online orders for higher-risk medicines rely on answers and evidence that are hard to check at a distance
Typical volume
Around 20,000 online consultations a month, more than half for weight-loss medicines
Who's involved
Superintendent pharmacist, prescribers, safeguarding lead, the online pharmacy product team, compliance and marketing, data protection
Pilot
8–10 weeks after a 3–4 week discovery
Clouds
AWS or Azure, UK regions

An illustrative scenario. The numbers are typical examples, not a client case study. The cloud services and UK rules were checked on 9 November 2026.

The business problem

The group's online pharmacy prescribes and supplies prescription-only medicines at a distance, mostly through its own pharmacist independent prescribers. Weight-loss medicines are the largest share, as injections and, since 2026, as licensed tablets too. Demand moves quickly, and prescribers can face hundreds of reviews in a shift, each built on a questionnaire, some uploaded evidence and an order history spread across several systems.

The rules have tightened. The GPhC's guidance for pharmacies providing services at a distance, updated in February 2025, says higher-risk medicines, including weight-loss medicines, must not be prescribed on a questionnaire alone. Weight, height or BMI must be independently verified, by video, in person, from clinical records or by contacting the patient's GP. The GPhC's April 2026 review found weight management in 77 inspection reports over two years, and 27% of 1,307 concerns were about prescribing practice, including missing BMI verification. Advertising is watched just as closely: the ASA and MHRA have acted against hundreds of ads for weight-loss prescription-only medicines.

Most people answer honestly. Some don't: a weight rounded up, someone else's photo, a second account at a different address, a re-order before the last pen could have been used, a child using a parent's details, or someone with an eating disorder who knows what to say. One prescriber looking at one order can't see most of this. And when an inspector or a concern asks what was checked for a particular supply, assembling the evidence takes days.

What AI changes

  • Every order reaches the prescriber with its verification status in plain view: identity checked by a certified provider, how weight or BMI was independently verified and by whom, and what is still missing.
  • Answers are compared with the person's previous orders and any linked accounts. Inconsistencies, such as a jump in weight, a changed date of birth or a condition that has disappeared, are flagged with the evidence.
  • Repeat-order patterns are flagged: re-orders earlier than the dose allows, dose steps faster than the group's protocol, and several accounts sharing an address, device or payment card.
  • Possible safeguarding concerns, such as signs of an eating disorder or a possible under-18, go to the trained safeguarding lead, never to an automated response.
  • Each supply has an evidence pack: what was checked, how, by whom and when, ready for a GPhC inspection or a concern.
  • What doesn't change: the prescriber makes every decision, and verification is done by people and certified services. The AI reads and compares; it never verifies anything itself.

How success is measured

Agree these, and measure the baseline, before anything is built. Example targets are typical, not promises.

Verification completeness

Share of weight-loss supplies with independent verification of weight, height or BMI recorded, and the method used.

Example100%, checked every day

Flags seen before the decision

Share of orders where every flag was in front of the prescriber before they decided.

ExampleEvery order

Flag usefulness

How often a flag changed or informed the prescriber's decision. Too low means noise, and noise gets ignored.

ExampleReviewed weekly

Linked accounts found

People ordering through more than one account, or for someone else, compared with a manual review sample.

ExampleMeasured against the sample

Prescriber decision drift

Approval, decline and referral rates before and after go-live. A rise in approvals is a warning sign, not a win.

ExampleNo unexplained change

Evidence on request

Time to assemble everything held about one supply for an inspector or a concern.

ExampleFrom days to under an hour

UK regulation and controls

Cross-sector rules are on the UK regulation map.

  • GPhCGuidance for registered pharmacies providing pharmacy services at a distance, including on the internet (February 2025)

    Higher-risk medicines can't be prescribed on a questionnaire alone, and weight-loss prescribing needs independent verification of weight, height or BMI plus a route for two-way communication. The AI never counts as that verification. It records which verification happened, flags where it didn't, and blocks the order reaching a prescriber as complete until it has.

  • GPhCStandards for registered pharmacies, and inspection

    The pharmacy owner and superintendent pharmacist are responsible for the service, including any third-party prescribers. Weight management is an inspection focus. The evidence pack is designed for an inspector's questions, and the safeguards are owned by the superintendent, not by the AI team.

  • CQCRegistration for online prescribing

    Online prescribing by doctors and other listed professionals needs CQC registration for treatment of disease, disorder or injury. Pharmacist prescribers working from the registered pharmacy fall under the GPhC. Know which regulator covers each prescriber, and keep evidence that suits both.

  • MHRA and ASAAdvertising prescription-only medicines (Human Medicines Regulations 2012, CAP Code)

    Prescription-only medicines can't be advertised to the public, and avoiding the product name doesn't make an ad compliant. The AI never writes marketing, and an assistant checks proposed copy against the rules before a person in compliance approves it.

  • ICOUK GDPR special category data and automated decisions

    Health data, profiling and linked-account matching need a DPIA, a clear lawful basis and condition, collecting only what's needed, UK processing and a retention period. Significant decisions based on health data still need meaningful human involvement, so no order is declined or delayed by the AI alone.

  • MHRASoftware and AI as a medical device

    A tool that recommends whether to prescribe would be heading towards a medical device. This one shows the prescriber verification status, inconsistencies and patterns, with the evidence, and makes no treatment recommendation. Keep that intended purpose written down.

The solution

Showing AWSAzuresovereign / on-prem services. Switch with the toggle; every diagram and table on this page follows it.

Online prescribing safeguards: reference architecture
  1. 01Channels

    • Online pharmacy website and app
    • Video consultation
    • Patient's GP
  2. 02Intake

    • API GatewayAPI ManagementKong, or your existing API gatewayOrders and questionnaires
    • Certified identity check
    • Amazon S3Blob StorageCeph, or IONOS S3 Object StorageEvidence store
  3. 03Intelligence

    • Amazon TextractContent Understanding (Document Intelligence)Docling plus an open-weight vision modelRead uploaded evidence
    • SageMaker AI + Entity ResolutionAzure Machine LearningMLflow and Kubeflow on KubernetesLinked accounts and order patterns
    • Agent
      Bedrock AgentCoreFoundry Agent ServiceLangGraph on KubernetesSafeguards agent
  4. 04Orchestration

    • Step FunctionsLogic Apps / Durable FunctionsTemporal, or n8nRequired-checks workflow
    • EventBridge + SQSEvent Grid + Service BusApache Kafka or RabbitMQEvents and queues
  5. 05Systems of record

    • Online pharmacy platform
    • Prescribing system
    • Dispensing and dispatch
  6. 06People

    • Person
      Prescriber decides
    • Person
      Branch team: in-person check
    • Person
      Safeguarding lead and superintendent
  • Cloud or platform service (AWSAzuresovereign / on-prem)
  • AI agent
  • A person decides
  • Your existing systems
  • Outside your organisation

Components, side by side

Online prescribing safeguards: components on AWS, Azure and a sovereign or on-prem stack
LayerAWSAzureSovereign / on-prem
Intake: orders, questionnaires, filesQuestionnaires are fixed, versioned and owned by the superintendent. No AI on the customer side.API Gateway, S3API Management, Blob StorageKong or your existing API gateway; Ceph or IONOS S3 Object Storage
IdentityBuy this, don't build it, whichever platform you choose. Certification is under the UK trust framework, on a statutory footing since the Data (Use and Access) Act 2025.A certified provider from the government's digital verification services registerA certified provider from the government's digital verification services registerA certified provider from the government's digital verification services register
Reading uploaded evidenceReads what was uploaded. It can't tell whether a document or photo is genuine or current.Amazon TextractAzure Content Understanding (includes Document Intelligence)Open-source parsing (e.g. Docling) plus an open-weight vision model
Linked accountsTune it carefully. Families share addresses and cards; that isn't misuse.AWS Entity ResolutionMatching model in Azure Machine LearningA matching model built with MLflow and Kubeflow on Kubernetes
Order-pattern modelTrained on cases reviewed by senior prescribers, not on past approvals. Amazon Fraud Detector closed to new customers in November 2025.Amazon SageMaker AIAzure Machine LearningMLflow and Kubeflow on Kubernetes
Summaries and reasoningBoth clouds offer a choice of models, including Claude and others.Amazon BedrockMicrosoft FoundryOpen-weight models served with vLLM on your own GPUs, or IONOS AI Model Hub
Protocols and guidance (retrieval)The group's prescribing protocols, product licences and GPhC guidance, so flags cite the rule they relate to.Bedrock Knowledge BasesFoundry IQ, built on Azure AI SearchOpenSearch, or PostgreSQL with pgvector
Agent runtimeThe original Bedrock Agents closed to new customers on 30 July 2026; new builds use AgentCore.Amazon Bedrock AgentCoreFoundry Agent ServiceAn open-source agent framework (e.g. LangGraph) on Kubernetes
WorkflowRequired checks are rules in the workflow, never model outputs.AWS Step FunctionsLogic Apps or Durable FunctionsTemporal, or n8n
GuardrailsBedrock GuardrailsAzure AI Content SafetyOpen-source guardrails (e.g. NeMo Guardrails, Llama Guard)
PlatformManaged AWS servicesManaged Azure servicesKubernetes on-prem (e.g. OpenShift, Rancher), or IONOS Managed Kubernetes
Identity, keys, data protectionIAM Identity Center, KMS, MacieEntra ID, Key Vault, PurviewKeycloak or your existing Active Directory; OpenBao or HashiCorp Vault; an HSM
Monitoring and auditLog every flag, who saw it, and what the prescriber decided.CloudWatch, CloudTrailAzure Monitor, Log AnalyticsPrometheus, Grafana, OpenTelemetry
UK data residencyThis is health data. If the group also handles NHS data on the same platform, some NHS buyers will require UK residency, so an EU-hosted option may not fit.eu-west-2 (London)UK South / UK WestYour own UK data centre, or a UK/EU provider (IONOS AI Model Hub runs in Germany)

On a phone, the table shows the platform you pick. Sovereign / on-prem means open, portable components you can run in your own data centre or with a UK or European provider; IONOS is shown as one example, and others exist. What sovereign cloud means →

Hybrid and on-prem

Many organisations keep core systems and sensitive data on their own servers. This is how the same design works across both.

Stays on-prem

The online pharmacy platform, the prescribing and dispensing systems, and the patient records stay where they are today. Required-checks rules live in the workflow, close to those systems, so they never depend on a model being available.

Uses cloud AI

Reading uploaded evidence, linked-account matching, the order-pattern model and the flag summaries run in the chosen platform: a UK cloud region, or the group's own GPUs for the sovereign option. The identity check is a call to a certified provider, whichever platform hosts the rest.

How they connect

Through an API gateway, over a private link such as AWS Direct Connect or Azure ExpressRoute, or inside the group's own data centre for the sovereign option. Flags come back as events and are attached to the order in the prescriber's existing queue.

If the link drops

Orders still reach prescribers, and every required check is still enforced by the workflow. The prescriber simply works without the extra flags and the order is marked as not yet pattern-checked. Nothing is approved faster because the AI is unavailable.

The agents

What each agent may do through its tools, what it may not, and where a person signs off. The limits are enforced by the platform, not the prompt.

Safeguards agent

May do

  • Read the order, questionnaire, uploaded evidence and order history
  • Check verification status against the required checks for that medicine
  • Compare answers with previous orders and linked accounts
  • Check timing and dose steps against the group's protocol
  • Draft a summary of flags, each with its evidence and the rule it relates to
  • Assemble the evidence pack for a supply

May not do

  • Approve, decline or prescribe
  • Mark a check as verified
  • Remove or lower a flag
  • Contact the patient
  • Change questionnaire answers or the patient record
  • Use anything it finds for marketing

Where a person signs offThe prescriber decides every order, and only the person or certified service that carried out a check can mark it verified. Safeguarding concerns go to the safeguarding lead. The agent's permissions are enforced by the platform's identity and policy controls, not by instructions in a prompt.

Marketing check

May do

  • Read proposed ads, emails and social posts
  • Highlight wording that could promote a prescription-only medicine, with the rule it may breach

May not do

  • Write or rewrite marketing copy
  • Approve or publish anything

Where a person signs offA named person in compliance approves every piece of marketing for the online pharmacy.

Middleware and integration

The online pharmacy platform stays the record of the order and the consultation. The identity provider, the evidence store and the AI connect to it through an API layer, and flags appear in the prescriber's existing queue, not in a new screen.

The branch network is a safeguard in its own right. Where weight can't be verified remotely, the workflow offers a check at a nearby branch, recorded by the branch team. The AI can book and chase that check; it can't stand in for it.

If the AI is down, nothing gets faster. Orders still reach prescribers, with the required checks enforced by the workflow, just without the extra flags. There is no fast path that depends on a model.

Process and people

  • Required checks for each medicine, written as rules and signed off by the superintendent pharmacist, kept separate from any model.
  • A safeguarding route with a named lead, and clear signposting to the GP or other services when a supply is declined.
  • A weekly review of flag usefulness, and a monthly review of prescriber decision rates at clinical governance.
  • A named owner for every rule, questionnaire version, model and prompt, with change control.
  • Prescribers trained before go-live on what the AI can't see, and told plainly that a clean summary is not a verified patient.
  • Marketing approval owned by compliance, with the marketing check as an aid, not a gate.

Delivery plan

  1. 3–4 weeks

    Discovery

    Map today's checks for each medicine, measure verification completeness, agree which checks are fixed rules, and choose a certified identity provider.

  2. Gate · must be true to passRequired checks signed off by the superintendent, baseline measured, DPIA started, safeguarding lead involved.

  3. 8–10 weeks

    Pilot

    Weight-loss medicines only, in shadow mode: flags go to a senior reviewing prescriber, not the live queue, and are compared with a manual review sample.

  4. Gate · must be true to passFlags useful, no decision drift, safeguarding route tested, and superintendent sign-off.

  5. 4–6 weeks

    Production

    Flags and evidence packs go live for all prescribers, with monitoring, support and a rollback plan.

  6. Gate · must be true to passMonitoring, decision-drift reporting, rollback plan and prescriber training in place.

  7. Ongoing

    Scale

    Extend to other higher-risk medicines, such as those liable to misuse, then add the marketing check.

  8. Gate · must be true to passEach new medicine passes the same pilot gate.

Roles and RACI

Who is responsible, accountable, consulted and informed, by activity
ActivitySuperintendent pharmacistLead prescriberProduct ownerSolutions architectI can fill thisTechnical PMI can fill thisEngineersI can fill thisCompliance & DPOSecurityI can fill this
Required checks for each medicineAccountableResponsibleConsultedConsultedInformedInformedConsultedInformed
Target architectureConsultedConsultedConsultedAccountable and ResponsibleConsultedConsultedConsultedConsulted
DPIA and lawful basisConsultedInformedConsultedConsultedInformedInformedAccountable and ResponsibleConsulted
Build and integrationInformedConsultedConsultedAccountableResponsibleResponsibleInformedConsulted
Testing flags on real casesAccountableResponsibleConsultedConsultedResponsibleResponsibleConsultedInformed
Go-live decisionAccountableConsultedResponsibleConsultedResponsibleInformedConsultedConsulted
Run, monitor and review decision driftAccountableResponsibleResponsibleConsultedConsultedResponsibleConsultedConsulted

Required checks for each medicine

Superintendent pharmacist
A · Accountable
Lead prescriber
R · Responsible
Product owner
C · Consulted
Solutions architect
C · Consulted
Technical PM
I · Informed
Engineers
I · Informed
Compliance & DPO
C · Consulted
Security
I · Informed

Target architecture

Superintendent pharmacist
C · Consulted
Lead prescriber
C · Consulted
Product owner
C · Consulted
Solutions architect
A/R · Accountable and Responsible
Technical PM
C · Consulted
Engineers
C · Consulted
Compliance & DPO
C · Consulted
Security
C · Consulted

DPIA and lawful basis

Superintendent pharmacist
C · Consulted
Lead prescriber
I · Informed
Product owner
C · Consulted
Solutions architect
C · Consulted
Technical PM
I · Informed
Engineers
I · Informed
Compliance & DPO
A/R · Accountable and Responsible
Security
C · Consulted

Build and integration

Superintendent pharmacist
I · Informed
Lead prescriber
C · Consulted
Product owner
C · Consulted
Solutions architect
A · Accountable
Technical PM
R · Responsible
Engineers
R · Responsible
Compliance & DPO
I · Informed
Security
C · Consulted

Testing flags on real cases

Superintendent pharmacist
A · Accountable
Lead prescriber
R · Responsible
Product owner
C · Consulted
Solutions architect
C · Consulted
Technical PM
R · Responsible
Engineers
R · Responsible
Compliance & DPO
C · Consulted
Security
I · Informed

Go-live decision

Superintendent pharmacist
A · Accountable
Lead prescriber
C · Consulted
Product owner
R · Responsible
Solutions architect
C · Consulted
Technical PM
R · Responsible
Engineers
I · Informed
Compliance & DPO
C · Consulted
Security
C · Consulted

Run, monitor and review decision drift

Superintendent pharmacist
A · Accountable
Lead prescriber
R · Responsible
Product owner
R · Responsible
Solutions architect
C · Consulted
Technical PM
C · Consulted
Engineers
R · Responsible
Compliance & DPO
C · Consulted
Security
C · Consulted

R ResponsibleA AccountableC ConsultedI Informed· not involved

Where I'd fit

Option A

Lead the architecture

If there's no architect on the programme, I'd own the design end to end: the required-checks workflow, the identity and evidence integrations, the matching and pattern models, and the gates. I'd report to your programme board and your superintendent pharmacist, and I'd say plainly where a check has to stay with a person.

Option B

Support your architect

If your partner or your own team already has an architect, I'd take on the linked-account matching, the safeguards agent and the evidence packs under their lead, and give them a second senior opinion on the rest, especially security and data protection.

Where this goes wrong

  1. Goes wrong

    The safeguards tool becomes a speed tool: a low risk score fast-tracks approval.

    How the design avoids it

    No score ever removes a required check. Required checks are workflow rules, and approval rates are watched for drift.

  2. Goes wrong

    A chatbot helps customers fill in the questionnaire and ends up coaching the right answers.

    How the design avoids it

    No AI on the customer side of the questionnaire. Questions are fixed, reviewed and versioned.

  3. Goes wrong

    Someone treats an uploaded photo or document as proof because the AI read it.

    How the design avoids it

    The AI reads; people and certified services verify. Every record says which is which.

  4. Goes wrong

    The model learns from past approvals, including past poor practice.

    How the design avoids it

    Train on cases reviewed by senior prescribers and known misuse, not on what was approved.

  5. Goes wrong

    Too many flags, so prescribers stop reading them.

    How the design avoids it

    Measure flag usefulness weekly and retire rules that never change a decision.

On the horizon

Changes already announced or under way that affect this design. More in the UK horizon scan.

  1. 18 November 2026 (expected)
    NICE guidance on orforglipron, the second oral GLP-1 tablet licensed in the UK in 2026, after the Wegovy tablet. Tablets are easier to share or resell than pens.

    Set required checks and pattern rules per product, not per drug class, so a new product gets its own rules before launch.

  2. Awaited
    The government's response to its call for evidence on private (non-NHS) prescribing, which closed in November 2025 and covered online prescribing, EEA prescriptions and PGDs outside the NHS. It could bring minimum assessment standards.

    Keep evidence structured by medicine and verification method, so a new standard is a report, not a project.

  3. October 2026 to March 2029
    The Obesity Pathway Innovation Programme is testing NHS obesity care through community pharmacies and digital routes, with the first pharmacy pilots starting from October 2026.

    Plan for NHS and private weight services side by side, so the same person can't be supplied by both without the prescriber knowing.

  4. Winter 2026
    OfDIA plans a machine-readable version of the digital verification services register. Version 1.0 of the UK trust framework came into force in September 2026.

    Choose an identity provider certified against version 1.0, and check its certification automatically once the register allows it.

  5. 2027
    Following the national commission on regulating AI in healthcare, the MHRA plans to consult on how AI-enabled devices are qualified and classified.

    Keep the intended purpose narrow and documented: flags and evidence for a prescriber, never a treatment recommendation.

Questions to ask your partner or vendor

Good answers are specific. Vague answers to any of these are worth following up.

Copy them into your next supplier meeting

  1. Which checks can never be skipped, and where in the system is that enforced?
  2. What does this actually verify, and what is it only reading?
  3. How do we find one person behind several accounts without wrongly linking families at the same address?
  4. How will we know if approvals quietly rise after go-live?
  5. Can we show an inspector everything we checked for a given supply within the hour?
  6. Where is our data processed and stored, and is it used to train anyone's model?

Planning something like this?

Whether you need someone to lead the design or to support the architect you already have, let's talk it through.

Sam Naseem
Sam NaseemBirmingham, UK · UK & Europe
Available now