Esempio n. 1
0
 def _first_visit_tested_positive_no_haart(self):
     healthy_visits = [enc.get_xform() for enc in self.sorted_healthy_encounters()]
     
     for healthy_visit_data in healthy_visits:
         if tested_positive(healthy_visit_data) and not_on_haart(healthy_visit_data):
             return healthy_visit_data
     
     return None
Esempio n. 2
0
 def _first_visit_tested_positive_no_haart_ga_14(self):
     healthy_visits = [enc.get_xform() for enc in self.sorted_healthy_encounters()]
     
     for healthy_visit_data in healthy_visits:
         gest_age = healthy_visit_data.xpath("gestational_age") 
         if gest_age and int(gest_age) > 14 and \
         tested_positive(healthy_visit_data) and not_on_haart(healthy_visit_data):
             return healthy_visit_data
     
     return None
Esempio n. 3
0
 def got_azt_haart_on_consecutive_visits(self):
     prev_azt_or_haart = False
     healthy_visits = [enc.get_xform() for enc in self.sorted_healthy_encounters()]
     for healthy_visit_data in healthy_visits:
         gest_age = healthy_visit_data.xpath("gestational_age")
         if gest_age and int(gest_age) > 14:
             curr_azt_or_haart = healthy_visit_data.found_in_multiselect_node("pmtct", "azt") or not not_on_haart(healthy_visit_data)            
             if curr_azt_or_haart and prev_azt_or_haart: 
                 return True
             prev_azt_or_haart = curr_azt_or_haart