use of gov.cms.qpp.conversion.model.validation.SubPopulationLabel in project qpp-conversion-tool by CMSgov.
the class MeasureDataEncoder method internalEncode.
/**
* internalEncode for measure data
*
* @param wrapper object that will represent the measure data
* @param node object that represents the measure data
* @throws EncodeException If error occurs during encoding
*/
@Override
protected void internalEncode(JsonWrapper wrapper, Node node) {
if (!SubPopulationLabel.IPOP.hasAlias(node.getValue(MEASURE_TYPE))) {
Map<SubPopulationLabel, String> measureTypeMapper = initializeMeasureTypeMap();
String measureType = node.getValue(MEASURE_TYPE);
Node aggCount = node.findFirstNode(TemplateId.ACI_AGGREGATE_COUNT);
String encodeLabel = measureTypeMapper.get(SubPopulationLabel.findPopulation(measureType));
wrapper.putInteger(encodeLabel, aggCount.getValue(AGGREGATE_COUNT));
maintainContinuity(wrapper, aggCount, encodeLabel);
}
}
Aggregations