26 Commits

Author SHA1 Message Date
Khafid Prayoga
51725d7f73 feat(patient): doc preview, integration to select ethnic and lang (#229)
* impl: opts for ethnic and lang

* fix: doc related for preview

fix: upload dokumen kk dan ktp

fix dokumen preview

fix: add preview doc on edit form
2025-12-12 16:12:24 +07:00
Khafid Prayoga
8c51cc2719 deprecated 2025-12-11 15:20:22 +07:00
Khafid Prayoga
3a4a2cc841 adjust form submit,list, and detail
refactor(patient-preview): comment out unused occupation field in patient preview
fix(handler): return success response from update operation in crud handler
fix search patient
add handle del search char for ease use
2025-12-11 14:54:18 +07:00
Khafid Prayoga
97d2b76ee3 refactor(person-relative): update schema and form components for family data
- Change value format in radio-parents-input from '1'/'0' to 'yes'/'no'
- Remove default labels from select-education and select-job components
- Update schema to make fields optional and add new fields
- Modify family-parents-form to use new schema and improve UI
- Update patient form and models to align with schema changes
2025-12-10 20:30:34 +07:00
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
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
05e2f32197 edit-mode: unwrap detail data and use strict type
refactor(patient-form): simplify address synchronization logic

- Extract address sync logic into helper functions
- Remove unused schema imports
- Streamline mounted hook with new loadInitData function
- Consolidate watchers into single efficient watcher

feat(forms): add readonly support across all form components

Implement readonly state handling for patient, relative, contact, and address forms
Add isDisabled prop to all form fields to support readonly mode
Update form components to respect isReadonly prop from parent

refactor(patient-form): reorganize imports and improve type usage

- Group related imports and move type imports to the top
- Replace genPatient with genPatientEntity for better type safety
- Remove console.log statement
- Fix formatting and indentation issues
2025-12-06 10:52:35 +07:00
Khafid Prayoga
1f6ca8a7f9 wip: adjust strict form data
person-relative: schema bind strict typed
person-contact: strict schema type
person-families: strict schema type
person-address-relative: strict schema type
patient: strict schema type
person-address: strict schema type
2025-12-06 08:54:37 +07:00
Khafid Prayoga
41985ea89f feat(patient): enhance patient detail view with accordion and timezone support
- Add date-fns-tz for timezone-aware date formatting
- Refactor patient detail view to use accordion components
- Improve date display formatting with locale support
- Update navigation handling for edit and back actions
- Extend ClickType enum to include 'edit' action
2025-12-05 19:24:40 +07:00
Khafid Prayoga
32654b0b11 wip: ui fix layout
fix(patient-form): add error handling in patient submission and simplify family form

- Wrap patient submission in try-catch to show appropriate error messages
- Simplify family parents form by removing conditional rendering and adding disabled state
- Update form fields to use consistent labels and disable when not sharing family data

feat(family-form): improve family data form handling and UI

- Add edit mode detection to conditionally set default family data
- Restructure form fields display based on shareFamilyData value
- Show disabled placeholder fields when family data is not shared
2025-11-24 16:37:33 +07:00
Khafid Prayoga
f3474eb0b5 refactor(patient-contact): improve contact form components and validation
- Remove hardcoded contact limit and use prop instead
- Add ButtonAction component to form exports
- Enhance contact schema validation with better error messages
- Refactor contact type select component to use doc-entry components
- Improve form layout and consistency between contact and relative forms
2025-11-24 14:08:01 +07:00
Khafid Prayoga
cd57dc6243 refactor(patient): rename entry component to add and clean up form error props
Remove FormErrors type imports and error props from all form components
Move content from entry.vue to add.vue with updated title styling
2025-11-24 12:03:53 +07:00
Muhammad Rifai
25d0091a19 Fix Dialog Consultation (#124) 2025-10-20 23:41:23 +07:00
708d5d6975 feat/patient-63: cleaning and resolve conflict 2025-10-18 06:47:17 +07:00
6f8eed1280 dev: hotfix, content header adjustment 2025-10-17 16:53:07 +07:00
Khafid Prayoga
070239270e feat(patient): add patient handler and refactor form submission
- Introduce new patient handler using genCrudHandler for CRUD operations
- Refactor patient entry form to use handler for save operations
- Separate form data composition from submission logic
- Handle file uploads and navigation after successful submission
2025-10-16 14:04:00 +07:00
Khafid Prayoga
20b96ab7e4 wip: data masih dead pixel upload sukses 2025-10-15 16:37:46 +07:00
Khafid Prayoga
46911514fb refactor: postal region, add new field on list
feat: implement postal region model and update address handling

- Add new PostalRegion model and service
- Replace postalCode with postalRegion in address-related components
- Update schemas and models to use locationType_code consistently
- Add usePostalRegion composable for postal code selection
- Modify patient form to handle address changes more robustly

feat(patient): add ID column and improve date formatting

- Add patient ID column to patient list
- Format dates using 'id-ID' locale in preview
- Update identity number display for foreign patients
- Include passport number for foreign nationals
2025-10-13 13:07:00 +07:00
Khafid Prayoga
7f6e0cc1fd refactor(patient): rename PatientEntity to Patient and update related components
Update interface name from PatientEntity to Patient for better clarity and consistency. Modify all related components and models to use the new interface name. Also includes minor improvements to address handling in patient forms.
2025-10-10 15:36:55 +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
bd4a269fad feat(patient): add callback url support for patient creation
Add callback URL parameter to redirect after successful patient creation. The URL can be passed via 'return-path' query parameter and will include the created patient's ID. This enables seamless integration with external systems that need to handle post-creation flows.
2025-10-09 20:21:06 +07:00
Khafid Prayoga
33f17e54b1 refactor(person-address): change postal_code to camelCase postalCode
Update all references to postal_code field to use camelCase postalCode for consistency with codebase naming conventions. This includes changes to models, schemas, and components.
2025-10-09 19:51:57 +07:00
Khafid Prayoga
5121422658 adjust: improve regency select based on new useRegencies composable to explicit pull all data with no limitation, because it has a province code 2025-10-09 18:46:58 +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