From 4b6247ef791880eab89c7cae5f2eb394cdbd8576 Mon Sep 17 00:00:00 2001 From: riefive Date: Wed, 5 Nov 2025 14:16:21 +0700 Subject: [PATCH] refactor(sep): update data structure and types for SEP components --- app/components/app/sep/list-cfg.ts | 28 +++--- app/components/app/sep/list.vue | 18 +--- app/components/content/sep/entry.vue | 40 --------- app/components/content/sep/list.vue | 123 +++++++++++++-------------- app/models/vclaim.ts | 15 ++++ 5 files changed, 91 insertions(+), 133 deletions(-) create mode 100644 app/models/vclaim.ts diff --git a/app/components/app/sep/list-cfg.ts b/app/components/app/sep/list-cfg.ts index 4a6784fc..e2257954 100644 --- a/app/components/app/sep/list-cfg.ts +++ b/app/components/app/sep/list-cfg.ts @@ -41,24 +41,24 @@ export const config: Config = { ], keys: [ - 'tgl_sep', - 'no_sep', - 'pelayanan', - 'jalur', - 'no_rm', - 'nama_pasien', - 'no_kartu_bpjs', - 'no_surat_kontrol', - 'tgl_surat_kontrol', - 'klinik_tujuan', - 'dpjp', - 'diagnosis_awal', + 'letterDate', + 'letterNumber', + 'serviceType', + 'flow', + 'medicalRecordNumber', + 'patientName', + 'cardNumber', + 'controlLetterNumber', + 'controlLetterDate', + 'clinicDestination', + 'attendingDoctor', + 'diagnosis', 'action', ], delKeyNames: [ - { key: 'no_sep', label: 'NO. SEP' }, - { key: 'nama_pasien', label: 'Nama Pasien' }, + { key: 'letterNumber', label: 'NO. SEP' }, + { key: 'patientName', label: 'Nama Pasien' }, ], parses: {}, diff --git a/app/components/app/sep/list.vue b/app/components/app/sep/list.vue index f44166e2..2afaa2cc 100644 --- a/app/components/app/sep/list.vue +++ b/app/components/app/sep/list.vue @@ -1,23 +1,11 @@ diff --git a/app/components/content/sep/entry.vue b/app/components/content/sep/entry.vue index 3f0e5545..1ecdc047 100644 --- a/app/components/content/sep/entry.vue +++ b/app/components/content/sep/entry.vue @@ -11,7 +11,6 @@ import { toast } from '~/components/pub/ui/toast' // Types import type { SepHistoryData } from '~/components/app/sep/list-cfg.history' -import type { SepVisitData } from '~/components/app/sep/list-cfg.visit' // Constants import { @@ -36,7 +35,6 @@ import { getValueLabelList as getHealthFacilityLabelList } from '~/services/vcla import { getValueLabelList as getDiagnoseLabelList } from '~/services/vclaim-diagnose.service' import { getList as getHospitalLetterList } from '~/services/vclaim-reference-hospital-letter.service' import { getList as getControlLetterList } from '~/services/vclaim-control-letter.service' -import { getList as geMonitoringVisitList } from '~/services/vclaim-monitoring-visit.service' import { getList as getMonitoringHistoryList } from '~/services/vclaim-monitoring-history.service' import { create as createSep, makeSepData } from '~/services/vclaim-sep.service' @@ -60,7 +58,6 @@ const selectedObjects = ref({}) const selectedServiceType = ref('') const selectedAdmissionType = ref('') const histories = ref>([]) -const visits = ref>([]) const letters = ref>([]) const doctors = ref>([]) const diagnoses = ref>([]) @@ -114,43 +111,6 @@ async function getMonitoringHistoryMappers() { } } -async function getMonitoringVisitMappers() { - visits.value = [] - const dateFirst = new Date() - const result = await geMonitoringVisitList({ - nop: '0002078925513', - tglpelayanan: dateFirst.toISOString().substring(0, 10), - jnspelayanan: 1, - }) - if (result && result.success && result.body) { - const visitsRaw = result.body?.response?.sep || [] - - // "jnsPelayanan": "R.Inap", - // "kelasRawat": "2", - // "nama": "HANIF ABDURRAHMAN", - // "noKartu": "0001819122189", - // "noRujukan": "0301U01108180200084", - // "poli": null, - // "tglPlgSep": "2017-10-03", - // "tglSep": "2017-10-01" - - if (!visitsRaw) return - visitsRaw.forEach((result: any) => { - visits.value.push({ - letterNumber: result.noRujukan, - letterDate: result.tglSep, - sepNumber: result.noSep, - patientName: result.nama, - bpjsNumber: result.noKartu, - diagnosis: result.diagnosa, - poly: result.poli || '-', - serviceType: result.jnsPelayanan, - careClass: result.kelasRawat, - }) - }) - } -} - async function getLetterMappers(admissionType: string, search: string) { letters.value = [] let result = null diff --git a/app/components/content/sep/list.vue b/app/components/content/sep/list.vue index f1ed0323..c795a162 100644 --- a/app/components/content/sep/list.vue +++ b/app/components/content/sep/list.vue @@ -1,4 +1,5 @@