Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
08/20/08 17:33:39 (5 months ago)
Author:
nribeka
Message:

patient matching module: added simple report generation page. need to do more testing on the page and write a way to persist the report to a file.

Files:

Legend:

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

    r5267 r5321  
    288288                } 
    289289                // choose total or prev_total, depending on which one is closer to estimated matches 
    290                 if(Math.abs(total - true_matches) > Math.abs(prev_total - true_matches)){ 
    291                         // use previous score as threshold 
    292                         mc.setScoreThreshold(prev_mr.getScore()); 
    293                 } else { 
    294                         mc.setScoreThreshold(total_mr.getScore()); 
    295                 } 
     290        if (prev_mr != null && total_mr != null){ 
     291            if(Math.abs(total - true_matches) > Math.abs(prev_total - true_matches)){ 
     292                // use previous score as threshold 
     293                mc.setScoreThreshold(prev_mr.getScore()); 
     294            } else { 
     295                mc.setScoreThreshold(total_mr.getScore()); 
     296            } 
     297        } 
    296298                log.info("new score threshold:\t" + mc.getScoreThreshold()); 
    297299