feat/role-check: updat flow for input encounter
This commit is contained in:
@@ -65,3 +65,16 @@ export async function checkIn(id: number, data: CheckInFormData) {
|
||||
throw new Error(`Failed to put ${name}`)
|
||||
}
|
||||
}
|
||||
|
||||
export async function createWithPatient(data: any) {
|
||||
try {
|
||||
const resp = await xfetch(path + '/create-with-patient', 'POST', data)
|
||||
const result: any = {}
|
||||
result.success = resp.success
|
||||
result.body = (resp.body as Record<string, any>) || {}
|
||||
return result
|
||||
} catch (error) {
|
||||
console.error(`Error putting ${name}:`, error)
|
||||
throw new Error(`Failed to put ${name}`)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user