How mishkatit/patient-management works
Patient Management is a React interface backed by a Django REST API and PostgreSQL. Users search and page through patients, create or edit records, delete patients, and record visits; the interface calls patient API functions, which issue HTTP requests to Django endpoints. The API routes requests to views, which use serializers and patient/visit models. The README also documents authentication and PostgreSQL, though implementation details for database configuration and pagination are not shown in the excerpts. HTTP wiring to the backend is therefore marked unverified.
Main entry points: models.py Patient and visits · App.jsx Patient workspace · views.py Patient endpoints · patients.js Patient API calls
Components 13
Patient interface
- Patient workspace
frontend/src/App.jsx - Visit form
frontend/src/components/PatientVisitModal.jsx - Patient API calls
frontend/src/api/patients.js - HTTP client
frontend/src/api/client.js
Django API
- API routes
backend/patients/urls.py - Patient endpoints
backend/patients/views.py - Pagination
backend/patients/pagination.py - Authentication endpoints
backend/patients/urls.py
Patient domain
- Patient serializer
backend/patients/serializers.py - Patient and visits
backend/patients/models.py - Patient manager
backend/patients/managers.py
Persistence
- PostgreSQL
Other components
- User
Connections 11
- User → Patient workspace: uses
frontend/src/App.jsx - Patient workspace → Patient API calls: requests
frontend/src/App.jsx - Patient workspace → Visit form: renders
frontend/src/App.jsx - Patient API calls → HTTP client: calls
frontend/src/api/patients.js - HTTP client → API routes: sends HTTP
- API routes → Patient endpoints: routes to
backend/patients/urls.py - Patient endpoints → Patient serializer: uses
backend/patients/views.py - Patient endpoints → Patient and visits: queries
backend/patients/views.py - Patient serializer → Patient and visits: serializes
backend/patients/serializers.py - Patient and visits → Patient manager: configures
backend/patients/models.py - Patient and visits → PostgreSQL: persists