feat: add diagnosis name handling and update SEP title in integration pages

This commit is contained in:
riefive
2025-12-01 14:53:09 +07:00
parent 8a954a8c00
commit 4dc7aa2fe9
4 changed files with 18 additions and 6 deletions
+4 -3
View File
@@ -104,6 +104,7 @@ const titleLetterDate = computed(() =>
) )
const mode = props.mode !== undefined ? props.mode : 'add' const mode = props.mode !== undefined ? props.mode : 'add'
const attendingDoctorName = ref('') const attendingDoctorName = ref('')
const diagnosisName = ref('')
const isAccidentally = computed(() => accident.value === '1' || accident.value === '2') const isAccidentally = computed(() => accident.value === '1' || accident.value === '2')
const isProvinceSelected = computed(() => accidentProvince.value !== '') const isProvinceSelected = computed(() => accidentProvince.value !== '')
const isCitySelected = computed(() => accidentCity.value !== '') const isCitySelected = computed(() => accidentCity.value !== '')
@@ -157,8 +158,8 @@ const onInitialized = (objects: any) => {
if (objects?.sepType === 'external') { if (objects?.sepType === 'external') {
admissionType.value = '1' admissionType.value = '1'
} }
if (objects?.initialDiagnosis) { if (objects?.diagnosisName) {
initialDiagnosis.value = objects?.initialDiagnosis diagnosisName.value = objects?.diagnosisName
} }
// Patient data // Patient data
if (objects?.serviceType) { if (objects?.serviceType) {
@@ -655,7 +656,7 @@ onMounted(() => {
/> />
<Input <Input
v-else v-else
v-model="initialDiagnosis" v-model="diagnosisName"
v-bind="initialDiagnosisAttrs" v-bind="initialDiagnosisAttrs"
:disabled="isLoading || isReadonly" :disabled="isLoading || isReadonly"
/> />
@@ -47,7 +47,7 @@ export function useIntegrationSepDetail() {
memberBirthDate: response.peserta?.tglLahir || '-', memberBirthDate: response.peserta?.tglLahir || '-',
memberType: response.peserta?.jnsPeserta || '-', memberType: response.peserta?.jnsPeserta || '-',
referralLetterNumber: response.noRujukan || '-', referralLetterNumber: response.noRujukan || '-',
initialDiagnosis: response.diagnosa || '-', diagnosisName: response.diagnosa || '-',
attendingDoctor: response.dpjp?.kdDPJP || '-', attendingDoctor: response.dpjp?.kdDPJP || '-',
attendingDoctorName: response.dpjp?.nmDPJP || '-', attendingDoctorName: response.dpjp?.nmDPJP || '-',
polyName: response.poli || '-', polyName: response.poli || '-',
@@ -5,7 +5,7 @@ import Content from '~/components/content/sep/list.vue'
definePageMeta({ definePageMeta({
middleware: ['rbac'], middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'], roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Daftar User', title: 'Daftar SEP',
contentFrame: 'cf-full-width', contentFrame: 'cf-full-width',
}) })
+12 -1
View File
@@ -12,7 +12,18 @@ const name = 'sep'
const destinationClinic = '1323R001' const destinationClinic = '1323R001'
export function create(data: any) { export function create(data: any) {
return base.create(path, data, name) const isNew = true
let url = !isNew ? pathOld : path
let payload: any = data
if (isNew && data?.encounterId) {
payload = {
encounter_id: data.encounterId || null,
requestPayload: data?.request ? JSON.stringify({ request: data.request }) : null,
}
} else {
url = pathOld
}
return base.create(url, payload, name)
} }
export function getList(params: any = null) { export function getList(params: any = null) {