This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
AMRIT HWC-UI (Health and Wellness Centre UI) — an Angular 16 healthcare application for the PSMRI AMRIT platform. Supports nurse, doctor, lab technician, pharmacist, radiologist, and oncologist workflows including patient registration, vitals capture, clinical examination, diagnosis (ANC, PNC, NCD screening, immunization, family planning, CDSS), prescriptions, lab tests, drug dispensing, telemedicine specialist consultations, and offline data sync.
| Command | Purpose |
|---|---|
npm start |
Dev server on port 4204 (ng serve) |
npm run build-dev |
AOT dev build (increased heap) |
npm run build-prod |
AOT production build (increased heap) |
npm run build-ci |
CI build (generates environment.ci.ts from template + env vars) |
npm test |
Run tests (Karma + Jasmine) |
npm run lint |
ESLint |
npm run lint:fix |
ESLint with auto-fix |
npm run commit |
Commitizen conventional commit prompt |
Common-UI/ is a git submodule from https://github.com/PSMRI/Common-UI. It provides:
registrarmodule (patient registration +SessionStorageService)feedbackmoduletrackingmodule (Matomo analytics)
Initialize with:
git submodule update --init --recursiveImport paths use Common-UI/src/... (e.g., Common-UI/src/registrar/registration.module).
- AppModule — root module with hash-based routing (
useHash: true) - CoreModule — singleton services, guards, shared components, directives,
MaterialModule - NurseDoctorModule (lazy-loaded at
/nurse-doctor) — primary clinical module:visit-details— visit type selection and detailsvitals— vitals capturehistory— medical/family/personal historyexamination— clinical examinationcase-record— diagnosis, prescriptions, investigations, referralscase-sheet— printable case sheetscreening— NCD/IDRS screeningcdss— Clinical Decision Support Systemanc/pnc— antenatal/postnatal careimmunization-service— immunization workflowsfamily-planning— family planning servicesidrs— IDRS screening toolrefer— referral managementquick-consult— quick consultation flowscheduler— embedded scheduling- Role-specific worklists:
nurse-worklist-wrapper,doctor-worklist,doctor-tm-worklist-wrapper,doctor-tm-future-worklist,tc-specialist-worklist,tc-specialist-future-worklist,radiologist-worklist,oncologist-worklist
- LabModule (lazy-loaded at
/lab) — lab test workflows - PharmacistModule (lazy-loaded at
/pharmacist) — drug dispensing - DataSYNCModule (lazy-loaded at
/datasync) — offline data synchronization - RegistrationModule (lazy-loaded at
/registrar, from Common-UI) — patient registration - FeedbackModule (lazy-loaded at
/feedback, from Common-UI) — feedback collection
Root routes: login, logout-tm, service, servicePoint, set-password, reset-password, set-security-questions, plus lazy-loaded feature modules above.
Nurse-doctor sub-routes include role-specific worklists and patient workarea.
Angular services with BehaviorSubject/Subject. No NgRx. Encrypted sessionStorage via ng-cryptostore.
- HTTP interceptor attaches
Authorization/ServerAuthorizationheaders, manages spinner, handles 27-minute session timeout with warning dialog, auto-logout on 401/5002 AuthGuardprotects clinical routesCanDeactivateGuardServiceprevents navigation with unsaved changes
ConfirmationService— alert/confirm/remarks dialogs viaMatDialogNurseService/DoctorService— cross-component clinical stateMasterdataService— master data cachingIotService— Bluetooth device integration (localhost:8085)
- Angular 16 + Angular Material 16
- Bootstrap 5 (layout) + Font Awesome 4.7 (icons)
crypto-js— password encryption (AES + PBKDF2)ng-cryptostore— encrypted sessionStoragemoment— date handlingng2-charts+chart.js— chartsngx-webcam— webcam capturerecordrtc— audio recordinghtml2canvas— screenshot/printngx-bootstrap— additional UI componentsngx-pagination— paginationfile-saver— file downloadsjquery— DOM manipulation (legacy)
- License header: All source files begin with the AMRIT GPL-3.0 license block
- Component prefix:
app - Commit convention: Conventional Commits enforced via commitlint + Husky
- Pre-commit hook:
lint-stagedruns ESLint--fixon staged.tsfiles
Environment files in src/environments/. CI build uses EJS template (environment.ci.ts.template) with env vars for API endpoints, encryption keys, captcha config, and tracking config.