Challenge
Building a Unified Healthcare Ecosystem Across Patients, Doctors, and Clinics
Access to quality medical services in Jordan and the wider MENA region is uneven — patients in provinces often have limited access to specialists, while urban clinics struggle to manage appointments, records, and communications efficiently.
Clinic owners needed an ERP-grade management tool tailored to healthcare workflows. Patients needed a consumer-grade mobile experience to find doctors, book visits, and follow treatment plans. And both sides needed to interact through real-time video and messaging without switching between apps.
The project required building three interconnected products simultaneously:
- a mobile app for patients
- a web application for clinic staff
- a platform-level administration console
All three had to share a single backend, a unified patient record system, and a compliant payment flow — while integrating with Jordan's national EHR system (Hakeem).
Business
solution
Creating a Connected Healthcare Platform for Telemedicine, Clinical Operations, and Patient Care
The platform had to serve fundamentally different user types with different goals. A patient books a same-day urgent video call or schedules an in-clinic visit weeks in advance. A doctor documents a diagnosis using ICD-9 codes and prescribes medication with dosage reminders. A clinic admin configures working hours, insurance company links, and staff roles. A super admin monitors all clinics across the platform.
The key business decisions were:
- Aggregation model - clinics are onboarded as tenants; patients search across all of them by specialty, location, availability, and rating.
- Hybrid visit types - office visits, video consultations, and home visits supported within a single booking flow, with home visit availability determined by clinic-defined service areas and the patient’s location.
- Subscription tier - patients can purchase a subscription (via App Store or Google Play) that unlocks a Family Doctor feature and priority access to the "Treat Me Now" urgent consultation service.
- Care Plan as a product - doctors can create structured, multi-appointment treatment programs linked to the patient's EHR, visible and actionable from the patient's mobile app.
- Medication reminders - prescription records automatically generate reminder schedules, with planned wearable integration to close the loop on patient adherence.
- Electronic Health Records integration - patient medical histories, treatment plans, prescriptions, and clinical records are synchronized through a centralized healthcare record system connected to Jordan's national EHR infrastructure (Hakeem).
- Payment processing - implemented through PayTabs, the regional payment gateway that met the client's compliance and banking requirements in Jordan.
Technical
solution
Developing a Scalable AWS-Based Healthcare Infrastructure with EHR Integration
Combining a React Native mobile app, two web applications, and an AWS-hosted backend into a single platform with role-based access control, real-time video, and national EHR integration.
The platform consists of four main parts:
- A mobile application for patients with clinic and doctor search, appointment booking for in-person, video, and home visits, real-time video consultation via AWS Chime SDK, care plan viewing, medication reminders, vital records, and subscription management through App Store and Google Play.
- A web application for clinic staff supporting six roles — General Admin, Clinic Admin, Secretary, Assistant Doctor, Nurse, and Doctor — each with granular permissions managed through a custom RBAC system. Doctors document clinical visits using ICD-9 diagnosis codes, structured prescription records, lab test and X-ray orders, and referrals. Secretaries manage schedules and billing. Clinic admins configure the institution's settings, insurance partners, and staff.
- A web application for the super admin, providing platform-level control over all registered clinics, license management, subscription plan configuration, medical reference data (specialties, medications, vaccines, vitals), and a full audit log of all entity changes across the system.
- A backend hosted on AWS, built with NestJS and TypeScript, deployed on ECS with an Application Load Balancer and Auto Scaling. Aurora PostgreSQL is used as the primary database following CQRS principles. Lambda functions handle async tasks — document generation, ICD processing, and scheduled reminder dispatching via EventBridge.
Personal data protection is addressed at every layer. AWS Cognito handles authentication with support for email, Google, Apple sign-in, and OTP phone verification. All user data is stored and transmitted in encrypted form. AWS Secrets Manager manages all credentials. The api_resources permission table implements a strict policy — anything not explicitly permitted is forbidden.
Real-time communication is powered by AWS Chime, used for both the urgent "Treat Me Now" video calls and scheduled video appointments. Meeting records store Chime session metadata and attendee lists.
Clinical data integrity is enforced through a commit mechanism — once an EHR record or appointment is marked isCommited, it becomes immutable and can only be appended. All changes are logged in a structured audit table with original entity references.
Integration with Hakeem, Jordan's national EHR system, syncs clinical records via a TPO (Third Party Order) mechanism. Sync status is tracked per record and retryable from the admin interface.
Solution
architecture

Technologies
-
React Native -
React -
TypeScript -
NestJS -
Node.js -
AWS Cognito -
Amazon Aurora -
Amazon S3 -
AWS Lambda -
Amazon EventBridge
-
Amazon Chime -
AWS IoT Core -
Amazon CloudFront -
Amazon Route 53 -
AWS Pinpoint -
Amazon CloudWatch





