Update Generate Spreadsheet

Modified logic for counting sections to reflect null flavors and empty sections to not be included
diff --git a/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/GenerateCDADataHandler.java b/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/GenerateCDADataHandler.java
index 4c56946..7f651dc 100644
--- a/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/GenerateCDADataHandler.java
+++ b/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/GenerateCDADataHandler.java
@@ -287,6 +287,29 @@
 
 	}
 
+	/**
+	 * If there is no null flavor and there is a entries or large narrative return true
+	 * else
+	 * return
+	 * false
+	 * 
+	 * @param section
+	 * @return boolean
+	 */
+	private boolean shouldCountSection(Section section) {
+		if (section.isNullFlavorUndefined()) {
+			if (!section.getEntries().isEmpty()) {
+				return true;
+			}
+			if (section.getText() != null && section.getText().getText() != null) {
+				if (section.getText().getText().length() > 50) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
 	void processFolder2(IFolder folder, IProgressMonitor monitor, String splitOption) throws Exception {
 
 		/*
@@ -411,9 +434,17 @@
 									sectionSwitch.doSwitch(section);
 									wb.getSheet(sheetIndex).flushRows();
 								}
+								if (section.getText() != null && section.getText().getText() != null) {
+									if (section.getText().getText().length() < 50) {
 
-								getSectionHash(
-									clinicalDocument.eClass().getClassifierID(), sheetIndex, splitOption).add(file);
+									}
+								}
+
+								if (shouldCountSection(section)) {
+									getSectionHash(
+										clinicalDocument.eClass().getClassifierID(), sheetIndex, splitOption).add(file);
+
+								}
 
 							}
 						} else if (clinicalDocument instanceof org.openhealthtools.mdht.uml.cda.ccd.ContinuityOfCareDocument) {
@@ -443,8 +474,10 @@
 									}
 									wb.getSheet(sheetIndex).flushRows();
 								}
-								getSectionHash(
-									clinicalDocument.eClass().getClassifierID(), sheetIndex, splitOption).add(file);
+								if (shouldCountSection(section)) {
+									getSectionHash(
+										clinicalDocument.eClass().getClassifierID(), sheetIndex, splitOption).add(file);
+								}
 							}
 
 						}