lib/qme/map/map_reduce_builder.rb in quality-measure-engine-1.0.4 vs lib/qme/map/map_reduce_builder.rb in quality-measure-engine-1.1.0
- old
+ new
@@ -95,10 +95,10 @@
reduce += "patient.effective_date = #{@params['effective_date']};
if (patient.provider_performances) {
var tmp = [];
for(var i=0; i<patient.provider_performances.length; i++) {
var value = patient.provider_performances[i];
- if (value['start_date'] <= #{@params['effective_date']} && (value['end_date'] >= #{@params['effective_date']} || value['end_date'] == null))
+ if ((value['start_date'] <= #{@params['effective_date']} || value['start_date'] == null) && (value['end_date'] >= #{@params['effective_date']} || value['end_date'] == null))
tmp.push(value);
}
if (tmp.length == 0) tmp = null;
patient.provider_performances = tmp;
}
\ No newline at end of file