feat: Implement VClaim SEP integration with new components and handlers for encounter entry and supporting documents.

This commit is contained in:
riefive
2025-12-09 13:31:23 +07:00
parent 1b31b33406
commit ad3f44c4a8
4 changed files with 19 additions and 4 deletions
+5 -1
View File
@@ -10,6 +10,7 @@ type SmallDetailDto = Encounter
const action = defineAsyncComponent(() => import('./dropdown-action.vue'))
const statusBadge = defineAsyncComponent(() => import('./status-badge.vue'))
const vclaimSepInfo = defineAsyncComponent(() => import('./vclaim-sep-info.vue'))
const vclaimSepNone = defineAsyncComponent(() => import('./vclaim-sep-none.vue'))
export const defaultConfig: Config = {
cols: [{}, {}, {}, { width: 160 }, {}, { width: 70 }, {}, { width: 50 }],
@@ -197,7 +198,10 @@ export const ambulatoryConfig: Config = {
components: {
sep(rec: any) {
if (rec?.paymentMethod_code !== 'jkn') {
return {} as RecComponent
return {
rec: rec as object,
component: vclaimSepNone,
} as RecComponent
}
const res: RecComponent = {
rec: rec as object,
@@ -0,0 +1,11 @@
<script setup lang="ts">
const props = defineProps<{
rec: any
}>()
</script>
<template>
<div class="flex flex-col gap-2">
<span>Tidak ada</span>
</div>
</template>
-2
View File
@@ -601,7 +601,6 @@ export function useEncounterEntry(props: {
await uploadAttachmentCustom({
id: isEditMode.value && formValues.sepFileReview ? formValues.sepFileReview.id : null,
file: sepFile.value,
name: 'image-vclaim-sep',
refId: encounterId,
entityTypeCode: 'encounter',
type: 'vclaim-sep',
@@ -611,7 +610,6 @@ export function useEncounterEntry(props: {
await uploadAttachmentCustom({
id: isEditMode.value && formValues.sippFileReview ? formValues.sippFileReview.id : null,
file: sippFile.value,
name: 'image-vclaim-sipp',
refId: encounterId,
entityTypeCode: 'encounter',
type: 'vclaim-sipp',
+3 -1
View File
@@ -27,7 +27,9 @@ export async function uploadAttachmentCustom(payload: any) {
const { user } = useUserStore()
const formData = new FormData()
formData.append('name', payload.name)
if (!payload.id && payload.name) {
formData.append('name', payload.name)
}
formData.append('content', payload.file)
formData.append('entityType_code', payload.entityTypeCode)
formData.append('type_code', payload.type)