parsing-ccda-documents

Extract section narrative and coded context from C-CDA and CCD XML documents.

5.0k|615|Updated Oct 4, 2025
One-click install
npx skills add https://github.com/maziyarpanahi/openmed --skill parsing-ccda-documents
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: parsing-ccda-documents
Source: https://github.com/maziyarpanahi/openmed/tree/main/skills/parsing-ccda-documents
Command: npx skills add https://github.com/maziyarpanahi/openmed --skill parsing-ccda-documents

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill turns complex C-CDA and CCD XML clinical documents into readable, section-specific narrative that can be safely de-identified and analyzed without losing clinical context or document structure.

Core Features & Use Cases

  • Section Narrative Extraction: Identifies clinical sections using LOINC codes and template identifiers, then flattens narrative content for NLP workflows.
  • OpenMed Integration: Routes extracted narrative through OpenMed de-identification and clinical text analysis while preserving the source section association.
  • XML-Safe De-identification: Redacts patient identifiers, names, addresses, dates, and narrative text while keeping CDA markup valid and parseable.
  • Use Case: Process an EHR-exported discharge summary, de-identify its header and section narratives, and analyze problems, medications, results, and care plans while retaining their clinical section context.

Quick Start

Use the parsing-ccda-documents skill to extract and de-identify the narrative sections from the attached C-CDA XML file, then analyze each section with OpenMed.

Frequently Asked Questions about parsing-ccda-documents

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

FAQPage Schema
How do I parse C-CDA XML files to extract clinical narrative text for NLP processing?

C-CDA XML files can be parsed using namespace-aware CDA parsing to extract section narratives by mapping LOINC codes and templateId identifiers. This flattens clinical text into a readable format while preserving document structure for downstream NLP workflows.

What is the best way to de-identify CCD documents while keeping the XML markup valid?

XML-safe de-identification redacts patient identifiers, names, addresses, and dates from CCD documents while keeping the CDA markup valid and parseable. This allows PHI protection without breaking the underlying clinical document structure.

Can I extract specific clinical sections like discharge summaries and consultation notes from C-CDA files?

You can extract specific clinical sections from C-CDA files by mapping LOINC codes and template identifiers to isolate discharge summaries, histories, physicals, and consultation notes. This targeted extraction retains clinical context for each identified section.

Does this CDA parsing approach protect against XXE attacks when processing EHR exports?

Yes, secure CDA parsing includes built-in XXE protection to prevent external entity attacks when processing EHR exports. This security measure is applied alongside namespace-aware extraction to ensure clinical XML documents are parsed safely.

How do I analyze problems, medications, and care plans from a C-CDA file after de-identification?

After de-identifying a C-CDA file, you analyze problems, medications, results, and care plans by routing extracted section narratives through OpenMed clinical text analysis. This workflow preserves source section association during downstream clinical evaluation.