Announcement

Collapse
No announcement yet.

MDHT CCDA Parsing Text Section Issues

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MDHT CCDA Parsing Text Section Issues

    I am using the Model Driven Health Tools Library inside of Mirth to parse CCDA documents. I am currently parsing out the medications section and inside the section there is a text section. This is the portion that is printed into the PDF's that is human readable. However, I need the Sig or instructions for the given medication.

    The instructions do not exist in the lower portion of the CCDA. There is just a reference to the text section. I can get into the text section but I cannot access the table section that is nested. The following is what is in the table section.

    Code:
    <table ID="medicationNarrative">
    							<thead>
    								<tr>
    									<th>Medication Name and Strength</th>
    									<th>Pharmacy Term</th>
    									<th>Instructions</th>
    									<th>Quantity Ordered</th>
    									<th>Prescription Expires</th>
    									<th>Prescription Number</th>
    									<th>Last Dispense Date</th>
    									<th>Ordering Provider</th>
    									<th>Facility</th>
    								</tr>
    							</thead>
    							<tbody>
    								<tr>
    									<td>
    										<content ID="mndMedication1001">CHOLECALCIFEROL 2,000UNIT TAB</content>
    									</td>
    									<td>
    										<content ID="mndStatus1001">Active</content>
    									</td>
    									<td>
    										<content ID="mndSig1001">TAKE ONE TABLET BY MOUTH ONCE A DAY FOR VITAMIN D DEFICIENCY.</content>
    									</td>
    									<td>
    										<content ID="mndQuantity1001">100</content>
    									</td>
    									<td>
    										<content ID="mndExpires1001">Feb 23, 2019</content>
    									</td>
    									<td>
    										<content ID="mndPrescription1001">47345465</content>
    									</td>
    									<td>
    										<content ID="mndLastDispensed1001">Feb 22, 2018</content>
    									</td>
    									<td>
    										<content ID="mndProvider1001">REDACTED</content>
    									</td>
    									<td>
    										<content ID="mndSource1001">REDACTED/content>
    									</td>
    								</tr>
    </tbody>
    </table>
    As you can see they do provide metadata in the header section of the table. This means that I do know what is in each of the rows but I cannot even begin to enter the table node. It tells me that node is null.

    Here is just one of the many iterations of code I have tried to extract the table section.

    Code:
    this.medications = function(sectionXML, medModelList) {
    		logger.info("Medications Parsing Starting.");
    
    		var table = sectionXML.text.table;
    
    		logger.info("Number of Rows" + sectionXML.text.get(0).table.get(0));
    }
    Has anyone encountered this before an have a potential solution?

    Thank you in advanced for any help you can provide.
Working...
X