fix: change dpjp, unit and healthcare vclaim
This commit is contained in:
@@ -31,7 +31,7 @@ import { getValueLabelList as getProvinceList } from '~/services/vclaim-region-p
|
||||
import { getValueLabelList as getCityList } from '~/services/vclaim-region-city.service'
|
||||
import { getValueLabelList 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 getHealthFacilityLabelList } from '~/services/vclaim-healthcare.service'
|
||||
import { getValueLabelList as getDiagnoseLabelList } from '~/services/vclaim-diagnose.service'
|
||||
import { getList as geMonitoringVisitList } from '~/services/vclaim-monitoring-visit.service'
|
||||
import { getList as getMonitoringHistoryList } from '~/services/vclaim-monitoring-history.service'
|
||||
@@ -184,9 +184,9 @@ async function handleEvent(menu: string, value: any) {
|
||||
if (menu === 'service-type') {
|
||||
selectedServiceType.value = value
|
||||
doctors.value = await getDoctorLabelList({
|
||||
'jenis-pelayanan': selectedServiceType.value || 1,
|
||||
'tgl-pelayanan': new Date().toISOString().substring(0, 10),
|
||||
'kode-spesialis': 0,
|
||||
serviceType: selectedServiceType.value || 1,
|
||||
serviceDate: new Date().toISOString().substring(0, 10),
|
||||
specialistCode: 0,
|
||||
})
|
||||
}
|
||||
if (menu === 'search-patient') {
|
||||
@@ -246,14 +246,14 @@ async function handleFetch(params: any) {
|
||||
}
|
||||
if (menu === 'clinic-from') {
|
||||
facilitiesFrom.value = await getHealthFacilityLabelList({
|
||||
faskes: value,
|
||||
'jenis-faskes': selectedServiceType.value || 1,
|
||||
healthcare: value,
|
||||
healthcareType: selectedServiceType.value || 1,
|
||||
})
|
||||
}
|
||||
if (menu === 'clinic-to') {
|
||||
facilitiesTo.value = await getHealthFacilityLabelList({
|
||||
faskes: value,
|
||||
'jenis-faskes': selectedServiceType.value || 1,
|
||||
healthcare: value,
|
||||
healthcareType: selectedServiceType.value || 1,
|
||||
})
|
||||
}
|
||||
if (menu === 'province') {
|
||||
@@ -267,16 +267,16 @@ async function handleFetch(params: any) {
|
||||
|
||||
async function handleInit() {
|
||||
const facilities = await getHealthFacilityLabelList({
|
||||
faskes: 'Puskesmas',
|
||||
'jenis-faskes': selectedLetter.value || 1,
|
||||
healthcare: 'Puskesmas',
|
||||
healthcareType: selectedLetter.value || 1,
|
||||
})
|
||||
diagnoses.value = await getDiagnoseLabelList({ diagnosa: 'paru' })
|
||||
facilitiesFrom.value = facilities
|
||||
facilitiesTo.value = facilities
|
||||
doctors.value = await getDoctorLabelList({
|
||||
'jenis-pelayanan': selectedServiceType.value || 1,
|
||||
'tgl-pelayanan': new Date().toISOString().substring(0, 10),
|
||||
'kode-spesialis': 0,
|
||||
serviceType: selectedServiceType.value || 1,
|
||||
serviceDate: new Date().toISOString().substring(0, 10),
|
||||
specialistCode: 0,
|
||||
})
|
||||
provincesList.value = await getProvinceList()
|
||||
serviceTypesList.value = Object.keys(serviceTypes).map((item) => ({
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
// Base
|
||||
import * as base from './_crud-base'
|
||||
|
||||
const path = '/api/vclaim/referensi/dokter-dpjp'
|
||||
const name = 'doctor-dpjp'
|
||||
const path = '/api/vclaim/v1/reference/responsible-doctor'
|
||||
const name = 'responsible-doctor'
|
||||
|
||||
export function getList(params: any = null) {
|
||||
let url = path
|
||||
if (params?.serviceType) {
|
||||
url += `/${params.serviceType}`
|
||||
delete params.serviceType
|
||||
}
|
||||
if (params?.serviceDate) {
|
||||
url += `/${params.serviceDate}`
|
||||
delete params.serviceDate
|
||||
}
|
||||
if (params?.specialistCode) {
|
||||
url += `/${params.specialistCode}`
|
||||
delete params.specialistCode
|
||||
}
|
||||
return base.getList(path, params, name)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,16 @@ const path = '/api/vclaim/v1/reference/healthcare'
|
||||
const name = 'healthcare'
|
||||
|
||||
export function getList(params: any = null) {
|
||||
return base.getList(path, params, name)
|
||||
let url = path
|
||||
if (params?.healthcare) {
|
||||
url += `/${params.healthcare}`
|
||||
delete params.healthcare
|
||||
}
|
||||
if (params?.healthcareType) {
|
||||
url += `/${params.healthcareType}`
|
||||
delete params.healthcareType
|
||||
}
|
||||
return base.getList(url, params, name)
|
||||
}
|
||||
|
||||
export async function getValueLabelList(params: any = null): Promise<{ value: string; label: string }[]> {
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// Base
|
||||
import * as base from './_crud-base'
|
||||
|
||||
const path = '/api/vclaim/v1/reference/unit'
|
||||
const name = 'unit'
|
||||
|
||||
export function getList(params: any = null) {
|
||||
let url = path
|
||||
if (params?.unitCode) {
|
||||
url += `/${params.unitCode}`
|
||||
delete params.unitCode
|
||||
}
|
||||
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?.faskes || []
|
||||
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.kode} - ${item.nama}`,
|
||||
}))
|
||||
}
|
||||
return data
|
||||
}
|
||||
Reference in New Issue
Block a user