From 42e108b76f1153ae37bb4a772b90126b63051cc1 Mon Sep 17 00:00:00 2001 From: adongare Date: Mon, 26 Feb 2024 09:38:18 -0500 Subject: [PATCH] MAT-6547 address PR feedback --- .../java/gov/cms/madie/hqmf/Generator.java | 176 +++++++++--------- .../madie/hqmf/HQMFAttributeGenerator.java | 2 +- .../HQMFDataCriteriaElementGenerator.java | 30 +-- .../qdm_5_6/HQMFClauseLogicGenerator.java | 4 +- .../HQMFDataCriteriaElementGenerator.java | 46 +++-- ...FDataCriteriaElementGeneratorForCodes.java | 9 +- .../qdm_5_6/HQMFDataCriteriaGenerator.java | 12 +- .../cms/madie/hqmf/qdm_5_6/HQMFGenerator.java | 22 ++- .../qdm_5_6/HQMFMeasureDetailsGenerator.java | 5 +- .../HQMFMeasureObservationLogicGenerator.java | 54 +++--- .../qdm_5_6/HQMFPopulationLogicGenerator.java | 142 ++++++++------ 11 files changed, 272 insertions(+), 230 deletions(-) diff --git a/src/main/java/gov/cms/madie/hqmf/Generator.java b/src/main/java/gov/cms/madie/hqmf/Generator.java index 7e3c925..e14f5bd 100644 --- a/src/main/java/gov/cms/madie/hqmf/Generator.java +++ b/src/main/java/gov/cms/madie/hqmf/Generator.java @@ -4,179 +4,177 @@ public interface Generator extends MatConstants { - public static final String HIGH = "high"; + String HIGH = "high"; - public static final String STOP_DATETIME = "stop datetime"; + String STOP_DATETIME = "stop datetime"; - public static final String START_DATETIME = "start datetime"; + String START_DATETIME = "start datetime"; - public static final String FLAVOR_ID = "flavorId"; + String FLAVOR_ID = "flavorId"; - public static final String LOW = "low"; + String LOW = "low"; - public static final String EFFECTIVE_TIME = "effectiveTime"; + String EFFECTIVE_TIME = "effectiveTime"; - public static final String ATTRIBUTE_UUID = "attributeUUID"; + String ATTRIBUTE_UUID = "attributeUUID"; - public static final String RELATED_TO = "related to"; + String RELATED_TO = "related to"; - public static final String CHECK_IF_PRESENT = "Check if Present"; + String CHECK_IF_PRESENT = "Check if Present"; - public static final String TYPE = "type"; + String TYPE = "type"; - public static final String GROUPING_CHECK = "isInGrouping"; + String GROUPING_CHECK = "isInGrouping"; - public static final String MOOD = "mood"; + String MOOD = "mood"; - public static final String CLASS = "class"; + String CLASS = "class"; - public static final String XSI_TYPE = "xsi:type"; + String XSI_TYPE = "xsi:type"; - public static final String VALUE = "value"; + String VALUE = "value"; - public static final String TITLE = "title"; + String TITLE = "title"; - public static final String DISPLAY_NAME = "displayName"; + String DISPLAY_NAME = "displayName"; - public static final String CODE_SYSTEM = "codeSystem"; + String CODE_SYSTEM = "codeSystem"; - public static final String CODE_SYSTEM_NAME = "codeSystemName"; + String CODE_SYSTEM_NAME = "codeSystemName"; - public static final String CODE_SYSTEM_DISPLAY_NAME = "codeDisplayName"; + String CODE_SYSTEM_DISPLAY_NAME = "codeDisplayName"; - public static final String ID = "id"; + String ID = "id"; - public static final String ROOT = "root"; + String ROOT = "root"; - public static final String ITEM = "item"; + String ITEM = "item"; - public static final String TEMPLATE_ID = "templateId"; + String TEMPLATE_ID = "templateId"; - public static final String MOOD_CODE = "moodCode"; + String MOOD_CODE = "moodCode"; - public static final String CLASS_CODE = "classCode"; + String CLASS_CODE = "classCode"; - public static final String TYPE_CODE = "typeCode"; + String TYPE_CODE = "typeCode"; - public static final String RAV = "riskAdjVar"; + String RAV = "riskAdjVar"; - public static final String OBSERVATION_CRITERIA = "observationCriteria"; + String OBSERVATION_CRITERIA = "observationCriteria"; - public static final String OUTBOUND_RELATIONSHIP = "outboundRelationship"; + String OUTBOUND_RELATIONSHIP = "outboundRelationship"; - public static final String UUID = "uuid"; + String UUID = "uuid"; - public static final String TAXONOMY = "taxonomy"; + String TAXONOMY = "taxonomy"; - public static final String OID = "oid"; + String OID = "oid"; - public static final String NAME = "name"; + String NAME = "name"; - public static final String CODE = "code"; + String CODE = "code"; - public static final String VERSION_5_0_ID = "2017-05-01"; + String VERSION_5_0_ID = "2017-05-01"; - public static final String VERSION_4_1_2_ID = "2014-11-24"; + String VERSION_4_1_2_ID = "2014-11-24"; - public static final String VERSION_4_3_ID = "2015-09-30"; + String VERSION_4_3_ID = "2015-09-30"; - public static final String POPULATION_CRITERIA_EXTENSION = "2015-12-01"; + String POPULATION_CRITERIA_EXTENSION = "2015-12-01"; - public static final String POPULATION_CRITERIA_EXTENSION_CQL = "2017-08-01"; + String POPULATION_CRITERIA_EXTENSION_CQL = "2017-08-01"; - public static final String VALUE_SET = "Value Set"; + String VALUE_SET = "Value Set"; - public static final String ANATOMICAL_LOCATION_SITE = "Anatomical Location Site"; + String ANATOMICAL_LOCATION_SITE = "Anatomical Location Site"; - public static final String ANATOMICAL_APPROACH_SITE = "Anatomical Approach Site"; + String ANATOMICAL_APPROACH_SITE = "Anatomical Approach Site"; - public static final String ORDINALITY = "Ordinality"; + String ORDINALITY = "Ordinality"; - public static final String LATERALITY = "Laterality"; + String LATERALITY = "Laterality"; - public static final String ROUTE = "route"; + String ROUTE = "route"; - public static final String FACILITY_LOCATION = "facility location"; + String FACILITY_LOCATION = "facility location"; - public static final String FACILITY_LOCATION_ARRIVAL_DATETIME = - "facility location arrival datetime"; + String FACILITY_LOCATION_ARRIVAL_DATETIME = "facility location arrival datetime"; - public static final String FACILITY_LOCATION_DEPARTURE_DATETIME = - "facility location departure datetime"; + String FACILITY_LOCATION_DEPARTURE_DATETIME = "facility location departure datetime"; - public static final String REFILLS = "refills"; + String REFILLS = "refills"; - public static final String CUMULATIVE_MEDICATION_DURATION = "cumulative medication duration"; + String CUMULATIVE_MEDICATION_DURATION = "cumulative medication duration"; - public static final String FREQUENCY = "frequency"; + String FREQUENCY = "frequency"; - public static final String ADMISSION_DATETIME = "admission datetime"; + String ADMISSION_DATETIME = "admission datetime"; - public static final String DISCHARGE_STATUS = "discharge status"; + String DISCHARGE_STATUS = "discharge status"; - public static final String DISCHARGE_DATETIME = "discharge datetime"; + String DISCHARGE_DATETIME = "discharge datetime"; - public static final String REMOVAL_DATETIME = "removal datetime"; + String REMOVAL_DATETIME = "removal datetime"; - public static final String INCISION_DATETIME = "incision datetime"; + String INCISION_DATETIME = "incision datetime"; - public static final String SIGNED_DATETIME = "signed datetime"; + String SIGNED_DATETIME = "signed datetime"; - public static final String ACTIVE_DATETIME = "active datetime"; + String ACTIVE_DATETIME = "active datetime"; - public static final String TIME = "time"; + String TIME = "time"; - public static final String DATE = "date"; + String DATE = "date"; - public static final String ATTRIBUTE_MODE = "attributeMode"; + String ATTRIBUTE_MODE = "attributeMode"; - public static final String ATTRIBUTE_NAME = "attributeName"; + String ATTRIBUTE_NAME = "attributeName"; - public static final String NEGATION_RATIONALE = "negation rationale"; + String NEGATION_RATIONALE = "negation rationale"; - public static final String ATTRIBUTE_DATE = "attrDate"; + String ATTRIBUTE_DATE = "attrDate"; - public final String nameSpace = "http://www.w3.org/2001/XMLSchema-instance"; + String nameSpace = "http://www.w3.org/2001/XMLSchema-instance"; - public static final String LESS_THAN = "Less Than"; + String LESS_THAN = "Less Than"; - public static final String GREATER_THAN = "Greater Than"; + String GREATER_THAN = "Greater Than"; - public static final String EQUAL_TO = "Equal To"; + String EQUAL_TO = "Equal To"; - public static final String DOSE = "dose"; + String DOSE = "dose"; - public static final String LENGTH_OF_STAY = "length of stay"; + String LENGTH_OF_STAY = "length of stay"; - public static final String TRANSLATION = "translation"; + String TRANSLATION = "translation"; - public static final String NULL_FLAVOR = "nullFlavor"; + String NULL_FLAVOR = "nullFlavor"; - public static final String RADIATION_DURATION = "radiation duration"; + String RADIATION_DURATION = "radiation duration"; - public static final String RADIATION_DOSAGE = "radiation dosage"; + String RADIATION_DOSAGE = "radiation dosage"; - public static final String STATUS_CODE = "statusCode"; + String STATUS_CODE = "statusCode"; - public static final String ONSET_DATETIME = "onset datetime"; + String ONSET_DATETIME = "onset datetime"; - public static final String ABATEMENT_DATETIME = "abatement datetime"; + String ABATEMENT_DATETIME = "abatement datetime"; - public static final String RECORDED_DATETIME = "recorded datetime"; + String RECORDED_DATETIME = "recorded datetime"; - public static final String REPEAT_NUMBER = "repeatNumber"; + String REPEAT_NUMBER = "repeatNumber"; - public static final String ONSET_AGE = "Onset Age"; + String ONSET_AGE = "Onset Age"; - public static final String REFERENCE = "reference"; + String REFERENCE = "reference"; - public static final String RELATIONSHIP = "relationship"; + String RELATIONSHIP = "relationship"; - public static final String DIAGNOSIS = "diagnosis"; + String DIAGNOSIS = "diagnosis"; - public static final String PRINCIPAL_DIAGNOSIS = "principal diagnosis"; + String PRINCIPAL_DIAGNOSIS = "principal diagnosis"; - public static final String ACTION_NEGATION_IND = "actionNegationInd"; + String ACTION_NEGATION_IND = "actionNegationInd"; - public String generate(MeasureExport me) throws Exception; + String generate(MeasureExport me) throws Exception; } diff --git a/src/main/java/gov/cms/madie/hqmf/HQMFAttributeGenerator.java b/src/main/java/gov/cms/madie/hqmf/HQMFAttributeGenerator.java index 82028d1..f172799 100644 --- a/src/main/java/gov/cms/madie/hqmf/HQMFAttributeGenerator.java +++ b/src/main/java/gov/cms/madie/hqmf/HQMFAttributeGenerator.java @@ -11,7 +11,7 @@ public class HQMFAttributeGenerator extends HQMFDataCriteriaElementGenerator { private MeasureExport measureExport; @Override - public String generate(MeasureExport me) throws Exception { + public String generate(MeasureExport measureExport) throws Exception { return null; } diff --git a/src/main/java/gov/cms/madie/hqmf/HQMFDataCriteriaElementGenerator.java b/src/main/java/gov/cms/madie/hqmf/HQMFDataCriteriaElementGenerator.java index 2a7fe55..b4d14f0 100644 --- a/src/main/java/gov/cms/madie/hqmf/HQMFDataCriteriaElementGenerator.java +++ b/src/main/java/gov/cms/madie/hqmf/HQMFDataCriteriaElementGenerator.java @@ -25,7 +25,7 @@ public class HQMFDataCriteriaElementGenerator implements Generator { /** The occurrence map. */ - private Map occurrenceMap = new HashMap(); + private final Map occurrenceMap = new HashMap(); protected String extensionValue = null; @@ -36,15 +36,15 @@ public class HQMFDataCriteriaElementGenerator implements Generator { /** * Generate hqm for measure. * - * @param me the me + * @param measureExport- instance of MeasureExport * @return the string * @throws Exception the exception */ @Override - public String generate(MeasureExport me) throws Exception { + public String generate(MeasureExport measureExport) throws Exception { String dataCriteria = ""; - getExtensionValueBasedOnVersion(me); - dataCriteria = getHQMFXmlString(me); + getExtensionValueBasedOnVersion(measureExport); + dataCriteria = getHQMFXmlString(measureExport); return dataCriteria; } @@ -64,20 +64,20 @@ public void generateAttributeTagForFunctionalOp( /** * Gets the HQMF xml string. * - * @param me the me + * @param measureExport- an instance of MeasureExport * @return the HQMF xml string */ - private String getHQMFXmlString(MeasureExport me) { - XmlProcessor dataCriteriaXMLProcessor = createDateCriteriaTemplate(me); - me.setHqmfXmlProcessor(dataCriteriaXMLProcessor); + private String getHQMFXmlString(MeasureExport measureExport) { + XmlProcessor dataCriteriaXMLProcessor = createDateCriteriaTemplate(measureExport); + measureExport.setHqmfXmlProcessor(dataCriteriaXMLProcessor); - String simpleXMLStr = me.getSimpleXml(); + String simpleXMLStr = measureExport.getSimpleXml(); XmlProcessor simpleXmlprocessor = new XmlProcessor(simpleXMLStr); - me.setSimpleXmlProcessor(simpleXmlprocessor); + measureExport.setSimpleXmlProcessor(simpleXmlprocessor); - prepHQMF(me); + prepHQMF(measureExport); - createDataCriteriaForQDMELements(me, dataCriteriaXMLProcessor, simpleXmlprocessor); + createDataCriteriaForQDMELements(measureExport, dataCriteriaXMLProcessor, simpleXmlprocessor); addDataCriteriaComment(dataCriteriaXMLProcessor); return dataCriteriaXMLProcessor.transform(dataCriteriaXMLProcessor.getOriginalDoc(), true); } @@ -85,10 +85,10 @@ private String getHQMFXmlString(MeasureExport me) { /** * Creates the date criteria template. * - * @param me the me + * @param measureExport- an instance of MeasureExport * @return the string */ - private XmlProcessor createDateCriteriaTemplate(MeasureExport me) { + private XmlProcessor createDateCriteriaTemplate(MeasureExport measureExport) { XmlProcessor outputProcessor = new XmlProcessor( ""); diff --git a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFClauseLogicGenerator.java b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFClauseLogicGenerator.java index ce69b73..1924e55 100644 --- a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFClauseLogicGenerator.java +++ b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFClauseLogicGenerator.java @@ -132,8 +132,8 @@ public class HQMFClauseLogicGenerator implements Generator { } @Override - public String generate(MeasureExport me) throws Exception { - measureExport = me; + public String generate(MeasureExport measureExport) throws Exception { + this.measureExport = measureExport; createUsedSubTreeRefMap(); generateSubTreeXML(); return null; diff --git a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaElementGenerator.java b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaElementGenerator.java index 055309b..4ae83d3 100644 --- a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaElementGenerator.java +++ b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaElementGenerator.java @@ -137,8 +137,8 @@ private void createDataCriteriaForQDMELements( } } - protected void getExtensionValueBasedOnVersion(MeasureExport me) { - if (me != null) { + protected void getExtensionValueBasedOnVersion(MeasureExport measureExport) { + if (measureExport != null) { extensionValue = getDataCriteriaExtValueBasedOnVersion(); } } @@ -146,13 +146,13 @@ protected void getExtensionValueBasedOnVersion(MeasureExport me) { /** * Generate measure grp item count qdm entries. * - * @param me the me + * @param measureExport - an instance of MeasureExport * @param dataCriteriaXMLProcessor the data criteria xml processor * @param measureGroupingItemCountList the measure grouping item count list * @throws XPathExpressionException the x path expression exception */ private void generateMeasureGrpnItemCountQDMEntries( - MeasureExport me, + MeasureExport measureExport, XmlProcessor dataCriteriaXMLProcessor, NodeList measureGroupingItemCountList) throws XPathExpressionException { @@ -170,22 +170,27 @@ private void generateMeasureGrpnItemCountQDMEntries( "/measure/elementLookUp/qdm[" + getUUIDString(itemCountIDList) + "]"; NodeList measureGroupingElementRefNodeList = - me.getSimpleXmlProcessor() + measureExport + .getSimpleXmlProcessor() .findNodeList( - me.getSimpleXmlProcessor().getOriginalDoc(), xpathforElementLookUpElements); - generateItemCountQDMEntries(me, dataCriteriaXMLProcessor, measureGroupingElementRefNodeList); + measureExport.getSimpleXmlProcessor().getOriginalDoc(), + xpathforElementLookUpElements); + generateItemCountQDMEntries( + measureExport, dataCriteriaXMLProcessor, measureGroupingElementRefNodeList); } /** * Generate supplemental data qdm entries. * - * @param me the me + * @param measureExport - an instance of MeasureExport * @param dataCriteriaXMLProcessor the data criteria xml processor * @param supplementalDataElements the supplemental data elements * @throws XPathExpressionException the x path expression exception */ private void generateOtherSupplementalDataQDMEntries( - MeasureExport me, XmlProcessor dataCriteriaXMLProcessor, NodeList supplementalDataElements) + MeasureExport measureExport, + XmlProcessor dataCriteriaXMLProcessor, + NodeList supplementalDataElements) throws XPathExpressionException { if (supplementalDataElements == null || supplementalDataElements.getLength() < 1) { return; @@ -200,23 +205,26 @@ private void generateOtherSupplementalDataQDMEntries( + getUUIDString(supplementalElemenRefIds) + "][@suppDataElement != 'true']"; NodeList otherSupplementalQDMNodeList = - me.getSimpleXmlProcessor() + measureExport + .getSimpleXmlProcessor() .findNodeList( - me.getSimpleXmlProcessor().getOriginalDoc(), xpathforOtherSupplementalDataElements); + measureExport.getSimpleXmlProcessor().getOriginalDoc(), + xpathforOtherSupplementalDataElements); - generateSupplementalDataQDMEntries(me, dataCriteriaXMLProcessor, otherSupplementalQDMNodeList); + generateSupplementalDataQDMEntries( + measureExport, dataCriteriaXMLProcessor, otherSupplementalQDMNodeList); } /** * Generate supplemental data qdm entries. * - * @param me the me + * @param measureExport - an instance of MeasureExport * @param dataCriteriaXMLProcessor the data criteria xml processor * @param qdmNodeList the qdm node list * @throws XPathExpressionException the x path expression exception */ private void generateSupplementalDataQDMEntries( - MeasureExport me, XmlProcessor dataCriteriaXMLProcessor, NodeList qdmNodeList) + MeasureExport measureExport, XmlProcessor dataCriteriaXMLProcessor, NodeList qdmNodeList) throws XPathExpressionException { for (int j = 0; j < qdmNodeList.getLength(); j++) { Node qdmNode = qdmNodeList.item(j); @@ -234,7 +242,8 @@ private void generateSupplementalDataQDMEntries( dataCriteriaXMLProcessor.findNode( dataCriteriaXMLProcessor.getOriginalDoc(), xpathForQDMEntry); if (qmdEntryIDNode == null) { - createXmlForDataCriteria(qdmNode, dataCriteriaXMLProcessor, me.getSimpleXmlProcessor()); + createXmlForDataCriteria( + qdmNode, dataCriteriaXMLProcessor, measureExport.getSimpleXmlProcessor()); } } } @@ -242,13 +251,13 @@ private void generateSupplementalDataQDMEntries( /** * Generate Item Count qdm entries. * - * @param me the me + * @param measureExport - an instance of MeasureExport * @param dataCriteriaXMLProcessor the data criteria xml processor * @param qdmNodeList the qdm node list * @throws XPathExpressionException the x path expression exception */ private void generateItemCountQDMEntries( - MeasureExport me, XmlProcessor dataCriteriaXMLProcessor, NodeList qdmNodeList) + MeasureExport measureExport, XmlProcessor dataCriteriaXMLProcessor, NodeList qdmNodeList) throws XPathExpressionException { for (int j = 0; j < qdmNodeList.getLength(); j++) { Node qdmNode = qdmNodeList.item(j); @@ -271,7 +280,8 @@ private void generateItemCountQDMEntries( dataCriteriaXMLProcessor.findNode( dataCriteriaXMLProcessor.getOriginalDoc(), xpathForQDMEntry); if (qmdEntryIDNode == null) { - createXmlForDataCriteria(qdmNode, dataCriteriaXMLProcessor, me.getSimpleXmlProcessor()); + createXmlForDataCriteria( + qdmNode, dataCriteriaXMLProcessor, measureExport.getSimpleXmlProcessor()); } } } diff --git a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaElementGeneratorForCodes.java b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaElementGeneratorForCodes.java index 7d80dfb..49b0e4d 100644 --- a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaElementGeneratorForCodes.java +++ b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaElementGeneratorForCodes.java @@ -20,16 +20,17 @@ public class HQMFDataCriteriaElementGeneratorForCodes implements Generator { /** * Generate hqm for measure. * - * @param me the me + * @param measureExport- an instance of MeasureExport * @return the string */ @Override - public String generate(MeasureExport me) { + public String generate(MeasureExport measureExport) { // This was previously determined by MAT version number, now directly using constant extensionValue = VERSION_5_0_ID; - XmlProcessor dataCriteriaXMLProcessor = me.getHqmfXmlProcessor(); + XmlProcessor dataCriteriaXMLProcessor = measureExport.getHqmfXmlProcessor(); - createDataCriteriaForQDMELements(dataCriteriaXMLProcessor, me.getSimpleXmlProcessor()); + createDataCriteriaForQDMELements( + dataCriteriaXMLProcessor, measureExport.getSimpleXmlProcessor()); return dataCriteriaXMLProcessor.transform(dataCriteriaXMLProcessor.getOriginalDoc(), true); } diff --git a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaGenerator.java b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaGenerator.java index 9fda873..16dc8b2 100644 --- a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaGenerator.java +++ b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFDataCriteriaGenerator.java @@ -12,26 +12,26 @@ public class HQMFDataCriteriaGenerator implements Generator { /** * Generate hqmf for measure. * - * @param me the me + * @param measureExport- an instance of MeasureExport * @return the string * @throws Exception the exception */ @Override - public String generate(MeasureExport me) throws Exception { + public String generate(MeasureExport measureExport) throws Exception { HQMFDataCriteriaElementGenerator cqlBasedHQMFDataCriteriaElementGenerator = new HQMFDataCriteriaElementGenerator(); - cqlBasedHQMFDataCriteriaElementGenerator.generate(me); + cqlBasedHQMFDataCriteriaElementGenerator.generate(measureExport); HQMFPopulationLogicGenerator cqlBasedHQMFPopulationLogicGenerator = new HQMFPopulationLogicGenerator(); - cqlBasedHQMFPopulationLogicGenerator.generate(me); + cqlBasedHQMFPopulationLogicGenerator.generate(measureExport); HQMFMeasureObservationLogicGenerator cqlBasedHQMFMeasureObservationLogicGenerator = new HQMFMeasureObservationLogicGenerator(); - cqlBasedHQMFMeasureObservationLogicGenerator.generate(me); + cqlBasedHQMFMeasureObservationLogicGenerator.generate(measureExport); - XmlProcessor dataCriteriaXMLProcessor = me.getHqmfXmlProcessor(); + XmlProcessor dataCriteriaXMLProcessor = measureExport.getHqmfXmlProcessor(); return removePreambleAndRootTags( dataCriteriaXMLProcessor.transform(dataCriteriaXMLProcessor.getOriginalDoc(), true)); } diff --git a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFGenerator.java b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFGenerator.java index 5a0d3ee..a0f4923 100644 --- a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFGenerator.java +++ b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFGenerator.java @@ -28,26 +28,26 @@ public class HQMFGenerator implements Generator { /** * Generate hqmf for CQL Based measures (QDM version 5.6) * - * @param me the me + * @param measureExport- an instance of MeasureExport * @return the string */ @Override - public String generate(MeasureExport me) throws Exception { + public String generate(MeasureExport measureExport) throws Exception { try { // MAT 6911: Export CQL based HQMF w/ Meta Data Section - String hqmfXML = hqmfMeasureDetailsGenerator.generate(me); + String hqmfXML = hqmfMeasureDetailsGenerator.generate(measureExport); // Inline comments are added after the end of last componentOf tag. // This is removed in this method hqmfXML = replaceInlineCommentFromEnd(hqmfXML); - String dataCriteriaXML = hqmfDataCriteriaGenerator.generate(me); + String dataCriteriaXML = hqmfDataCriteriaGenerator.generate(measureExport); hqmfXML = appendToHQMF(dataCriteriaXML, hqmfXML); XmlProcessor hqmfProcessor = new XmlProcessor(hqmfXML); - me.setHqmfXmlProcessor(hqmfProcessor); + measureExport.setHqmfXmlProcessor(hqmfProcessor); // generateNarrative(me); - return finalCleanUp(me); + return finalCleanUp(measureExport); } catch (Exception e) { logger.error( "Unable to generate HQMF for QDM v5.6. Exception Stack Strace is as followed : "); @@ -86,13 +86,15 @@ private String appendToHQMF(String dataCriteriaXML, String hqmfXML) { /** * Final clean up. * - * @param me the me + * @param measureExport- an instance of MeasureExport * @return the string */ - private String finalCleanUp(MeasureExport me) { - HQMFFinalCleanUp.clean(me); + private String finalCleanUp(MeasureExport measureExport) { + HQMFFinalCleanUp.clean(measureExport); return removeXmlTagNamespace( - me.getHqmfXmlProcessor().transform(me.getHqmfXmlProcessor().getOriginalDoc(), true)); + measureExport + .getHqmfXmlProcessor() + .transform(measureExport.getHqmfXmlProcessor().getOriginalDoc(), true)); } /** diff --git a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFMeasureDetailsGenerator.java b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFMeasureDetailsGenerator.java index 3a63a49..f7881f1 100644 --- a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFMeasureDetailsGenerator.java +++ b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFMeasureDetailsGenerator.java @@ -21,9 +21,8 @@ public class HQMFMeasureDetailsGenerator implements Generator { "xsl/qdm_v5_6_measure_details.xsl"; @Override - public String generate(MeasureExport me) { - String simpleXML = me.getSimpleXml(); - String releaseVersion = me.getReleaseVersion(); + public String generate(MeasureExport measureExport) { + String simpleXML = measureExport.getSimpleXml(); simpleXML = addReleaseVersionToSimpleXML(simpleXML); String measureDetailsHQMF_XML = diff --git a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFMeasureObservationLogicGenerator.java b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFMeasureObservationLogicGenerator.java index acba644..68f3288 100644 --- a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFMeasureObservationLogicGenerator.java +++ b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFMeasureObservationLogicGenerator.java @@ -31,7 +31,7 @@ public class HQMFMeasureObservationLogicGenerator extends HQMFClauseLogicGenerat private Map measureGroupingMap = new TreeMap<>(); - private MeasureExport me; + private MeasureExport measureExport; private String scoringType; @@ -64,13 +64,13 @@ public class HQMFMeasureObservationLogicGenerator extends HQMFClauseLogicGenerat } @Override - public String generate(MeasureExport me) throws Exception { - this.me = me; - setMeasureExport(me); - getMeasureScoringType(me); - generateClauseLogicMap(me); - getAllMeasureGroupings(me); - generateMeasureObSection(me); + public String generate(MeasureExport measureExport) throws Exception { + this.measureExport = measureExport; + setMeasureExport(measureExport); + getMeasureScoringType(measureExport); + generateClauseLogicMap(measureExport); + getAllMeasureGroupings(measureExport); + generateMeasureObSection(measureExport); return null; } @@ -307,7 +307,8 @@ private Node getAssociatedPopulationNode(Node measureObservationNode) "//measureGrouping/group/clause[@uuid = '" + associatedPopulationUUID + "']"; Node associatedPopulationNode = - me.getSimpleXmlProcessor() + measureExport + .getSimpleXmlProcessor() .findNode(measureObservationNode.getOwnerDocument(), associatedClauseXPath); return associatedPopulationNode; } @@ -365,7 +366,9 @@ public Element createExpressionTag(Node item, Document doc, Node cqlFunctionNode try { Node cqlLibraryNameNode = - me.getSimpleXmlProcessor().findNode(item.getOwnerDocument(), cqlLibraryNameXPath); + measureExport + .getSimpleXmlProcessor() + .findNode(item.getOwnerDocument(), cqlLibraryNameXPath); String libraryName = ""; if (cqlLibraryNameNode != null) { libraryName = cqlLibraryNameNode.getTextContent(); @@ -1000,7 +1003,9 @@ private String generateValueAndExpressionTag( String qdmUUID = node.getAttributes().getNamedItem("id").getNodeValue(); String xPath = "/measure/elementLookUp/qdm[@uuid ='" + qdmUUID + "']"; Node qdmNode = - me.getSimpleXmlProcessor().findNode(me.getSimpleXmlProcessor().getOriginalDoc(), xPath); + measureExport + .getSimpleXmlProcessor() + .findNode(measureExport.getSimpleXmlProcessor().getOriginalDoc(), xPath); String dataType = qdmNode.getAttributes().getNamedItem("datatype").getNodeValue(); String qdmName = qdmNode.getAttributes().getNamedItem(NAME).getNodeValue(); String ext = qdmName + "_" + dataType; @@ -1015,9 +1020,10 @@ private String generateValueAndExpressionTag( qdmAttributeName = node.getFirstChild().getAttributes().getNamedItem(NAME).getNodeValue(); } Node idNodeQDM = - me.getHqmfXmlProcessor() + measureExport + .getHqmfXmlProcessor() .findNode( - me.getHqmfXmlProcessor().getOriginalDoc(), + measureExport.getHqmfXmlProcessor().getOriginalDoc(), "//entry/*/id[@root='" + root + "'][@extension=\"" + ext + "\"]"); if (idNodeQDM != null) { Node entryNodeForElementRef = idNodeQDM.getParentNode().getParentNode(); @@ -1111,30 +1117,32 @@ public Node createNewMeasureObservationSection(XmlProcessor outputProcessor) { /** * Get Measure Scoring type. * - * @param me - MeasureExport + * @param measureExport - MeasureExport * @throws XPathExpressionException - {@link Exception} */ - private void getMeasureScoringType(MeasureExport me) throws XPathExpressionException { + private void getMeasureScoringType(MeasureExport measureExport) throws XPathExpressionException { String xPathScoringType = "/measure/measureDetails/scoring/text()"; javax.xml.xpath.XPath xPath = XPathFactory.newInstance().newXPath(); scoringType = (String) xPath.evaluate( xPathScoringType, - me.getSimpleXmlProcessor().getOriginalDoc(), + measureExport.getSimpleXmlProcessor().getOriginalDoc(), XPathConstants.STRING); } /** * Method to populate clause UUID and displayName. * - * @param me - MeasureExport + * @param measureExport - MeasureExport * @throws XPathExpressionException - {@link Exception} */ - private void generateClauseLogicMap(MeasureExport me) throws XPathExpressionException { + private void generateClauseLogicMap(MeasureExport measureExport) throws XPathExpressionException { String xPath = "/measure/subTreeLookUp/subTree"; NodeList subTreeNodeList = - me.getSimpleXmlProcessor().findNodeList(me.getSimpleXmlProcessor().getOriginalDoc(), xPath); + measureExport + .getSimpleXmlProcessor() + .findNodeList(measureExport.getSimpleXmlProcessor().getOriginalDoc(), xPath); for (int i = 0; i < subTreeNodeList.getLength(); i++) { String uuid = subTreeNodeList.item(i).getAttributes().getNamedItem(UUID).getNodeValue(); Node firstChildNode = subTreeNodeList.item(i).getFirstChild(); @@ -1147,13 +1155,15 @@ private void generateClauseLogicMap(MeasureExport me) throws XPathExpressionExce /** * Method to populate all measure groupings in measureGroupingMap. * - * @param me - MeasureExport + * @param measureExport - MeasureExport * @throws XPathExpressionException - {@link Exception} */ - private void getAllMeasureGroupings(MeasureExport me) throws XPathExpressionException { + private void getAllMeasureGroupings(MeasureExport measureExport) throws XPathExpressionException { String xPath = "/measure/measureGrouping/group"; NodeList measureGroupings = - me.getSimpleXmlProcessor().findNodeList(me.getSimpleXmlProcessor().getOriginalDoc(), xPath); + measureExport + .getSimpleXmlProcessor() + .findNodeList(measureExport.getSimpleXmlProcessor().getOriginalDoc(), xPath); for (int i = 0; i < measureGroupings.getLength(); i++) { String measureGroupingSequence = measureGroupings.item(i).getAttributes().getNamedItem("sequence").getNodeValue(); diff --git a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFPopulationLogicGenerator.java b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFPopulationLogicGenerator.java index f017185..df9c4b4 100644 --- a/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFPopulationLogicGenerator.java +++ b/src/main/java/gov/cms/madie/hqmf/qdm_5_6/HQMFPopulationLogicGenerator.java @@ -41,7 +41,7 @@ public class HQMFPopulationLogicGenerator extends HQMFClauseLogicGenerator { * mat.server.simplexml.hqmf.HQMFClauseLogicGenerator#generate(mat.model.clause.MeasureExport) */ @Override - public String generate(MeasureExport me) throws Exception { + public String generate(MeasureExport measureExport) throws Exception { /*1. Fetch all Clause Logic HQMF in MAP. 2. Fetch all groupings. 3. For Each Grouping : @@ -68,23 +68,24 @@ public String generate(MeasureExport me) throws Exception { 8. Generate precondition tag typeCode="PRCN" for all children inside top Logical Op and add criteriaRef to it with id and extension. */ - measureExport = me; - getMeasureScoringType(me); - getAllMeasureGroupings(me); - generatePopulationCriteria(me); + this.measureExport = measureExport; + getMeasureScoringType(measureExport); + getAllMeasureGroupings(measureExport); + generatePopulationCriteria(measureExport); return null; } /** * Method to generate population Criteria. * - * @param me - MeasureExport + * @param measureExport - MeasureExport * @throws XPathExpressionException - Exception */ - private void generatePopulationCriteria(MeasureExport me) throws XPathExpressionException { + private void generatePopulationCriteria(MeasureExport measureExport) + throws XPathExpressionException { for (Integer key : measureGroupingMap.keySet()) { Node populationCriteriaComponentElement = - createPopulationCriteriaSection(key.toString(), me.getHqmfXmlProcessor()); + createPopulationCriteriaSection(key.toString(), measureExport.getHqmfXmlProcessor()); NodeList groupingChildList = measureGroupingMap.get(key).getPackageClauses(); log.info("measureGroupingMap: {}", measureGroupingMap); log.info("groupingChildList: {}", groupingChildList); @@ -98,69 +99,75 @@ private void generatePopulationCriteria(MeasureExport me) throws XPathExpression generatePopulationTypeCriteria( groupingChildList.item(i), populationCriteriaComponentElement, - me, + measureExport, "initialPopulationCriteria", "IPOP"); break; case "denominator": - if (checkForRequiredClauseByScoring(me, popType, groupingChildList.item(i))) { + if (checkForRequiredClauseByScoring( + measureExport, popType, groupingChildList.item(i))) { generatePopulationTypeCriteria( groupingChildList.item(i), populationCriteriaComponentElement, - me, + measureExport, "denominatorCriteria", "DENOM"); } break; case "denominatorExclusions": // top Logical Op is OR - if (checkForRequiredClauseByScoring(me, popType, groupingChildList.item(i))) { + if (checkForRequiredClauseByScoring( + measureExport, popType, groupingChildList.item(i))) { generatePopulationTypeCriteria( groupingChildList.item(i), populationCriteriaComponentElement, - me, + measureExport, "denominatorExclusionCriteria", "DENEX"); } break; case "denominatorExceptions": // top Logical Op is OR - if (checkForRequiredClauseByScoring(me, popType, groupingChildList.item(i))) { + if (checkForRequiredClauseByScoring( + measureExport, popType, groupingChildList.item(i))) { generatePopulationTypeCriteria( groupingChildList.item(i), populationCriteriaComponentElement, - me, + measureExport, "denominatorExceptionCriteria", "DENEXCEP"); } break; case "numerator": - if (checkForRequiredClauseByScoring(me, popType, groupingChildList.item(i))) { + if (checkForRequiredClauseByScoring( + measureExport, popType, groupingChildList.item(i))) { generatePopulationTypeCriteria( groupingChildList.item(i), populationCriteriaComponentElement, - me, + measureExport, "numeratorCriteria", "NUMER"); } break; case "numeratorExclusions": // top Logical Op is OR - if (checkForRequiredClauseByScoring(me, popType, groupingChildList.item(i))) { + if (checkForRequiredClauseByScoring( + measureExport, popType, groupingChildList.item(i))) { generatePopulationTypeCriteria( groupingChildList.item(i), populationCriteriaComponentElement, - me, + measureExport, "numeratorExclusionCriteria", "NUMEX"); } break; case "measurePopulation": - if (checkForRequiredClauseByScoring(me, popType, groupingChildList.item(i))) { + if (checkForRequiredClauseByScoring( + measureExport, popType, groupingChildList.item(i))) { generatePopulationTypeCriteria( groupingChildList.item(i), populationCriteriaComponentElement, - me, + measureExport, "measurePopulationCriteria", "MSRPOPL"); } @@ -168,11 +175,12 @@ private void generatePopulationCriteria(MeasureExport me) throws XPathExpression case "measurePopulationExclusions": // If measurePopulationExclusions has no logic added // then it should not be included in populationCriteria as per Stan. - if (checkForRequiredClauseByScoring(me, popType, groupingChildList.item(i))) { + if (checkForRequiredClauseByScoring( + measureExport, popType, groupingChildList.item(i))) { generatePopulationTypeCriteria( groupingChildList.item(i), populationCriteriaComponentElement, - me, + measureExport, "measurePopulationExclusionCriteria", "MSRPOPLEX"); } @@ -180,11 +188,12 @@ private void generatePopulationCriteria(MeasureExport me) throws XPathExpression case "measureObservation": break; case "stratum": - if (checkForRequiredClauseByScoring(me, popType, groupingChildList.item(i))) { + if (checkForRequiredClauseByScoring( + measureExport, popType, groupingChildList.item(i))) { generatePopulationTypeCriteria( groupingChildList.item(i), populationCriteriaComponentElement, - me, + measureExport, "stratifierCriteria", "STRAT"); } @@ -195,21 +204,24 @@ private void generatePopulationCriteria(MeasureExport me) throws XPathExpression } } // for creating SupplementalDataElements Criteria Section - createSupplementalDataElmStratifier(me, populationCriteriaComponentElement.getFirstChild()); - createRiskAdjustmentStratifier(me, populationCriteriaComponentElement.getFirstChild()); + createSupplementalDataElmStratifier( + measureExport, populationCriteriaComponentElement.getFirstChild()); + createRiskAdjustmentStratifier( + measureExport, populationCriteriaComponentElement.getFirstChild()); createScoreUnit( - me, + measureExport, populationCriteriaComponentElement.getFirstChild(), measureGroupingMap.get(key).getScoreUnit()); } } - private void createScoreUnit(MeasureExport me, Node populationCriteriaSection, String scoreUnit) { + private void createScoreUnit( + MeasureExport measureExport, Node populationCriteriaSection, String scoreUnit) { if (StringUtils.isBlank(scoreUnit)) { // No Score Unit provided in measure group return; } - Document doc = me.getHqmfXmlProcessor().getOriginalDoc(); + Document doc = measureExport.getHqmfXmlProcessor().getOriginalDoc(); Element componentElement = doc.createElement("component"); componentElement.setAttribute(TYPE_CODE, "COMP"); @@ -234,7 +246,7 @@ private void createScoreUnit(MeasureExport me, Node populationCriteriaSection, S * * @param item - Node * @param populationCriteriaComponentElement - Element - * @param me - MeasureExport + * @param measureExport - MeasureExport * @param criteriaTagName - String. * @param criteriaTagCodeName - String code value. * @throws XPathExpressionException - Exception @@ -242,7 +254,7 @@ private void createScoreUnit(MeasureExport me, Node populationCriteriaSection, S private void generatePopulationTypeCriteria( Node item, Node populationCriteriaComponentElement, - MeasureExport me, + MeasureExport measureExport, String criteriaTagName, String criteriaTagCodeName) throws XPathExpressionException { @@ -282,7 +294,8 @@ private void generatePopulationTypeCriteria( preConditionElem.setAttribute(TYPE_CODE, "PRCN");*/ if (item.getChildNodes() != null) { for (int i = 0; i < item.getChildNodes().getLength(); i++) { - generatePopulationLogic(initialPopCriteriaElement, item.getChildNodes().item(i), me); + generatePopulationLogic( + initialPopCriteriaElement, item.getChildNodes().item(i), measureExport); } } checkScoringTypeToAssociateIP(initialPopCriteriaElement, item); @@ -329,11 +342,11 @@ private void checkScoringTypeToAssociateIP(Element populationCritieriaElem, Node * Method to generate tags for logic used inside population. * * @param populationTypeCriteriaElement - Element. - * @param me - MeasureExport. + * @param measureExport - MeasureExport. * @throws XPathExpressionException - Exception. */ private void generatePopulationLogic( - Element populationTypeCriteriaElement, Node childNode, MeasureExport me) + Element populationTypeCriteriaElement, Node childNode, MeasureExport measureExport) throws XPathExpressionException { String nodeType; @@ -347,7 +360,8 @@ private void generatePopulationLogic( preConditionElement.setAttribute(TYPE_CODE, "PRCN"); switch (nodeType) { case "cqldefinition": - generateCritRefCQLDefine(preConditionElement, childNode, me.getHqmfXmlProcessor()); + generateCritRefCQLDefine( + preConditionElement, childNode, measureExport.getHqmfXmlProcessor()); break; case "comment": // skipping comment node as of now. @@ -407,11 +421,11 @@ private Node createPopulationCriteriaSection( /** * Get Measure Scoring type. * - * @param me - MeasureExport + * @param measureExport - MeasureExport * @return the measure scoring type * @throws XPathExpressionException - {@link Exception} */ - private void getMeasureScoringType(MeasureExport me) throws XPathExpressionException { + private void getMeasureScoringType(MeasureExport measureExport) throws XPathExpressionException { String xPathScoringType = "/measure/measureDetails/scoring/text()"; javax.xml.xpath.XPath xPath = XPathFactory.newInstance().newXPath(); @@ -419,21 +433,23 @@ private void getMeasureScoringType(MeasureExport me) throws XPathExpressionExcep (String) xPath.evaluate( xPathScoringType, - me.getSimpleXmlProcessor().getOriginalDoc(), + measureExport.getSimpleXmlProcessor().getOriginalDoc(), XPathConstants.STRING); } /** * Method to populate all measure groupings in measureGroupingMap. * - * @param me - MeasureExport + * @param measureExport - MeasureExport * @return the all measure groupings * @throws XPathExpressionException - {@link Exception} */ - private void getAllMeasureGroupings(MeasureExport me) throws XPathExpressionException { + private void getAllMeasureGroupings(MeasureExport measureExport) throws XPathExpressionException { String xPath = "/measure/measureGrouping/group"; NodeList measureGroupings = - me.getSimpleXmlProcessor().findNodeList(me.getSimpleXmlProcessor().getOriginalDoc(), xPath); + measureExport + .getSimpleXmlProcessor() + .findNodeList(measureExport.getSimpleXmlProcessor().getOriginalDoc(), xPath); for (int i = 0; i < measureGroupings.getLength(); i++) { int measureGroupingSequence = Integer.parseInt( @@ -538,15 +554,15 @@ private static boolean checkForPackageClauseLogic(Node node, String popType) { * Create the risk adjustment components. This will create a create a component tag underneath * population critiera section for risk adjustment variables. * - * @param me the measure export + * @param measureExport the measure export * @param parentNode the parent node * @throws XPathExpressionException */ - private void createRiskAdjustmentStratifier(MeasureExport me, Node parentNode) + private void createRiskAdjustmentStratifier(MeasureExport measureExport, Node parentNode) throws XPathExpressionException { String xPathForRiskAdjustmentVariables = "/measure/riskAdjustmentVariables/cqldefinition"; - XmlProcessor simpleXmlProcessor = me.getSimpleXmlProcessor(); + XmlProcessor simpleXmlProcessor = measureExport.getSimpleXmlProcessor(); NodeList riskAdjustmentVariables = simpleXmlProcessor.findNodeList( simpleXmlProcessor.getOriginalDoc(), xPathForRiskAdjustmentVariables); @@ -567,7 +583,7 @@ private void createRiskAdjustmentStratifier(MeasureExport me, Node parentNode) Element component = createRiskAdjustmentComponentNode( - me, cqlUUID, libraryName, riskAdjustmentDefName, "MSRADJ"); + measureExport, cqlUUID, libraryName, riskAdjustmentDefName, "MSRADJ"); parentNode.appendChild(component); } } @@ -575,19 +591,19 @@ private void createRiskAdjustmentStratifier(MeasureExport me, Node parentNode) /** * Creates the component for a risk adjustment variable in the hqmf document * - * @param me the measure export + * @param measureExport the measure export * @param cqlUUID the cql file uuid * @param libraryName the cql library name * @param riskAdjustmentDefName the risk adjustment definition name * @return the component element */ private Element createRiskAdjustmentComponentNode( - MeasureExport me, + MeasureExport measureExport, String cqlUUID, String libraryName, String riskAdjustmentDefName, String type) { - XmlProcessor processor = me.getHqmfXmlProcessor(); + XmlProcessor processor = measureExport.getHqmfXmlProcessor(); Element component = processor.getOriginalDoc().createElement("component"); component.setAttribute(TYPE_CODE, "COMP"); @@ -642,27 +658,31 @@ private Element createRiskAdjustmentComponentNode( /** * Creates Logic for Each Supplemental Data Element Nodes. * - * @param me the me + * @param measureExport - the measure export * @param parentNode - PopulationCriteria First Child Node. * @throws XPathExpressionException the x path expression exception */ - private void createSupplementalDataElmStratifier(MeasureExport me, Node parentNode) + private void createSupplementalDataElmStratifier(MeasureExport measureExport, Node parentNode) throws XPathExpressionException { String xpathForOtherSupplementalQDMs = "/measure/supplementalDataElements/cqldefinition/@uuid"; NodeList supplementalDataElements = - me.getSimpleXmlProcessor() + measureExport + .getSimpleXmlProcessor() .findNodeList( - me.getSimpleXmlProcessor().getOriginalDoc(), xpathForOtherSupplementalQDMs); + measureExport.getSimpleXmlProcessor().getOriginalDoc(), + xpathForOtherSupplementalQDMs); String xPathForLibraryName = "/measure/cqlLookUp/library"; Node libraryNode = - me.getSimpleXmlProcessor() - .findNode(me.getSimpleXmlProcessor().getOriginalDoc(), xPathForLibraryName); + measureExport + .getSimpleXmlProcessor() + .findNode(measureExport.getSimpleXmlProcessor().getOriginalDoc(), xPathForLibraryName); String libraryName = libraryNode.getTextContent(); String xPathForCQLUUID = "/measure/measureDetails/cqlUUID"; Node cqluuidNode = - me.getSimpleXmlProcessor() - .findNode(me.getSimpleXmlProcessor().getOriginalDoc(), xPathForCQLUUID); + measureExport + .getSimpleXmlProcessor() + .findNode(measureExport.getSimpleXmlProcessor().getOriginalDoc(), xPathForCQLUUID); String cqlUUID = cqluuidNode.getTextContent(); if (supplementalDataElements == null || supplementalDataElements.getLength() < 1) { @@ -682,9 +702,11 @@ private void createSupplementalDataElmStratifier(MeasureExport me, Node parentNo String xpathforOtherSupplementalDataElements = "/measure/cqlLookUp/definitions/definition[" + uuidXPathString + "]"; NodeList supplementalQDMNodeList = - me.getSimpleXmlProcessor() + measureExport + .getSimpleXmlProcessor() .findNodeList( - me.getSimpleXmlProcessor().getOriginalDoc(), xpathforOtherSupplementalDataElements); + measureExport.getSimpleXmlProcessor().getOriginalDoc(), + xpathforOtherSupplementalDataElements); if (supplementalQDMNodeList.getLength() < 1) { return; } @@ -695,7 +717,7 @@ private void createSupplementalDataElmStratifier(MeasureExport me, Node parentNo // createRiskAdjustmentComponentNode is good enough for this too. Element componentElement = - createRiskAdjustmentComponentNode(me, cqlUUID, libraryName, qdmName, "SDE"); + createRiskAdjustmentComponentNode(measureExport, cqlUUID, libraryName, qdmName, "SDE"); parentNode.appendChild(componentElement); } }