How sajid73/careplan-frontend works
This is a React-based care-planning and practice-management application. Its central workflow is to select a patient, record insurance and planned services, calculate costs and coverage, and review or generate care-plan documents. Management workflows maintain fee schedules and codes, patient records, team members, and templates. The excerpts show the router, shared context calculations, selected API operations, and template editor; several feature screens are represented by their tree paths, so their internal wiring is not asserted.
Main entry points: App.tsx Route application · index.ts Backend API client · app.context.tsx Application context · TemplateEditor.jsx Template editor
Components 22
Application and access
- Route application
src/App.tsx - Role-based layout
src/components/Layout/index.tsx - Login
src/pages/Login.tsx
Patient care
- Patient dashboard
src/components/PatientDashboard/PatientDashboard.tsx - Insurance entry
src/components/PatientDashboard/NewInsurance.tsx - Care plan builder
src/components/PatientDashboard/BuildCarePlan.tsx - Current care plan
src/components/PatientDashboard/CurrentCarePlan.tsx - Previous care plans
src/components/PatientDashboard/PreviousCarePlan.tsx
Practice management
- Patient records
src/components/Dashboard/PatientList/PatientList.tsx - Fee schedules
src/components/Dashboard/FeeSchedule/FeeSchedule.tsx - Schedule and code editor
src/components/Dashboard/FeeSchedule/FeeScheduleDetails.tsx - Prebuilt care plans
src/components/Dashboard/CarePlan/CarePlanBuilder.tsx - Team members
src/components/Dashboard/TeamMembers/TeamMembers.tsx - Template builder
src/pages/TemplateBuilder.tsx - Template editor
src/components/Common/TemplateEditor.jsx - User settings
src/components/Dashboard/UserSettings/UserSettings.tsx
Shared data and services
- Application context
src/states/app.context.tsx - Plan cost calculation
src/utils/calculatePay.ts - Template substitution
src/hooks/templateHooks.ts - Backend API client
src/api/index.ts
Other components
- User
- Care-plan backend
Connections 26
- User → Route application: opens
- Route application → Login: routes
- Route application → Role-based layout: routes
- Route application → Patient dashboard: routes
- Route application → Care plan builder: routes
- Route application → Current care plan: routes
- Route application → Previous care plans: routes
- Route application → Template editor: routes
- Route application → Template builder: routes
- Route application → User settings: routes
- Role-based layout → Backend API client: logs out via
- Login → Backend API client: authenticates via
- Login → Application context: sets user
- Patient dashboard → Application context: uses patient state
- Insurance entry → Application context: loads patient
- Application context → Backend API client: loads patient and codes
- Application context → Plan cost calculation: calculates plan
- Application context → Backend API client: loads templates and schedules
- Patient records → Backend API client: manages patients
- Schedule and code editor → Backend API client: updates schedules and codes
- Fee schedules → Backend API client: loads schedules
- Prebuilt care plans → Application context: uses plan state
- Template editor → Application context: reads plan data
- Template editor → Template substitution: fills placeholders
- Template editor → Backend API client: saves template
- Backend API client → Care-plan backend: sends requests