fix: adjust payload sep
This commit is contained in:
No files matched your search
@@ -55,6 +55,7 @@ import {
|
||||
getPatientByIdentifierSearch,
|
||||
} from '~/handlers/patient.handler'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const route = useRoute()
|
||||
const openPatient = ref(false)
|
||||
const openLetter = ref(false)
|
||||
@@ -290,8 +291,13 @@ function mapLetterDataToForm(formValues: any): any {
|
||||
}
|
||||
|
||||
// response.rujukan.provPerujuk.kode → fromClinic (rujukan.ppkRujukan)
|
||||
if (info.ppkRujukan) {
|
||||
mappedValues.referralTo = info.ppkRujukan
|
||||
if (info.destination) {
|
||||
mappedValues.referralTo = info.destination
|
||||
}
|
||||
|
||||
// response.rujukan.poliRujukan.kode → polyCode
|
||||
if (info.poly) {
|
||||
mappedValues.polyCode = info.poly
|
||||
}
|
||||
|
||||
// response.asalFaskes → asalRujukan (1 = Faskes 1, 2 = Faskes RS)
|
||||
@@ -387,7 +393,7 @@ async function handleEvent(menu: string, value: any) {
|
||||
})
|
||||
if (resultControl && resultControl.success && resultControl.body) {
|
||||
const resultData = resultControl.body?.response?.list || []
|
||||
const resultUnique = [...new Map(resultData.map((item: any) => [item.kode, item])).values()]
|
||||
const resultUnique = [...new Map(resultData.map((item: any) => [item.kodeDokter, item])).values()]
|
||||
const controlLetters = resultUnique.map((item: any) => ({
|
||||
value: item.kodeDokter ? String(item.kodeDokter) : '',
|
||||
label: `${item.kodeDokter} - ${item.namaDokter} - ${item.jadwalPraktek} (${item.kapasitas})`,
|
||||
@@ -477,6 +483,8 @@ async function handleEvent(menu: string, value: any) {
|
||||
mappedValues.clinicExcecutive = 'no'
|
||||
}
|
||||
|
||||
mappedValues.userName = userStore.user?.user_name || ''
|
||||
|
||||
createSep(makeSepData(mappedValues))
|
||||
.then((res) => {
|
||||
const body = res?.body
|
||||
|
||||
Reference in New Issue
Block a user