Developed a Medical Records App for a Jeddah Hospital Group to Reduce Chart Retrieval Time by 55%

Medical records app on a tablet and two phones: patient chart, ward list and emergency access

Project Overview

A hospital group in Jeddah stored patient files in three separate computer systems. To check one patient, a doctor had to walk to a desktop, log in to each system and search for the patient again every time. Some patients also had two files, because each hospital spelled their Arabic name a little differently.

The main aim was simple: one app where a doctor or nurse can find the patient fast and see everything on one screen. The app only reads information. The original hospital system stays the official record.

Our team built the app, the connections to the three systems, and a control panel that decides who can see which file. We started with one ward and kept the old desktop method running until that ward said it no longer needed it. Then we moved on to the other wards.

Business Challenges

  • Three logins per chart

    Lab and radiology each had separate credentials and separate search screens.

  • Arabic name mismatches

    The same patient appeared with different spellings, returning the wrong person.

  • Duplicate charts across hospitals

    Each hospital issued its own file number, so a patient seen at two sites had two unlinked charts.

  • Results far from the bedside

    Lab values were read at a desktop, then repeated from memory at the bed.

  • Weak access trail

    Nobody could say which staff member opened which chart, or why.

  • Poor signal in some wards

    Concrete walls in older buildings dropped the connection, and web pages timed out mid-search.

Our Solution

A single API gateway serves the clinician app and the admin console. Node.js services behind it handle authentication and audit logging.

  • REST endpoints for patient search, chart summary, medication list, allergy list, lab results and imaging reports
  • JSON schema validation at the gateway with a uniform error envelope and machine-readable error codes
  • Per-service timeouts and circuit breakers on every call to the hospital information system, lab system and radiology archive
  • Rate limiting per user and per device
  • Every endpoint is read-only, so the app cannot change a clinical record

An interface engine receives HL7 v2 messages from the hospital information system and lab system and converts them into HL7 FHIR R4 resources: Patient, Encounter, AllergyIntolerance, MedicationRequest, Observation, DiagnosticReport and DocumentReference. Radiology reports arrive through the archive's API with a link to the image viewer. A clean internal model keeps source field names and quirks out of the app services.

  • Deterministic match first on National ID or Iqama number
  • Arabic name normalization: removed diacritics, and a transliteration table for common English spellings
  • Matches above a high threshold link automatically, and matches in a middle band go to a records officer for review
  • Linked charts keep their original hospital file numbers, so nothing is overwritten

  • OpenSearch index with Arabic and English analyzers, n-gram matching for partial names and phonetic matching for spelling variants
  • Search by name, National ID, Iqama, file number, bed number or phone
  • Results returned in two stages: a short list in under a second, then the full chart in the background
  • Index updates triggered by interface layer events, with a nightly full rebuild as a safety net

  • A composite chart endpoint returns allergies, active medications, last 5 lab panels and latest imaging report in one response
  • Redis stores assembled summaries with a time to live of 60 seconds
  • Lab results and allergies are re-read from the source after any new message for that patient, so a cached screen never shows a value that was already corrected
  • Critical lab values carry a visible timestamp and the source system name

  • Role and attribute-based rules: role, hospital, ward, shift and treating relationship decide what a user can open
  • Emergency override with a mandatory reason, an instant alert to the privacy officer and a review task within 24 hours
  • Sensitive record categories hidden by default and shown only to named roles
  • Patient consent flags checked on every chart request

  • Ward census and assigned patient summaries cached on the device in an encrypted SQLCipher database
  • Cache wiped on logout, on 8 hours of inactivity or after a remote wipe command
  • Biometric unlock plus a short PIN, and certificate pinning on all API calls
  • Sync checks the version number of each chart on reconnect and refreshes any that changed

  • Correlation identifiers carried from the app through the gateway, services and interface layer
  • OpenTelemetry tracing and structured JSON logs with masked patient identifiers
  • Dashboards for search p50, p95 and p99 latency, chart load time per source system, interface message lag and failed searches
  • Append-only audit records for every chart view, search and override, kept for the retention period the hospital group's policy sets
Medical records app on a tablet with patient search and chart, and the emergency access screen on a phone
Clinical records dashboard on a laptop cycling through the results: patient search, chart retrieval, patient matching and the audit trail

