refactor(sep): update data structure and types for SEP components
This commit is contained in:
No files matched your search
@@ -41,24 +41,24 @@ export const config: Config = {
|
|||||||
],
|
],
|
||||||
|
|
||||||
keys: [
|
keys: [
|
||||||
'tgl_sep',
|
'letterDate',
|
||||||
'no_sep',
|
'letterNumber',
|
||||||
'pelayanan',
|
'serviceType',
|
||||||
'jalur',
|
'flow',
|
||||||
'no_rm',
|
'medicalRecordNumber',
|
||||||
'nama_pasien',
|
'patientName',
|
||||||
'no_kartu_bpjs',
|
'cardNumber',
|
||||||
'no_surat_kontrol',
|
'controlLetterNumber',
|
||||||
'tgl_surat_kontrol',
|
'controlLetterDate',
|
||||||
'klinik_tujuan',
|
'clinicDestination',
|
||||||
'dpjp',
|
'attendingDoctor',
|
||||||
'diagnosis_awal',
|
'diagnosis',
|
||||||
'action',
|
'action',
|
||||||
],
|
],
|
||||||
|
|
||||||
delKeyNames: [
|
delKeyNames: [
|
||||||
{ key: 'no_sep', label: 'NO. SEP' },
|
{ key: 'letterNumber', label: 'NO. SEP' },
|
||||||
{ key: 'nama_pasien', label: 'Nama Pasien' },
|
{ key: 'patientName', label: 'Nama Pasien' },
|
||||||
],
|
],
|
||||||
|
|
||||||
parses: {},
|
parses: {},
|
||||||
|
|||||||
@@ -1,23 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { config } from './list-cfg'
|
import { config } from './list-cfg'
|
||||||
|
|
||||||
interface SepData {
|
// Types
|
||||||
tgl_sep: string
|
import type { VclaimSepData } from '~/models/vclaim'
|
||||||
no_sep: string
|
|
||||||
pelayanan: string
|
|
||||||
jalur: string
|
|
||||||
no_rm: string
|
|
||||||
nama_pasien: string
|
|
||||||
no_kartu_bpjs: string
|
|
||||||
no_surat_kontrol: string
|
|
||||||
tgl_surat_kontrol: string
|
|
||||||
klinik_tujuan: string
|
|
||||||
dpjp: string
|
|
||||||
diagnosis_awal: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
data: SepData[]
|
data: VclaimSepData[]
|
||||||
}>()
|
}>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { toast } from '~/components/pub/ui/toast'
|
|||||||
|
|
||||||
// Types
|
// Types
|
||||||
import type { SepHistoryData } from '~/components/app/sep/list-cfg.history'
|
import type { SepHistoryData } from '~/components/app/sep/list-cfg.history'
|
||||||
import type { SepVisitData } from '~/components/app/sep/list-cfg.visit'
|
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
import {
|
import {
|
||||||
@@ -36,7 +35,6 @@ import { getValueLabelList as getHealthFacilityLabelList } from '~/services/vcla
|
|||||||
import { getValueLabelList as getDiagnoseLabelList } from '~/services/vclaim-diagnose.service'
|
import { getValueLabelList as getDiagnoseLabelList } from '~/services/vclaim-diagnose.service'
|
||||||
import { getList as getHospitalLetterList } from '~/services/vclaim-reference-hospital-letter.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 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 { getList as getMonitoringHistoryList } from '~/services/vclaim-monitoring-history.service'
|
||||||
import { create as createSep, makeSepData } from '~/services/vclaim-sep.service'
|
import { create as createSep, makeSepData } from '~/services/vclaim-sep.service'
|
||||||
|
|
||||||
@@ -60,7 +58,6 @@ const selectedObjects = ref<any>({})
|
|||||||
const selectedServiceType = ref<string>('')
|
const selectedServiceType = ref<string>('')
|
||||||
const selectedAdmissionType = ref<string>('')
|
const selectedAdmissionType = ref<string>('')
|
||||||
const histories = ref<Array<SepHistoryData>>([])
|
const histories = ref<Array<SepHistoryData>>([])
|
||||||
const visits = ref<Array<SepVisitData>>([])
|
|
||||||
const letters = ref<Array<any>>([])
|
const letters = ref<Array<any>>([])
|
||||||
const doctors = ref<Array<{ value: string | number; label: string }>>([])
|
const doctors = ref<Array<{ value: string | number; label: string }>>([])
|
||||||
const diagnoses = ref<Array<{ value: string | number; label: string }>>([])
|
const diagnoses = ref<Array<{ value: string | number; label: string }>>([])
|
||||||
@@ -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) {
|
async function getLetterMappers(admissionType: string, search: string) {
|
||||||
letters.value = []
|
letters.value = []
|
||||||
let result = null
|
let result = null
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
// Components
|
||||||
import type { DataTableLoader } from '~/components/pub/my-ui/data-table/type'
|
import type { DataTableLoader } from '~/components/pub/my-ui/data-table/type'
|
||||||
import type { HeaderPrep, RefSearchNav } from '~/components/pub/my-ui/data/types'
|
import type { HeaderPrep, RefSearchNav } from '~/components/pub/my-ui/data/types'
|
||||||
import type { PaginationMeta } from '~/components/pub/my-ui/pagination/pagination.type'
|
import type { PaginationMeta } from '~/components/pub/my-ui/pagination/pagination.type'
|
||||||
@@ -9,8 +10,17 @@ import {
|
|||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
DropdownMenuItem,
|
DropdownMenuItem,
|
||||||
} from '~/components/pub/ui/dropdown-menu'
|
} from '~/components/pub/ui/dropdown-menu'
|
||||||
|
import AppSepList from '~/components/app/sep/list.vue'
|
||||||
|
|
||||||
|
// Icons
|
||||||
import { X, Check } from 'lucide-vue-next'
|
import { X, Check } from 'lucide-vue-next'
|
||||||
|
|
||||||
|
// Types
|
||||||
|
import type { VclaimSepData } from '~/models/vclaim'
|
||||||
|
|
||||||
|
// Services
|
||||||
|
import { getList as geMonitoringVisitList } from '~/services/vclaim-monitoring-visit.service'
|
||||||
|
|
||||||
const search = ref('')
|
const search = ref('')
|
||||||
const dateRange = ref('12 Agustus 2025 - 32 Agustus 2025')
|
const dateRange = ref('12 Agustus 2025 - 32 Agustus 2025')
|
||||||
const open = ref(false)
|
const open = ref(false)
|
||||||
@@ -21,21 +31,6 @@ const sepData = {
|
|||||||
nama: 'Kenzie',
|
nama: 'Kenzie',
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SepData {
|
|
||||||
tgl_sep: string
|
|
||||||
no_sep: string
|
|
||||||
pelayanan: string
|
|
||||||
jalur: string
|
|
||||||
no_rm: string
|
|
||||||
nama_pasien: string
|
|
||||||
no_kartu_bpjs: string
|
|
||||||
no_surat_kontrol: string
|
|
||||||
tgl_surat_kontrol: string
|
|
||||||
klinik_tujuan: string
|
|
||||||
dpjp: string
|
|
||||||
diagnosis_awal: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const paginationMeta = reactive<PaginationMeta>({
|
const paginationMeta = reactive<PaginationMeta>({
|
||||||
recordCount: 0,
|
recordCount: 0,
|
||||||
page: 1,
|
page: 1,
|
||||||
@@ -49,53 +44,7 @@ function handlePageChange(page: number) {
|
|||||||
console.log('pageChange', page)
|
console.log('pageChange', page)
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = ref<SepData[]>([])
|
const data = ref<VclaimSepData[]>([])
|
||||||
|
|
||||||
// contoh data dummy
|
|
||||||
const rows = [
|
|
||||||
{
|
|
||||||
tgl_sep: '12 Agustus 2025',
|
|
||||||
no_sep: 'SP23311224',
|
|
||||||
pelayanan: 'Rawat Jalan',
|
|
||||||
jalur: 'Kontrol',
|
|
||||||
no_rm: 'RM23311224',
|
|
||||||
nama_pasien: 'Ahmad Baidowi',
|
|
||||||
no_kartu_bpjs: '334423231214',
|
|
||||||
no_surat_kontrol: 'SK22334442',
|
|
||||||
tgl_surat_kontrol: '13 Agustus 2024',
|
|
||||||
klinik_tujuan: 'Penyakit dalam',
|
|
||||||
dpjp: 'dr. Andi Prasetyo, Sp.PD-KHOM',
|
|
||||||
diagnosis_awal: 'C34.9 - Karsinoma Paru',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
tgl_sep: '12 Agustus 2025',
|
|
||||||
no_sep: 'SP23311224',
|
|
||||||
pelayanan: 'Rawat Jalan',
|
|
||||||
jalur: 'Kontrol',
|
|
||||||
no_rm: 'RM001234',
|
|
||||||
nama_pasien: 'Kenzie',
|
|
||||||
no_kartu_bpjs: '12301234',
|
|
||||||
no_surat_kontrol: '123456',
|
|
||||||
tgl_surat_kontrol: '10 Agustus 2024',
|
|
||||||
klinik_tujuan: 'Penyakit dalam',
|
|
||||||
dpjp: 'Dr. Andreas Sutaji',
|
|
||||||
diagnosis_awal: 'Bronchitis',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
tgl_sep: '11 Agustus 2025',
|
|
||||||
no_sep: 'SP23455667',
|
|
||||||
pelayanan: 'Rawat Jalan',
|
|
||||||
jalur: 'Kontrol',
|
|
||||||
no_rm: 'RM001009',
|
|
||||||
nama_pasien: 'Abraham Sulaiman',
|
|
||||||
no_kartu_bpjs: '334235',
|
|
||||||
no_surat_kontrol: '123334',
|
|
||||||
tgl_surat_kontrol: '11 Agustus 2024',
|
|
||||||
klinik_tujuan: 'Penyakit dalam',
|
|
||||||
dpjp: 'Dr. Andreas Sutaji',
|
|
||||||
diagnosis_awal: 'Paru-paru basah',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
const dataBpjs = {
|
const dataBpjs = {
|
||||||
noSEP: '1323R0010825V027605',
|
noSEP: '1323R0010825V027605',
|
||||||
@@ -153,12 +102,58 @@ const headerPrep: HeaderPrep = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getSepList() {
|
async function getMonitoringVisitMappers() {
|
||||||
isLoading.dataListLoading = true
|
isLoading.dataListLoading = true
|
||||||
data.value = [...rows]
|
data.value = []
|
||||||
|
|
||||||
|
const dateFirst = new Date()
|
||||||
|
const result = await geMonitoringVisitList({
|
||||||
|
date: dateFirst.toISOString().substring(0, 10),
|
||||||
|
serviceType: 1,
|
||||||
|
})
|
||||||
|
|
||||||
|
if (result && result.success && result.body) {
|
||||||
|
const visitsRaw = result.body?.response?.sep || []
|
||||||
|
|
||||||
|
if (!visitsRaw) {
|
||||||
|
isLoading.dataListLoading = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
visitsRaw.forEach((result: any) => {
|
||||||
|
// Format pelayanan: "R.Inap" -> "Rawat Inap", "1" -> "Rawat Jalan", dll
|
||||||
|
let serviceType = result.jnsPelayanan || '-'
|
||||||
|
if (serviceType === 'R.Inap') {
|
||||||
|
serviceType = 'Rawat Inap'
|
||||||
|
} else if (serviceType === '1' || serviceType === 'R.Jalan') {
|
||||||
|
serviceType = 'Rawat Jalan'
|
||||||
|
}
|
||||||
|
|
||||||
|
data.value.push({
|
||||||
|
letterDate: result.tglSep || '-',
|
||||||
|
letterNumber: result.noSep || '-',
|
||||||
|
serviceType: serviceType,
|
||||||
|
flow: '-',
|
||||||
|
medicalRecordNumber: '-',
|
||||||
|
patientName: result.nama || '-',
|
||||||
|
cardNumber: result.noKartu || '-',
|
||||||
|
controlLetterNumber: result.noRujukan || '-',
|
||||||
|
controlLetterDate: result.tglPlgSep || '-',
|
||||||
|
clinicDestination: result.poli || '-',
|
||||||
|
attendingDoctor: '-',
|
||||||
|
diagnosis: result.diagnosa || '-',
|
||||||
|
careClass: result.kelasRawat || '-',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
isLoading.dataListLoading = false
|
isLoading.dataListLoading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getSepList() {
|
||||||
|
await getMonitoringVisitMappers()
|
||||||
|
}
|
||||||
|
|
||||||
function exportCsv() {
|
function exportCsv() {
|
||||||
console.log('Ekspor CSV dipilih')
|
console.log('Ekspor CSV dipilih')
|
||||||
// tambahkan logic untuk generate CSV
|
// tambahkan logic untuk generate CSV
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
export interface VclaimSepData {
|
||||||
|
letterDate: string
|
||||||
|
letterNumber: string
|
||||||
|
serviceType: string
|
||||||
|
flow: string
|
||||||
|
medicalRecordNumber: string
|
||||||
|
patientName: string
|
||||||
|
cardNumber: string
|
||||||
|
controlLetterNumber: string
|
||||||
|
controlLetterDate: string
|
||||||
|
clinicDestination: string
|
||||||
|
attendingDoctor: string
|
||||||
|
diagnosis: string
|
||||||
|
careClass: string
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user