adjust form submit,list, and detail
refactor(patient-preview): comment out unused occupation field in patient preview fix(handler): return success response from update operation in crud handler fix search patient add handle del search char for ease use
This commit is contained in:
@@ -13,6 +13,11 @@ export async function getPatients(params: any = null) {
|
||||
searchParams.append(key, params[key])
|
||||
}
|
||||
}
|
||||
if (params.search) {
|
||||
url += `/search/${params.search}`
|
||||
searchParams.delete('search')
|
||||
}
|
||||
|
||||
const queryString = searchParams.toString()
|
||||
if (queryString) url += `?${queryString}`
|
||||
}
|
||||
@@ -42,7 +47,8 @@ export async function getPatientDetail(id: number) {
|
||||
|
||||
export async function getPatientByIdentifier(search: string) {
|
||||
try {
|
||||
const urlPath = search.length === 16 ? `by-resident-identity/search=${encodeURIComponent(search)}` : `/search/${search}`
|
||||
const urlPath =
|
||||
search.length === 16 ? `by-resident-identity/search=${encodeURIComponent(search)}` : `/search/${search}`
|
||||
const url = `${mainUrl}/${urlPath}`
|
||||
const resp = await xfetch(url, 'GET')
|
||||
const result: any = {}
|
||||
|
||||
Reference in New Issue
Block a user