Commit 087768fb authored by R.W.Majeed's avatar R.W.Majeed

fixed validation bug reporting same concepts for different patients as duplicates

parent e133de42
......@@ -64,14 +64,18 @@ public class Validator extends AbstractObservationHandler implements Transformat
String patid = t.getPatientId();
String encid = t.getEncounterId();
// check if patient already known
if( prevPatient == null || !prevPatient.equals(patid) ){
// check if patient already known
// new patient
// clear visit
visits.clear();
prevVisit = encid;
visits.add(encid);
// clear concepts
concepts.clear();
prevPatient = patid; // remember patient to suppress errors for the same patient
if( patients.contains(patid) ){
......@@ -90,6 +94,9 @@ public class Validator extends AbstractObservationHandler implements Transformat
}else{
visits.add(encid);
}
// clear concepts
concepts.clear();
}
// check for duplicate non-repeating start+concept tuples
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment