Clinic management system: appointments, encounters, billing and insurance claims
A web system for a medical centre in Riyadh. It replaces the appointment diary, the paper chart and the after-hours keying of claims into each payer portal with a single path: appointment, eligibility check, documented encounter, then an invoice and a claim tracked through to settlement.
Interactive prototype: 10 web screens covering front desk, clinician, billing, claims and reporting.
Open the prototype1Executive summary
The centre runs 6 clinics with 9 physicians and sees about 120 patients a day, 70% of them under a payer contract. Appointments are kept in a paper diary and an Excel file, the medical record is on paper, and claims are keyed by hand into each payer's portal after hours. The denial rate is high, and some denials come back for correction only after the resubmission window has closed.
This document specifies a web system, used inside the centre, covering: appointments; front-desk check-in and eligibility checking; the encounter and its clinical documentation; e-prescriptions and lab orders; billing and collection of the patient share; and claim submission and follow-up. The initial estimate is 760–1,045 development hours, that is 9–12 weeks for a team of three developers.
2Current state and objectives
| Problem today | Impact | Objective in release 1 |
|---|---|---|
| Appointments in a diary and an Excel file | Double bookings and long waits | One schedule per physician, with conflicts blocked |
| Eligibility confirmed by phone or on a separate payer portal | Patient is seen, then found not covered | Eligibility checked before the patient enters the room |
| Paper medical record | History missing, drug allergies not visible | Electronic record on the clinician's screen in a second |
| Claims keyed in by hand after hours | Slow payment and keying errors | Claim built from the encounter itself |
| Nobody works the denials | Money written off once the window lapses | Denials board showing every reason code and resubmission window |
The operating figures (6 clinics, 9 physicians, 120 patients a day, 70% insured) come from the discovery session and are to be confirmed before sign-off.
3Users and roles
| Role | What they do in the system | What they do not see |
|---|---|---|
| Front desk clerk | Books appointments, opens the patient record, runs the eligibility check, checks patients in | Not the clinical content of the encounter |
| Physician | Documents the encounter and the diagnosis, writes the prescription and the lab orders | Cannot change prices or invoices |
| Nurse | Records vital signs and prepares the patient | Does not record the diagnosis |
| Insurance and billing officer | Raises invoices, collects the patient share, submits claims and works denials | Not the detailed clinical notes |
| Centre manager | Maintains services, prices and physician schedules, and reads the reports | — |
Every time a medical record is opened, the user and the timestamp are written to the access log (BR-08).
4Release 1 scope (MoSCoW)
MustRequired to go live
- Patient record: national ID or iqama, medical history, allergy list
- Appointments: book, reschedule, cancel, block conflicts, SMS reminder
- Front desk: check-in and payer eligibility check
- Pre-authorization for the procedures that require it
- Encounter: chief complaint, vital signs, diagnosis coded to ICD-10-AM, plan
- E-prescription and lab and imaging orders
- Billing: cash or insurance, with the patient share calculated and collected
- Simplified tax invoice
- Claims: built from the encounter, submitted, status tracked, denials worked
- Role-based permissions, access log and audit trail
- Reports: utilisation, revenue, denial rate, claim ageing
ShouldWanted, not a condition of go-live
- Self-service booking from the centre's website
- Reminders over WhatsApp
- Lab analyser interface delivering results automatically
- Drug and consumable stock
- English interface for the clinical terminology
CouldIf time allows
- Patient app showing appointments and results
- Smart waitlist that fills cancelled slots
- Waiting-room display calling ticket numbers
Won'tNot in release 1
- Radiology image archiving (PACS)
- Operating theatres and inpatient admission
- Full pharmacy with dispensing and stock
- HR and payroll
5Functional requirements
Stories are written "As a… I want… so that…". Acceptance criteria are written Given / When / Then.
Appointments and front desk APT
As a front desk clerk, I want to book a patient into a free slot with a physician, so that nothing is double booked and nobody waits.
MustGiven the physician already has an appointment at that time, then the system shall block the booking and offer the next free slot.
When the appointment is booked, then a confirmation shall be sent to the patient, and a reminder 24 hours before the appointment.
As a front desk clerk, I want to check the patient's eligibility before they enter the room, so that we do not deliver a service that is not covered.
MustWhen I open the patient record and press "Check eligibility", then the system shall show coverage status, patient share, remaining annual limit and the time of the check.
Given eligibility comes back rejected or expired, then the system shall block the encounter from being raised as an insured encounter, and allow it to be converted to self-pay with the patient's agreement.
As an insurance officer, I want to request pre-authorization for the procedures that require it, so that the claim is not denied after the work is done.
MustEncounter and clinical documentation EMR
As a physician, I want the patient's history and allergy list in front of me the moment the encounter opens, so that I prescribe safely.
MustGiven an allergy is recorded, then a drug–allergy interaction alert shall block saving a prescription containing that substance unless it is confirmed with a written reason.
As a physician, I want to document chief complaint, examination, diagnosis and plan on one screen, so that I finish the documentation during the encounter.
MustWhen I sign off the encounter, then its content shall be locked, and any correction shall be added as an addendum carrying my name and the time (BR-04).
As a physician, I want to write a prescription and order lab tests from the approved catalogues, so that they reach the pharmacy and the lab without paper.
MustBilling and claims RCM
As a billing officer, I want the patient share calculated automatically from the encounter lines, so that I collect it before the patient leaves.
MustGiven coverage of 80% and a patient share of 20%, when the encounter lines are added, then the system shall show the payer portion and the patient portion, and issue a simplified tax invoice for the patient portion.
As an insurance officer, I want to build the claim straight from the encounter and submit it, so that I do not re-key the data into an external portal.
MustWhen I submit the claim, then the system shall first check that the diagnosis, the service lines and — where required — the pre-authorization reference are complete, and shall block an incomplete submission.
As an insurance officer, I want a board of denied claims with their reason codes and resubmission windows, so that no money is lost.
MustGiven a denied claim, then the system shall show the denial reason, its date and the time left, and shall allow correction and resubmission with both versions retained.
Administration and reporting ADM
As the centre manager, I want to maintain services and prices and the physicians' schedules and leave, so that booking and billing stay under control.
MustAs the centre manager, I want reports on utilisation, revenue, denial rate and claim ageing, so that I can see where income is leaking.
MustAs the centre manager, I want every look at a medical record logged, so that I can evidence compliance in an audit.
Must6Business rules
| Id | Rule |
|---|---|
| BR-01 | No insured service is delivered before an eligibility check on the same day. |
| BR-02 | A procedure that requires pre-authorization is not performed before the approval reference is issued. |
| BR-03 | The patient share is collected before the patient leaves; any exception needs manager rights and is logged. |
| BR-04 | A signed encounter is locked; a correction is added as an addendum carrying the physician's name and the time. |
| BR-05 | A patient more than 15 minutes late loses the slot, which is released, and moves to the waitlist. |
| BR-06 | Prices come from the approved price list; any discount needs manager rights and is logged with its reason. |
| BR-07 | Every denied claim is corrected and resubmitted inside the contractual window, and both versions are kept. |
| BR-08 | Access to the medical record is by role; every look is logged and the log cannot be deleted. |
7Data model and claim lifecycle
The encounter ties the patient to the physician and to the service lines; the invoice and the claim are generated from it. A claim can only be raised from a signed encounter.
| Entity | Key fields | Relationships |
|---|---|---|
| Patient | Name, national ID or iqama, mobile, allergy list | Has coverages, appointments and encounters |
| Coverage | Payer, policy number, class, patient share, expiry date, last eligibility check | Belongs to a patient |
| Appointment | Physician, clinic, time, status (booked, arrived, no-show, cancelled) | Becomes an encounter |
| Encounter | Chief complaint, vital signs, diagnosis, plan, sign-off status | Has service lines, a prescription, orders and an invoice |
| Service line | Service, quantity, approved price, payer portion, patient portion | Belongs to an encounter |
| Prescription and order | Drug or test, dose or instructions, status, result | Belong to an encounter |
| Invoice | Serial number, lines, amount collected from the patient, payment method | Belongs to an encounter |
| Claim | Payer, lines, approval reference, status, denial reason code, version | Belongs to an encounter, has several versions |
| Access log | User, patient, screen, time | Immutable |
Claim lifecycle
8Non-functional requirements and compliance
| Id | Area | Requirement |
|---|---|---|
| NFR-01 | Performance | Patient search and record open in under a second; an eligibility check returns in under 10 seconds. |
| NFR-02 | Availability | 99.7% during working hours, with a recovery plan: no more than 15 minutes of data loss, service restored within two hours. |
| NFR-03 | Health data | Health data is sensitive data: encrypted in transit and at rest, narrow permissions, and an access log entry for every record opened. |
| NFR-04 | Personal data protection | Explicit consent and a privacy notice, and a documented procedure for reporting any breach within 72 hours. |
| NFR-05 | Hosting | Data centre inside the Kingdom, with an encrypted daily backup whose restore is tested monthly. |
| NFR-06 | Language | Arabic right-to-left interface, with clinical terminology and codes kept in English. |
| NFR-07 | Usability | Screens are keyboard-first: the front desk completes a check-in without touching the mouse. |
PDPL (Personal Data Protection Law) has been in full force since 14 Sep 2024: consent as the default basis, a clear notice at the point of collection, breach notification to SDAIA within 72 hours, and controls on transferring data outside the Kingdom.
9Integrations
| Integration | Purpose | Priority | Notes |
|---|---|---|---|
| NPHIES | Eligibility checks, pre-authorizations and claim submission | Must | Data exchanged in FHIR R4. Connection either direct or through an accredited vendor. |
| Fatoora | Reporting simplified tax invoices | Must | Depends on the centre's ZATCA integration wave. |
| SMS provider | Appointment confirmations and reminders | Must | Under a sender name registered to the centre. |
| Card payment terminal | Collecting the patient share by mada | Must | Transaction reference tied to the invoice. |
| Lab analysers | Receiving results automatically | Should | Over HL7 or a results file. |
| WhatsApp Business | Appointment reminders | Should | Using approved templates. |
NPHIES, the National Platform for Health Information Exchange Services, standardises the exchange of health service and insurance data between providers and payers. It covers three flows — eligibility, pre-authorization and claims — in FHIR R4, with strict structural validation.
10Out of scope
- Radiology image archiving and PACS.
- Inpatient admission and operating theatres.
- The pharmacy as a point of sale with full stock; release 1 covers the prescription only.
- HR and physician payroll.
- General ledger accounting; revenue and collection are exported instead.
11Delivery plan and effort estimate
| Module | Phase | Hours (low – high) |
|---|---|---|
| Design and screens, built out from the prototype | 1 | 45 – 65 |
| Users, permissions and the access log | 1 | 40 – 55 |
| Patient records and coverages | 1 | 40 – 55 |
| Appointments and physician schedules | 1 | 60 – 80 |
| Eligibility checks and pre-authorizations | 2 | 90 – 130 |
| Encounter screen and clinical documentation | 2 | 90 – 120 |
| Prescriptions and lab orders | 2 | 50 – 70 |
| Billing, patient share and tax invoices | 2 | 70 – 95 |
| Claims: build, submit, denial and resubmission | 2–3 | 80 – 110 |
| Services, prices and centre administration | 3 | 45 – 60 |
| Reports | 3 | 35 – 50 |
| Testing and QA | 1–3 | 90 – 120 |
| Deployment, training and go-live | 3 | 25 – 35 |
| Total | 760 – 1,045 |
| Phase | Weeks | Outcome |
|---|---|---|
| 1 · Front desk | 1–4 | Patient records, appointments and check-in running inside the centre. |
| 2 · Clinic and insurance | 5–9 | Eligibility, encounters, prescriptions, billing and claims. |
| 3 · Operations | 10–12 | Denials and resubmission, reports, training and go-live. |
The estimate covers the Must requirements only, for a team of three developers with a part-time tester. It excludes the time to get the NPHIES connection accredited and the network work inside the centre.
12Risks and open questions
| Item | Type | Proposed action |
|---|---|---|
| NPHIES connection: direct or through an accredited vendor? | Decision | Compare cost and lead time before phase 2; a vendor is faster to go live. |
| VAT treatment of private medical services | Open question | To be settled by the centre's accountant before the invoice layout is fixed. |
| Statutory retention period for medical records | Open question | To be confirmed before the archiving and deletion policy is designed. |
| Who codes the diagnoses and procedures? | Open question | Inaccurate coding is among the most common causes of claim denial. |
| Physician resistance to documenting on screen during the encounter | Risk | One encounter screen with the fewest possible clicks, and a pilot in a single clinic first. |
| Loss of internet inside the centre | Risk | A local read-only mode for the day's appointments and records, syncing when the line returns. |