CtrlK
BlogDocsLog inGet started
Tessl Logo

lab-result-interpretation

Transforms biochemical lab test results into clear, patient-friendly explanations. Covers blood routine, lipid panel, liver/kidney function, thyroid, electrolytes, and inflammation markers. Flags critical values, classifies severity, and generates structured interpretation rep...

56

Quality

64%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./scientific-skills/Other/lab-result-interpretation/SKILL.md
SKILL.md
Quality
Evals
Security

Source: https://github.com/aipoch/medical-research-skills

Lab Result Interpretation Skill

A medical assistant tool that transforms complex biochemical laboratory test results into clear, patient-friendly explanations.

Quick Check

Use this command to verify that the packaged script entry point can be parsed before deeper execution.

python -m py_compile scripts/main.py

Audit-Ready Commands

Use these concrete commands for validation. They are intentionally self-contained and avoid placeholder paths.

python -m py_compile scripts/main.py
python scripts/main.py --help

When to Use

  • Interpreting biochemical laboratory test results for patients
  • Generating patient-friendly explanations of abnormal lab values
  • Flagging critical values requiring immediate medical attention
  • Creating structured lab result summary reports

Workflow

  1. Parse lab report — Input: lab result text or file (--file/--input) → extract test names, values, units, reference ranges using regex patterns → Output: structured test data array
  2. Compare to reference ranges — Match each test against references/lab_reference_ranges.json → determine status (normal/high/low) → Output: status classification per test
  3. Assess severity — Classify: mild (slightly outside range), moderate (clinically significant deviation), critical (requires immediate attention) → Output: severity rating per abnormal value
  4. Generate explanations — For each abnormal value: explain what the test measures, what the deviation means, contextual health information → ⛔ Checkpoint: Flag critical values to user with "Seek immediate medical attention" warning before continuing → Output: patient-friendly explanation per test
  5. Format output — Combine all results into structured JSON with test_name, value, status, explanation, severity, recommendation → include medical disclaimer → Output: final interpretation report

Features

  • Parses various lab test formats (numeric values, units, reference ranges)
  • Compares values against standard reference ranges
  • Generates patient-friendly explanations in Chinese
  • Flags abnormal values with severity indicators
  • Provides contextual health recommendations

Supported Test Types

CategoryTests
Blood RoutineWBC, RBC, Hemoglobin, Platelets, Hematocrit
Lipid PanelTotal Cholesterol, LDL, HDL, Triglycerides
Liver FunctionALT, AST, ALP, GGT, Bilirubin, Total Protein, Albumin
Kidney FunctionCreatinine, BUN, eGFR, Uric Acid
Blood SugarFasting Glucose, HbA1c
ThyroidTSH, T3, T4, FT3, FT4
ElectrolytesSodium, Potassium, Chloride, Calcium, Magnesium
InflammationCRP, ESR

Usage

As Module

from scripts.main import LabResultInterpreter

interpreter = LabResultInterpreter()
result = interpreter.interpret("Total Cholesterol: 5.8 mmol/L (Reference: 3.1-5.7)")
print(result.explanation)

CLI

python scripts/main.py --file lab_report.txt
python scripts/main.py --interactive

Parameters

NameTypeDefaultRequiredDescription
filestring""NoPath to lab report file to process
interactivebooleanfalseNoEnable interactive mode for manual input
inputstring""NoDirect lab test input string for interpretation

Input Format

Accepts flexible formats:

Test Name: Value Unit (Reference: Min-Max)
Test Name Value Unit Ref: Min-Max
Test Name: Value (Min-Max)

Output Format

{
  "test_name": "Total Cholesterol",
  "value": 5.8,
  "unit": "mmol/L",
  "reference_min": 3.1,
  "reference_max": 5.7,
  "status": "high",
  "explanation": "Your total cholesterol is slightly above the normal range...",
  "severity": "mild",
  "recommendation": "Consider reducing saturated fat intake..."
}

Technical Details

Difficulty: Medium

Key Components:

  • Lab value parsing with regex patterns
  • Reference range comparison logic
  • Medical knowledge base (references/lab_reference_ranges.json)
  • Patient-friendly explanation templates

Safety:

  • Includes medical disclaimer in all outputs
  • Flags values requiring immediate medical attention
  • Does not diagnose - only explains test meanings

References

  • references/lab_reference_ranges.json - Standard reference ranges
  • references/explanation_templates.json - Patient-friendly templates
  • references/test_metadata.json - Test descriptions and clinical notes

Medical Disclaimer

This tool provides educational information only and is not a substitute for professional medical advice, diagnosis, or treatment. Always consult with a qualified healthcare provider for interpretation of lab results.

Risk Assessment

Risk IndicatorAssessmentLevel
Code ExecutionPython/R scripts executed locallyMedium
Network AccessNo external API callsLow
File System AccessRead input files, write output filesMedium
Instruction TamperingStandard prompt guidelinesLow
Data ExposureOutput files saved to workspaceLow

Security Checklist

  • No hardcoded credentials or API keys
  • No unauthorized file system access (../)
  • Output does not expose sensitive information
  • Prompt injection protections in place
  • Input file paths validated (no ../ traversal)
  • Output directory restricted to workspace
  • Script execution in sandboxed environment
  • Error messages sanitized (no stack traces exposed)
  • Dependencies audited

Prerequisites

# Python dependencies
pip install -r requirements.txt

Evaluation Criteria

Success Metrics

  • Successfully executes main functionality
  • Output meets quality standards
  • Handles edge cases gracefully
  • Performance is acceptable

Test Cases

  1. Basic Functionality: Standard input → Expected output
  2. Edge Case: Invalid input → Graceful error handling
  3. Performance: Large dataset → Acceptable processing time

Lifecycle Status

  • Current Stage: Draft
  • Next Review Date: 2026-03-06
  • Known Issues: None
  • Planned Improvements:
    • Performance optimization
    • Additional feature support

Output Requirements

Every final response should make these items explicit when they are relevant:

  • Objective or requested deliverable
  • Inputs used and assumptions introduced
  • Workflow or decision path
  • Core result, recommendation, or artifact
  • Constraints, risks, caveats, or validation needs
  • Unresolved items and next-step checks

Error Handling

  • If required inputs are missing, state exactly which fields are missing and request only the minimum additional information.
  • If the task goes outside the documented scope, stop instead of guessing or silently widening the assignment.
  • If scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.
  • Do not fabricate files, citations, data, search results, or execution outcomes.

Input Validation

This skill accepts requests that match the documented purpose of lab-result-interpretation and include enough context to complete the workflow safely.

Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:

lab-result-interpretation only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.

Response Template

Use the following fixed structure for non-trivial requests:

  1. Objective
  2. Inputs Received
  3. Assumptions
  4. Workflow
  5. Deliverable
  6. Risks and Limits
  7. Next Checks

If the request is simple, you may compress the structure, but still keep assumptions and limits explicit when they affect correctness.

Repository
aipoch/medical-research-skills
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.