refactor(sep): update data structure and types for SEP components
This commit is contained in:
No files matched your search
@@ -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<any>({})
|
||||
const selectedServiceType = ref<string>('')
|
||||
const selectedAdmissionType = ref<string>('')
|
||||
const histories = ref<Array<SepHistoryData>>([])
|
||||
const visits = ref<Array<SepVisitData>>([])
|
||||
const letters = ref<Array<any>>([])
|
||||
const doctors = 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) {
|
||||
letters.value = []
|
||||
let result = null
|
||||
|
||||
Reference in New Issue
Block a user