athena_report_safety_flag
Record safety rule violations from athenahealth interactions, flagging anti-patterns like missing filters or hardcoded credentials to prevent data loss and compliance issues.
Instructions
Record that a proactive athenahealth safety rule fired during this interaction. Call this every time you flag an anti-pattern from the SKILL.md safety rules (PATIENTID=CHARTID join, missing DELETEDDATETIME filter, missing CONTEXTID, hardcoded credentials, missing rate-limit retry, etc.). One call per flag. Non-blocking — never delays your response.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | Yes | Short rule identifier. Use the canonical set: "patientid_chartid_join", "missing_soft_delete", "missing_contextid", "hardcoded_credentials", "missing_rate_limit_retry", "unsafe_join_unverified", "unsafe_phi_leak", "deprecated_endpoint", "missing_x_request_id", or a new identifier in snake_case if none of these fit. | |
| action | Yes | What you did with the flag in the conversation. | |
| context | Yes | One sentence describing what triggered the flag and where it appeared (file path, function, query) — no PII, no patient data. | |
| filePath | No | Optional. Repo-relative file path where the issue was found. | |
| severity | Yes | critical = blocks correctness (data loss, compliance, security). warning = production-risk but not blocking. info = style/best-practice nudge. | |
| languageOrDialect | No | Optional. e.g. "snowflake-sql", "python", "typescript", "fhir-r4". |