feat(sep): implement diagnose on sep form
This commit is contained in:
@@ -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) => {
|
||||
<span class="text-red-500">*</span>
|
||||
</Label>
|
||||
<Field :errMessage="errors.initialDiagnosis">
|
||||
<Input
|
||||
<Combobox
|
||||
id="initialDiagnosis"
|
||||
v-model="initialDiagnosis"
|
||||
v-bind="initialDiagnosisAttrs"
|
||||
:disabled="isLoading || isReadonly"
|
||||
:items="diagnoses"
|
||||
:is-disabled="isLoading || isReadonly"
|
||||
placeholder="Pilih Diagnosa Awal"
|
||||
search-placeholder="Cari Diagnosa Awal"
|
||||
empty-message="Item tidak ditemukan"
|
||||
/>
|
||||
</Field>
|
||||
</Cell>
|
||||
|
||||
@@ -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' }],
|
||||
|
||||
|
||||
@@ -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<PatientEntity | null>(null)
|
||||
const selectedLetter = ref('SK22334442')
|
||||
const histories = ref<Array<SepHistoryData>>([])
|
||||
const visits = ref<Array<SepVisitData>>([])
|
||||
|
||||
const patients = ref<Array<{ id: string; identity: string; number: string; bpjs: string; name: string }>>([])
|
||||
const doctors = ref<Array<{ value: string | number; label: string }>>([])
|
||||
const diagnoses = ref<Array<{ value: string | number; label: string }>>([])
|
||||
const facilities = ref<Array<{ value: string | number; label: string }>>([])
|
||||
const isPatientsLoading = ref(false)
|
||||
const paginationMeta = ref<PaginationMeta>({
|
||||
@@ -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)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -256,6 +264,7 @@ onMounted(async () => {
|
||||
</div>
|
||||
<AppSepEntryForm
|
||||
:doctors="doctors"
|
||||
:diagnoses="diagnoses"
|
||||
:facilities="facilities"
|
||||
:patient="selectedPatientObject"
|
||||
@event="handleEvent"
|
||||
|
||||
@@ -5,5 +5,24 @@ const path = '/api/vclaim/diagnosa'
|
||||
const name = 'diagnose'
|
||||
|
||||
export function getList(params: any = null) {
|
||||
return base.getList(path, params, name)
|
||||
let url = path
|
||||
if (params && params?.diagnosa) {
|
||||
url += `/${params.diagnosa}`
|
||||
delete params.diagnosa
|
||||
}
|
||||
return base.getList(url, params, name)
|
||||
}
|
||||
|
||||
export async function getValueLabelList(params: any = null): Promise<{ value: string; label: string }[]> {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user