fix: update encounter payment method
This commit is contained in:
No files matched your search
@@ -49,7 +49,6 @@ model.value = genEncounter()
|
|||||||
|
|
||||||
// Common preparation
|
// Common preparation
|
||||||
const defaultCBItems = [{ label: 'Pilih', value: '' }]
|
const defaultCBItems = [{ label: 'Pilih', value: '' }]
|
||||||
const paymentMethodItems = ref<any>({})
|
|
||||||
|
|
||||||
// Emit preparation
|
// Emit preparation
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
@@ -84,21 +83,21 @@ const sepTrafficStatus = ref('')
|
|||||||
const diagnosis = ref('')
|
const diagnosis = ref('')
|
||||||
const noteReference = ref('Hanya diperlukan jika pembayaran jenis JKN')
|
const noteReference = ref('Hanya diperlukan jika pembayaran jenis JKN')
|
||||||
const noteFile = ref('Gunakan file [.pdf, .jpg, .png] dengan ukuran maksimal 1MB')
|
const noteFile = ref('Gunakan file [.pdf, .jpg, .png] dengan ukuran maksimal 1MB')
|
||||||
|
const mode = props.mode !== undefined ? props.mode : 'add'
|
||||||
const isLoading = props.isLoading !== undefined ? props.isLoading : false
|
const isLoading = props.isLoading !== undefined ? props.isLoading : false
|
||||||
const isReadonly = props.isReadonly !== undefined ? props.isReadonly : false
|
const isReadonly = props.isReadonly !== undefined ? props.isReadonly : false
|
||||||
const mode = props.mode !== undefined ? props.mode : 'add'
|
const isSepValid = computed(() => props.isSepValid || false) // SEP validation state from props
|
||||||
// SEP validation state from props
|
|
||||||
const isSepValid = computed(() => props.isSepValid || false)
|
|
||||||
const isCheckingSep = computed(() => props.isCheckingSep || false)
|
const isCheckingSep = computed(() => props.isCheckingSep || false)
|
||||||
const isInsurancePayment = computed(() => ['insurance', 'jkn'].includes(paymentMethodCode.value))
|
const isInsurancePayment = computed(() => ['insurance', 'jkn'].includes(paymentMethodCode.value))
|
||||||
const isDateLoading = ref(false)
|
const isDateLoading = ref(false)
|
||||||
|
const isUsePaymentNew = true
|
||||||
const debouncedSepNumber = refDebounced(sepNumber, 500)
|
const debouncedSepNumber = refDebounced(sepNumber, 500)
|
||||||
const debouncedCardNumber = refDebounced(cardNumber, 500)
|
const debouncedCardNumber = refDebounced(cardNumber, 500)
|
||||||
const sepFileReview = ref<any>(null)
|
const sepFileReview = ref<any>(null)
|
||||||
const sippFileReview = ref<any>(null)
|
const sippFileReview = ref<any>(null)
|
||||||
const unitFullName = ref('') // Unit, specialist, subspecialist
|
const unitFullName = ref('') // Unit, specialist, subspecialist
|
||||||
const formRef = ref<HTMLFormElement | null>(null) // Expose submit method for parent component
|
const formRef = ref<HTMLFormElement | null>(null) // Expose submit method for parent component
|
||||||
|
const paymentMethodItems = isUsePaymentNew ? props.payments : CB.recStrToItem(paymentMethodCodes)
|
||||||
|
|
||||||
if (mode === 'add') {
|
if (mode === 'add') {
|
||||||
// Set default sepDate to current date in YYYY-MM-DD format
|
// Set default sepDate to current date in YYYY-MM-DD format
|
||||||
@@ -236,11 +235,6 @@ function submitForm() {
|
|||||||
defineExpose({
|
defineExpose({
|
||||||
submitForm,
|
submitForm,
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
const isPaymentMethodVclaim = true
|
|
||||||
paymentMethodItems.value = isPaymentMethodVclaim ? props.payments : CB.recStrToItem(paymentMethodCodes)
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -393,9 +387,6 @@ onMounted(() => {
|
|||||||
:colCount="3"
|
:colCount="3"
|
||||||
:cellFlex="false"
|
:cellFlex="false"
|
||||||
>
|
>
|
||||||
{{ JSON.stringify(paymentMethodCode) }}
|
|
||||||
{{ JSON.stringify(paymentMethodItems, null, 2) }}
|
|
||||||
{{ JSON.stringify(payments, null, 2) }}
|
|
||||||
<DE.Cell>
|
<DE.Cell>
|
||||||
<DE.Label height="compact">
|
<DE.Label height="compact">
|
||||||
Jenis Pembayaran
|
Jenis Pembayaran
|
||||||
@@ -406,18 +397,10 @@ onMounted(() => {
|
|||||||
id="paymentMethodCode"
|
id="paymentMethodCode"
|
||||||
v-model="paymentMethodCode"
|
v-model="paymentMethodCode"
|
||||||
v-bind="paymentMethodCodeAttrs"
|
v-bind="paymentMethodCodeAttrs"
|
||||||
:items="payments as any"
|
:items="paymentMethodItems as any"
|
||||||
:disabled="isLoading || isReadonly"
|
:disabled="isLoading || isReadonly"
|
||||||
placeholder="Pilih Jenis Pembayaran"
|
placeholder="Pilih Jenis Pembayaran"
|
||||||
/>
|
/>
|
||||||
<!-- <CB.Combobox
|
|
||||||
id="paymentMethodCode"
|
|
||||||
v-model="paymentMethodCode"
|
|
||||||
v-bind="paymentMethodCodeAttrs"
|
|
||||||
:items="paymentMethodItems"
|
|
||||||
:disabled="isLoading || isReadonly"
|
|
||||||
placeholder="Pilih Jenis Pembayaran"
|
|
||||||
/> -->
|
|
||||||
</DE.Field>
|
</DE.Field>
|
||||||
</DE.Cell>
|
</DE.Cell>
|
||||||
</DE.Block>
|
</DE.Block>
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ export function useEncounterEntry(props: {
|
|||||||
const isSaveDisabled = computed(() => {
|
const isSaveDisabled = computed(() => {
|
||||||
return !selectedPatient.value || !selectedPatientObject.value || isSaving.value || isLoadingDetail.value
|
return !selectedPatient.value || !selectedPatientObject.value || isSaving.value || isLoadingDetail.value
|
||||||
})
|
})
|
||||||
|
const isUsePaymentNew = true
|
||||||
|
|
||||||
function getListPath(): string {
|
function getListPath(): string {
|
||||||
if (props.classCode === 'ambulatory') {
|
if (props.classCode === 'ambulatory') {
|
||||||
@@ -436,7 +437,7 @@ export function useEncounterEntry(props: {
|
|||||||
formData.registerDate = date.toISOString().split('T')[0]
|
formData.registerDate = date.toISOString().split('T')[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encounter.paymentMethod_code) {
|
if (!isUsePaymentNew && encounter.paymentMethod_code) {
|
||||||
formData.paymentMethodCode = encounter.paymentMethod_code
|
formData.paymentMethodCode = encounter.paymentMethod_code
|
||||||
if (encounter.paymentMethod_code === 'insurance') {
|
if (encounter.paymentMethod_code === 'insurance') {
|
||||||
formData.paymentType = 'jkn'
|
formData.paymentType = 'jkn'
|
||||||
@@ -449,7 +450,7 @@ export function useEncounterEntry(props: {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
formData.paymentType = 'spm'
|
formData.paymentType = encounter.paymentMethod_code
|
||||||
}
|
}
|
||||||
|
|
||||||
formData.cardNumber = encounter.member_number || ''
|
formData.cardNumber = encounter.member_number || ''
|
||||||
@@ -520,7 +521,7 @@ export function useEncounterEntry(props: {
|
|||||||
sippFile.value = formValues.sippFile || null
|
sippFile.value = formValues.sippFile || null
|
||||||
|
|
||||||
let paymentMethodCode = formValues.paymentMethod_code ?? null
|
let paymentMethodCode = formValues.paymentMethod_code ?? null
|
||||||
if (!paymentMethodCode) {
|
if (!isUsePaymentNew && !paymentMethodCode) {
|
||||||
if (formValues.paymentType === 'jkn' || formValues.paymentType === 'jkmm') {
|
if (formValues.paymentType === 'jkn' || formValues.paymentType === 'jkmm') {
|
||||||
paymentMethodCode = 'insurance'
|
paymentMethodCode = 'insurance'
|
||||||
} else if (formValues.paymentType === 'spm') {
|
} else if (formValues.paymentType === 'spm') {
|
||||||
|
|||||||
@@ -56,72 +56,35 @@ const VaccineDataListAsync = defineAsyncComponent(() => import('~/components/con
|
|||||||
const InitialNursingStudyAsync = defineAsyncComponent(() => import('~/components/content/initial-nursing/entry.vue'))
|
const InitialNursingStudyAsync = defineAsyncComponent(() => import('~/components/content/initial-nursing/entry.vue'))
|
||||||
|
|
||||||
const defaultKeys: Record<string, any> = {
|
const defaultKeys: Record<string, any> = {
|
||||||
status: 'status',
|
|
||||||
earlyNurseryAssessment: 'early-nursery-assessment',
|
|
||||||
earlyMedicalAssessment: 'early-medical-assessment',
|
|
||||||
earlyMedicalRehabAssessment: 'early-medical-rehab-assessment',
|
|
||||||
functionAssessment: 'function-assessment',
|
|
||||||
therapyProtocol: 'therapy-protocol',
|
|
||||||
chemotherapyProtocol: 'chemotherapy-protocol',
|
|
||||||
chemotherapyMedicine: 'chemotherapy-medicine',
|
|
||||||
educationAssessment: 'education-assessment',
|
|
||||||
generalConsent: 'general-consent',
|
|
||||||
patientAmbNote: 'patient-amb-note',
|
|
||||||
patientDevNote: 'patient-dev-note',
|
|
||||||
prescription: 'prescription',
|
|
||||||
deviceOrder: 'device-order',
|
|
||||||
radiologyOrder: 'radiology-order',
|
|
||||||
cpLabOrder: 'cp-lab-order',
|
|
||||||
microLabOrder: 'micro-lab-order',
|
|
||||||
paLabOrder: 'pa-lab-order',
|
|
||||||
procedureRoomOrder: 'procedure-room-order',
|
|
||||||
mcuResult: 'mcu-result',
|
|
||||||
actionReport: 'action-report',
|
|
||||||
surgeryReport: 'surgery-report',
|
|
||||||
vaccineData: 'vaccine-data',
|
|
||||||
consultation: 'consultation',
|
|
||||||
controlLetter: 'control-letter',
|
|
||||||
inpatientLetter: 'inpatient-letter',
|
|
||||||
fkr: 'fkr',
|
|
||||||
refBack: 'reference-back',
|
|
||||||
screening: 'screening',
|
|
||||||
supportingDocument: 'supporting-document',
|
|
||||||
resume: 'resume',
|
|
||||||
ambResume: 'amb-resume',
|
|
||||||
priceList: 'price-list',
|
|
||||||
initialNursingStudy: 'initial-nursing-study',
|
|
||||||
}
|
|
||||||
|
|
||||||
const defaultMenus: Record<string, any> = {
|
|
||||||
status: {
|
status: {
|
||||||
id: defaultKeys.status,
|
id: 'status',
|
||||||
title: 'Status Masuk/Keluar',
|
title: 'Status Masuk/Keluar',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
// NOTE : HIDDEN UNTIL IT IS READY
|
// NOTE : HIDDEN UNTIL IT IS READY
|
||||||
// earlyNurseryAssessment: {
|
// earlyNurseryAssessment: {
|
||||||
// id: defaultKeys.earlyNurseryAssessment,
|
// id: 'early-nursery-assessment',
|
||||||
// title: 'Pengkajian Awal Keperawatan',
|
// title: 'Pengkajian Awal Keperawatan',
|
||||||
// classCode: ['ambulatory', 'emergency', 'inpatient'],
|
// classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
// unit: 'all',
|
// unit: 'all',
|
||||||
// },
|
// },
|
||||||
earlyMedicalAssessment: {
|
earlyMedicalAssessment: {
|
||||||
id: defaultKeys.earlyMedicalAssessment,
|
id: 'early-medical-assessment',
|
||||||
title: 'Pengkajian Awal Medis',
|
title: 'Pengkajian Awal Medis',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
afterId: 'early-medical-assessment',
|
afterId: 'early-medical-assessment',
|
||||||
},
|
},
|
||||||
earlyMedicalRehabAssessment: {
|
earlyMedicalRehabAssessment: {
|
||||||
id: defaultKeys.earlyMedicalRehabAssessment,
|
id: 'rehab-medical-assessment',
|
||||||
title: 'Pengkajian Awal Medis Rehabilitasi Medis',
|
title: 'Pengkajian Awal Medis Rehabilitasi Medis',
|
||||||
classCode: ['ambulatory'],
|
classCode: ['ambulatory'],
|
||||||
unit: 'rehab',
|
unit: 'rehab',
|
||||||
afterId: defaultKeys.earlyMedicalAssessment,
|
afterId: 'early-medical-assessment',
|
||||||
},
|
},
|
||||||
fkr: {
|
fkr: {
|
||||||
id: defaultKeys.fkr,
|
id: 'fkr',
|
||||||
title: 'FKR',
|
title: 'FKR',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
@@ -142,165 +105,165 @@ const defaultMenus: Record<string, any> = {
|
|||||||
// afterId: 'function-assessment',
|
// afterId: 'function-assessment',
|
||||||
// },
|
// },
|
||||||
chemotherapyProtocol: {
|
chemotherapyProtocol: {
|
||||||
id: defaultKeys.chemotherapyProtocol,
|
id: 'chemotherapy-protocol',
|
||||||
title: 'Protokol Kemoterapi',
|
title: 'Protokol Kemoterapi',
|
||||||
classCode: ['ambulatory'],
|
classCode: ['ambulatory'],
|
||||||
unit: 'chemo',
|
unit: 'chemo',
|
||||||
afterId: defaultKeys.earlyMedicalAssessment,
|
afterId: 'early-medical-assessment',
|
||||||
},
|
},
|
||||||
chemotherapyMedicine: {
|
chemotherapyMedicine: {
|
||||||
id: 'chemotherapy-medicine',
|
id: 'chemotherapy-medicine',
|
||||||
title: 'Protokol Obat Kemoterapi',
|
title: 'Protokol Obat Kemoterapi',
|
||||||
classCode: ['ambulatory'],
|
classCode: ['ambulatory'],
|
||||||
unit: 'chemo',
|
unit: 'chemo',
|
||||||
afterId: defaultKeys.chemotherapyProtocol,
|
afterId: 'chemotherapy-protocol',
|
||||||
},
|
},
|
||||||
educationAssessment: {
|
educationAssessment: {
|
||||||
id: defaultKeys.educationAssessment,
|
id: 'education-assessment',
|
||||||
title: 'Asesmen Kebutuhan Edukasi',
|
title: 'Asesmen Kebutuhan Edukasi',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
generalConsent: {
|
generalConsent: {
|
||||||
id: defaultKeys.generalConsent,
|
id: 'general-consent',
|
||||||
title: 'General Consent',
|
title: 'General Consent',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
patientAmbNote: {
|
patientAmbNote: {
|
||||||
id: defaultKeys.patientAmbNote,
|
id: 'patient-amb-note',
|
||||||
title: 'CPRJ',
|
title: 'CPRJ',
|
||||||
classCode: ['ambulatory', 'emergency'],
|
classCode: ['ambulatory', 'emergency'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
patientDevNote: {
|
patientDevNote: {
|
||||||
id: defaultKeys.patientDevNote,
|
id: 'patient-dev-note',
|
||||||
title: 'CPP',
|
title: 'CPP',
|
||||||
classCode: ['inpatient'],
|
classCode: ['inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
prescription: {
|
prescription: {
|
||||||
id: defaultKeys.prescription,
|
id: 'prescription',
|
||||||
title: 'Order Obat',
|
title: 'Order Obat',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
deviceOrder: {
|
deviceOrder: {
|
||||||
id: defaultKeys.deviceOrder,
|
id: 'device-order',
|
||||||
title: 'Order Alkes',
|
title: 'Order Alkes',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
radiologyOrder: {
|
radiologyOrder: {
|
||||||
id: defaultKeys.radiologyOrder,
|
id: 'radiology-order',
|
||||||
title: 'Order Radiologi',
|
title: 'Order Radiologi',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
cpLabOrder: {
|
cpLabOrder: {
|
||||||
id: defaultKeys.cpLabOrder,
|
id: 'cp-lab-order',
|
||||||
title: 'Order Lab PK',
|
title: 'Order Lab PK',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
microLabOrder: {
|
microLabOrder: {
|
||||||
id: defaultKeys.microLabOrder,
|
id: 'micro-lab-order',
|
||||||
title: 'Order Lab Mikro',
|
title: 'Order Lab Mikro',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
paLabOrder: {
|
paLabOrder: {
|
||||||
id: defaultKeys.paLabOrder,
|
id: 'pa-lab-order',
|
||||||
title: 'Order Lab PA',
|
title: 'Order Lab PA',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
procedureRoomOrder: {
|
procedureRoomOrder: {
|
||||||
id: defaultKeys.procedureRoomOrder,
|
id: 'procedure-room-order',
|
||||||
title: 'Order Ruang Tindakan',
|
title: 'Order Ruang Tindakan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
mcuResult: {
|
mcuResult: {
|
||||||
id: defaultKeys.mcuResult,
|
id: 'mcu-result',
|
||||||
title: 'Hasil Penunjang',
|
title: 'Hasil Penunjang',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
actionReport: {
|
actionReport: {
|
||||||
id: defaultKeys.actionReport,
|
id: 'action-report',
|
||||||
title: 'Laporan Tindakan',
|
title: 'Laporan Tindakan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
surgeryReport: {
|
surgeryReport: {
|
||||||
id: defaultKeys.surgeryReport,
|
id: 'surgery-report',
|
||||||
title: 'Laporan Operasi',
|
title: 'Laporan Operasi',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
vaccineData: {
|
vaccineData: {
|
||||||
id: defaultKeys.vaccineData,
|
id: 'vaccine-data',
|
||||||
title: 'Data Vaksin',
|
title: 'Data Vaksin',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
consultation: {
|
consultation: {
|
||||||
id: defaultKeys.consultation,
|
id: 'consultation',
|
||||||
title: 'Konsultasi',
|
title: 'Konsultasi',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
controlLetter: {
|
controlLetter: {
|
||||||
id: defaultKeys.controlLetter,
|
id: 'control-letter',
|
||||||
title: 'Surat Kontrol',
|
title: 'Surat Kontrol',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
inpatientLetter: {
|
inpatientLetter: {
|
||||||
id: defaultKeys.inpatientLetter,
|
id: 'inpatient-letter',
|
||||||
title: 'SPRI',
|
title: 'SPRI',
|
||||||
classCode: ['ambulatory', 'emergency'],
|
classCode: ['ambulatory', 'emergency'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
refBack: {
|
refBack: {
|
||||||
id: defaultKeys.refBack,
|
id: 'reference-back',
|
||||||
title: 'PRB',
|
title: 'PRB',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
screening: {
|
screening: {
|
||||||
id: defaultKeys.screening,
|
id: 'screening',
|
||||||
title: 'Skrinning MPP',
|
title: 'Skrinning MPP',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
supportingDocument: {
|
supportingDocument: {
|
||||||
id: defaultKeys.supportingDocument,
|
id: 'supporting-document',
|
||||||
title: 'Upload Dokumen Pendukung',
|
title: 'Upload Dokumen Pendukung',
|
||||||
classCode: ['ambulatory'],
|
classCode: ['ambulatory'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
resume: {
|
resume: {
|
||||||
id: defaultKeys.resume,
|
id: 'resume',
|
||||||
title: 'Resume',
|
title: 'Resume',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
ambResume: {
|
ambResume: {
|
||||||
id: defaultKeys.ambResume,
|
id: 'amb-resume',
|
||||||
title: 'Resume Medis Rawat Jalan',
|
title: 'Resume Medis Rawat Jalan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
priceList: {
|
priceList: {
|
||||||
id: defaultKeys.priceList,
|
id: 'price-list',
|
||||||
title: 'Tarif Tindakan',
|
title: 'Tarif Tindakan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
initialNursingStudy: {
|
initialNursingStudy: {
|
||||||
id: defaultKeys.initialNursingStudy,
|
id: 'initial-nursing-study',
|
||||||
title: 'Kajian Awal Keperawatan',
|
title: 'Kajian Awal Keperawatan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
@@ -338,7 +301,7 @@ export function insertItemByAfterId(id: string, items: EncounterItem[], newItem:
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function injectComponents(id: string | number, data: EncounterListData, meta: EncounterListData) {
|
export function injectComponents(id: string | number, data: EncounterListData, meta: EncounterListData) {
|
||||||
const currentKeys = { ...defaultMenus }
|
const currentKeys = { ...defaultKeys }
|
||||||
if (currentKeys?.status) {
|
if (currentKeys?.status) {
|
||||||
currentKeys.status['component'] = StatusAsync
|
currentKeys.status['component'] = StatusAsync
|
||||||
currentKeys.status['props'] = { encounter: data?.encounter }
|
currentKeys.status['props'] = { encounter: data?.encounter }
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { isValid } from "date-fns"
|
||||||
import { z } from 'zod'
|
import { z } from 'zod'
|
||||||
|
|
||||||
const ERROR_MESSAGES = {
|
const ERROR_MESSAGES = {
|
||||||
@@ -16,6 +17,7 @@ const ERROR_MESSAGES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ACCEPTED_UPLOAD_TYPES = ['image/jpeg', 'image/png', 'application/pdf']
|
const ACCEPTED_UPLOAD_TYPES = ['image/jpeg', 'image/png', 'application/pdf']
|
||||||
|
const isValidationSep = false
|
||||||
|
|
||||||
const IntegrationEncounterSchema = z
|
const IntegrationEncounterSchema = z
|
||||||
.object({
|
.object({
|
||||||
@@ -116,7 +118,7 @@ const IntegrationEncounterSchema = z
|
|||||||
.refine(
|
.refine(
|
||||||
(data) => {
|
(data) => {
|
||||||
// If payment type is jkn and SEP type is selected, then SEP number is required
|
// If payment type is jkn and SEP type is selected, then SEP number is required
|
||||||
if (data.paymentMethod_code === 'jkn' && data.sepType && data.sepType.trim() !== '') {
|
if (isValidationSep && data.paymentMethod_code === 'jkn' && data.sepType && data.sepType.trim() !== '') {
|
||||||
return data.sepNumber && data.sepNumber.trim() !== ''
|
return data.sepNumber && data.sepNumber.trim() !== ''
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user