fix: add constant and change some service of vclaim

This commit is contained in:
riefive
2025-10-27 13:41:09 +07:00
parent 26e9ea96ea
commit aa2a20a018
10 changed files with 65 additions and 17 deletions
@@ -1,7 +1,7 @@
// Base
import * as base from './_crud-base'
const path = '/api/vclaim/diagnosaprb'
const path = '/api/vclaim/v1/reference/diagnose-prb'
const name = 'diagnose-referral'
export function getList(params: any = null) {
+1 -1
View File
@@ -1,7 +1,7 @@
// Base
import * as base from './_crud-base'
const path = '/api/vclaim/diagnosa'
const path = '/api/vclaim/v1/reference/diagnose'
const name = 'diagnose'
export function getList(params: any = null) {
@@ -1,8 +1,8 @@
// Base
import * as base from './_crud-base'
const path = '/api/vclaim/referensi/faskes'
const name = 'faskes'
const path = '/api/vclaim/v1/reference/healthcare'
const name = 'healthcare'
export function getList(params: any = null) {
return base.getList(path, params, name)
+22
View File
@@ -0,0 +1,22 @@
// Base
import * as base from './_crud-base'
const path = '/api/vclaim/v1/reference/medicine'
const name = 'medicine'
export function getList(params: any = null) {
return base.getList(path, 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?.list || []
data = resultData.map((item: any) => ({
value: item.kode ? String(item.kode) : '',
label: item.nama,
}))
}
return data
}
+1 -1
View File
@@ -1,7 +1,7 @@
// Base
import * as base from './_crud-base'
const path = '/api/vclaim/cities'
const path = '/api/vclaim/v1/reference/regency'
const name = 'cities'
export function getList(params: any = null) {
@@ -1,7 +1,7 @@
// Base
import * as base from './_crud-base'
const path = '/api/vclaim/districts'
const path = '/api/vclaim/v1/reference/district'
const name = 'districts'
export function getList(params: any = null) {
@@ -1,7 +1,7 @@
// Base
import * as base from './_crud-base'
const path = '/api/vclaim/provinces'
const path = '/api/vclaim/v1/reference/province'
const name = 'provinces'
export function getList(params: any = null) {