Clinical data review

From tinh2/skills-hub-registry · View interactive version

Clinical data review is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Review clinical data models and APIs for HL7 FHIR conformance, terminology standards, interoperability, and clinical workflow correctness. Triggers: 'check FHIR compliance', 'review clinical data model', 'audit HL7 conformance', 'validate medical terminology codes'.

How to use this skill

Skill file

You are in AUTONOMOUS MODE. Do NOT ask questions. Review the entire codebase's clinical data layer systematically.

INPUT

$ARGUMENTS (optional). If no arguments provided, review all data models, schemas, and APIs in the current working directory for clinical data standards compliance. If a specific standard is named (e.g., "FHIR only", "terminology"), focus on that area.


PHASE 0: CLINICAL SYSTEM DETECTION

Auto-detect the project stack and clinical context:

  1. Detect tech stack (package.json, requirements.txt, pom.xml, go.mod, *.csproj, etc.).
  2. Identify clinical libraries and dependencies:
  1. Identify database and ORM (Prisma, TypeORM, SQLAlchemy, Hibernate, EF Core).
  2. Locate data model definitions:

PHASE 1: FHIR CONFORMANCE REVIEW

Evaluate data models against FHIR R4 resource definitions.

1.1 Resource Modeling

Map project data models to FHIR resources:

For each mapped resource, check:

1.2 Search Parameters

1.3 Capability Statement

1.4 Bundle Support


PHASE 2: TERMINOLOGY AND CODING STANDARDS

2.1 ICD-10 (Diagnoses)

2.2 CPT / HCPCS (Procedures and Services)

2.3 SNOMED CT (Clinical Terms)

2.4 LOINC (Lab and Observations)

2.5 RxNorm (Medications)

2.6 Terminology Service


PHASE 3: INTEROPERABILITY ASSESSMENT

3.1 CDA / CCDA Documents

3.2 Bulk Data Export

3.3 ADT Messaging

3.4 ORU / ORM Messaging

3.5 Direct Messaging


PHASE 4: CLINICAL WORKFLOW VALIDATION

4.1 Order Management

4.2 Results Management

4.3 Medication Management

4.4 Documentation

4.5 Data Quality


============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After producing output, validate data quality and completeness:

  1. Verify all output sections have substantive content (not just headers).
  2. Verify every finding references a specific file, code location, or data point.
  3. Verify recommendations are actionable and evidence-based.
  4. If the analysis consumed insufficient data (empty directories, missing configs),

note data gaps and attempt alternative discovery methods.

IF VALIDATION FAILS:

IF STILL INCOMPLETE after 2 iterations:

OUTPUT FORMAT

## Clinical Data Model Review

**Project:** [name]
**Stack:** [detected technologies]
**Clinical Domain:** [EHR/lab/pharmacy/imaging/billing/etc.]
**Date:** [date]

### Standards Conformance Summary

| Standard | Coverage | Conformance | Issues |
|---|---|---|---|
| FHIR R4 | [N resources mapped] | [FULL/PARTIAL/NONE] | N |
| ICD-10-CM/PCS | [usage found?] | [VALID/PARTIAL/NONE] | N |
| CPT/HCPCS | [usage found?] | [VALID/PARTIAL/NONE] | N |
| SNOMED CT | [usage found?] | [VALID/PARTIAL/NONE] | N |
| LOINC | [usage found?] | [VALID/PARTIAL/NONE] | N |
| RxNorm | [usage found?] | [VALID/PARTIAL/NONE] | N |
| CDA/CCDA | [support found?] | [CONFORMANT/PARTIAL/NONE] | N |
| HL7v2 | [usage found?] | [VALID/PARTIAL/NONE] | N |

### FHIR Resource Mapping

| Project Model | FHIR Resource | Required Elements | Missing Elements | Extensions |
|---|---|---|---|---|
| [model name] | Patient | [present] | [missing] | [non-standard fields] |

### Data Model Findings

| # | Severity | File | Model/Field | Standard | Issue | Fix |
|---|----------|------|-------------|----------|-------|-----|
| 1 | High | path/to/model.ts | Patient.identifier | FHIR R4 | Missing system URI on identifier | Add system field per FHIR Identifier datatype |

### Terminology Gaps

| Coded Field | Current Implementation | Required Standard | Gap |
|---|---|---|---|
| [diagnosis_code] | Free text string | ICD-10-CM CodeableConcept | No code validation, no system URI |

### Interoperability Readiness
- FHIR API: [Ready/Partial/Not implemented]
- Bulk Export: [Ready/Partial/Not implemented]
- CDA/CCDA: [Ready/Partial/Not implemented]
- HL7v2: [Ready/Partial/Not implemented]
- Patient matching: [algorithm used or none]

### Clinical Workflow Assessment
| Workflow | Status | Key Gaps |
|---|---|---|
| Order management | [Complete/Partial/Missing] | [gaps] |
| Results delivery | [Complete/Partial/Missing] | [gaps] |
| Medication mgmt | [Complete/Partial/Missing] | [gaps] |
| Documentation | [Complete/Partial/Missing] | [gaps] |

RULES


NEXT STEPS

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /clinical-data-review — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.