feat(encounter): update encounter permissions and enhance entry form handling
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user