This is a lightweight Python library for parsing raw C-CDA documents without the need to understand the entire specification. If you're using BlueButton.js this maintains much of the same functionality. This is a largely unstable build so use at your own risk - we have since ported over to C++ for necessary performance improvements and will release a stable version of that shortly.
Test documents from various vendors available here.
pip install pyCCDA
# example
from pyCCDA import CCDA
with open('CCCD_sample.xml') as f:
ccd = CCDA(f.read())
# ccd.type # The document type ('ccda', 'c32', and such)
# ccd.source # The parsed source data (XML) with added querying methods
# ccd.data # The final parsed document data
name = ccd.data.demographics.name
print name.prefix, name.given, name.family.
βββ _init_.py
βββ core
β βββ _core.py
β βββ _init_.py
β βββ codes.py
β βββ wrappers.py
β βββ xml.py
βββ documents
β βββ _init_.py
β βββ ccda.py
βββ parsers
βββ _ccda
β βββ allergies.py
β βββ care_plan.py
β βββ demographics.py
β βββ documents(_ccda).py
β βββ encounters.py
β βββ free_text.py
β βββ functional_statuses.py
β βββ immunizations.py
β βββ instructions.py
β βββ medications.py
β βββ problems.py
β βββ procedures.py
β βββ results.py
β βββ smoking_status.py
β βββ vitals.py
βββ ccda.py
Parser ...
Generator ...
Section ...
Document ...
Allergies
Care Plan
Chief Complaint
Demographics
Encounters
Functional Statuses
Immunizations
Instructions
Results
Medications
Problems
Procedures
Smoking
Status
Vitals