Changeset 1959 for openmrs-modules/patientmatching/src/org/regenstrief/linkage/util/MatchingConfig.java
- Timestamp:
- 07/02/07 13:26:07 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs-modules/patientmatching/src/org/regenstrief/linkage/util/MatchingConfig.java
r1883 r1959 1 1 package org.regenstrief.linkage.util; 2 2 /* 3 * Code refactored in February 2007. The MatchingConfig boject3 * Code refactored in February 2007. The MatchingConfig object 4 4 * was disentangled from the GUI and other classes added to hold 5 5 * the … … 56 56 } 57 57 58 public MatchingConfigRow getMatchingConfigRowByName(String name) { 59 Iterator<MatchingConfigRow> it = row_options.iterator(); 60 while(it.hasNext()) { 61 MatchingConfigRow mcr = it.next(); 62 if(mcr.getName().equals(name)) { 63 return mcr; 64 } 65 } 66 return null; 67 } 68 58 69 public List<MatchingConfigRow> getMatchingConfigRows(){ 59 70 return row_options; … … 143 154 } 144 155 } 145 146 return ret;147 }148 156 return ret; 157 } 158 159 149 160 /** 150 * Returns the indices of the columns for weight scaling161 * Returns the names of the columns for weight scaling (among included ones) 151 162 * 152 163 * @return an array of the column names included in weight scaling, 153 164 * null if no fields require weight scaling 154 165 */ 155 public String[] getScaleWeightColumns() { 166 167 public String[] getScaleWeightColumnNames() { 156 168 int num_rows = row_options.size(); 157 169 … … 162 174 while(it.hasNext()) { 163 175 MatchingConfigRow mcr = it.next(); 164 if(mcr.isScaleWeight() ) {176 if(mcr.isScaleWeight() && mcr.isIncluded()) { 165 177 scale_weight_columns.add(mcr.getName()); 166 178 } … … 174 186 return scale_weight_columns.toArray(result); 175 187 } 176 177 188 } 178 189