How a digital prescription in Senegal can replace the handwritten ordonnance: FHIR records, QR verification, ATC codes, and what changes for pharmacies.
In short
- A digital ordonnance is a structured record, not a scanned page: the doctor's order (MedicationRequest) and the pharmacy's dispensing (MedicationDispense) are linked.
- A QR code lets a pharmacist check in seconds that an ordonnance is genuine, still valid and not already dispensed.
- Senegal's 2023 medicines law and 2008 electronic transactions law already frame much of this, but electronic prescriptions are not yet specifically regulated.
Awa leaves Dr Moussa Ndiaye's cardiology practice in Plateau with a folded sheet of paper: three medicines, a dosage in the doctor's quick handwriting, a stamp and a signature. At a pharmacy in Medina, the pharmacist reads it twice, calls the practice to confirm one dose, and replaces one brand with an equivalent generic. A month later the sheet is lost, and nobody can say exactly what Awa took.
This article explains what a digital prescription (ordonnance) is, how a QR code can prove it is genuine, what it changes for patients, doctors and pharmacies, and what Senegalese law already says about it. Technical details are grouped in a clearly marked section near the end.
Why the paper ordonnance is fragile
For medicines that can only be dispensed on prescription, Senegal's law 2023-06 of 13 June 2023 on medicines, other health products and pharmacy lists what the ordonnance must show: the prescriber's name and address, the date, stamp and signature, the patient's sex, age and weight, and the dosage. Article 81 adds one demanding word: these details must be written legibly (full text).
Handwriting is only the first weakness. The World Health Organization notes that medication errors arise when weak systems or human factors affect prescribing, transcribing, dispensing, administration and monitoring, and it estimates their global cost at 42 billion US dollars a year. Each time a prescription is copied by hand, read out over the phone or retyped into software, there is one more chance for a mistake.
Paper is also easy to forge. In June 2026, police in Thiès and Tivaouane dismantled a network that used blank prescription pads taken from a hospital, and the stamp of a doctor who had left five years earlier, to obtain controlled psychotropic medicines. The alarm came from a pharmacist who noticed a customer returning again and again with such prescriptions. With paper, that kind of vigilance is the main safeguard.
What a digital ordonnance actually is
A digital ordonnance is not a photo of a paper one. It is a structured record in which each part (medicine, dose, duration, prescriber, patient) sits in its own labelled field, so that software can read it without guessing.
In FHIR, the international standard for exchanging health data (see FHIR, simply), a prescription is split into two linked resources, the standard building blocks of the format:
- MedicationRequest is the doctor's order. HL7, the organisation that publishes FHIR, defines it as an order "for both supply of the medication and the instructions for administration" (HL7). It holds the medicine, the dosage instructions, how many times it may be renewed and how long it stays valid.
- MedicationDispense records what the pharmacy actually handed over. It points back to the order it fulfils and has a dedicated field saying whether the pharmacist substituted a different product (HL7).
Each medicine also carries an international code from the ATC classification (Anatomical Therapeutic Chemical), maintained by a WHO Collaborating Centre. Codes go from broad to precise in five levels. The antimalarial combination artemether and lumefantrine, for example, is P01BF01: antiparasitic products, then antiprotozoals, antimalarials, artemisinin combinations, and finally the substance itself. Our article on health codes explains how ATC works alongside ICD-11 and LOINC.
The patient still gets something to read: a clear document, printed or as a PDF on the phone. The difference is that this document is now a view of the record, not the record itself.
How a QR code proves an ordonnance is genuine
France offers a working example. With its ordonnance numérique, the doctor's software registers the prescription and prints a QR code containing its identifier. The pharmacist scans it, retrieves the prescription in the pharmacy software, dispenses, then records what was handed over; with the patient's agreement, the doctor can see that dispensing (Assurance Maladie brochure). Dematerialised prescriptions became mandatory there for most ordonnances on 31 December 2024.
A QR check answers three questions that a pharmacist in Medina cannot answer from paper alone:
- Was this ordonnance really issued by Dr Ndiaye?
- Is it still valid, or has it expired or been cancelled?
- Has it already been dispensed, fully or in part?
There are two ways to build the check. The QR code can carry only an identifier, which the pharmacy looks up online, as in France. Or it can carry the signed prescription itself: the SMART Health Cards specification, for instance, packs FHIR data into a QR code signed by the issuer, which a verifier checks with the issuer's published public key. Because a signature can be checked with a key the pharmacy has already downloaded, authenticity can be confirmed even when the connection drops. Only the third question, "already dispensed?", needs the network.
Key idea A digital ordonnance is written once by the doctor, checked by the pharmacy in seconds and completed by a dispensing record. Nobody retypes it, and the patient keeps a readable copy.
What changes for patients, doctors and pharmacies
For Awa, the ordonnance can no longer be lost: it stays on her phone and in her record. If she later sees another doctor, that doctor can see what she was prescribed and what she actually received, if Awa allows it. Who can see what, and how that permission is recorded, is the subject of a separate article on consent.
For Dr Ndiaye, a pre-filled template saves time on routine treatments, and coded medicines make it possible for software to flag a duplicate or a known interaction. He no longer receives calls to decipher a dose.
For the pharmacy, the law already describes much of what a dispensing record does. Article 29 of law 2023-06 allows the pharmacist to substitute an equivalent medicine unless the prescriber has written "ne pas substituer" (do not substitute) next to it. A digital ordonnance can carry that instruction in a field, and MedicationDispense records whether a substitution was made. Article 87 requires each dispensing of prescription-only medicines to be entered in a register, the ordonnancier, kept for at least ten years, and explicitly allows "any other recording system" approved by the pharmaceutical regulator.
What Senegalese law already says
Two texts matter. Law 2008-08 on electronic transactions accepts an electronic signature "au même titre que la signature autographe" (on the same footing as a handwritten signature) when it is created with a secure device under the signer's sole control and relies on a digital certificate (Article 42).
Law 2023-06, however, does not set out specific rules for electronic prescriptions. It requires the prescriber's stamp and signature (Article 81), says that information technology in pharmacy must respect ethical and professional rules (Article 52), and requires computerised pharmacy tools to be registered and validated by the body in charge of pharmaceutical regulation (Article 54). That body is the ARP (Agence sénégalaise de réglementation pharmaceutique), created in 2022, which WHO assessed at maturity level 3 for medicines in 2024, the first French-speaking country in Africa to reach that level.
In practice, a responsible digital ordonnance in Senegal today should produce a legible, signed document that satisfies Article 81, keep a dispensing trail compatible with Article 87, and be ready for review by the regulator.
For the technical reader
- MedicationRequest:
status(active, completed, cancelled…),intentset to order,medication[x]as a coded concept carrying the ATC code plus a national product code,dosageInstruction,dispenseRequest.validityPeriodandnumberOfRepeatsAllowed(renewals, not counting the first dispense),requester(Practitioner),subject(Patient) andencounter. - MedicationDispense:
authorizingPrescriptionpointing to the MedicationRequest,status,quantity, andsubstitution.wasSubstitutedwith its reason. - ATC is not a product code. It identifies the active substance, as the P01BF01 entry shows. Brand, strength and pack size need a national product list alongside it.
- Verification: an identifier lookup over the FHIR API, a signed payload (compact JWS, as in SMART Health Cards), or both. Pharmacy access should be limited to what the patient allowed and logged, which the consent article covers in detail.
How Quralys approaches this
Quralys is pre-launch. In the doctor suite being built for the first version, the ordonnance is a pre-filled template the doctor adjusts and signs; the patient receives it on the phone as a PDF with a QR check, and every ordonnance is stored as a FHIR MedicationRequest from the first day.
The pharmacy side, recording dispensing as MedicationDispense and helping patients find a nearby pharmacy that has the medicine in stock, is planned for a later stage, after a pilot with three to five private doctors in Dakar. The platform page describes the full patient and doctor loop.
Sources
- Journal officiel du Sénégal n° 7642: law 2023-06 of 13 June 2023 on medicines, other health products and pharmacy
- WHO health legislation database: Senegal law 2023-06 (full text)
- WHO: Medication Without Harm
- Senego: Thiès-Tivaouane, a vigilant pharmacist brings down a prescription forgery network (June 2026)
- HL7 FHIR R4: MedicationRequest
- HL7 FHIR R4: MedicationDispense
- WHO Collaborating Centre for Drug Statistics Methodology: ATC code P01BF01
- Assurance Maladie (G_NIUS): the ordonnance numérique, brochure
- Ordre national des pharmaciens: when and how the ordonnance numérique applies
- SMART Health Cards: framework specification
- WIPO Lex: Senegal law 2008-08 on electronic transactions
- WHO Africa: Senegal's pharmaceutical regulation reaches maturity level 3
Written by the Quralys team
Quralys is building a FHIR-native health ecosystem in Senegal: one record that clinics, pharmacies, labs, insurers and the national system can read, with the patient’s consent.
See it in practice
Private doctors in Dakar can join the pilot: online booking, prepaid consultations, digital ordonnances and video, free during the pilot.