How vtg2208/medicare-secure works
Medicare is a permission-aware healthcare and patient-management platform. Patients and care teams use role-specific workspaces to manage visits, records, diagnostic and medication workflows, and patient-controlled sharing; the API enforces access at the data boundary and persists application state in PostgreSQL. The graph also preserves the documented identity, oversight, privacy-rights, retention, research, and optional AI capabilities. Relationships between unsampled subsystems are shown only where the README documents them; the source excerpts provide additional evidence for clinical-access checks, workflow orchestration, and database-backed audit.
Main entry points: app.js Express API · emr.controller.js Medical records · visit.controller.js Visits and appointments · workflow.controller.js Care coordination
Components 24
Web experience
- Role workspaces
frontend/src/routes/AppRoutes.jsx - API client
frontend/src/api/client.js
Clinical care
- Medical records
backend/src/modules/emr/emr.controller.js - Visits and appointments
backend/src/modules/visit/visit.controller.js - Visit lifecycle
backend/src/services/visit.lifecycle.service.js - Care coordination
backend/src/modules/workflow/workflow.controller.js - Lab and imaging
backend/src/modules/lab/lab.controller.js - Medication workflows
backend/src/modules/pharmacist/pharmacist.controller.js - Care correspondence
backend/src/modules/messages/messages.routes.js - Insurance workflows
backend/src/modules/insurance/insurance.controller.js
Identity and safeguards
- Identity and sessions
backend/src/modules/auth/auth.controller.js - Clinical access checks
backend/src/middleware/clinical-access.middleware.js - Consent grants
backend/src/modules/consent/consent.controller.js
Privacy and oversight
- Audit evidence
backend/src/services/audit.service.js - Incidents and breaches
backend/src/modules/compliance/compliance.routes.js - Patient rights requests
backend/src/modules/privacy/privacy-fulfillment.service.js - Retention governance
backend/src/modules/privacy/retention-policy.js - Research cohorts
backend/src/modules/research/research-cohort.js
Runtime and integrations
- Express API
backend/src/app.js - PostgreSQL
backend/src/config/db.js - Optional AI intake
ai-service/app.py - Triage engine
ai-service/triage_engine.py
Other components
- Patients and staff
- SMTP service
Connections 31
- Patients and staff → Role workspaces: use
README.md - Role workspaces → API client: request
- API client → Express API: call API
README.md - Express API → PostgreSQL: query
backend/src/config/db.js - Express API → Identity and sessions: route requests
- Express API → Visits and appointments: route requests
- Express API → Medical records: route requests
- Express API → Care coordination: route requests
- Express API → Consent grants: route requests
- Medical records → Clinical access checks: check access
backend/src/modules/emr/emr.controller.js - Clinical access checks → Consent grants: check grants
backend/src/middleware/clinical-access.middleware.js - Visits and appointments → Visit lifecycle: manage states
backend/src/modules/visit/visit.controller.js - Care coordination → Visit lifecycle: read history
backend/src/modules/workflow/workflow.controller.js - Patients and staff → Consent grants: manage sharing
README.md - Patients and staff → Medical records: review and document
README.md - Patients and staff → Visits and appointments: manage visits
README.md - Patients and staff → Care coordination: coordinate care
README.md - Patients and staff → Lab and imaging: process orders
README.md - Patients and staff → Medication workflows: process medication
README.md - Patients and staff → Care correspondence: exchange messages
README.md - Patients and staff → Insurance workflows: use scoped access
README.md - Patients and staff → Audit evidence: review evidence
README.md - Patients and staff → Incidents and breaches: review casework
README.md - Patients and staff → Patient rights requests: submit requests
README.md - Patients and staff → Retention governance: govern disposal
README.md - Patients and staff → Research cohorts: analyze cohorts
README.md - Medical records → Audit evidence: record access
backend/src/modules/emr/emr.controller.js - Patient rights requests → Audit evidence: log fulfillment
- Patients and staff → Optional AI intake: request intake
README.md - Optional AI intake → Triage engine: triage
- Identity and sessions → SMTP service: send verification