| name | health-md-parser |
| description | Parse and work with Health.md files - the open standard for LLM-optimized healthcare data. Extract patient information, generate summaries, and analyze healthcare records while preserving privacy. |
Health.md Parser Skill
Parse and analyze Health.md files - the open standard for LLM-optimized healthcare data.
What This Skill Does
- Parse Health.md files into structured data
- Extract key information (medications, lab results, conditions)
- Generate LLM-optimized summaries for AI analysis
- Validate file format and clinical data
- Anonymize sensitive information based on privacy levels
- Create patient timelines and clinical insights
Setup
Install Dependencies
pip install health-md pyyaml beautifulsoup4
Usage Examples
python scripts/parse_health.py patient-001.health.md
python scripts/parse_health.py patient-001.health.md --summary
python scripts/parse_health.py patient-001.health.md --medications --labs
python scripts/parse_health.py patient-001.health.md --validate
python scripts/parse_health.py patient-001.health.md --anonymize
OpenClaw Integration
This skill integrates seamlessly with OpenClaw agents:
from skills.health_md_parser.scripts.parse_health import HealthMdParser
parser = HealthMdParser("patient.health.md")
record = parser.parse()
context = record.to_llm_context()
response = agent.process(f"""
Patient context: {context}
Question: What are the key health concerns for this patient?
""")
Clinical Use Cases
1. Clinical Decision Support
medications = record.get_current_medications()
conditions = record.get_conditions()
analysis = analyze_clinical_context(medications, conditions)
2. Patient Education
summary = record.to_patient_summary()
education = generate_patient_education(record.get_conditions())
3. Research & Analytics
if record.get_privacy_level() == 'anonymous':
research_data = record.to_research_dataset()
Privacy & Security
This skill respects Health.md privacy levels:
- Anonymous: No identifiable information processed
- Pseudonymized: Consistent fake identifiers maintained
- Identified: Full access (requires appropriate permissions)
All processing follows HIPAA/GDPR principles and the Health.md privacy specification.
File Format Support
Supports all Health.md specification features:
- ✅ Demographics with privacy-aware handling
- ✅ Current Medications with clinical context
- ✅ Lab Results with trend analysis
- ✅ Medical History with ICD coding
- ✅ Clinical Timeline with provider context
- ✅ Vital Signs with temporal tracking
- ✅ Allergies & Intolerances
- ✅ Care Team information
Examples
The examples/ directory contains sample Health.md files:
anonymous-diabetes-patient.health.md - Comprehensive diabetes case
cardiac-patient.health.md - Cardiovascular conditions
mental-health-patient.health.md - Mental health considerations
pediatric-patient.health.md - Pediatric healthcare data
Integration with EIR Space
This skill is designed to work with EIR Space health literacy platform:
eir_data = record.to_eir_format()
explanations = generate_health_explanations(record)
Error Handling
Robust error handling for clinical data:
try:
record = HealthRecord.from_file('patient.health.md')
except HealthMdValidationError as e:
print(f"Validation error: {e}")
except HealthMdPrivacyError as e:
print(f"Privacy error: {e}")
Advanced Features
Clinical Reasoning
insights = record.generate_clinical_insights()
Timeline Analysis
timeline = record.get_clinical_timeline(days=365)
events = analyze_clinical_progression(timeline)
Risk Assessment
risks = calculate_health_risks(record)
Contributing
This skill is part of the open-source Health.md standard. Contributions welcome:
- Clinical validation - Review medical accuracy
- Parser improvements - Handle edge cases better
- New features - Additional analysis capabilities
- Privacy enhancements - Stronger anonymization
See CONTRIBUTING.md in the main repository.
Healthcare data deserves better standards. This skill helps make it reality. 🏥💙