Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
07/02/07 13:26:07 (1 year ago)
Author:
scentel
Message:

* Added new parameters to the configuration for weight scaling
* Updated documentation for the new weight scaling parameters
* Refactored CharDelimFileAnalyzer, DataBaseAnalyzer and DataSourceAnalyzer classes
* A new object called AnalysisObject to be used in CharDelimFileAnalyzer
* Implemented reset method for CharDelimFileReader
* Added new methods to LinkDBManager for weight scaling
* Added methods to store/get the unique number of non null tokens in a DataColumn
* Added methods for weight scaling to LinkDataSource
* Modified getScaleWeightColumnNames in MatchingConfig to use included columns
* Added scale weight parameters to MatchingConfigRow
* Modified XMLTranslator to set null and non null count, and parse the new configuration file with weight scaling parameters

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/patientmatching/src/org/regenstrief/linkage/util/MatchingConfig.java

    r1883 r1959  
    11package org.regenstrief.linkage.util; 
    22/* 
    3  * Code refactored in February 2007.  The MatchingConfig boject 
     3 * Code refactored in February 2007.  The MatchingConfig object 
    44 * was disentangled from the GUI and other classes added to hold 
    55 * the  
     
    5656        } 
    5757         
     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         
    5869        public List<MatchingConfigRow> getMatchingConfigRows(){ 
    5970                return row_options; 
     
    143154                        } 
    144155                } 
    145                  
    146                return ret; 
    147         } 
    148          
     156                return ret; 
     157        } 
     158         
     159 
    149160        /** 
    150          * Returns the indices of the columns for weight scaling 
     161         * Returns the names of the columns for weight scaling (among included ones) 
    151162         *  
    152163         * @return an array of the column names included in weight scaling, 
    153164         * null if no fields require weight scaling 
    154165         */ 
    155         public String[] getScaleWeightColumns() { 
     166         
     167        public String[] getScaleWeightColumnNames() { 
    156168                int num_rows = row_options.size(); 
    157169                 
     
    162174                while(it.hasNext()) { 
    163175                        MatchingConfigRow mcr = it.next(); 
    164                         if(mcr.isScaleWeight()) { 
     176                        if(mcr.isScaleWeight() && mcr.isIncluded()) { 
    165177                                scale_weight_columns.add(mcr.getName()); 
    166178                        } 
     
    174186                        return scale_weight_columns.toArray(result);  
    175187                } 
    176  
    177188        } 
    178189