feat(encounter): update encounter permissions and enhance entry form handling

This commit is contained in:
riefive
2025-11-09 18:36:15 +07:00
parent 9fad8f4123
commit 5e309801ed
8 changed files with 37 additions and 10 deletions
+7 -4
View File
@@ -128,17 +128,20 @@ async function handleSaveEncounter(formValues: any) {
visitDate: formatDate(formValues.registerDate),
class_code: props.classCode || '',
subClass_code: props.subClassCode || '',
infra_id: 0,
unit_id: 0,
infra_id: null,
unit_id: null,
appointment_doctor_id: Number(formValues.doctorId),
responsible_doctor_id: Number(formValues.doctorId),
paymentType: formValues.paymentType,
cardNumber: formValues.cardNumber,
adm_employee_id: employeeId,
refSource_name: '',
appointment_id: null,
}
if (employeeId && employeeId > 0) {
payload.adm_employee_id = employeeId
}
// Add specialist_id and subspecialist_id if available
if (specialist_id) {
payload.specialist_id = specialist_id
@@ -149,7 +152,7 @@ async function handleSaveEncounter(formValues: any) {
if (formValues.paymentType === 'jkn') {
payload.paymentMethod_code = 'insurance'
payload.insuranceCompany_id = 0
payload.insuranceCompany_id = null
payload.member_number = formValues.cardNumber
payload.ref_number = formValues.sepNumber
}