Cookbook: voice-driven discharge summary
Junior doctor talks through the discharge; OHM produces the FHIR-shaped summary.
Discharge documentation is one of the most time-consuming parts of an inpatient stay. With OHM Studio, the on-duty resident can dictate a 2-minute summary at the bedside and get back a structured discharge note ready to print, share with the family, and post into the hospital EMR.
Studio side
- + New API → Clone Discharge Summary
- Keep the default sections (admission, hospital course, diagnoses, discharge meds, follow-up, instructions).
- Tighten the system prompt:
Focus on the events of THIS admission only. Skip prior history unless it directly relates to discharge planning. List discharge medications by exact dose and duration; never abbreviate to "as needed" without a reason.
- Add an input under Inputs tab:
dischargeDate: stringso callers can pin the exact date in the output. - Publish as
discharge.
Mobile build (Expo)
import { Audio } from "expo-av";
import {
ExpoRecorder,
OHM,
} from "@ohm_studio/sdk-react-native";
const ohm = new OHM({ apiKey: TEST_KEY, acknowledgeBundledKey: true });
const recorder = new ExpoRecorder(Audio);
export async function recordDischarge(dischargeDate: string) {
await recorder.start();
// …UI shows "Recording…"; user taps Stop…
const file = await recorder.stop();
const { transcript, data } = await ohm.audio.extract({
apiSlug: "discharge",
file,
inputs: { dischargeDate },
});
return { transcript, summary: data };
}For production, route through your backend so the live key stays server-side:
import { OHM } from "@ohm_studio/sdk";
const ohm = new OHM({ apiKey: process.env.OHM_API_KEY! });
app.post("/discharge", upload.single("audio"), async (req, res) => {
const { dischargeDate } = req.body;
const result = await ohm.audio.extract({
apiSlug: "discharge",
file: req.file!.buffer,
inputs: { dischargeDate },
});
res.json(result);
});Output shape
{
"transcript": "Patient is a 58-year-old male admitted on May 4 for acute...",
"data": {
"admissionDate": "2026-05-04",
"dischargeDate": "2026-05-09",
"principalDiagnosis": {
"name": "Acute pyelonephritis",
"system": "icd10",
"code": "N10",
"status": "active"
},
"secondaryDiagnoses": [
{ "name": "Type 2 diabetes mellitus", "code": "E11.9", "status": "active" }
],
"hospitalCourse": "- Admitted with high-grade fever and right flank pain...",
"dischargeMedications": [
{
"name": "Cefixime",
"dosage": "200 mg",
"frequency": "BD",
"route": "Oral",
"duration": "10 days",
"instructions": "Complete full course"
}
],
"advice": "- Plenty of oral fluids\n- Re-check urine culture in 2 weeks",
"followUp": "OPD in 2 weeks for urine culture review."
}
}Production tips
- Set
retainPayloads: trueon this API in Settings — discharge summaries are medico-legal documents; you'll want the full input/output in the audit log. - Print template — the structured shape above maps to a printable card with one mustache pass; no LLM step in the print path.
- Append to EMR —
principalDiagnosis.codeslots into FHIRCondition.code.coding; medications map toMedicationRequest.
Doctor sign-off is non-negotiable
The output is a draft — it's a starting point that saves typing, not a final medical document. The on-duty doctor must review and sign the rendered card before it leaves the hospital.