PharmaConnectTelehealth & Prescription Platform
- Period
- Jan 2025 - Apr 2025
- Project type
- Collaborative Duo Project
- Role
- Full-Stack Developer (Pair)
- Team
- Two-person development team
A multi-surface telehealth system connecting appointments, consultations, prescriptions, notifications, clinical notes, and AI-assisted functions through NestJS, Next.js, Expo, and MySQL.
- API, web, mobile, and upload service
- 4RepositoriesAPI, web, mobile, and upload service
- Prototype status
- 0Verified deploymentsPrototype status
Overview
PharmaConnect models a broad healthcare workflow across appointments, provider schedules, consultations, prescriptions, meetings, follow-ups, notifications, clinical notes, and AI-assisted extraction. The source shows substantial prototype coverage, but consistent server-side authorization, production operations, and clinical deployment evidence are not established.
Role & context
- Role
- Full-Stack Developer
- Team
- Two-person development team
- Type
- Collaborative Duo Project
- Period
- Jan 2025 - Apr 2025
Built as a two-person full-stack project spanning a NestJS API, Next.js web client, Expo mobile client, and upload service. Responsibilities and outcomes are presented at team level because the repository history does not consistently separate each collaborator's contribution.
Problem
Paper prescriptions are lost, illegible, and have no audit trail: a misplaced slip means the dose history is gone, a misread drug name can't be disproven, and nothing ties a condition (e.g. Type 2 Diabetes) to the prescriptions, follow-ups, labs, and appointments issued for it. Small clinics can't justify a heavyweight EMR for this.
Approach & architecture
Next.js client (RTK Query) over a JWT-guarded NestJS API; prescriptions flow through GPT-4o-mini Vision, consultations through Zoom S2S OAuth, and reminders through @nestjs/schedule cron jobs.
Practices followed
Double-booking impossible by design
compound unique indexes on Appointment(doctor,
scheduledAt,appointmentNo) and DoctorSchedule(doctor, date, time-range) make race-condition double-bookings a database error, not application logicAuditable reminder dispatch
every notification fire writes a FiredNotification row (success/failure + error), and reminders past 24h auto-expire instead of lingering
AI merge, not overwrite
a new prescription is merged into the patient summary (preserving prior medication history) instead of replacing it
Zoom S2S token cache with a 5-minute pre-expiry refresh window, eliminating per-call OAuth round-trips
Tag-based cache correctness on the client
~12 RTK Query tags drive automatic refetches, so creating a prescription invalidates the dependent lists without manual refetch plumbing
Role-segmented routing with a hydrated guard
useRequireAuthwaits for InitAuthGate hydration before redirecting, so a refresh on a protected route doesn't flash login
Challenges & resolutions
GPT-4 Vision will happily invent medications if the source image is blurry, and a naive 'replace the patient summary' workflow risks deleting a real prior-medication history on every upload.
FixA two-call pipeline: (1) a Vision call extracts only what's visible in the image as structured fields; (2) a second text call merges that into the existing summary under a strict prompt contract that preserves historical medications and flags conflicts rather than overwriting — the model's role is additive, never destructive.
Zoom's Web SDK init can fail on slow networks or behind corporate proxies, and a non-joinable consultation kills trust in a healthcare app on the first call.
FixWrapped SDK init in try/catch and fell back to a static Google Meet link so the consultation still happens; the failure is surfaced to telemetry, and the backend Meeting table also stores join/start URLs so the doctor can share the link out-of-band.
Outcomes
A broad telehealth domain is represented across API, web, mobile, and file-service codebases
The web client and NestJS backend implement appointment, prescription, meeting, notification, clinical-note, and follow-up surfaces
The schema captures provider availability and fired-notification state explicitly
AI and meeting-provider integration points exist in source, without verified production operation
Tech stack
Concepts & skills14
- OpenAI GPT-4o-mini Vision for image-to-structured-data extraction
- Prompt design for additive AI merges (preserve history, never overwrite)
- Zoom Server-to-Server OAuth with cached access tokens
- Embedded video SDK with graceful fallback (Zoom → Google Meet)
- JWT + Google OAuth 2.0 via Passport strategies in NestJS
- Role-Based Access Control across four roles
- Compound unique indexes for race-condition-free booking
- TypeORM relations, cascading deletes, enum-typed status columns
- Cron-driven background jobs (@nestjs/schedule)
- Auditable notification dispatch (FiredNotification pattern)
- RTK Query tag-based cache invalidation (~12 entity tags)
- Hydration-aware route protection (no flash-of-login on refresh)
- Next.js 15 App Router with role-segmented route trees
- Swagger/OpenAPI auto-generation from NestJS decorators
Links
Expertise demonstrated here
- Full-stack developmentIfham Mohamed builds production web applications across React interfaces, typed APIs, authentication, databases, testing, and deployment.
- React engineeringReact engineering by Ifham Mohamed across design systems, typed state, role-based workflows, testing, performance, and web and mobile products.