ehr-data-parsing

Parse HL7v2 messages and FHIR R4 resources into structured formats.

13|5|Updated May 4, 2026
One-click install
npx skills add https://github.com/awslabs/hcls-agent-skills --skill ehr-data-parsing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ehr-data-parsing
Source: https://github.com/awslabs/hcls-agent-skills/tree/main/skills/ehr-data-parsing
Command: npx skills add https://github.com/awslabs/hcls-agent-skills --skill ehr-data-parsing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-hl7, fhir.resources, pandas.

What problem does it solve?

This skill solves the complexity of interoperability by providing standardized Python pipelines to parse, extract, and validate clinical data from HL7v2 messages and FHIR R4 resources.

Core Features & Use Cases

  • Clinical Data Extraction: Automatically parse HL7v2 segments (PID, OBX, etc.) and FHIR resources (Patient, Observation, Condition) into structured formats.
  • Format Conversion: Seamlessly convert between clinical data formats and tabular structures like pandas DataFrames for analysis.
  • Data Quality Assurance: Perform automated validation checks on clinical datasets, including completeness, date range verification, and code system compliance.

Quick Start

Use the ehr-data-parsing skill to extract patient demographics and lab results from the provided HL7v2 message string.

Frequently Asked Questions about ehr-data-parsing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I parse HL7v2 messages and extract clinical data segments in Python?

Parsing HL7v2 messages in Python involves extracting clinical data from segments like PID and OBX into structured formats. Standardized pipelines using the python-hl7 library handle message segmentation and field extraction automatically for interoperability tasks.

What is the best way to convert FHIR R4 resources to pandas DataFrames for analysis?

Converting FHIR R4 resources to pandas DataFrames involves flattening resource bundles like Patient or Observation into tabular structures. This format conversion uses the fhir.resources and pandas libraries to enable downstream clinical data analysis.

Can I validate clinical data quality and code system compliance for FHIR resources?

Yes, you can validate clinical data quality for FHIR resources by performing automated checks on datasets. This includes verifying date ranges, checking data completeness, and ensuring code system compliance to maintain interoperability standards across healthcare records.

Do I need python-hl7 and fhir.resources to extract patient demographics from clinical messages?

Yes, python-hl7 and fhir.resources are required to extract patient demographics because these dependencies provide the core validation and data transformation logic. They execute the pipelines that parse HL7v2 and FHIR R4 clinical data.

How do I flatten FHIR bundles for interoperability tasks without losing clinical data?

Flattening FHIR bundles for interoperability involves extracting nested clinical resources into tabular rows while preserving data integrity. Python pipelines transform complex hierarchical FHIR R4 structures into pandas DataFrames for analysis.