fix: add constant and change some service of vclaim
This commit is contained in:
No files matched your search
@@ -9,8 +9,6 @@ import AppViewHistory from '~/components/app/sep/view-history.vue'
|
|||||||
import { toast } from '~/components/pub/ui/toast'
|
import { toast } from '~/components/pub/ui/toast'
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import type { PaginationMeta } from '~/components/pub/my-ui/pagination/pagination.type'
|
|
||||||
import type { PatientEntity } from '~/models/patient'
|
|
||||||
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'
|
import type { SepVisitData } from '~/components/app/sep/list-cfg.visit'
|
||||||
|
|
||||||
@@ -325,6 +323,7 @@ async function handleInit() {
|
|||||||
})) as any
|
})) as any
|
||||||
if (route.query) {
|
if (route.query) {
|
||||||
// resource=encounter®ister-date=2025-10-23&payment-type=bpjs&bpjs-number=121212121222&sep-type=ri
|
// resource=encounter®ister-date=2025-10-23&payment-type=bpjs&bpjs-number=121212121222&sep-type=ri
|
||||||
|
// resource=encounter&is-service=false&patient-name=Slathem&national-identity=5617213001231231&medical-record-number=0000000018
|
||||||
const queries = route.query as any
|
const queries = route.query as any
|
||||||
isServiceHidden.value = queries['is-service'] === 'true'
|
isServiceHidden.value = queries['is-service'] === 'true'
|
||||||
selectedObjects.value = {}
|
selectedObjects.value = {}
|
||||||
@@ -333,13 +332,28 @@ async function handleInit() {
|
|||||||
if (queries['sep-number']) selectedObjects.value['sepNumber'] = queries['sep-number']
|
if (queries['sep-number']) selectedObjects.value['sepNumber'] = queries['sep-number']
|
||||||
if (queries['register-date']) selectedObjects.value['registerDate'] = queries['register-date']
|
if (queries['register-date']) selectedObjects.value['registerDate'] = queries['register-date']
|
||||||
if (queries['doctor-id']) selectedObjects.value['doctorId'] = queries['doctor-id']
|
if (queries['doctor-id']) selectedObjects.value['doctorId'] = queries['doctor-id']
|
||||||
if (queries['patient_name']) selectedObjects.value['patientName'] = queries['patient_name']
|
if (queries['patient-name']) selectedObjects.value['patientName'] = queries['patient-name']
|
||||||
if (queries['national_identity']) selectedObjects.value['nationalIdentity'] = queries['national_identity']
|
if (queries['national-identity']) selectedObjects.value['nationalIdentity'] = queries['national-identity']
|
||||||
if (queries['payment-type']) selectedObjects.value['paymentType'] = queries['payment-type']
|
if (queries['payment-type']) selectedObjects.value['paymentType'] = queries['payment-type']
|
||||||
if (queries['medical_record_number'])
|
if (queries['medical-record-number'])
|
||||||
selectedObjects.value['medicalRecordNumber'] = queries['medical_record_number']
|
selectedObjects.value['medicalRecordNumber'] = queries['medical-record-number']
|
||||||
if (queries['resource']) resourceType.value = queries['resource']
|
if (queries['resource']) resourceType.value = queries['resource']
|
||||||
delete selectedObjects.value['is-service']
|
delete selectedObjects.value['is-service']
|
||||||
|
// Load patient data if identifier is provided
|
||||||
|
if (queries['national-identity'] && queries['medical-record-number']) {
|
||||||
|
try {
|
||||||
|
await getPatientByIdentifierSearch(queries['national-identity'])
|
||||||
|
if (patients.value.length > 0) {
|
||||||
|
const foundPatient = patients.value[0]
|
||||||
|
if (foundPatient && foundPatient.id) {
|
||||||
|
selectedPatient.value = foundPatient.id
|
||||||
|
await getPatientCurrent(foundPatient.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Failed to load patient from query params:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,10 +96,10 @@ async function getPatientByIdentifierSearch(search: string) {
|
|||||||
if (result.type === 'resident-identity' && result.body.data) {
|
if (result.type === 'resident-identity' && result.body.data) {
|
||||||
patients.value = [mapPatientToRow(result.body.data)]
|
patients.value = [mapPatientToRow(result.body.data)]
|
||||||
} else if (result.type === 'identity') {
|
} else if (result.type === 'identity') {
|
||||||
patients.value = [mapPatientToRow(result.body.data)]
|
patients.value = Array.isArray(result.body.data) ? result.body.data.map(mapPatientToRow) : result.body.data ? [mapPatientToRow(result.body.data)] : []
|
||||||
} else {
|
} else {
|
||||||
const meta = result.body.meta
|
const meta = result.body.meta
|
||||||
patients.value = result.body.data.map(mapPatientToRow)
|
patients.value = Array.isArray(result.body.data) ? result.body.data.map(mapPatientToRow) : result.body.data ? [mapPatientToRow(result.body.data)] : []
|
||||||
paginationMeta.value = mapPaginationMetaToRow(meta)
|
paginationMeta.value = mapPaginationMetaToRow(meta)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ export const classLevelUpgrades: Record<string, string> = {
|
|||||||
'6': 'ICCU',
|
'6': 'ICCU',
|
||||||
'7': 'ICU',
|
'7': 'ICU',
|
||||||
'8': 'Diatas Kelas 1',
|
'8': 'Diatas Kelas 1',
|
||||||
};
|
}
|
||||||
|
|
||||||
export const classPaySources: Record<string, string> = {
|
export const classPaySources: Record<string, string> = {
|
||||||
'1': 'Pribadi',
|
'1': 'Pribadi',
|
||||||
'2': 'Pemberi Kerja',
|
'2': 'Pemberi Kerja',
|
||||||
'3': 'Asuransi Kesehatan Tambahan'
|
'3': 'Asuransi Kesehatan Tambahan',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const procedureTypes: Record<string, string> = {
|
export const procedureTypes: Record<string, string> = {
|
||||||
@@ -73,3 +73,15 @@ export const serviceAssessments: Record<string, string> = {
|
|||||||
'4': 'Atas Instruksi RS',
|
'4': 'Atas Instruksi RS',
|
||||||
'5': 'Tujuan Kontrol',
|
'5': 'Tujuan Kontrol',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const paymentTypes: Record<string, string> = {
|
||||||
|
jkn: 'JKN (Jaminan Kesehatan Nasional)',
|
||||||
|
jkmm: 'JKMM (Jaminan Kesehatan Mandiri)',
|
||||||
|
spm: 'SPM (Sistem Pembayaran Mandiri)',
|
||||||
|
pks: 'PKS (Pembiayaan Kesehatan Sosial)',
|
||||||
|
}
|
||||||
|
|
||||||
|
export const sepRefTypeCodes: Record<string, string> = {
|
||||||
|
internal: 'Rujukan Internal',
|
||||||
|
external: 'Faskes Lain',
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// Base
|
// Base
|
||||||
import * as base from './_crud-base'
|
import * as base from './_crud-base'
|
||||||
|
|
||||||
const path = '/api/vclaim/diagnosaprb'
|
const path = '/api/vclaim/v1/reference/diagnose-prb'
|
||||||
const name = 'diagnose-referral'
|
const name = 'diagnose-referral'
|
||||||
|
|
||||||
export function getList(params: any = null) {
|
export function getList(params: any = null) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Base
|
// Base
|
||||||
import * as base from './_crud-base'
|
import * as base from './_crud-base'
|
||||||
|
|
||||||
const path = '/api/vclaim/diagnosa'
|
const path = '/api/vclaim/v1/reference/diagnose'
|
||||||
const name = 'diagnose'
|
const name = 'diagnose'
|
||||||
|
|
||||||
export function getList(params: any = null) {
|
export function getList(params: any = null) {
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
// Base
|
// Base
|
||||||
import * as base from './_crud-base'
|
import * as base from './_crud-base'
|
||||||
|
|
||||||
const path = '/api/vclaim/referensi/faskes'
|
const path = '/api/vclaim/v1/reference/healthcare'
|
||||||
const name = 'faskes'
|
const name = 'healthcare'
|
||||||
|
|
||||||
export function getList(params: any = null) {
|
export function getList(params: any = null) {
|
||||||
return base.getList(path, params, name)
|
return base.getList(path, params, name)
|
||||||
@@ -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,7 +1,7 @@
|
|||||||
// Base
|
// Base
|
||||||
import * as base from './_crud-base'
|
import * as base from './_crud-base'
|
||||||
|
|
||||||
const path = '/api/vclaim/cities'
|
const path = '/api/vclaim/v1/reference/regency'
|
||||||
const name = 'cities'
|
const name = 'cities'
|
||||||
|
|
||||||
export function getList(params: any = null) {
|
export function getList(params: any = null) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Base
|
// Base
|
||||||
import * as base from './_crud-base'
|
import * as base from './_crud-base'
|
||||||
|
|
||||||
const path = '/api/vclaim/districts'
|
const path = '/api/vclaim/v1/reference/district'
|
||||||
const name = 'districts'
|
const name = 'districts'
|
||||||
|
|
||||||
export function getList(params: any = null) {
|
export function getList(params: any = null) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Base
|
// Base
|
||||||
import * as base from './_crud-base'
|
import * as base from './_crud-base'
|
||||||
|
|
||||||
const path = '/api/vclaim/provinces'
|
const path = '/api/vclaim/v1/reference/province'
|
||||||
const name = 'provinces'
|
const name = 'provinces'
|
||||||
|
|
||||||
export function getList(params: any = null) {
|
export function getList(params: any = null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user