(self)
return XPath("{} = 0".format(count))
count(visit[within_window][@id != coalesce(last_visit_number_{form_id},0)]) = 0
count(visit[within_window][
count ( visit [ within_window ] [
def is_unscheduled_visit(self):
        """count(visit[within_window][@id != coalesce(last_visit_number_{form_id},0)]) = 0"""
        last_visit_id = XPath('@id != {}'.format("coalesce({}, {})".format(self.last_visit, 0)))
        count = XPath.count(
            self.fixture.visit().select_raw(self.within_window()).
            select_raw(last_visit_id)
        )
        return XPath("{} = 0".format(count))
def is_unscheduled_visit ( self ) : last_visit_id = XPath ( '@id != {}' . format ( "coalesce({}, {})" . format ( self . last_visit , 0 ) ) ) count = XPath . count ( self . fixture . visit ( ) . select_raw ( self . within_window ( ) ) . select_raw ( last_visit_id ) ) return XPath ( "{} = 0" . format ( count ) )