From a3ddbac0af13a79a2e02f66fb66867920587c5b6 Mon Sep 17 00:00:00 2001 From: riefive Date: Thu, 13 Nov 2025 13:16:47 +0700 Subject: [PATCH] fix: conflict after rebase --- app/components/app/sep/entry-form.vue | 3 +++ app/components/content/sep/entry.vue | 16 +++++++++++++--- .../(features)/integration/bpjs/sep/add.vue | 6 ++++-- app/schemas/integration-bpjs.schema.ts | 2 +- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/app/components/app/sep/entry-form.vue b/app/components/app/sep/entry-form.vue index a3c85569..b775f61e 100644 --- a/app/components/app/sep/entry-form.vue +++ b/app/components/app/sep/entry-form.vue @@ -150,6 +150,9 @@ watch(props, (value) => { if (objects?.sepType === 'external') { admissionType.value = '1' } + if (objects?.diagnoseLabel) { + initialDiagnosis.value = objects?.diagnoseLabel + } isDateReload.value = true setTimeout(() => { if (objects?.letterDate) { diff --git a/app/components/content/sep/entry.vue b/app/components/content/sep/entry.vue index 36558305..eb3b5ad3 100644 --- a/app/components/content/sep/entry.vue +++ b/app/components/content/sep/entry.vue @@ -179,7 +179,7 @@ async function getLetterMappers(admissionType: string, search: string) { doctor: '', information: { facility: lettersRaw?.asalFaskes || '', - diagnoses: lettersRaw?.rujukan?.diagnosa?.kode || '', + diagnose: lettersRaw?.rujukan?.diagnosa?.kode || '', serviceType: lettersRaw?.rujukan?.pelayanan?.kode || '', classLevel: lettersRaw?.rujukan?.peserta?.hakKelas?.kode || '', poly: lettersRaw?.rujukan?.poliRujukan?.kode || '', @@ -376,7 +376,7 @@ async function handleEvent(menu: string, value: any) { selectedObjects.value = {} selectedLetter.value = letter.letterNumber isLetterReadonly.value = true - setTimeout(() => { + setTimeout(async () => { selectedObjects.value = copyObjects selectedObjects.value['letterDate'] = letter.plannedDate selectedObjects.value['cardNumber'] = letter.information?.cardNumber || '' @@ -385,11 +385,18 @@ async function handleEvent(menu: string, value: any) { selectedObjects.value['patientName'] = letter.information?.patientName || '' selectedObjects.value['phoneNumber'] = letter.information?.patientPhone || '' selectedObjects.value['facility'] = letter.information?.facility || '' - selectedObjects.value['diagnoses'] = letter.information?.diagnoses || '' + selectedObjects.value['diagnose'] = letter.information?.diagnose || '' selectedObjects.value['serviceType'] = letter.information?.serviceType || '' selectedObjects.value['classLevel'] = letter.information?.classLevel || '' selectedObjects.value['poly'] = letter.information?.poly || '' selectedObjects.value['destination'] = letter.information?.destination || '' + if (!!selectedObjects.value['diagnose']) { + const diagnoseRes: any = await getDiagnoseLabelList({ diagnosa: selectedObjects.value['diagnose'] }) + diagnoses.value = diagnoseRes + if (diagnoseRes && diagnoseRes.length > 0) { + selectedObjects.value['diagnoseLabel'] = diagnoseRes[0].value + } + } }, 250) } }) @@ -446,6 +453,9 @@ async function handleEvent(menu: string, value: any) { if (!value.destinationClinic) { mappedValues.destinationClinic = selectedObjects.value['destination'] || '' } + if (!value.clinicExcecutive) { + mappedValues.clinicExcecutive = 'no' + } createSep(makeSepData(mappedValues)) .then((res) => { diff --git a/app/pages/(features)/integration/bpjs/sep/add.vue b/app/pages/(features)/integration/bpjs/sep/add.vue index 5cdbd9bf..ed1fa862 100644 --- a/app/pages/(features)/integration/bpjs/sep/add.vue +++ b/app/pages/(features)/integration/bpjs/sep/add.vue @@ -18,9 +18,11 @@ useHead({ const roleAccess: PagePermission = PAGE_PERMISSIONS['/doctor'] -// const { checkRole, hasCreateAccess } = useRBAC() +const { checkRole, hasCreateAccess } = useRBAC() -// // Check if user has access to this page +console.log(checkRole(roleAccess)) + +// Check if user has access to this page // const hasAccess = checkRole(roleAccess) // if (!hasAccess) { // throw createError({ diff --git a/app/schemas/integration-bpjs.schema.ts b/app/schemas/integration-bpjs.schema.ts index 78795be8..452735f7 100644 --- a/app/schemas/integration-bpjs.schema.ts +++ b/app/schemas/integration-bpjs.schema.ts @@ -89,7 +89,7 @@ const IntegrationBpjsSchema = z cataract: z.string({ required_error: ERROR_MESSAGES.required.cataract }).min(1, ERROR_MESSAGES.required.cataract), clinicExcecutive: z .string({ required_error: ERROR_MESSAGES.required.clinicExcecutive }) - .min(1, ERROR_MESSAGES.required.clinicExcecutive), + .min(1, ERROR_MESSAGES.required.clinicExcecutive).optional(), subSpecialistId: z .string({ required_error: ERROR_MESSAGES.required.subSpecialistId }) .min(1, ERROR_MESSAGES.required.subSpecialistId)