Journey 3 — Prescription Creation
The Full Digital Drug Request — From Consultation to QR Code
Personas
Dr. Mohamed Khalil — GP, HPR-12345-GP, private clinic FAC-CAI-00789, Heliopolis
Fatima Hassan — Patient, 56F, National ID: 27001012345678, UHIS insured
Her active medications: Ramipril 5mg (ACE inhibitor, for hypertension)
Her conditions: Type 2 Diabetes (ICD-10: E11), Hypertension (ICD-10: I10)
Her allergies: None documented
Today Without NDP
Dr. Mohamed would:
- Examine Fatima and decide she has a sinus infection + mild joint pain
- Write on stamped paper: "Augmentin 875 / Brufen 400 / Panadol"
- Give her the paper — no dosing instructions mandatory
- No check if she's taking Ramipril (NSAIDs + ACE inhibitors = dangerous)
- Fatima goes to any pharmacy; pharmacist may dispense without reading the stamp carefully
- If Fatima goes to 3 pharmacies, she could get 3 sets of the same drugs
The NDP catches every one of these gaps.
Complete Prescription Flow Overview
Phase 1: Patient Identity & Doctor Authorization
Step 1.1 — Patient Lookup
Dr. Mohamed opens the prescription creation form. He asks Fatima for her national ID card.
National ID entered: 27001012345678The system decodes the national ID:
- Birth date: 1970-01-01 (digits 2–7: 700101)
- Governorate: Cairo (digits 8–9: 01)
- Gender: Female (last digit: 8 = even = female)
Patient Registry response:
{
"id": "PAT-00045678",
"nationalId": "27001012345678",
"name": "فاطمة محمد حسن",
"nameEn": "Fatima Mohamed Hassan",
"dateOfBirth": "1970-01-01",
"gender": "FEMALE",
"age": 56,
"phone": "01112345678",
"bloodType": "A+",
"allergies": [],
"chronicConditions": ["E11", "I10"],
"activeMedications": [
{
"drugId": "EDA-MED-01001",
"name": "Ramipril 5mg",
"prescriptionId": "RX-20251201B9C8D7",
"prescribedBy": "HPR-99999-CAR",
"startDate": "2025-12-01"
}
],
"insuranceProvider": "UHIS",
"insuranceNumber": "UHIS-01-0045678",
"insuranceStatus": "ACTIVE",
"consentToShare": true
}What Dr. Mohamed sees in the UI
Patient: فاطمة محمد حسن (56 سنة — أنثى)
الرقم القومي: 2700 **** **678
التأمين: تأمين صحي شامل — نشط ✅
الأمراض المزمنة: سكري النوع الثاني | ارتفاع ضغط الدم
الأدوية الحالية: رامبريل ٥ مجم (يومي)
الحساسية: لا توجدStep 1.2 — Doctor Authorization Check
The system validates Dr. Mohamed:
Phase 2: Drug Selection
Dr. Mohamed diagnoses:
- Acute bacterial sinusitis → prescribes Augmentin 875mg
- Mild pain / fever → prescribes Panadol 1g (after CDSS intervention — see below)
He enters the prescription form:
| # | Drug | Strength | Form | Qty | Frequency | Duration | Refills |
|---|---|---|---|---|---|---|---|
| 1 | Augmentin (EDA-MED-00123) | 875/125mg | Tablet | 14 | Twice daily | 7 days | 0 |
| 2 | |||||||
| 2 | Panadol 1g (EDA-MED-00789) | 1g | Tablet | 30 | 3x daily | 10 days | 0 |
(Brufen replaced after CDSS warning — see Phase 3)
Phase 3: CDSS — Multi-Layer Clinical Safety Checks
This is the most important feature of the NDP. The CDSS validates in real-time as the doctor types.
Layer 1 — Drug-Drug Interactions (DDI)
Initial drug list: Augmentin + Brufen + Ramipril (existing medication)
What the doctor sees:
⚠️ تفاعل دوائي هام — Major Drug Interaction
Brufen 400mg (NSAID) + Ramipril 5mg (ACE Inhibitor)
- الخطر: تقليل تأثير رامبريل على ضغط الدم + خطر ارتفاع البوتاسيوم
- الشدة: كبير (Grade A)
- الإجراء المطلوب: تبرير طبي مكتوب أو تغيير الدواء
بديل مقترح: باراسيتامول ١ جرام (لا يؤثر على ضغط الدم)
[ تأكيد مع مبرر ] [ استبدال بالبديل ] [ إلغاء ]
Dr. Mohamed clicks "استبدال بالبديل" (Replace with alternative).
He selects Panadol 1g (EDA-MED-00789).
Layer 2 — Allergy Checking
CDSS checks patient allergies against the new drug list:
Patient allergies: None documented
Augmentin: contains Amoxicillin (penicillin)
→ No penicillin allergy on record ✅
⚠️ Note: 10% of population has undocumented penicillin allergy
→ System shows advisory: "Confirm no penicillin allergy with patient verbally"Advisory shown (not blocking — Dr. Mohamed verbally confirms with Fatima → no allergy).
Layer 3 — Dosing Validation
Augmentin 875mg × 2/day for 7 days:
→ Weight-based: 875mg/dose — appropriate for adult ✅
→ Renal function: Not flagged (no CrCl data) → Advisory: "Check renal function for extended course"
→ Augmentin 875mg: Standard adult sinusitis dose per Egypt MOH guidelines ✅
Panadol 1g × 3/day for 10 days:
→ Max daily dose: 3g/day ✅ (safe, below 4g limit)
→ Age 56: No restrictions ✅
→ Hepatic: No hepatic impairment documented ✅Layer 4 — Duplicate Therapy Check
Active prescriptions for Fatima:
→ Ramipril 5mg (antihypertensive) — by HPR-99999-CAR (cardiologist)
→ No other antibiotics active ✅
→ No other analgesics active ✅
→ No duplicate therapy detected ✅Layer 5 — Prescription Validity Rules
Augmentin 875mg:
→ Category: Antibiotic
→ Max validity: 30 days (no refills allowed per Egypt MOH antibiotic stewardship)
→ Duration requested: 7 days ✅
Panadol 1g:
→ Category: Analgesic/Antipyretic (OTC in Egypt, but prescribed here)
→ Validity: 30 days ✅Final CDSS Status: ✅ CLEARED
{
"status": "CLEARED",
"criticalAlerts": 0,
"majorAlerts": 0,
"minorAlerts": 0,
"advisories": 1,
"advisoryDetails": ["Confirm no penicillin allergy with patient verbally"],
"validatedAt": "2026-05-03T09:32:15Z"
}Phase 4: Insurance Verification
With the drug list cleared, the system checks Fatima's UHIS coverage:
What Dr. Mohamed sees:
تغطية التأمين الصحي الشامل:
──────────────────────────────────────────
أوجمنتين ٨٧٥ × ١٤ قرص 145.50 ج.م → تغطية ٩٠% → يدفع: 14.55 ج.م
باراسيتامول ١ جم × ٣٠ قرص 18.00 ج.م → تغطية ٥٠% → يدفع: 9.00 ج.م
──────────────────────────────────────────
إجمالي الدفع للمريض: 23.55 ج.مPhase 5: Finalization
Prescription Form (Completed by Dr. Mohamed)
المريض: فاطمة محمد حسن — ٢٧٠٠١٠١٢٣٤٥٦٧٨
الطبيب: د. محمد خليل — HPR-12345-GP
العيادة: عيادة د. محمد خليل — FAC-CAI-00789
التاريخ: 2026-05-03
صالحة حتى: 2026-06-02 (30 يوم)
التشخيص (ICD-10):
→ J01.9 — التهاب الجيوب الأنفية الحاد
→ M79.3 — آلام العضلات والمفاصل
الأدوية:
1. أوجمنتين ٨٧٥/١٢٥ مجم أقراص
الجرعة: قرص × مرتين يومياً بعد الأكل
المدة: ٧ أيام | الكمية: ١٤ قرصاً | إعادة صرف: لا
2. باراسيتامول ١ جم أقراص
الجرعة: قرص × ٣ مرات يومياً عند الحاجة
المدة: ١٠ أيام | الكمية: ٣٠ قرصاً | إعادة صرف: لا
ملاحظات: مراقبة ضغط الدم أثناء العلاج
التوقيع الرقمي: [X.509 Certificate — HPR-12345-GP — 2026-05-03T09:35:00Z]Submission & ID Generation
Phase 6: Patient Notification
The moment the prescription is finalized, Fatima is notified:
Phase 7: What Dr. Mohamed's Clinic Gets
The prescription UI shows:
✅ روشتة رقم: RX-20260503A1B2C3
──────────────────────────────────────────────
📱 QR Code: [████ █ ██ █████████] ← Fatima shows this at pharmacy
📄 PDF: [طباعة] ← Clinic prints for Fatima
📤 SMS: تم الإرسال لـ 011*****678
──────────────────────────────────────────────
الصلاحية: 2026-06-02
الحالة: نشطة — لم تُصرف بعدEdge Case 1: Controlled Substance Prescription
Scenario: Dr. Heba Mansour (Psychiatrist, HPR-67890-PSY) prescribes Alprazolam 0.5mg for Fatima's anxiety.
Additional required fields:
ECSN (Controlled Substance Number): ECSN-2026-00456 ✅ Active
Clinical Indication (mandatory): "Generalised Anxiety Disorder — ICD-10: F41.1"
Duration: 30 days (max for schedule IV)
Quantity: 30 tablets (max 1 per day)
Refills: 0 (must re-examine for refill)
Patient consent: Required ✅CDSS adds a controlled substance check:
→ Alprazolam × Ramipril: No interaction ✅
→ Alprazolam × Paracetamol: No interaction ✅
⚠️ Advisory: Benzodiazepine — monitor for sedation; avoid alcohol
→ EDA quota check: Dr. Heba has 47/50 controlled prescriptions available this month ✅Prescription marked: CONTROLLED — Schedule IV in the system. Pharmacy must confirm patient identity at dispensing.
Edge Case 2: Offline Mode (Rural Clinic)
Scenario: Dr. Ahmed Sayed at a rural clinic in Fayoum has intermittent internet.
The NDP client app caches:
- Patient Registry (local patients, last 24h)
- Medicine Directory (full local copy, refreshed nightly)
- CDSS rules (downloaded rules engine, works offline)
Offline prescription:
- Dr. Ahmed creates prescription locally → stored with status
PENDING_SYNC - App generates a local RX-TEMP-ID and QR code
- When internet restores → prescription synced → real RX-ID assigned → patient notified
- Pharmacy cannot scan QR until synced (pharmacist sees "Pending sync — check back in X minutes")
Edge Case 3: Insurance Not Yet Active in Patient's Governorate
Scenario: Fatima's cousin Sara lives in Assiut — UHIS not yet rolled out there (phased rollout 2018–2032).
Insurance check returns:
{
"eligible": false,
"reason": "UHIS_NOT_ACTIVE_IN_GOVERNORATE",
"governorate": "ASSIUT",
"expectedRollout": "2028",
"alternatives": ["CASH_PAYMENT", "PRIVATE_INSURANCE"]
}Prescription is still issued — insurance just marks as CASH_OR_PRIVATE. Patient pays full retail price.
Summary: What the NDP Prescription Achieves
| Paper Prescription (Before) | NDP Prescription (After) |
|---|---|
| "Augmentin + Brufen + Ramipril" — no check | CDSS blocked NSAID+ACE inhibitor combination → Paracetamol substituted |
| No patient identity | National ID verified — right patient, right drugs |
| Price unknown until pharmacy | Copayment shown at prescribing: 23.55 EGP |
| Valid indefinitely | Expires 2026-06-02 — enforced |
| 1 paper copy — can be lost | QR code + SMS + PDF — multiple channels |
| Can be used at 10 pharmacies | Central registry — dispensed once, tracked |
| No audit | Full audit trail — tamper-proof, 10-year retention |
| No notification to patient | Fatima gets SMS immediately in Arabic |
Prescription RX-20260503A1B2C3 is now active and ready for dispensing.
What Comes Next
Fatima takes her phone (showing the QR code) to El-Ezaby Pharmacy. The pharmacist scans it, and the Pharmacy Dispensing Journey begins.
Coming Soon
Journey 4: Patient Access — App / QR / National ID channels
Journey 5: Pharmacy Dispensing — How Pharmacist Amir fulfills the prescription
Journey 6: Insurance Adjudication — UHIS claim submission and settlement