Technology Stack

  • Clinician app

    React Native

    One codebase for iOS and Android with right-to-left layout for Arabic

  • Admin console

    React

    Access rule editor, audit search and override review queue

  • Backend

    Node.js, REST

    Many short read requests that fan out to three source systems

  • Interface engine

    Mirth Connect

    Receives HL7 v2 and routes messages to FHIR conversion

  • Data exchange

    HL7 FHIR R4

    Defined resource shapes for Patient, Observation and DiagnosticReport

  • Database

    PostgreSQL

    Master patient index, consent flags and audit records

  • Search

    OpenSearch

    Arabic analyzers, n-gram and phonetic name matching

  • Cache

    Redis

    Chart summaries with a short time to live

  • Local storage

    SQLCipher

    Encrypted offline cache on the device

  • Authentication

    OAuth 2.0, OpenID Connect, Keycloak

    Hospital directory login with short-lived tokens

  • Cloud

    AWS EC2, RDS, S3, CloudWatch

    Managed databases, backups and alarms

Saudi Specific Integrations

  • Nafath

    national digital identity login for clinicians with multi-factor confirmation

  • National ID and Iqama

    used as the first key in patient matching, with checksum validation on entry

  • Arabic and RTL

    Arabic first interface, bilingual drug and diagnosis names, Hijri and Gregorian dates

  • PDPL

    consent records, encryption at rest and in transit, purpose logging for every access and data residency review

  • NCA ECC

    controls from the National Cybersecurity Authority's Essential Cybersecurity Controls applied to access, logging and device management

  • MOH and CBAHI standards

    patient identification and record access requirements used as design checks

  • Saudi coding standards

    ICD 10 AM diagnosis codes and SBS service codes displayed as stored in the hospital information system

Development Process

  1. Discovery

    Shadowed ward rounds in three departments, timed 80 chart lookups, 1st tap to full chart.

  2. Data mapping

    For each of the three data sources, listed all the fields that they expose and matched each of these fields to a FHIR resource.

  3. Patient matching build

    Built the master patient index and Arabic normalization first, then tested it against 20,000 hospital information system historical records with known duplicates.

  4. Interface and API build

    Configured hospital information system, lab system and radiology archive, created chart assembly endpoint and search index.

  5. Clinician design and testing

    Tested with first prototypes of the Arabic version on tablets, reduced chart screen to 1 scroll.

  6. Security and failure testing

    Conducted penetration tests and subsequently disabled each source system, cut the ward connection and replayed duplicate and out of order messages to ensure that the app displayed the correct information or a clear warning.

  7. Ward by ward rollout

    Started in internal medicine, compared results with the desktop workflow for four weeks, then opened further wards in stages.

Measurable Results

  • Median chart retrieval time cut by 55%, from about 3 minutes 40 seconds to about 1 minute 39 seconds

  • Patient search p95 under 900 milliseconds, with the first result visible in under 2 seconds on ward Wi Fi

  • Duplicate charts down 71% after the master patient index review

  • Correct patient found on the first search in 94% of lookups, up from about 68%

  • Chart opened from the app for 83% of ward round lookups within three months of release

  • Every chart view traced to a user, a reason and a time, with no gaps found in audit review

  • No lost data or wrong chart displayed in the source system outage tests

Ready to Build Your Custom Medical Records App in Saudi Arabia?

Connect with our healthcare app development company to discuss your app idea!

Get a Free Quote
Contact Us

Ready To Fuel Your Vision With AI-Powered Innovation?

Our Presence

Level- 18, Dubai World Trade Centre Tower, Sheikh Rashid Tower, Sheikh Zayed Rd, Dubai, UAE

business@code-brew.com +971-55-645-7972

Plot no I - 36, Sector 83 Alpha, Mohali SAS Nagar 140308

business@code-brew.com +91-771-976-8427

Al Akaria 2, 6926 Olaya Street, RHOA2566, Riyadh, Saudi Arabia.

business@code-brew.com

Av. Miguel Hidalgo y Costilla 1995, Arcos Vallarta, 44600 Guadalajara, Mexico

business@code-brew.com +1(213)2614953

4231 Balboa Ave #512 San Diego, CA 92117 United States

business@code-brew.com +1(213)2614953

2nd floor, College House, 17 King Edwards Rd, London HA4 7AE, UK

business@code-brew.com +44 (20) 82644493

Partner With Experts Who Leverage AI & Tech To Transform Ideas Into Market-Leading Solutions.

Wait! Looking for Right Technology Partner For Your Business Growth?

It's Time To Convert Your Business Idea Into Success!

Get Free Consultation From Top Industry Experts:
gif
I would like to keep it to myself