OpenSeva · सेवा · Student Navigator

The Complete Patient Journey

Follow one visit end-to-end — from a patient booking an appointment to the patient paying their copay after the insurer adjudicates the claim. You'll play every persona, touch every service and port, and watch the real FHIR resources appear in the database at each step.
Patient · patient@emr.local / patient123 Doctor · doctor@emr.local / doctor123 Reception · reception@emr.local / reception123 Admin/Biller · admin@emr.local / admin123

1 · The stack at a glance — every port you'll use

Green dot = the service answered just now. Click a tile to jump straight into that layer. OpenSeva is many small services on purpose — a student should see each one, not a single black box.

Not all green? Start the whole stack from the repo root with ./run.sh start, seed demo data with ./run.sh seed, then reload this page. The dots re-check every 5 seconds.

2 · How to use this page

Two ways to travelWhat it gives you
By hand (this page)Play each persona in the real UI. Every act tells you exactly who to log in as, what to click, the FHIR resource it creates, and where money is saved.
Automated (script)Run ./journey-test.sh from the repo root. It performs the same 7 acts headlessly and asserts every dollar of the EOB is correct across the paid, downcoded and rejected branches. This is what guarantees the walkthrough is accurate — not just a story.

3 · The journey — 7 acts, every persona

1
🧑 Patient

Book an appointment

Do
Log in as patient@emr.local → open Book Appointment → pick a service, provider and slot → confirm.
Block
A FHIR Appointment is created and linked to the patient.
Cost
Self-scheduling removes a phone call from a scheduler's day. Multiply by thousands of visits and the administrative saving is real — no staff time to book routine appointments.
2
🗂️ Receptionist

Register & verify insurance

Do
Log in as reception@emr.local → open the patient → Insurance tab. You see two layers: the Coverage on file (plan, member id) and a Check eligibility (real-time) button that verifies the plan with the payer and returns an Active/Inactive badge + the copay due today.
Block
Two FHIR resources, two questions. Coverage = the record on file ("what plan does the patient have?"). The button sends a CoverageEligibilityRequest to the payer, which writes a CoverageEligibilityResponse ("is it active right now, and what are the benefits?") — the 270/271 transaction. Both live in the same FHIR DB.
Cost
Eligibility up front is the cheapest possible check. Roughly a quarter of denied claims trace back to coverage problems caught too late — verifying now prevents an expensive rework loop in Act 6.
✗ Branch — Good data matters: open the seeded patient Dana Lapsed (patient-baddata) and click Check eligibility. Her coverage is cancelled, so the check returns Inactive — a registration data error caught at the desk instead of becoming a denied claim later.
⚑ Role note: reception owns the front of the revenue cycle (registration, eligibility, copay collection) — this Insurance tab. They do not see the Revenue Cycle back office (coding, claims, adjudication); that's for billing/admin and providers. See the role table in §5.
3
🩺 Doctor

See the patient — document, order, prescribe

Do
Log in as doctor@emr.local → open the patient → Start Encounter → document the visit, then use Prescriptions to prescribe a medication. (A lab order is modelled as a lab Observation in Act 4 — this build has no dedicated lab-ordering screen.)
Block
Creates an Encounter, an Observation (the note / vitals), and a MedicationRequest (Rx).
Cost
Documentation quality decides money. A thorough note is what justifies the billed visit level. A thin note here is exactly what gets downcoded by the payer in Act 6 — the doctor's writing is a billing control.
4
🧪 Lab & 💊 Pharmacy

Results come back, medication dispensed

Do
The lab result posts against the order; the patient collects the prescription. (Simplified in this build — modelled as a lab Observation + the MedicationRequest; there is no full lab/pharmacy workflow.)
Block
A laboratory Observation (the result) and the MedicationRequest from Act 3.
Cost
Generic vs brand and formulary choice is a direct, visible saving on drug spend — the same molecule at a fraction of the price. Avoiding duplicate labs (checking prior results first) saves again.
5
🧾 Biller / Clearinghouse

Code the visit & submit the claim

