# Offline-First Mobile OCR and FHIR Interoperability for Bedside Vital Sign Digitisation in Geriatric Care under Power and Network Constraints: A Ghanaian District Hospital Study
**Author:** Titus Afeo Azure Aduku, BSN, RN
**Affiliation:** Department of Nursing, Tatale District Hospital, Ghana Health Service, P. O. Box YD 9, Tatale, Northern Region, Ghana
**Corresponding Email:** titusafeoazureaduku@gmail.com
---
## Abstract
### Background
Manual transcription of bedside vital signs in resource-limited district hospitals across Sub-Saharan Africa is slow, error-prone, and burdensome for health personnel. Although digital health platforms offer potential solutions, existing cloud-based artificial intelligence (AI) and optical character recognition (OCR) systems consistently fail in remote border facilities due to frequent power blackouts, cross-border network dropouts, high API costs, and strict data privacy regulations (e.g., Ghana's Data Protection Act, 2012 [Act 843] and Cybersecurity Act, 2020 [Act 1038]). Furthermore, human expert usability testing of mobile health (mHealth) applications remains unscalable due to severe clinical workforce shortages.
### Objective
To design, benchmark, and validate an offline-first mobile clinical OCR pipeline that digitizes paper-based vital sign charts on low-cost commodity hardware into standardized Health Level Seven Fast Healthcare Interoperability Resources (HL7 FHIR R4) `Observation` payloads mapped to Logical Observation Identifiers Names and Codes (LOINC), and to evaluate its interface usability using a local, automated Large Language Model (LLM)-as-a-Judge framework.
### Methods
We benchmarked an edge-computing OCR pipeline (combining local OpenCV image filtering and Google ML Kit text recognition) on physical bedside tablet hardware (Samsung SM-X210: Qualcomm Snapdragon 695 5G, 4 GB RAM) and a throttled single-core ARM Cortex-A53 virtual device emulator representing entry-level smartphones ($\le \$130\text{ USD}$). Diagnostic accuracy was evaluated across a validated dataset of $N = 250$ distorted clinical vital sign charts derived from the open-access VitalDB repository. Extracted parameters (blood pressure, heart rate, respiratory rate, temperature) were converted into HL7 FHIR R4 JSON payloads, bound to standard LOINC codes, and validated using the HAPI FHIR Engine. User interface usability was evaluated locally using an offline quantized model (Llama-3-8B-Instruct) scored against Jakob Nielsen’s 10 Usability Heuristics and validated against gold-standard expert human benchmarks. Resilience to power outages was tested across 50 off-grid "Ward-to-OPD" deferred batch-synchronization scenarios using 256-bit AES-encrypted local SQLite queues.
### Results
The on-device OCR pipeline achieved a mean processing latency of $120.30\text{ ms}$ ($\text{SD} = \pm 24.16\text{ ms}$) on physical tablet hardware and $243.80\text{ ms}$ ($\text{SD} = \pm 54.39\text{ ms}$) under single-core emulation. Automated OCR charting significantly outperformed manual keyboard entry speed ($t_{249} = 103.50, p < 0.001$; Wilcoxon $W = 31380, p < 0.001$). The pipeline yielded an overall Character Error Rate (CER) of $0.8\%$ ($0.008$), with minimal Mean Absolute Errors:
* **Systolic BP MAE:** $0.428\text{ mmHg}$
* **Diastolic BP MAE:** $0.288\text{ mmHg}$
* **Heart Rate MAE:** $0.192\text{ bpm}$
* **Respiratory Rate MAE:** $0.116\text{ breaths/min}$
* **Temperature MAE:** $0.015^\circ\text{C}$
All generated JSON payloads ($250/250, 100.0\%, p = 1.000$) achieved full HL7 FHIR R4 schema compliance and correct LOINC terminology bindings. The local Llama-3-8B judge model demonstrated strong agreement with human expert ratings ($r = 0.840, p < 0.001$), achieving $87.20\%$ classification accuracy ($\text{F1} = 0.729$, Cohen’s $\kappa = 0.645$, Krippendorff’s $\alpha = 0.646$, $\chi^2_1 = 104.60, p < 0.001$). Over off-grid blackout periods averaging $12.15\text{ hours}$ (accumulating up to 115 queued records per device), the physical deferred sync protocol achieved a $100.0\%$ record preservation rate ($0\%$ data loss) with a mean batch upload latency of $3.738\text{ seconds}$.
### Conclusions
On-device OCR combined with local rule-based FHIR parsing enables rapid, highly accurate, and fully offline bedside vital sign digitization on commodity mobile hardware, eliminating transcription errors while maintaining interoperability with central electronic medical record systems. Executing all computations on-device bypasses electrical grid and network failures, eliminates recurring mobile data fees, and guarantees statutory data sovereignty under national cybersecurity and privacy laws. Furthermore, localized LLM-as-a-Judge evaluation provides a zero-cost, privacy-preserving, and human-aligned software quality auditing mechanism for continuous mHealth optimization in resource-constrained healthcare environments.
---
**Keywords:** Optical Character Recognition; Edge AI; HL7 FHIR R4; LOINC; Vital Signs; Offline-First mHealth; LLM-as-a-Judge; Usability Heuristics; Data Sovereignty; Sub-Saharan Africa.