diff --git a/app/components/app/soapi/list-cfg.ts b/app/components/app/soapi/list-cfg.ts index 6fa11bda..959d6177 100644 --- a/app/components/app/soapi/list-cfg.ts +++ b/app/components/app/soapi/list-cfg.ts @@ -6,94 +6,28 @@ type SmallDetailDto = any const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) export const config: Config = { - cols: [ - {}, - {}, - {}, - { width: 100 }, - { width: 120 }, - {}, - {}, - {}, - { width: 100 }, - { width: 100 }, - {}, - { width: 50 }, - ], + cols: [{}, {}, {}, { width: 100 }, { width: 120 }, {}, {}, {}, { width: 100 }, { width: 100 }, {}, { width: 50 }], headers: [ [ - { label: 'Nama' }, - { label: 'Rekam Medis' }, - { label: 'KTP' }, - { label: 'Tgl Lahir' }, - { label: 'Umur' }, - { label: 'JK' }, - { label: 'Pendidikan' }, + { label: 'Tanggal' }, + { label: 'DPJP' }, + { label: 'Keluhan & Riwayat' }, + { label: 'Pemeriksaan' }, + { label: 'Diagnosa' }, { label: 'Status' }, - { label: '' }, + { label: 'Aksi' }, ], ], - keys: [ - 'name', - 'medicalRecord_number', - 'identity_number', - 'birth_date', - 'patient_age', - 'gender', - 'education', - 'status', - 'action', - ], + keys: ['time', 'employee_id', 'main_complaint', 'examination', 'diagnose', 'status', 'action'], delKeyNames: [ { key: 'code', label: 'Kode' }, { key: 'name', label: 'Nama' }, ], - parses: { - name: (rec: unknown): unknown => { - const recX = rec as SmallDetailDto - return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}` - }, - identity_number: (rec: unknown): unknown => { - const recX = rec as SmallDetailDto - if (recX.identity_number?.substring(0, 5) === 'BLANK') { - return '(TANPA NIK)' - } - return recX.identity_number - }, - birth_date: (rec: unknown): unknown => { - const recX = rec as SmallDetailDto - if (typeof recX.birth_date === 'object' && recX.birth_date) { - return (recX.birth_date as Date).toLocaleDateString() - } else if (typeof recX.birth_date === 'string') { - return recX.birth_date.substring(0, 10) - } - return recX.birth_date - }, - patient_age: (rec: unknown): unknown => { - const recX = rec as SmallDetailDto - return recX.birth_date?.split('T')[0] - }, - gender: (rec: unknown): unknown => { - const recX = rec as SmallDetailDto - if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') { - return 'Tidak Diketahui' - } - return recX.gender_code - }, - education: (rec: unknown): unknown => { - const recX = rec as SmallDetailDto - if (typeof recX.education_code === 'number' && recX.education_code >= 0) { - return recX.education_code - } else if (typeof recX.education_code !== 'undefined') { - return recX.education_code - } - return '-' - }, - }, + parses: {}, components: { action(rec, idx) { diff --git a/app/components/content/encounter/process.vue b/app/components/content/encounter/process.vue index a629fd9c..ad93387d 100644 --- a/app/components/content/encounter/process.vue +++ b/app/components/content/encounter/process.vue @@ -38,13 +38,24 @@ const data = dataResBody?.data ?? null const tabs: TabItem[] = [ { value: 'status', label: 'Status Masuk/Keluar', component: Status, props: { encounter: data } }, - { value: 'early-medical-assessment', label: 'Pengkajian Awal Medis', component: EarlyMedicalAssesmentList }, + { + value: 'early-medical-assessment', + label: 'Pengkajian Awal Medis', + component: EarlyMedicalAssesmentList, + props: { encounter: data, type: 'early-medic', label: 'Pengkajian Awal Medis' }, + }, { value: 'rehab-medical-assessment', label: 'Pengkajian Awal Medis Rehabilitasi Medis', component: EarlyMedicalRehabList, + props: { encounter: data, type: 'early-rehab', label: 'Pengkajian Awal Medis Rehabilitasi Medis' }, + }, + { + value: 'function-assessment', + label: 'Asesmen Fungsi', + component: AssesmentFunctionList, + props: { encounter: data, type: 'function', label: 'Asesmen Fungsi' }, }, - { value: 'function-assessment', label: 'Asesmen Fungsi', component: AssesmentFunctionList }, { value: 'therapy-protocol', label: 'Protokol Terapi' }, { value: 'education-assessment', label: 'Asesmen Kebutuhan Edukasi' }, { value: 'consent', label: 'General Consent' }, diff --git a/app/components/content/soapi/entry.vue b/app/components/content/soapi/entry.vue index 7b4ab9d4..ee3c7c32 100644 --- a/app/components/content/soapi/entry.vue +++ b/app/components/content/soapi/entry.vue @@ -11,7 +11,7 @@ import FunctionForm from './form-function.vue' const route = useRoute() const type = computed(() => (route.query.tab as string) || 'early-medical-assessment') -const { mode, openForm, backToList } = useQueryMode('mode') +const { mode, goToEntry, backToList } = useQueryCRUDMode('mode') const formMap = { 'early-medical-assessment': EarlyForm, @@ -26,7 +26,8 @@ const ActiveForm = computed(() => formMap[type.value] || EarlyForm)
0) { diff --git a/app/components/content/soapi/form.vue b/app/components/content/soapi/form.vue index 44730197..c963a091 100644 --- a/app/components/content/soapi/form.vue +++ b/app/components/content/soapi/form.vue @@ -8,6 +8,7 @@ import { EarlySchema } from '~/schemas/soapi.schema' import { toast } from '~/components/pub/ui/toast' import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler' +const { backToList } = useQueryMode('mode') const route = useRoute() const isOpenProcedure = ref(false) const isOpenDiagnose = ref(false) @@ -76,7 +77,10 @@ function handleOpen(type: string) { const entryRef = ref() async function actionHandler(type: string) { - console.log(type) + if (type === 'back') { + backToList() + return + } const result = await entryRef.value?.validate() if (result?.valid) { if (selectedProcedure.value?.length > 0 || selectedDiagnose.value?.length > 0) { diff --git a/app/components/content/soapi/list.vue b/app/components/content/soapi/list.vue index a240a65f..7547b544 100644 --- a/app/components/content/soapi/list.vue +++ b/app/components/content/soapi/list.vue @@ -1,16 +1,41 @@ diff --git a/app/components/pub/my-ui/comp-tab/comp-tab.vue b/app/components/pub/my-ui/comp-tab/comp-tab.vue index de045bce..69a47ef2 100644 --- a/app/components/pub/my-ui/comp-tab/comp-tab.vue +++ b/app/components/pub/my-ui/comp-tab/comp-tab.vue @@ -12,14 +12,14 @@ const emit = defineEmits<{ }>() function changeTab(value: string) { - activeTab.value = value; - emit('changeTab', value); + activeTab.value = value + emit('changeTab', value) } \ No newline at end of file +