Spaces:
Sleeping
Sleeping
Download app/api/routers/documentation.py from build-small-hackathon/CliniqAl: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/spaces/build-small-hackathon/CliniqAl/resolve/main/app/api/routers/documentation.py
- Command line
-
hf download hf://spaces/build-small-hackathon/CliniqAl/app/api/routers/documentation.py
-
curl -L -o documentation.py https://huggingface.co/spaces/build-small-hackathon/CliniqAl/resolve/main/app/api/routers/documentation.py
1.14 kB
| """Documentation router — OWNER: Person A. | |
| Wires Whisper + Documentation Agent to HTTP. Until A's real agent lands, | |
| endpoints return the mock so the UI can render against realistic data. | |
| """ | |
| from __future__ import annotations | |
| from fastapi import APIRouter | |
| from app.agents.documentation.mocks import fake_soap_draft | |
| from app.contracts import SOAPNoteDraft | |
| router = APIRouter() | |
| def draft(payload: dict) -> SOAPNoteDraft: | |
| """Generate a SOAP note draft from audio or transcript. | |
| TODO(Person A): replace mock with `app.agents.documentation.api.draft_soap(...)`. | |
| Expected payload: { patient_id: str, audio_b64?: str, transcript?: str }. | |
| """ | |
| patient_id = payload.get("patient_id", "p-001") | |
| return fake_soap_draft(patient_id=patient_id) | |
| def approve(payload: dict) -> SOAPNoteDraft: | |
| """Approve (or edit-and-approve) a SOAP draft. Writes to wiki + DB. | |
| TODO(Person A): persist to soap_drafts + update patient wiki page. | |
| """ | |
| return fake_soap_draft(patient_id=payload.get("patient_id", "p-001")) | |