NdcPropertiesModel common = new NdcPropertiesModel(); if (model.getRxcui() != null && rxcui != null) { if (analysisMode && !model.getRxcui().equals(rxcui)) { common.setRxcui(InfoModel.MULTIPLE_VALUES); } else if (model.getRxcui().equals(rxcui)) { common.setRxcui(rxcui); found = true; if (model.getRxcuiName() != null && rxcuiName != null) { if (analysisMode && !model.getRxcuiName().equals(rxcuiName)) { common.setRxcuiName(InfoModel.MULTIPLE_VALUES); } else if (model.getRxcuiName().equals(rxcuiName)) { common.setRxcuiName(rxcuiName); found = true; if (model.getNdc11() != null && ndc11 != null) { if (analysisMode && !model.getNdc11().equals(ndc11)) { common.setNdc11(InfoModel.MULTIPLE_VALUES); } else if (model.getNdc11().equals(ndc11)) { common.setNdc11(ndc11); found = true; if (model.getNdc10() != null && ndc10 != null) { if (analysisMode && !model.getNdc10().equals(ndc10)) { common.setNdc10(InfoModel.MULTIPLE_VALUES); } else if (model.getNdc10().equals(ndc10)) { common.setNdc10(ndc10); found = true;
/** * Instantiates a {@link NdcPropertiesModel} from the specified parameters. * * @param model the model */ public NdcPropertiesModel(NdcPropertiesModel model) { rxcui = model.getRxcui(); rxcuiName = model.getRxcuiName(); ndc11 = model.getNdc11(); ndc10 = model.getNdc10(); ndc9 = model.getNdc9(); splSetId = model.getSplSetId(); propertyList = new ArrayList<>(model.getPropertyList()); }
final NdcPropertiesModel model = new NdcPropertiesModel(); model.setRxcui(concept.getTerminologyId()); model.setRxcuiName(concept.getName()); model.setNdc11(query); model.setSplSetId(null); } else { model.setSplSetId(atom.getCodeId()); model.setPropertyList(properties); model.setNdc9(ndc9); model.setNdc10(ndc10); .debug(" model = " + new NdcPropertiesModel()); return new NdcPropertiesModel();
@Override public NdcPropertiesListModel getModelInCommon(NdcPropertiesListModel model, boolean analysisMode) throws Exception { if (model == null) { return null; } boolean found = false; NdcPropertiesListModel common = new NdcPropertiesListModel(); if (model.getList() != null && list != null) { // Find common ingredient strength values for (final NdcPropertiesModel in : model.getList()) { for (final NdcPropertiesModel in2 : list) { final NdcPropertiesModel commonProperties = in.getModelInCommon(in2, analysisMode); if (commonProperties != null && !common.getList().contains(commonProperties)) { common.getList().add(commonProperties); } found = true; } } } if (!found) { return null; } return common; }
if (model != null) { final ScoredResult result = new ScoredResultJpa(); result.setValue(model.getModelValue()); result.setScore(1); results.add(result);