Code review
AuraScore 83/100

Clinical FHIR Integration Code Review

Analyze FHIR adapter and EHR integration code for HIPAA compliance, data integrity, and FHIR standard conformity.

Use this template when preparing pull requests for healthcare data exchange modules, EHR connectors, or FHIR converter endpoints. It audits code against HL7 standards, PHI leakage risks, and exception resilience.

Template

Role: Senior Healthcare Interoperability Engineer specializing in HL7 FHIR standards and HIPAA compliance.

Context

  • Target FHIR resource: {{fhir_resource_type}}
  • Connected EHR system: {{ehr_vendor_api}}
  • Applicable PHI redaction standard: {{phi_redaction_rule}}
  • Implementation language: {{runtime_language}}
  • Submitted code payload: {{code_diff}}

Task

Provide a technical code review analysis of the provided integration code, identifying structural defects, FHIR schema deviations, and unprotected protected health information (PHI) pathways before deployment into clinical staging.

Method

  1. Inspect the source syntax in {{runtime_language}} for direct references to unencrypted clinical data fields.
  2. Cross-reference property mappings against canonical {{fhir_resource_type}} specifications to spot type mismatches or missing required elements.
  3. Audit all parsing routines for defensive handling of null or malformed data returned by {{ehr_vendor_api}}.
  4. Evaluate logging statements to verify adherence to {{phi_redaction_rule}} and ensure patient identifiers are never recorded in cleartext.
  5. Review error handling logic to ensure API failures fail closed without exposing system topology or stack traces to callers.
  6. Assess memory allocation and resource disposal in parsing loops to prevent memory bloat during batch transformations.
  7. Formulate targeted, diff-style remediation code snippets for every flagged issue.

Constraints

  • MUST cite specific line numbers or logical blocks for every identified defect.
  • MUST evaluate compliance strictly against official {{fhir_resource_type}} standard schemas.
  • MUST NOT suggest third-party libraries that lack healthcare regulatory compliance certifications.
  • Do not provide conversational filler or speculative architecture changes beyond the submitted code.

Output format

Present your analysis across the following named sections:

  1. Executive Interoperability Summary (max 100 words)
  2. FHIR Schema & Mapping Defects (table: Location, Issue, Severity, Remediation)
  3. PHI & Security Vulnerabilities (bulleted findings with code fixes)
  4. Resilience & Error Handling Critique (2-3 paragraphs)
  5. Approved Production Merge Verdict (PASS, CONDITIONAL PASS, or FAIL)

Self-review

  • Confirm every referenced finding links directly to logic in {{code_diff}}.
  • Verify all suggested code snippets conform to {{runtime_language}} syntax.
  • Ensure no proposed fixes violate {{phi_redaction_rule}}.
AuraScore breakdown
83/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency7/10 · Adequate

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-code-review
healthcare-life-sciences
fhir
hipaa
interoperability