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
+12 -1
View File
@@ -12,7 +12,18 @@ const name = 'sep'
const destinationClinic = '1323R001'
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) {