How beto0077/ccps-emr-mern-prototype works
This is a patient-record and social-services case-management application: staff use a routed web client to manage patient profiles, loans, clinical and social-work assessments, attachments, internal references, and user accounts. The server exposes corresponding REST routes; controllers perform SQL operations through a MySQL connection pool. The excerpts establish client routing, selected form/context and context/API relationships, server route registration, and examples of controller persistence. Other domain branches are represented from the route and file indexes; client-to-server HTTP links are unverified.
Main entry points: index.js HTTP API · App.js Page router · controllers Domain controllers · Patient Patient profiles
Components 23
Web client
- Page router
client/src/App.js - User accounts
client/src/components/User
Patient records
- Patient profiles
client/src/components/Patient - Patient state
client/src/context/PatientContext.js - Patient API client
client/src/api/patient.api.js - Internal references
client/src/components/InternalReference - Attachments
client/src/components/Attachment
Assessments
- Physical therapy
client/src/components/PhysicalTherapyInfo - Psychology records
client/src/components/PsychologyInfo - Social work records
client/src/components/SocialWorkInfo
Support services
- Equipment loans
client/src/components/Loans
API and persistence
- HTTP API
server/index.js - Patient routes
server/routes/Patient/patient.routes.js - Loan routes
server/routes/LoanInfo - Therapy routes
server/routes/PhysicalTherapyInfo - Psychology routes
server/routes/PsychologyInfo - Social work routes
server/routes/SocialWorkInfo - Reference routes
server/routes/InternalReferencesInfo/internalReference.routes.js - Attachment routes
server/routes/Attachment/attachment.routes.js - User routes
server/routes/User/user.routes.js - Domain controllers
server/controllers - MySQL pool
server/utils/database.js
Other components
- Staff user
Connections 36
- Staff user → Page router: uses
client/src/App.js - Page router → Patient profiles: routes to
client/src/App.js - Page router → Equipment loans: routes to
client/src/App.js - Page router → Physical therapy: routes to
client/src/App.js - Page router → Psychology records: routes to
client/src/App.js - Page router → Social work records: routes to
client/src/App.js - Page router → Internal references: routes to
client/src/App.js - Page router → User accounts: routes to
client/src/App.js - Patient profiles → Patient state: uses
client/src/components/Patient/PatientSearch.js - Patient state → Patient API client: calls
client/src/context/PatientContext.js - Patient profiles → Patient state: uses
client/src/components/Patient/PatientSearch.js - HTTP API → Patient routes: mounts
server/index.js - HTTP API → Loan routes: mounts
server/index.js - HTTP API → Therapy routes: mounts
server/index.js - HTTP API → Psychology routes: mounts
server/index.js - HTTP API → Social work routes: mounts
server/index.js - HTTP API → Reference routes: mounts
server/index.js - HTTP API → Attachment routes: mounts
server/index.js - HTTP API → User routes: mounts
server/index.js - Patient routes → Domain controllers: dispatches
server/routes/Patient/patient.routes.js - Loan routes → Domain controllers: dispatches
server/routes/LoanInfo/equipmentLoan.routes.js - Therapy routes → Domain controllers: dispatches
server/routes/PhysicalTherapyInfo/physicalTherapyInfo.routes.js - Psychology routes → Domain controllers: dispatches
server/routes/PsychologyInfo/psychologyInfo.routes.js - Social work routes → Domain controllers: dispatches
server/routes/SocialWorkInfo/socialWorkInfo3.routes.js - Reference routes → Domain controllers: dispatches
server/routes/InternalReferencesInfo/internalReference.routes.js - Attachment routes → Domain controllers: dispatches
server/routes/Attachment/attachment.routes.js - User routes → Domain controllers: dispatches
server/routes/User/user.routes.js - Domain controllers → MySQL pool: queries
server/controllers/psychologyInfo.controller.js - Patient API client → HTTP API: HTTP requests
- Equipment loans → HTTP API: HTTP requests
- Physical therapy → HTTP API: HTTP requests
- Psychology records → HTTP API: HTTP requests
- Social work records → HTTP API: HTTP requests
- Internal references → HTTP API: HTTP requests
- Attachments → HTTP API: HTTP requests
- User accounts → HTTP API: HTTP requests