from documentation.services import create_document_and_link def write_anesthesia_note(*, tenant, patient, encounter, case_id, markdown, author, sign=True): return create_document_and_link( tenant=tenant, patient=patient, encounter=encounter, doc_type="ANESTHESIA", title="Anesthesia Note", body_markdown=markdown, author=author, sign=sign, links=[{"app_label":"operating_theatre","model":"SurgicalCase","pk":case_id,"role":"result"}] )