fix: update encounter payment method
This commit is contained in:
No files matched your search
@@ -75,6 +75,7 @@ export function useEncounterEntry(props: {
|
||||
const isSaveDisabled = computed(() => {
|
||||
return !selectedPatient.value || !selectedPatientObject.value || isSaving.value || isLoadingDetail.value
|
||||
})
|
||||
const isUsePaymentNew = true
|
||||
|
||||
function getListPath(): string {
|
||||
if (props.classCode === 'ambulatory') {
|
||||
@@ -436,7 +437,7 @@ export function useEncounterEntry(props: {
|
||||
formData.registerDate = date.toISOString().split('T')[0]
|
||||
}
|
||||
|
||||
if (encounter.paymentMethod_code) {
|
||||
if (!isUsePaymentNew && encounter.paymentMethod_code) {
|
||||
formData.paymentMethodCode = encounter.paymentMethod_code
|
||||
if (encounter.paymentMethod_code === 'insurance') {
|
||||
formData.paymentType = 'jkn'
|
||||
@@ -449,7 +450,7 @@ export function useEncounterEntry(props: {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
formData.paymentType = 'spm'
|
||||
formData.paymentType = encounter.paymentMethod_code
|
||||
}
|
||||
|
||||
formData.cardNumber = encounter.member_number || ''
|
||||
@@ -520,7 +521,7 @@ export function useEncounterEntry(props: {
|
||||
sippFile.value = formValues.sippFile || null
|
||||
|
||||
let paymentMethodCode = formValues.paymentMethod_code ?? null
|
||||
if (!paymentMethodCode) {
|
||||
if (!isUsePaymentNew && !paymentMethodCode) {
|
||||
if (formValues.paymentType === 'jkn' || formValues.paymentType === 'jkmm') {
|
||||
paymentMethodCode = 'insurance'
|
||||
} else if (formValues.paymentType === 'spm') {
|
||||
|
||||
Reference in New Issue
Block a user