Do
Log in as admin@emr.localRevenue CycleCoding Review (accept/adjust the CPT/ICD codes — this is where upcoding risk lives) → Billing ReviewSubmit Claim to Payer (pick the plan).
Block
A real FHIR Claim (id claim-<encounterId>) is built from the accepted codes + the patient's Coverage, then POSTed to the Payer App.
Cost
A clean claim adjudicates first time. Every rejected claim (Act 6 branch) is a manual rework loop that costs the provider real staff dollars. Correct coding is cheaper than correcting coding.
⚑ Branch — Upcode on purpose: in Coding Review, keep a high-complexity code (99215) but leave a thin note. Watch the payer downcode it in Act 6.
✗ Branch — Reject on purpose: submit with a missing diagnosis. The payer rejects it at intake before any payment is computed.
6
🏦 Payer (Insurance Co.)

Adjudicate → the EOB

Do
Open the Payer App dashboard — a separate company on its own port, no EMR login. Watch the pipeline run: receivedvalidateeligibility payment integrityadjudicate
Block
The payer writes a FHIR ClaimResponsethis is the Explanation of Benefits (EOB). It carries the outcome plus the money: billed → allowed → plan pays → deductible + copay = patient responsibility.
Cost
This is where the payer contains cost: downcoding (lower the paid level when documentation is thin), the fraud/abuse screen (upcoding patterns, excessive units), and plan rules (coverage %, deductible, copay, exclusions). Every one of those levers is visible in the EOB.
OutcomeWhy (in this simulation)Example money (BlueShield 85% / $25 copay)
PaidClean claim, documentation supports the code allowed $180 → plan $128 + patient $52
DowncodedHigh-complexity code, thin note → level reduced billed $300 → allowed $180 → plan $128 + patient $52
DeniedService excluded by the plan, or fraud score over the block threshold plan $0
RejectedMissing required data (e.g. no diagnosis) — fails intake never priced
7
🧑 Patient (again)

Pay the copay — balance $0

Do
Back in the EMR as adminRevenue CycleClaim Status → open the claim. The EOB shows the patient responsibility. Click Record copay payment → the claim settles to balance $0.
Block
A FHIR PaymentReconciliation (id copay-payment-<encounterId>) records the copay and links back to the ClaimResponse it settles.
Cost
Price transparency. The patient pays the exact amount from the EOB — no surprise bill weeks later. Knowing the responsibility at the point of care is itself a cost-of-care improvement.

4 · Prove it — run the automation script

Everything above is backed by a script that runs the same journey headlessly and checks every number. From the repo root:

./journey-test.sh

It runs three patients — a paid, a downcoded and a rejected claim — creates every FHIR resource, submits to the live Payer App, reads the EOB back from the FHIR DB, asserts the math (e.g. allowed $180 − $0 deductible ×0.85 − $25 copay = plan $128 / patient $52), records the copay, and prints PASS / FAIL. If it's green, the walkthrough you just did is accurate to the penny.

5 · Who sees what & where healthcare cost can be saved

Role access mirrors a real EMR — the revenue cycle splits into a front end (reception) and a back office (billing/admin + providers).

RoleSeesDoes not see
PatientOwn chart, book appointment, own insuranceCoding, claims, other patients
ReceptionistPatients, scheduling, Insurance/eligibility tab (front-end revenue cycle)Revenue Cycle back office (coding, claims, adjudication)
Doctor / ProviderClinical chart, encounters, Coding Review + claim status for their visitsFinal claim submission, simulation config
Admin (Billing)Everything — full Revenue Cycle: code, bill, submit, configure
StageBuilding block (FHIR / service)Where cost is saved
BookingAppointmentSelf-service scheduling → less admin labor; fewer no-shows with reminders
InsuranceCoverage, Organization, CoverageEligibilityResponseReal-time eligibility up front → far fewer denied claims; catches bad data early
VisitEncounter, ObservationGood documentation → protects the billed level; avoids appeals
Lab / RxObservation (lab), MedicationRequestGenerics + no duplicate tests → direct spend reduction
BillingClaim · Biller/ClearinghouseClean-claim-first-time → no rework loops
AdjudicationClaimResponse (EOB) · Payer + Integrity APIDowncoding + fraud screen + plan rules → payer cost control
PaymentPaymentReconciliationPrice transparency → no surprise bills, faster collection
The one big idea: healthcare cost isn't saved in a single place — it's saved (or wasted) a little at every handoff between personas. This journey lets a student stand in each role and feel exactly where.