Welcome

We blend strategy, design and engineering to build intelligent systems that help businesses in Saudi Arabia and the GCC grow and stand out.

Rifq

An AI clinic assistant, from WhatsApp booking to the signed note and the claim

  • A Shfrah product
  • Healthcare
  • AI
  • Mobile
  • At a glance

Sector

Healthcare

Platforms

Web · iOS · Android · WhatsApp

Modules

9

Integrations

8

Screens

5

Total duration

23 weeks

Rifq books patients on WhatsApp and the app and triages their symptoms before the visit, then listens to the doctor-patient conversation and drafts a structured SOAP note that the doctor reviews and signs; after the visit it explains the condition and treatment to the patient in plain language, from content the doctor approves. Prescriptions go out through Wasfaty, eligibility and pre-authorisation run through NPHIES, and the clinic manager sees utilisation, no-shows and rejected claims on one dashboard.

Rifq: screen 1
Clinic dashboard: bookings, attendance and no-shows, claim rejection reasons and each doctor’s day on one screen.
  • Challenge

  1. 01

    Booking runs on calls and WhatsApp messages answered by hand at the front desk, so requests sent after hours are lost.

  2. 02

    Doctors spend much of the visit typing instead of facing the patient, and finish their notes after hours.

  3. 03

    Claims are rejected in NPHIES for lapsed eligibility, a pre-authorisation not requested in time, or codes that do not match the diagnosis.

  4. 04

    No-shows run high, and managers cannot see which doctors and clinics lose hours or where revenue leaks.

Who it is built for

  • Patient

    Books on WhatsApp in a minute and knows when to come and which clinic to see

  • Doctor

    A note ready to review when the visit ends, with codes and prescription without re-keying

  • Front desk

    A clear queue and eligibility checked before the patient arrives

  • Claims officer

    A complete claim before it goes to NPHIES, and a clear reason if it is rejected

  • Clinic manager

    Utilisation, no-shows and rejected claims per doctor and branch

  • Modules

What the system does

Connected modules working on one set of data.

  • 01

    Smart booking

    Book, reschedule and cancel on WhatsApp and the app, with a waitlist that refills cancelled slots

  • 02

    Symptom triage

    Guided pre-visit questions pick the right specialty and flag emergencies at once

  • 03

    Ambient scribe

    Turns the doctor-patient conversation into a structured SOAP note the doctor reviews and signs

  • 04

    Coding & e-prescription

    ICD-10 suggestions, and Wasfaty prescriptions once the doctor signs

  • 05

    Eligibility & pre-auth

    Coverage checked before the visit; pre-authorisation and claims sent through NPHIES

  • 06

    Front desk & queue

    Check-in, queue numbers and a waiting-room screen per clinic

  • 07

    Results & follow-up

    Lab results reach the patient after doctor approval, with follow-up and dose reminders

  • 08

    AI patient education

    After each visit the patient gets a plain explanation of their condition, medicines and diet, as text or voice, from doctor-approved content, with short questions that confirm understanding

  • 09

    Manager dashboard

    Utilisation, no-shows, rejected claims and revenue per doctor and branch

Where the AI works

  • AI · 01

    A speech-to-text model tuned for Saudi dialects and mixed Arabic-English medical terms, separating the doctor’s voice from the patient’s.

  • AI · 02

    A private in-Kingdom language model drafts the SOAP note from the transcript and suggests ICD-10 codes, linking each suggestion to the sentence it came from; nothing is saved until the doctor signs.

  • AI · 03

    A WhatsApp triage assistant asks protocol-based questions, sends emergencies straight to the 997 ambulance line and never gives a diagnosis.

  • AI · 04

    Two operational models: one scores each appointment’s no-show risk and sends an extra reminder or offers the slot to the waitlist; the other scores a claim’s rejection risk before it goes to NPHIES.

  • AI · 05

    Patient-education assistant: an in-Kingdom language model grounded only in a content library approved by the clinic’s doctors. It turns the signed care plan into plain Arabic matched to the patient’s age and reading level, as text or voice, asks short teach-back questions to confirm understanding, sends dose reminders, and hands any red-flag symptom or question outside approved content to the doctor at once.

  • Screens

The system as the client's team and customers use it.

Rifq: screen 2
Visit screen: the live transcript beside the drafted SOAP note and ICD-10 codes with the source of each; nothing is saved before the doctor signs.
Rifq: screen 3
The patient on WhatsApp: short triage questions, then the nearest slot in the right specialty with insurance checked.
Rifq: screen 4
A plain-language visit summary after the doctor signs: diagnosis, prescription, next steps and when to go to the ER.
Rifq: screen 5
Post-visit patient education: a plain explanation of the condition and treatment from content the doctor approved, short questions that confirm understanding, and any out-of-scope question routed to the doctor.
  • Architecture

Independent services, in-Kingdom data, and integrations over documented APIs.

Channels

  • WhatsApp bot: Booking, triage & reminders
  • Patient app: iOS & Android
  • Clinic web app: Doctor, desk & manager
  • Room capture: Exam-room microphone

