12 Commits

Author SHA1 Message Date
Khafid Prayoga
3cac23ce8a fix edit form state
fix: id list for contacts and address list

fix warning

fix duplicate contacts responsible: true

fix edit family

fix nik required
2025-12-10 14:36:32 +07:00
Khafid Prayoga
9918501f29 refactor(patient): extract age calculation logic to shared utility
Move age calculation logic from multiple components to a shared utility function in person model
Add age display to patient entry form and update preview component to use shared utility
Remove redundant age field from select-dob component
2025-12-10 09:49:30 +07:00
Khafid Prayoga
910b641750 form cleanup
feat(patient): add edit functionality to patient form

- Modify genPatientEntity to accept existing patient data for updates
- Add handleActionEdit handler for edit mode
- Update form to handle both create and edit modes
- Rename patient ref to patientDetail for clarity

refactor(patient): update marital status codes and job options mapping

- Change marital status enum values to standardized codes (S, M, D, W)
- Simplify job options and marital status options mapping using mapToComboboxOptList
- Add error handling in patient data loading

ajust styling text based on combobox

wip: edit patient redirect

refactor(models): update type definitions and form field handling

- Add field-name prop to SelectDob component for better form handling
- Update Person and Patient interfaces to use null for optional fields
- Add maritalStatus_code field to Person interface
- Improve type safety by replacing undefined with null for optional fields

fix casting radio str to boolean and parsing date error
2025-12-09 20:49:25 +07:00
Khafid Prayoga
e967ee1cf0 refactor(role): rename PagePermission to RoleAccesses and fix base model id
Update type name from PagePermission to RoleAccesses across multiple files for consistency
Change mock id value from -1 to 0 in base model to match backend constraints
Enable RBAC middleware and fix patient edit page permissions
2025-12-08 18:57:35 +07:00
Khafid Prayoga
3fbcdf9e2a refactor(treatment-report): restructure treatment report form and components
- Replace SelectDPJP with SelectDoctor component
- Update schema naming from ActionReport to TreatmentReport
- Add doctor selection functionality to treatment report form
- Improve form layout and field organization
- Update related model imports to use single quotes
- add fragment for better form grouping
- cherry pick form field from another branch
2025-11-25 17:15:00 +07:00
761fe4e0ed feat/encounter: improved processing needs 2025-10-19 21:57:17 +07:00
cc29ad1ff7 Merge branch 'dev' into feat/encounter 2025-10-19 06:24:44 +07:00
53a1b7d4ae feat/encounter: wip 2025-10-17 02:19:12 +07:00
Khafid Prayoga
ea04f33ad1 refactor(address): update address models and forms to use standardized fields
- Add preload relationships to address-related models
- Rename postalCode to postalCode_code for consistency
- Simplify location type handling with hidden fields
- Update validation schemas and form components
- Improve address display in patient preview
2025-10-10 15:36:54 +07:00
Khafid Prayoga
a5d5e8acd1 refactor(patient): restructure patient data handling to use nested properties
Move address, contact and relative data into nested properties of Person model
Update preview component to access data through person object
Remove separate props for addresses, contacts and relatives
2025-10-10 10:30:00 +07:00
Khafid Prayoga
55239606af feat(patient): address integration to backend apis
feat(patient): add newborn status field and validation

- Add radio button component for newborn status selection
- Update patient schema with newborn status validation
- Remove deprecated alias field from person model
- Refactor disability type handling in patient schema

fix(patient): correct address comparison logic and schema

Update the patient address comparison to use boolean instead of string '1' and modify the schema to transform the string value to boolean. This ensures consistent type usage throughout the application.

feat(models): add village and district model interfaces

Add new model interfaces for Village and District with their respective generator functions. These models will be used to handle administrative division data in the application.

feat(address): implement dynamic province selection with caching

- Add province service for CRUD operations
- Create useProvinces composable with caching and loading states
- Update select-province component to use dynamic data
- Export SelectItem interface for type consistency
- Improve combobox styling and accessibility

feat(address-form): implement dynamic regency selection with caching

- Add new regency service for CRUD operations
- Create useRegencies composable with caching and loading states
- Update SelectRegency component to use dynamic data based on province selection
- Improve placeholder and disabled state handling

feat(address-form): implement dynamic district selection

- Add district service for CRUD operations
- Create useDistricts composable with caching and loading states
- Update SelectDistrict component to use dynamic data
- Remove hardcoded district options and implement regency-based filtering

feat(address-form): implement dynamic village selection with caching

- Add village service for CRUD operations
- Create useVillages composable with caching and loading states
- Update SelectVillage component to fetch villages based on district
- Remove hardcoded village options in favor of API-driven data

feat(address-form): improve address selection with debouncing and request deduplication

- Add debouncing to prevent rapid API calls when selecting addresses
- Implement request deduplication to avoid duplicate API calls
- Add delayed form reset to ensure proper composable cleanup
- Add isUserAction flag to force refresh when user changes selection
2025-10-08 15:58:22 +07:00
Munawwirul Jamal
3eb9dde21d Dev cleaning (#106) 2025-10-08 00:03:36 +07:00