Code RoomClinical dosing logic safety
HardPrep Room Coding #4171

Clinical dosing logic safety

Vibe & agenticAlgorithms & data structuresSenior–Staff~22 min

You're building a clinical-decision-support feature: given a patient's labs, suggest a medication dosage range. An AI agent writes the Python dosing logic and it looks clean and well-tested. A PM wants to ship it on the strength of the green test suite and the agent's confident explanation. As the engineer accountable for this code path, what's your position on shipping, and what would you require?

Implement
screen_dose_suggestions(case_ids: list[str], suggested_mg: list[float], reference_low_mg: list[float], reference_high_mg: list[float], clinician_signed_off: list[bool]) → list[str]
Examples
in[["case-1","case-2"],[250,900],[125,250],[500,500],[true,true]]out["case-1|release","case-2|hold:out_of_range"]
in[["case-3"],[300],[125],[500],[false]]out["case-3|hold:no_clinician_signoff"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 22 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.