Edge

  • API gateway: Routing & WAF
  • Identity: Nafath & staff roles
  • Realtime gateway: Encrypted audio stream

Services

  • Scheduling: Slots & queue
  • Encounter service: Visit, note & sign-off
  • Orders & Rx: Prescriptions & labs
  • Revenue cycle: Eligibility, pre-auth & claims
  • Notifications: Reminders & results

AI

  • Arabic ASR: Speech-to-text & diarisation
  • Clinical LLM: SOAP note & ICD-10
  • Triage agent: Protocol-based triage
  • Risk models: No-show & denial risk
  • Education agent: Grounded patient education

Data

  • PostgreSQL: Scheduling & billing
  • FHIR store: Clinical record
  • Object storage: Short-lived audio, in-Kingdom
  • Content library: Doctor-approved content

Integrations

  • NPHIES: HL7 FHIR
  • Wasfaty: E-prescriptions
  • Nafath: Patient identity
  • Lab LIS: Lab results
  • WhatsApp API: Outbound messages

Connections

  • WhatsApp bot to API gateway
  • Patient app to API gateway
  • Clinic web app to API gateway
  • Room capture to Realtime gateway: WebSocket
  • API gateway to Identity
  • API gateway to Scheduling: REST
  • API gateway to Encounter service
  • API gateway to Revenue cycle
  • Realtime gateway to Arabic ASR: audio
  • Arabic ASR to Clinical LLM: transcript
  • Scheduling to Triage agent
  • Scheduling to Risk models
  • Revenue cycle to Risk models
  • Encounter service to Clinical LLM
  • Encounter service to Orders & Rx
  • Encounter service to FHIR store
  • Revenue cycle to PostgreSQL
  • Arabic ASR to Object storage
  • Orders & Rx to Wasfaty
  • Orders & Rx to Lab LIS: HL7
  • Revenue cycle to NPHIES: FHIR
  • Identity to Nafath
  • Scheduling to Notifications
  • Notifications to WhatsApp API
  • Encounter service to Education agent: care plan
  • Education agent to Content library: RAG
  • Education agent to WhatsApp API

Stack

  • Next.js
  • NestJS
  • Flutter
  • PostgreSQL
  • HAPI FHIR
  • Redis
  • Python · FastAPI
  • vLLM
  • Kubernetes
  • Workflow

The visit journey

  1. 01

    Book & triage

    PatientWhatsApp · Triage agent

  2. 02

    Eligibility check

    AutomaticNPHIES

  3. 03

    Reminder & confirmation

    AutomaticNo-show model · WhatsApp

  4. 04

    Check-in & vitals

    Front desk & nurseQueue · Clinic app

  5. 05

    Consultation with the scribe

    Doctor & patientArabic ASR · Clinical LLM

  6. 06

    Review & sign

    DoctorEncounter service

  7. 07

    Prescription & labs

    Automatic after sign-offWasfaty · Lab LIS

  8. 08

    Explain the condition and treatment

    Automatic, from approved contentEducation agent · Patient app

  9. 09

    Pre-auth if needed, then the claim

    Claims officerNPHIES

  10. 10

    Results & follow-up

    Doctor, then automaticPatient app · WhatsApp

  • Data & API

The core entities and relations, and a live example from the API.

Patient

  • iduuidPK
  • national_idtext
  • mrntextunique
  • nametext
  • birth_datedate
  • phonetext
  • scribe_consentboolean

Coverage

  • iduuidPK
  • patient_iduuidFK
  • payer_idtext
  • member_notext
  • classtext
  • eligible_untildate
  • checked_attimestamptz

Appointment

  • iduuidPK
  • patient_iduuidFK
  • doctor_iduuidFK
  • slot_attimestamptz
  • channelenum(whatsapp,app,desk)
  • statusenum
  • triagejsonb
  • no_show_riskreal

Encounter

  • iduuidPK
  • appointment_iduuidFK
  • transcript_keytext
  • soapjsonb
  • statusenum(draft,signed)
  • signed_byuuidFK
  • signed_attimestamptz

Diagnosis

  • iduuidPK
  • encounter_iduuidFK
  • icd10text
  • sourceenum(ai,doctor)
  • confidencereal
  • evidencetext
  • acceptedboolean

Prescription

  • iduuidPK
  • encounter_iduuidFK
  • wasfaty_reftext
  • itemsjsonb
  • statusenum
  • issued_attimestamptz

LabResult

  • iduuidPK
  • encounter_iduuidFK
  • test_codetext
  • valuetext
  • flagenum
  • approved_byuuid
  • released_attimestamptz

Claim

  • iduuidPK
  • encounter_iduuidFK
  • coverage_iduuidFK
  • nphies_reftext
  • preauth_reftext
  • amountnumeric
  • statusenum
  • denial_reasontext

