How do I negate a statement? https://pypi.org/project/durable-rules/
I would like something like this but the !
doesn't work.
with ruleset('awv'):
@when_all(m.visits.anyItem(item.cpt_codes.anyItem( item.matches('G0438') | item.matches('G0439') )))
def had_awv_exam_or_awv_visit_more_than_12_month(c):
print('had_awv_exam_or_awv_visit_more_than_12_month')
@when_all(m.visits.anyItem(!item.cpt_codes.anyItem( item.matches('G0438') | item.matches('G0439') )))
def never_awv_exam_or_awv_visit(c):
print('no_awv_exam_or_awv_visit')