mirror of
https://github.com/temetro/temetro.git
synced 2026-08-27 19:06:52 +00:00
frontend: lab dashboard with add-result flow
New /lab department home: the lab's task queue (tasks assigned to the Lab department, with done toggle) and an "Add result" dialog — pick a patient, enter test/value/flag/date — that posts to the new labs append endpoint via appendLabs() in lib/patients.ts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -113,6 +113,22 @@ export async function updatePatient(patient: Patient): Promise<Patient> {
|
||||
);
|
||||
}
|
||||
|
||||
// Append lab results to a patient's record without touching the rest of it.
|
||||
// Backed by POST /api/patients/:fileNumber/labs (gated by `lab:write`, so lab
|
||||
// staff can submit analyses without patient-edit rights).
|
||||
export async function appendLabs(
|
||||
fileNumber: string,
|
||||
labs: Lab[],
|
||||
): Promise<Patient> {
|
||||
return apiFetch<Patient>(
|
||||
`/api/patients/${encodeURIComponent(fileNumber.trim())}/labs`,
|
||||
{
|
||||
method: "POST",
|
||||
body: JSON.stringify({ labs }),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// Reassign a patient to another clinician (sets their primary provider + PCP).
|
||||
export async function transferPatient(
|
||||
fileNumber: string,
|
||||
|
||||
Reference in New Issue
Block a user