diff --git a/app/components/app/sep/entry-form.vue b/app/components/app/sep/entry-form.vue index aa4507e3..ff840b8d 100644 --- a/app/components/app/sep/entry-form.vue +++ b/app/components/app/sep/entry-form.vue @@ -24,6 +24,7 @@ const props = defineProps<{ isLoading?: boolean isReadonly?: boolean doctors: any[] + diagnoses: any[] facilities: any[] patient?: PatientEntity | null | undefined values?: any @@ -355,11 +356,15 @@ watch(props, (value) => { * - diff --git a/app/components/app/sep/list-cfg.visit.ts b/app/components/app/sep/list-cfg.visit.ts index 83b16d3b..3de1f0a3 100644 --- a/app/components/app/sep/list-cfg.visit.ts +++ b/app/components/app/sep/list-cfg.visit.ts @@ -6,8 +6,10 @@ export interface SepVisitData { sepNumber: string patientName: string bpjsNumber: string - clinic: string - doctor: string + poly: string + diagnosis: string + serviceType: string + careClass: string } export const config: Config = { @@ -20,6 +22,7 @@ export const config: Config = { { width: 100 }, { width: 100 }, { width: 100 }, + { width: 100 }, ], headers: [ @@ -29,12 +32,13 @@ export const config: Config = { { label: 'NO. SEP' }, { label: 'NAMA PASIEN' }, { label: 'NO. KARTU BPJS' }, - { label: 'KLINIK' }, - { label: 'DOKTER' }, + { label: 'DIAGNOSIS AWAL' }, + { label: 'JENIS PELAYANAN' }, + { label: 'KELAS RAWAT' }, ], ], - keys: ['letterNumber', 'letterDate', 'sepNumber', 'patientName', 'bpjsNumber', 'clinic', 'doctor'], + keys: ['letterNumber', 'letterDate', 'sepNumber', 'patientName', 'bpjsNumber', 'diagnosis', 'serviceType', 'careClass'], delKeyNames: [{ key: 'code', label: 'Kode' }], diff --git a/app/components/content/sep/entry.vue b/app/components/content/sep/entry.vue index 3645cfa5..a15278e8 100644 --- a/app/components/content/sep/entry.vue +++ b/app/components/content/sep/entry.vue @@ -17,6 +17,7 @@ import { getList as getCityList } from '~/services/vclaim-region-city.service' import { getList as getDistrictList } from '~/services/vclaim-region-district.service' import { getValueLabelList as getDoctorLabelList } from '~/services/vclaim-doctor.service' import { getValueLabelList as getHealthFacilityLabelList } from '~/services/vclaim-health-facility.service' +import { getValueLabelList as getDiagnoseLabelList } from '~/services/vclaim-diagnose.service' import { getList as getDiagnoseReferralList } from '~/services/vclaim-diagnose-referral.service' import { getList as geMonitoringVisitList } from '~/services/vclaim-monitoring-visit.service' import { getList as getMonitoringHistoryList } from '~/services/vclaim-monitoring-history.service' @@ -29,9 +30,9 @@ const selectedPatientObject = ref(null) const selectedLetter = ref('SK22334442') const histories = ref>([]) const visits = ref>([]) - const patients = ref>([]) const doctors = ref>([]) +const diagnoses = ref>([]) const facilities = ref>([]) const isPatientsLoading = ref(false) const paginationMeta = ref({ @@ -140,17 +141,30 @@ async function getMonitoringVisitMappers() { jnspelayanan: 1, }) if (result && result.success && result.body) { - const visitsRaw = result.body?.response?.visit || [] + const visitsRaw = result.body?.response?.sep || [] + + // "diagnosa": "K65.0", + // "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.noSuratKontrol, - letterDate: result.tglRencanaKontrol, + letterNumber: result.noRujukan, + letterDate: result.tglSep, sepNumber: result.noSep, - patientName: result.namaPasien, - bpjsNumber: result.noKartuBPJS, - clinic: '-', - doctor: '-', + patientName: result.nama, + bpjsNumber: result.noKartu, + diagnosis: result.diagnosa, + poly: result.poli || '-', + serviceType: result.jnsPelayanan, + careClass: result.kelasRawat, }) }) } @@ -194,22 +208,21 @@ function handleEvent(menu: string, value: string) { return } if (menu === 'search-patient') { - // fetch patients from API then open the dialog getPatientsList({ 'page-size': 10, includes: 'person' }).then(() => { openPatient.value = true }) return } if (menu === 'search-letter') { - openLetter.value = true + getMonitoringVisitMappers().then(() => { + openLetter.value = true + }) return } if (menu === 'history-sep') { - // fetch history sep from API then open the dialog - getMonitoringHistoryMappers().then((value) => { - console.log('value:', value) + getMonitoringHistoryMappers().then(() => { + openHistory.value = true }) - openHistory.value = true return } if (menu === 'back') { @@ -224,6 +237,7 @@ onMounted(async () => { 'kode-spesialis': 0, }) facilities.value = await getHealthFacilityLabelList({ faskes: 'Puskesmas', 'jenis-faskes': 1 }) + diagnoses.value = await getDiagnoseLabelList({ diagnosa: 'paru' }) getProvinceList().then((value) => { console.log('value:', value) }) @@ -236,12 +250,6 @@ onMounted(async () => { getDiagnoseReferralList().then((value) => { console.log('value:', value) }) - geMonitoringVisitList({ tglpelayanan: '2025-10-10', jnspelayanan: 1 }).then((value) => { - console.log('value:', value) - }) - getMonitoringHistoryList({ nop: '0002078925513', tglawal: '2025-07-20', tglakhir: '2025-10-10' }).then((value) => { - console.log('value:', value) - }) }) @@ -256,6 +264,7 @@ onMounted(async () => { { + let data: { value: string; label: string }[] = [] + const result = await getList(params) + if (result.success) { + const resultData = result.body?.response?.diagnosa || [] + const resultUnique = [...new Map(resultData.map((item: any) => [item.kode, item])).values()] + data = resultUnique.map((item: any) => ({ + value: item.kode ? String(item.kode) : '', + label: item.nama, + })) + } + return data }