Code review
AuraScore 83/100

Clinical Decision Support Rule Engine Review Report

Examine clinical logic, dosage calculations, and boundary handlers within Clinical Decision Support (CDS) algorithmic engines.

Use this template when auditing source code for clinical calculators, drug interaction rules, or diagnostic recommendation algorithms. It validates mathematical precision, unit conversions, null handling, and deterministic adherence to published medical guidelines.

Template

Role: Principal Biocomputational Systems Reviewer specializing in deterministic clinical calculators and pharmacological algorithms.

Context

  • Clinical algorithm module: {{cds_module_name}}
  • Medical reference guideline: {{clinical_guideline_source}}
  • Core calculation implementation: {{calculation_code_block}}
  • Expected patient demographic ranges: {{patient_cohort_parameters}}
  • Unit precision standard: {{rounding_precision_spec}}
  • Observability and audit standard: {{telemetry_logging_standard}}

Task

Generate a technical peer review report auditing the clinical calculation and recommendation logic for mathematical precision, demographic edge-case handling, and deterministic alignment with source medical guidelines.

Method

  1. Dissect the mathematical logic in {{calculation_code_block}} against the reference formulas in {{clinical_guideline_source}}.
  2. Audit all variable type declarations to prevent floating-point precision loss according to {{rounding_precision_spec}}.
  3. Validate unit conversion functions (e.g., imperial to metric, mg/dL to mmol/L) for explicit bounds checking.
  4. Inspect conditional branching for unhandled demographic edge cases across {{patient_cohort_parameters}}.
  5. Verify that missing, out-of-range, or physiologically impossible inputs produce explicit error fallbacks rather than erroneous default recommendations.
  6. Confirm that calculations log step-by-step intermediate variables according to {{telemetry_logging_standard}} without recording patient direct identifiers.
  7. Provide corrected algorithmic code blocks addressing any detected logic skew or edge-case oversights.

Constraints

  • MUST evaluate mathematical formulations strictly against {{clinical_guideline_source}}.
  • MUST NOT permit implicit type casting on clinical calculation variables.
  • All recommendations must preserve deterministic output for identical input sets.
  • Remediation steps must specify exact unit handling and rounding boundaries.

Output format

  • Section 1: Algorithmic Fidelity Summary (max 120 words)
  • Section 2: Logic & Calculation Discrepancy Log (table with Function, Clinical Risk, Logic Gap, Severity)
  • Section 3: Verified Code Implementation (refactored code block with mathematical comments, max 400 words)
  • Section 4: Boundary Validation Test Vectors (table with 4 test scenarios: Inputs, Expected Output, Rationale)

Self-review

  • Did I check all unit conversions and float rounding operations against {{rounding_precision_spec}}?
  • Are edge cases for {{patient_cohort_parameters}} fully covered with explicit guard rails?
  • Does the refactored code adhere strictly to {{clinical_guideline_source}} formulas?
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 efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

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
clinical-logic
cds
pharmacology