updates to procssing
modified narrative to limit size for memory issue
modified logging
diff --git a/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/ProcessSectionSwitch.java b/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/ProcessSectionSwitch.java
index bd43899..875c7f5 100644
--- a/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/ProcessSectionSwitch.java
+++ b/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/ProcessSectionSwitch.java
@@ -37,6 +37,7 @@
import org.eclipse.mdht.uml.cda.Section;
import org.eclipse.mdht.uml.cda.ServiceEvent;
import org.eclipse.mdht.uml.cda.util.CDAUtil.Query;
+import org.eclipse.mdht.uml.hl7.datatypes.II;
import org.openhealthtools.mdht.uml.cda.consol.AssessmentScaleObservation;
import org.openhealthtools.mdht.uml.cda.consol.CognitiveStatusProblemObservation;
import org.openhealthtools.mdht.uml.cda.consol.CognitiveStatusResultOrganizer;
@@ -853,8 +854,6 @@
// If not found - try using code
Section section = (Section) object;
- Logger.log(Logger.ERROR, "Second Chance");
-
if (codeToSection.isEmpty()) {
for (EClassifier consolPackageClassifier : ConsolPackage.eINSTANCE.getEClassifiers()) {
if (CDAPackage.eINSTANCE.getSection().isSuperTypeOf(CDAPackage.eINSTANCE.getSection())) {
@@ -869,19 +868,28 @@
}
}
+ StringBuffer sb = new StringBuffer();
+ sb.append("UnIdentified Section in " + this.file.getName());
+ sb.append("Section title is ").append(section.getTitle().getText());
+ for (II ii : section.getTemplateIds()) {
+ sb.append(ii.getRoot()).append(
+ (StringUtils.isEmpty(ii.getExtension())
+ ? ""
+ : " : " + ii.getExtension()));
+ }
+
+ Logger.log(Logger.ERROR, sb.toString());
+
boolean processed = false;
if (section.getCode() != null && !StringUtils.isEmpty(section.getCode().getCode())) {
String code = section.getCode().getCode();
- Logger.log(Logger.ERROR, "Second Chance CODE " + code);
if (codeToSection.containsKey(code)) {
Section newSection = (Section) EcoreUtil.create(codeToSection.get(code));
newSection.setText(section.getText());
newSection.getEntries().addAll(section.getEntries());
- Logger.log(Logger.ERROR, "Second Chance SECTION " + newSection.toString());
-
String secondChanceSheetIndex = currentHandler.getSheet(
section.getClinicalDocument().eClass(), String.valueOf(newSection.eClass().getClassifierID()),
GenerateCDADataHandler.sheetName(newSection.eClass()), splitOption);
diff --git a/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/SpreadsheetSerializer.java b/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/SpreadsheetSerializer.java
index b180a20..28456e0 100644
--- a/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/SpreadsheetSerializer.java
+++ b/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/SpreadsheetSerializer.java
@@ -160,7 +160,8 @@
String narrative = text.getText();
HTMLToExcel hte = new HTMLToExcel();
RichTextString s = hte.fromHtmlToCellValue(narrative, row.getSheet().getWorkbook());
- row.createCell(offset++).setCellValue(s.getString());
+ row.createCell(offset++).setCellValue(StringUtils.left(StringUtils.trim(s.getString()), 500));
+
} else {
row.createCell(offset++).setCellValue("No Narrative");
}