feat/role-check: updat flow for input encounter

This commit is contained in:
2025-12-15 12:10:04 +07:00
parent 49ffad1dde
commit bd48cc5907
13 changed files with 1163 additions and 499 deletions
+13
View File
@@ -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}`)
}
}