Skip to main content

care-sql-code-review

Review raw SQL for the CARE analytics repo (care_analytics_sql) — hand-written Postgres queries that power Metabase dashboards and run directly against the CARE database's physical tables (emr_*, users_user). Use this whenever reviewing, writing, or debugging an analytics SQL query or its diff: new report queries, changes to existing ones, reported wrong numbers, or slow dashboards. It checks correctness (status-based record validity — excluding entered_in_error and terminal statuses — join fan-out inflating money totals, tenant/facility scoping, NULL handling), performance (sargability, unindexed JSONB/array access), and maintainability (hardcoded magic IDs, parameter docs). CARE-specific: it knows the emr_* schema, which columns are indexed, and the traps created because raw SQL bypasses the Django ORM's automatic filtering — including that clinical records are invalidated by status (entered_in_error), not by the deleted flag. Prefer this over the generic sql-code-review skill for anything under care_analyt

跳到安装

来源信息

仓库
ohcnetwork/skills
最近来源活动
2026年7月3日 10:35
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。