Install
openclaw skills install lab-result-interpretationA medical assistant tool that transforms complex biochemical laboratory test results into clear, patient-friendly explanations with safety disclaimers and severity flags.
openclaw skills install lab-result-interpretationA medical assistant tool that transforms complex biochemical laboratory test results into clear, patient-friendly explanations.
python -m py_compile scripts/main.py
python scripts/main.py --help
python scripts/main.py --interactive
Critical values: When any value is in the critical range, output a Critical Findings Summary block at the top of the response before the per-test breakdown. Sort findings by severity (critical → high → normal). Include an explicit urgent care recommendation for critical values.
| Category | Tests |
|---|---|
| Blood Routine | WBC, RBC, Hemoglobin, Platelets, Hematocrit |
| Lipid Panel | Total Cholesterol, LDL, HDL, Triglycerides |
| Liver Function | ALT, AST, ALP, GGT, Bilirubin, Total Protein, Albumin |
| Kidney Function | Creatinine, BUN, eGFR, Uric Acid |
| Blood Sugar | Fasting Glucose, HbA1c |
| Thyroid | TSH, T3, T4, FT3, FT4 |
| Electrolytes | Sodium, Potassium, Chloride, Calcium, Magnesium |
| Inflammation | CRP, ESR |
from scripts.main import LabResultInterpreter
interpreter = LabResultInterpreter()
result = interpreter.interpret("Total Cholesterol: 5.8 mmol/L (Reference: 3.1-5.7)")
print(result.explanation)
python scripts/main.py --file lab_report.txt
python scripts/main.py --interactive
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| file | string | "" | No | Path to lab report file to process |
| interactive | boolean | false | No | Enable interactive mode for manual input |
| input | string | "" | No | Direct lab test input string for interpretation |
Accepts flexible formats:
Test Name: Value Unit (Reference: Min-Max)
Test Name Value Unit Ref: Min-Max
Test Name: Value (Min-Max)
{
"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..."
}
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. This tool does not diagnose — it only explains test meanings.
references/lab_reference_ranges.json — Standard reference rangesreferences/explanation_templates.json — Patient-friendly templatesreferences/test_metadata.json — Test descriptions and clinical notessys.version_info >= (3, 8) at startup and exit with 'Error: Python 3.8+ required' if the check fails, before any imports.pip install -r requirements.txt
This skill accepts: biochemical laboratory test results in standard formats (test name, value, unit, reference range) for the purpose of generating patient-friendly explanations.
If the user's request does not involve lab result interpretation — for example, asking to diagnose a condition, prescribe treatment, interpret imaging results, or perform general medical consultation — do not proceed with the workflow. Instead respond:
"lab-result-interpretation is designed to explain biochemical lab test values in patient-friendly language. It does not diagnose conditions or replace medical advice. Your request appears to be outside this scope. Please provide lab test values with reference ranges, or consult a qualified healthcare provider."
Do not continue the workflow when the request is out of scope, missing lab values, or would require clinical diagnosis. For missing inputs, state exactly which fields are missing.
If scripts/main.py fails or required inputs are incomplete:
--interactive mode to enter values one at a time, or provide the raw value and reference range for manual comparison.This skill explicitly does not:
Any request that would require crossing these boundaries must be declined with the medical disclaimer and a referral to appropriate professional resources.
Every final response must make these items explicit when relevant:
scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.--file path contains ../ or points outside the workspace, reject with a path traversal warning before opening the file.Use the following fixed structure for non-trivial requests:
For stress/multi-constraint requests, also include:
If the request is simple, you may compress the structure, but always keep the medical disclaimer and scope limits explicit.