- 28 Nov 2023
- 7 Minutes to read
- Print
- DarkLight
IXML QRDA I
- Updated on 28 Nov 2023
- 7 Minutes to read
- Print
- DarkLight
Intermediate XML is used in conveying reported data out of SearchServer to the mdht-restlet which generates on-demand QRDAs. This document covers QRDA I and is an appendage to the larger IXML Documentation which contains definitions common to both CCDA and QRDA.
Documents (Implementation Guide)
The document below was used primarily in creating the POJOs and populating the CCD using MDHT APIs.
Title | HL7 CDA® R2 Implementation Guide: Quality Reporting Document Architecture Category I (QRDA I), Release 1, STU Release 5.2—US Realm HL7 Standard for Trial Use February 2020 (with June 2020 errata) |
Filename | CDAR2_IG_QRDA_I_R1_STU5.2_2020FEB_Vol2_2020JUN_with_errata.pdf, 834 pages |
Common (evolved) POJOs
For CommonPojo see IXML Documentation.
Source Code | IXML Sample |
Assessment | |
class Assessment extends CommonPojo { String moodcode; // determines -recommended (INT) vs. -performed (EVN) String value; String unit; // alternatively to value and unit just above, the following: String valuecode; String valuecodesystem; Striyg valuecodesystemname; String valuedisplayname; } | <assessments> <assessment startdate="20180403000000+0000" enddate="20180403000000+0000" moodcode="EVN" codesystem="2.16.840.1.113883.6.88" codesystemname="RxNORM" code="1007589" displayname="blah, blah, blah" /> ... </assessments> |
Assessment Performed (V2) Assessment Recommended (V2) | |
DeviceOrder | |
class DeviceOrder extends CommonPojo { Author author; } | <devices> <deviceorder startdate="20220625" enddate="20220625" code="360006004" codesystem="2.16.840.1.113883.6.96" codesystemname="SNOMEDCT" displayname="Device order"> <author ... /> </deviceorder> ... </devices> |
Device Order Act (V4) | |
DeviceRecommended | |
class DeviceRecommended extends CommonPojo { Author author; } | <devices> <devicerecommended startdate="20220625" enddate="20220625" code="360006004" codesystem="2.16.840.1.113883.6.96" codesystemname="SNOMEDCT" displayname="Device recommendation" /> <author ... /> </deviceorder> ... </devices> |
Device Recommended Act (V4) | |
Diagnosis | |
class Diagnosis extends CommonPojo { String messagetimestamp; // date/time of (original, e.g.: HL7 v2) message List< Translation > problemtranslations; } | <diagnoses> <diagnosis startdate="20171108" enddate="20191114" code="401.1" codesystem="2.16.840.1.113883.6.103" codesystemname="ICD9CM" displayname="Benign essential hypertension" /> ... </diagnoses> |
Diagnosis Concern Act (V4) Diagnosis (V3) Severity Observation (V2) | |
DiagnosticStudy | |
class DiagnosticStudy extends CommonPojo { String messagetimestamp; // date/time of (original, e.g.: HL7 v2) message } | <diagnosticstudies> <diagnosticstudy startdate="20180712" enddate="20180712" messagetimestamp="20180712" code="G0204" codesystem="2.16.840.1.113883.6.285" codesystemname="HCPCS" displayname="Diagnostic mammography when performed; bilateral" /> ... </diagnosticstudies> |
Diagnostic Study Performed (V5) | |
Encounter | |
class Encounter extends CommonPojo { // Encounter Performed (V5) String valueccode; // Encounter Diagnosis (V3) String valueccodesystem; String valueccodesystemname; String valueccodedisplayname; String ddcode; // (sdtc:dischargeDispositionCode) String ddcodesystem; String ddcodesystemname; String dddisplayname; } | <encounters> <encounter startdate="20190419" enddate="20190419" code="99205" codesystem="2.16.840.1.113883.6.12" codesystemname="CPT" displayname="Office or other outpatient visit for ..." valuecode="diagnosis code" valuecodesystem="diagnosis.code.system" valuecodesystemname="DIAGNOSIS" valuedisplayname="Encounter Diagnosis (V3)" ddcode="blah" ddcodesystem="blah.blah.blah" ddcodesystemname="BLAH" dddisplayname="Big blah..." /> </encounter> ... </encounters> |
Encounter Performed Act (V3) Encounter Performed (V5) Encounter Activity (V3) Encounter Diagnosis (V3) | |
Immunization | |
class Immunization extends CommonPojo { } | <immunizations> <immunization startdate="20200718" enddate="20200718" moodcode="EVN" typecode="1" code="03" codesystem="2.16.840.1.113883.12.292" codesystemname="CVX" displayname="measles, mumps and rubella virus vaccine" /> ... </immunizations> |
Immunization Activity (V3) Immunization Medication Information (V2) Immunization Administrered (V3) | |
Intervention | |
class Intervention extends CommonPojo { String moodcode; // determines -order vs. -performed String messagetimestamp; // date/time of (original, e.g.: HL7 v2) message } | <interventions> <intervention startdate="20191205" enddate="20191205" moodcode="ENV" messagetimestamp="20200124" code="385765002" codesystem="2.16.840.1.113883.6.96" codesystemname="SNOMEDCT" displayname="Hospice care management" /> ... </interventions> |
Intervention Performed (V5) Intervention Order (V5) | |
Lab | |
class Lab extends CommonPojo { String moodcode; // determines -order vs. -performed String value; String unit; List< LabResult > results; } | <labs> <lab startdate="20190904" enddate="20190904" code="33717-0" codesystem="2.16.840.1.113883.6.1" codesystemname="LOINC" displayname="Cytology report of Cervical or vaginal smear or scraping Cyto stain" value="" unit=""> <labresult ... /> </lab> ... </labs> |
Laboratory Test Order (V5) Laboratory Test Performed (V4/5) | |
LabResult | |
class LabResult extends CommonPojo { String moodcode; String root; String extension; String root2; String extension2; String value; String unit; // alternatively to value and unit, the following: String valuecode; String valuecodesystem; String valuecodesystemname; String valuedisplayname; } | <labresults> <labresult startdate="20200115" enddate="20200115" typecode="REFR" moodcode="EVN" extension="2015-08-01" code="35275-7" codesystem="2.16.840.1.113883.6.1" codesystemname="LOINC" displayname="Measles virus IgG Ab [Presence] in Serum by Immunoassay" root="2.16.840.1.113883.10.20.22.4.2" valuecode="441773004" valuecodesystem="2.16.840.1.113883.6.96" valuecodesystemname="SNOMED-CT" valuedisplayname="441773004" /> ... </labresults> |
Measure | |
class Measure extends CommonPojo { String measurename; // attribute String measuresetid; // attribute String version; // ibid String count; // ibid } | <measures> <measure measurename="Controlling High Blood Pressure" measuresetid="abdc37cc-bac6-4156-9b91-d1be2c8b7268" version="40280382-6258-7581-0162-92d6e6db1680" /> ... </measures> |
Measure Section Measure Section QDM | |
Medication | |
class Medication extends CommonPojo { String dosage; } | <medications> <medication startdate="20200404" enddate="20200404" moodcode="EVN" code="349401" codesystem="2.16.840.1.113883.6.88" codesystemname="RXNORM" displayname="Olmesartan medoxomil 20 MG Oral Tablet" dosage="1" /> ... </medications> |
Medication Active (V4) Medication Administered (V5) Medication Order (V6) Medication Dispensed Act (V4) Medication Dispense (V2) Medication Information (V2) | |
PatientAssertion | |
class PatientAssertion extends CommonPojo { Author author; // optional } | <patientassertion code="422894000" codesystem="2.16.840.1.113883.6.96" codesystemname="SNOMED CT" displayname="Eastern Cooperative Oncology Group - grade 2 (finding)"> <author ... /> </patientassertion> |
Patient Characteristic Observation Assertion (V5) | |
PatientDatum | |
class PatientDatum extends CommonPojo { String title; String text; List< Allergy > allergies; List< Assessment > assessments; List< DeviceOrder > deviceorders; List< DeviceRecommended > devicerecommendeds; List< Diagnosis > diagnoses; List< DiagnosticStudy > studies; List< Encounter > encounters; List< Immunization > immunizations; List< Intervention > interventions; List< Lab > labs; List< Medication > medications; List< PhysicalExam > exams; List< PatientPayer > patientpayers; List< Payer > payers; List< Procedure > procedures; List< Symptom > symptoms; } | <patientdata title="Patient Data" statuscode="normal" code="17861-6" codesystem="2.16.840.1.113883.6.1" codesystemname="LOINC" displayname="17861-6|Calcium SerPl-mCnc|"> <allergies /> <assessments /> <diagnoses /> <dagnosticstudies /> <encounters /> <physicalexams /> <immunizations /> <interventions /> <labs /> <medications /> <patientpayers /> <payers /> <procedures /> </patientdata> |
Patient Data Section (V5) Patient Data Section QDM (V8) | |
PatientPayer | |
class PatientPayer extends CommonPojo { String valuecode; String valuecodesystem; String valuecodesystemname; String valuedisplayname; } | <patientpayers> <patientpayer startdate="20201113" enddate="20201113" <!-- supply source of payment: --> valuecode="29" valuecodesystem="2.16.840.1.113883.3.221.5" valuecodesystemname="SOP" valuedisplayname="Medicaid Other" /> ... <patientpayers> |
Patient Characteristic Payer | |
PhysicalExam | |
class PhysicalExam extends CommonPojo { String value; String unit; } | <physicalexams> <physicalexam startdate="20190731" enddate="20190731" code="8480-6" codesystem="2.16.840.1.113883.6.12" codesystemname="LOINC" displayname="Systolic blood pressure" unit="mmHg" value="92" /> ... </physicalexams> |
Physical Exam Performed (V5) | |
Procedure | |
class Procedure extends CommonPojo { } | <procedures> <procedure startdate="20180621" enddate="20180621" moodcode="EVN" code="170402006" codesystem="2.16.840.1.113883.6.96" codesystemname="SNOMEDCT" displayname="Third diphtheria, pertussis and tetanus triple and polio vaccination" /> ... <procedures> |
Procedure Performed (V6) Procedure Order (V6) | |
ReportingParameter | |
class ReportingParameter extends CommonPojo { String text; // (required) } | <reportingparameter startdate="20190901" enddate="20190904" /> |
Reporting Parameters Section Reporting Parameters Act | |
Symptom | |
class Symptom extends CommonPojo { } | <symptoms> <symptom startdate="20201104" enddate="20201104" <!-- for value tetracodes: --> code="R63.6" codesystem="2.16.840.1.113883.6.90" codesystemname="ICD10CM" displayname="Underweight" /> ... <symptoms> |
Symptom Concern Act (V5) Symptom (V4) |
Specialized POJOs
Appendix: sample IXML files and format templates
Beside <diagnosis>, <lab>, etc., there can exist other elements (which also imply POJOs) created as new measures handled will require. A recent example is physicalexam.
<?xml version="1.0" encoding="UTF-8"?> <cdadoc> <header> <doctype>QRDA I</doctype> <vendor>Acme</vendor> <conformance>2018</conformance> <codename>Continuity of Care Document</codename> <title>Good Health QRDA I Report</title> <patient> <facilityoid>2.16.840.1.113883.3.6452</facilityoid> <mrn>665892</mrn> <firstname>Herman</firstname> <lastname>Munster</lastname> <birthdate>18561031000000+0000</birthdate> <gender>M</gender> <race>2106-3</race> <ethnicity>2186-5</ethnicity> <address> <line>1313 Mockingbird Lane</line> <city>Mockingbird Heights</city> <state>CA</state> <zipcode>90210</zipcode> <country>US</country> </address> </patient> <hieinfo> <hiename>Mockingbird Heights Clinic</hiename> <telecom>tel:+1(213) 666-9032</telecom> <oid>2.16.840.1.113883.3.5785</oid> <address> <line>13 Boulevard of the Stars</line> <line>Suite 1A</line> <city>Mockingbird Heights</city> <state>CA</state> <zipcode>90210</zipcode> <country>US</country> </address> </hieinfo> <informationrecipientid>CDAC_HQR_EHR</informationrecipientid> <participant> <type>BBY</type> <class>GUAR</class> <certificationnumber>123456</certificationnumber> </participant> <custodianinfo> <name>Reliance eHealth Collaborative</name> <telecom>tel:+1(999)999-9999</telecom> <oid>2.16.840.1.113883.3.5785</oid> <address> <line>3264 East Longbourne Avenue</line> <line>#53</line> <city>Westinghouse</city> <state>MA</state> <zipcode>01001</zipcode> <country>US</country> </address> </custodianinfo> </header> <measures> <measure measurename="Diabetes: Hemoglobin A1c (HbA1c) Poor Control (> 9%)" version="40280382-6258-7581-0162-9249c8ab1447" measuresetid="f2986519-5a4e-4149-a8f2-af0a1dc7f6bc" /> <measures> <reportingparameter startdate="20161212100229+0000" enddate="20161213100229+0000" /> <patientdata> <allergies> <allergy startdate="20190703" enddate="20190703" code="256442007" codesystem="2.16.840.1.113883.6.96" codesystemname="SNOMEDCT" displayname="Egg yolk (substance)" /> </allergies> <assessments> <assessment startdate="20190902" enddate="20190902" moodcode="INT" code="65705-6" codesystem="2.16.840.1.113883.6.1" codesystemname="LOINC" displayname="Gait - parkinsons [UPDRS]" /> <assessment startdate="20190127" enddate="20190127" moodcode="EVN" unit="Score" value="6" code="59454-9" codesystem="2.16.840.1.113883.6.1" codesystemname="LOINC" displayname="History of falling; immediate or within 3 months [Morse Fall Scale]" /> <assessment startdate="20190127" enddate="20190127" moodcode="EVN" code="59454-9" codesystem="2.16.840.1.113883.6.1" codesystemname="LOINC" displayname="History of falling; immediate or within 3 months [Morse Fall Scale]" valuecode="428171000124102" valuecodesystem="2.16.840.1.113883.6.96" valuecodesystemname="SNOMED" valuedisplayname="No Specific Name" /> </assessments> <devices> <deviceorder ... /> <devicerecommended ... /> </devices> <diagnoses> <diagnosis messagetimestamp="" startdate="20180620133152+0000" enddate="" code="E11.610" codesystemname="ICD-10-CM" displayname="Type 2 diabetes mellitus with diabetic neuropathic arthropathy" /> </diagnosticstudies> <diagnosticstudy messagetimestamp="" startdate="20180620133152+0000" enddate="" code="E11.610" codesystemname="ICD-10-CM" displayname="Type 2 diabetes mellitus with diabetic neuropathic arthropathy" /> </diagnosticstudies> <encounters> <encounter startdate="20180620133152+0000" enddate="20180620135900+0000" code="183452005" codesystemname="SNOMED CT" displayname="Emergency hospital admission (procedure)" valuecode="8319008" valuecodesystem="2.16.840.1.113883.6.96" valuecodesystemname="SNOMED CT" valuedisplayname="Regularly scheduled home visit" /> </encounter> <encounter startdate="20190519" enddate="20190519" moodcode="EVN" code="225929007" codesystem="2.16.840.1.113883.6.96" codesystemname="SNOMEDCT" valuecode="8319008" valuecodesystem="2.16.840.1.113883.6.96" valuecodesystemname="SNOMED CT" valuedisplayname="Regularly scheduled home visit" /> </encounters> <labs> <lab startdate="20180620133152+0000" enddate="" moodcode="EVN" code="4544-3" codesystem="2.16.840.1.113883.6.1" codesystemname="LOINC" displayname="Hematocrit"> <labresults> <labresult typecode="REFR" moodcode="EVN" startdate="201805230800" enddate="201805230800" root="2.16.840.1.113883.10.20.22.4.2" extension="2015-08-01" code="19765-7" codesystem="2.16.840.1.113883.6.1" codesystemname="LOINC" displayname="Microscopic observation identifier in cervix by cyto stain" /> </labresults> </lab> </labs> <medications> <medication startdate="20190320" enddate="20200101" dosage="1" code="105152" codesystem="2.16.840.1.113883.6.88" codesystemname="RxNorm" displayname="Amoxicillin 60 MG/ML Oral Suspension" /> </medications> <procedures> <procedure startdate="20191205" enddate="20191205" code="385765002" codesystem="2.16.840.1.113883.6.96" codesystemname="SNOMEDCT" displayname="Hospital care management (procedure)" /> </procedures> <symptoms> <symptom startdate="20191205" enddate="20191205" code="R63.6" codesystem="2.16.840.1.113883.6.90" codesystemname="ICD10CM" displayname="Underweight" /> </symptoms> </patientdata> </cdadoc>
Appendix: IXML format templates
Here are some sample "railroad tracks" for IXMLs for QRDA I.
<cdadoc> <header> <doctype>QRDA I</doctype> <vendor>Acme</vendor> <codename /> <title /> <patient /> <hieinfo /> <informationrecipientid /> <custodianinfo /> </header> <measure ... /> <!-- {1} --> <reportingparameter ... /> <!-- {1} --> <patientdata> <diagnoses> <!-- {0,1,+} --> <diagnosis ... /> </diagnoses> <encounters> <!-- {0,1,+} --> <encounter ...> <status .../> <!-- {0,1} --> </encounter> </encounters> <labs> <!-- {0,1,+} --> <lab startdate="20180620133152+0000" enddate="" code="4544-3" codesystem="2.16.840.1.113883.6.1" codesystemname="LOINC" displayname="Hematocrit" /> </labs> <physicalexams> <!-- {0,1,+} --> <physicalexam startdate="201909200800" enddate="201909200800" code="8480-6" codesystemname="LOINC" displayname="Intravascular systolic Pressure Point in time Arterial system Quantitative" value="91" unit="mmHg" /> </physicalexams> <procedures> <!-- {0,1,+} --> <procedure .../> </procedures> </patientdata> </cdadoc>
Execution
An example of how CCDA documents are generated:
- The JUnit test or Tomcat servlet code passes the IXML input as a stream to a SAX parser.
- ParseIncoming.parse( InputStream inputStream ) invokes SAX parsing.
- IncomingDataHandler, this is the SAX parser user code, calls...
- ...various IncomingDataHandler.method()s until, having reached the IXML document's end...
- ...IncomingDataHandler.endDocument() winds up the parsing, then calls for MDHT generators.
- Depending on the type of document being generated, CCDA, QRDA I or QRDA III, a generator is called.
- Generate.generateDocument() refines the POJOs, then calls generators on all parsed POJOs.
- GenerateQrdaI.generate()* creates the ClinicalDocument,then the items below
- PopulateHeader generates the header
- PopulateMeasures adds the measures section
- PopulateReportingParameters adds reporting parameters section
- PopulatePatientData adds the patient-data section subsuming sections for (as of March 2021)
- allergies
- assessments
- devices
- diagnoses
- encounters
- exams
- interventions
- labs
- medications
- immunizations
- patient payers
- procedures
- studies
- symptoms
- Bottles up the (MDHT-generated) document and returns it as a String to the bottom of the SAX parser handler, endDocument(), thence to the bottom of the SAX parser and finally to the invoking code in JUnit test or Tomcat servlet.
* Or GenerateCcd.generate() or GenerateQrdaIII.generate().