EducationPlan

  • iduuidPK
  • encounter_iduuidFK
  • topicstext[]
  • reading_levelenum
  • channelenum
  • teachback_scoreint
  • approved_byuuidFK
  • Encounter 1—1 EducationPlan
  • Patient 1—∞ Coverage
  • Patient 1—∞ Appointment
  • Appointment 1—1 Encounter
  • Encounter 1—∞ Diagnosis
  • Encounter 1—∞ Prescription
  • Encounter 1—∞ LabResult
  • Encounter 1—1 Claim
  • Coverage 1—∞ Claim
POST /v1/encounters/{id}/sign Sign the note, then release the prescription and claim

Request

{
  "doctor_id": "doc_7Q2M",
  "soap": {
    "subjective": "Cough and fever for 3 days, yellow sputum, no shortness of breath",
    "objective": "T 38.1 · HR 92 · SpO2 98% · mild wheeze",
    "assessment": "Acute bronchitis; type 2 diabetes",
    "plan": "Paracetamol as needed, HbA1c, follow-up in 7 days"
  },
  "diagnoses": [
    { "icd10": "J20.9", "primary": true, "source": "ai_accepted" },
    { "icd10": "E11.9", "primary": false, "source": "ai_accepted" }
  ],
  "rejected_suggestions": ["R50.9"],
  "orders": [
    { "type": "medication", "code": "paracetamol-500-tab", "sig": "1 tab PRN, max 4/day", "days": 5 },
    { "type": "lab", "code": "HbA1c" }
  ],
  "signature": { "method": "pin", "at": "2026-11-08T11:02:15+03:00" }
}

Response

{
  "encounter": "ENC-26-114902",
  "status": "signed",
  "prescription": { "wasfaty_ref": "RX-81726", "status": "sent" },
  "lab_orders": [{ "test": "HbA1c", "status": "ordered" }],
  "claim": {
    "id": "CLM-26-30418",
    "status": "ready_to_submit",
    "preauth_required": false,
    "denial_risk": 0.06
  },
  "patient_summary_url": "/s/114902"
}

Webhook event · claim.adjudicated

{
  "event": "claim.adjudicated",
  "claim": "CLM-26-30418",
  "nphies_ref": "NPH-CR-5582091",
  "outcome": "approved",
  "approved_amount": 385.00,
  "patient_share": 77.00,
  "currency": "SAR",
  "at": "2026-11-09T14:20:03+03:00"
}
  • Integrations

  • NPHIES

    Eligibility, pre-authorisation and claims (HL7 FHIR)

  • Wasfaty

    E-prescriptions dispensed at pharmacies

  • Nafath

    Patient sign-in and identity verification

  • WhatsApp Business

    Booking, triage, reminders and results

  • Lab LIS

    Lab orders out, results back (HL7)

  • Clinic EMR / HIS

    Syncs the record with the clinic’s existing system over FHIR

  • mada · Apple Pay

    Visit fees for self-pay patients

  • ZATCA (Fatoora)

    E-invoices for self-pay services

  • Security & compliance

  • Health data and backups hosted inside the Kingdom.
  • National Cybersecurity Authority Essential Cybersecurity Controls (ECC) and Cloud Cybersecurity Controls (CCC).
  • Personal Data Protection Law (PDPL) alignment, with health data handled as sensitive data.
  • The scribe starts only with the patient’s recorded consent, and audio is deleted after sign-off under a set retention policy.
  • AI only suggests: no note is saved and no prescription or claim is sent before the doctor signs.
  • Role-based access keeps clinical notes away from the front desk, with an audit trail of every record view.
  • Encryption in transit and at rest with managed keys; patient data is used for model tuning only de-identified and with the clinic’s approval.
  • Delivery plan

Clear phases with measurable deliverables.

  1. 01

    Discovery & journey mapping

    • Sessions with doctors, front desk and claims
    • Analysis of current claim rejection reasons
    2 weeks
  2. 02

    UX & architecture

    • Doctor screen prototypes tested in the exam room
    • FHIR data model and APIs
    3 weeks
  3. 03

    Booking & front desk

    • Education assistant and the doctor-approved content library
    • WhatsApp bot, triage and patient app
    • Queue and manager dashboard
    5 weeks
  4. 04

    Ambient scribe

    • Speech recognition tuned for dialects and medical terms
    • SOAP templates per specialty, piloted with selected doctors
    6 weeks
  5. 05

    Integrations

    • NPHIES, Wasfaty, Nafath and the lab system
    4 weeks
  6. 06

    UAT & go-live

    • Clinic-by-clinic rollout with hypercare
    3 weeks
Total duration
23 weeks
Team
Project manager, business analyst with healthcare revenue-cycle experience, 3 backend and frontend engineers, a mobile engineer, 2 ML engineers for speech and language, QA, DevOps and a clinical advisor for medical review.

Performance

  • < 60s Note ready for review after the visit
  • 70%+ Appointments booked without front-desk help
  • 95%+ Claims accepted on first submission
  • -30% Reduction in no-shows

Have a similar project?

Start a project
Contact us