feat: enhance SEP entry and detail handling with new link mode and save functionality
This commit is contained in:
No files matched your search
@@ -39,67 +39,55 @@ export function useIntegrationSepDetail() {
|
||||
if (result.success && result.body?.response) {
|
||||
const response = result.body.response
|
||||
sepData.value = response
|
||||
|
||||
// Map response to form objects
|
||||
// patientName.value = objects?.patientName || ''
|
||||
// nationalIdentity.value = objects?.nationalIdentity || ''
|
||||
// medicalRecordNumber.value = objects?.medicalRecordNumber || ''
|
||||
// doctorId.value = objects?.doctorId || ''
|
||||
// subSpecialistId.value = objects?.subSpecialistId || ''
|
||||
// registerDate.value = objects?.registerDate || ''
|
||||
// paymentType.value = objects?.paymentType || ''
|
||||
// patientCategory.value = objects?.patientCategory || ''
|
||||
// cardNumber.value = objects?.cardNumber || ''
|
||||
// sepType.value = objects?.sepType || ''
|
||||
// sepNumber.value = objects?.sepNumber || ''
|
||||
// sepReference.value = objects?.sepReference || ''
|
||||
// sepControlDate.value = objects?.sepControlDate || ''
|
||||
// sepTrafficStatus.value = objects?.sepTrafficStatus || ''
|
||||
// diagnosis.value = objects?.diagnosis || ''
|
||||
|
||||
// if (Object.keys(response).length > 0) {
|
||||
// formObjects.value.patientName = response.peserta?.nama || '-'
|
||||
// formObjects.value.medicalRecordNumber = response.peserta?.noMr || '-'
|
||||
// formObjects.value.cardNumber = response.peserta?.noKartu || '-'
|
||||
// formObjects.value.registerDate = response.tglSep || null
|
||||
// formObjects.value.sepReference = response.noSep || '-'
|
||||
// formObjects.value.sepControlDate = response.tglSep || null
|
||||
// formObjects.value.sepTrafficStatus = response.nmstatusKecelakaan || '-'
|
||||
// formObjects.value.diagnosis = response.diagnosa || '-'
|
||||
// vclaimReference.value = {
|
||||
// noSep: response.noSep || sepNumberValue.trim(),
|
||||
// tglRujukan: response.tglSep ? new Date(response.tglSep).toISOString() : null,
|
||||
// ppkDirujuk: response.noRujukan || 'rssa',
|
||||
// jnsPelayanan:
|
||||
// response.jnsPelayanan === 'Rawat Jalan' ? '2' : response.jnsPelayanan === 'Rawat Inap' ? '1' : null,
|
||||
// catatan: response.catatan || '',
|
||||
// diagRujukan: response.diagnosa || '',
|
||||
// tipeRujukan: response.tujuanKunj?.kode ?? '0',
|
||||
// poliRujukan: response.poli || '',
|
||||
// user: userStore.user?.user_name || '',
|
||||
// }
|
||||
// }
|
||||
|
||||
valueObjects.value = {
|
||||
noSep: response.noSep || noSep.value,
|
||||
tglRujukan: response.tglSep ? new Date(response.tglSep).toISOString().split('T')[0] : '',
|
||||
ppkDirujuk: response.noRujukan || '',
|
||||
jnsPelayanan: mapServiceCodeToLabel(response.jnsPelayanan),
|
||||
catatan: response.catatan || '',
|
||||
diagRujukan: response.diagnosa || '',
|
||||
tipeRujukan: response.tujuanKunj?.kode ?? '0',
|
||||
poliRujukan: response.poli || '',
|
||||
user: response.dpjp?.kdDPJP || response.dpjp?.nmDPJP || '',
|
||||
// Additional fields dari response
|
||||
patientName: response.peserta?.nama || '-',
|
||||
medicalRecordNumber: response.peserta?.noMr || '-',
|
||||
sepNumber: response.noSep || noSep.value,
|
||||
eSep: response.eSEP === 'True' ? 'yes' : 'no',
|
||||
serviceType: response.jnsPelayanan === 'Rawat Jalan' ? '2' : response.jnsPelayanan === 'Rawat Inap' ? '1' : null,
|
||||
sepDate: response.tglSep ? new Date(response.tglSep).toISOString().split('T')[0] : '',
|
||||
cardNumber: response.peserta?.noKartu || '-',
|
||||
diagnosis: response.diagnosa || '-',
|
||||
sepReference: response.noSep || '-',
|
||||
sepControlDate: response.tglSep || null,
|
||||
sepTrafficStatus: response.nmstatusKecelakaan || '-',
|
||||
kelasRawat: response.kelasRawat || '-',
|
||||
referralNumber: response.noRujukan || '-',
|
||||
patientName: response.peserta?.nama || '-',
|
||||
phoneNumber: response.peserta?.noTelp || '-',
|
||||
medicalRecordNumber: response.peserta?.noMr || '-',
|
||||
memberInsurance: response.peserta?.asuransi || '-',
|
||||
memberClass: response.peserta?.hakKelas || '-',
|
||||
memberGender: response.peserta?.kelamin || '-',
|
||||
memberBirthDate: response.peserta?.tglLahir || '-',
|
||||
memberType: response.peserta?.jnsPeserta || '-',
|
||||
referralLetterNumber: response.noRujukan || '-',
|
||||
initialDiagnosis: response.diagnosa || '-',
|
||||
attendingDoctor: response.dpjp?.kdDPJP || '-',
|
||||
attendingDoctorName: response.dpjp?.nmDPJP || '-',
|
||||
polyName: response.poli || '-',
|
||||
cob: response.cob === '1' ? 'yes' : 'no',
|
||||
cataract: response.katarak === '1' ? 'yes' : 'no',
|
||||
clinicExcecutive: response.poliEksekutif === '1' ? 'yes' : 'no',
|
||||
procedureType: response.flagProcedure?.kode || '-',
|
||||
procedureTypeName: response.flagProcedure?.nama || '-',
|
||||
supportCode: response.kdPenunjang?.kode || '-',
|
||||
supportCodeName: response.kdPenunjang?.nama || '-',
|
||||
note: response.catatan || response.informasi || '-',
|
||||
classLevel: response.kelasRawat || '-',
|
||||
classLevelUpgrade: response.klsRawat?.klsRawatNaik || '-',
|
||||
classPaySource: response.klsRawat?.pembiayaan || '-',
|
||||
responsiblePerson: response.klsRawat?.penanggungJawab || response.penjamin || '-',
|
||||
purposeOfVisit: response.tujuanKunj?.kode || '-',
|
||||
purposeOfVisitName: response.tujuanKunj?.nama || '-',
|
||||
serviceAssessment: response.assestmenPel?.kode || '-',
|
||||
serviceAssessmentName: response.assestmenPel?.nama || '-',
|
||||
trafficAccident: response.nmstatusKecelakaan || '',
|
||||
trafficAccidentCode: response.kdStatusKecelakaan || '',
|
||||
lpNumber: response.kontrol?.noSurat || '-',
|
||||
accidentDate: response.lokasiKejadian?.tglKejadian || '-',
|
||||
accidentNote: response.lokasiKejadian?.ketKejadian || '-',
|
||||
accidentProvince: response.lokasiKejadian?.kdProp || '-',
|
||||
accidentCity: response.lokasiKejadian?.kdKab || '-',
|
||||
accidentDistrict: response.lokasiKejadian?.kdKec || '-',
|
||||
accidentLocation: response.lokasiKejadian?.lokasi || '-',
|
||||
suplesi: response.jnsPelayanan === 'Rawat Jalan' ? 'yes' : 'no',
|
||||
suplesiNumber: response.jnsPelayanan === 'Rawat Jalan' ? response.noRujukan || '-' : '-',
|
||||
controlLetterNumber: response.kontrol?.noSurat || '-',
|
||||
controlLetterDoctor: response.kontrol?.kdDokter || '-',
|
||||
controlLetterDoctorName: response.kontrol?.nmDokter || '-',
|
||||
}
|
||||
} else {
|
||||
toast({
|
||||
|
||||
@@ -442,6 +442,9 @@ export function useIntegrationSepEntry() {
|
||||
if (menu === 'back') {
|
||||
navigateTo('/integration/bpjs-vclaim/sep')
|
||||
}
|
||||
if (menu === 'save-sep-number') {
|
||||
navigateTo({ path: resourcePath.value, query: { 'sep-number': value.sepNumber || '' } })
|
||||
}
|
||||
if (menu === 'save-sep') {
|
||||
isSaveLoading.value = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user