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.
Parse and analyze Health.md files - the open standard for LLM-optimized healthcare data.
pip install health-md pyyaml beautifulsoup4
# Parse a health.md file
python scripts/parse_health.py patient-001.health.md
# Generate LLM summary
python scripts/parse_health.py patient-001.health.md --summary
# Extract specific information
python scripts/parse_health.py patient-001.health.md --medications --labs
# Validate file format
python scripts/parse_health.py patient-001.health.md --validate
# Anonymize a record
python scripts/parse_health.py patient-001.health.md --anonymize
This skill integrates seamlessly with OpenClaw agents:
# In your OpenClaw agent
from skills.health_md_parser.scripts.parse_health import HealthMdParser
# Parse a health record
parser = HealthMdParser("patient.health.md")
record = parser.parse()
# Generate AI-optimized context
context = record.to_llm_context()
# Use in agent conversation
response = agent.process(f"""
Patient context: {context}
Question: What are the key health concerns for this patient?
""")
# Extract current medications and conditions
medications = record.get_current_medications()
conditions = record.get_conditions()
# Check for drug interactions or contraindications
analysis = analyze_clinical_context(medications, conditions)
# Generate patient-friendly summaries
summary = record.to_patient_summary()
# Create educational content based on conditions
education = generate_patient_education(record.get_conditions())
# Extract de-identified data for research
if record.get_privacy_level() == 'anonymous':
research_data = record.to_research_dataset()
This skill respects Health.md privacy levels:
All processing follows HIPAA/GDPR principles and the Health.md privacy specification.
Supports all Health.md specification features:
The examples/ directory contains sample Health.md files:
anonymous-diabetes-patient.health.md - Comprehensive diabetes casecardiac-patient.health.md - Cardiovascular conditionsmental-health-patient.health.md - Mental health considerationspediatric-patient.health.md - Pediatric healthcare dataThis skill is designed to work with EIR Space health literacy platform:
# Convert Health.md to EIR-compatible format
eir_data = record.to_eir_format()
# Generate health literacy explanations
explanations = generate_health_explanations(record)
Robust error handling for clinical data: