示例#1
0
文件: pregnancy.py 项目: dimagi/bhoma
 def tested_positive_rpr_and_had_later_visit(self):
     found_rpr = False
     for enc in self.sorted_encounters():
         if enc.get_xform().xpath("rpr") == "r":
             found_rpr = True
             continue
         # this healthy visit must have come after a positive test
         if found_rpr and is_healthy_pregnancy_encounter(enc):
             return True
     return False
示例#2
0
文件: pregnancy.py 项目: dimagi/bhoma
 def sorted_healthy_encounters(self):
     # TODO: should we sort by visit number or by date?
     return [enc for enc in self.sorted_encounters() if is_healthy_pregnancy_encounter(enc)]