(self)
return "coalesce({}, {} - {})".format(due, SCHEDULE_MAX_DATE, XPath.date(self.anchor))
instance(...)/schedule/visit[before_window][1]/@due
instance(...)/schedule/visit[before_window][1]/
instance ( ... ) / schedule / visit [ before_window ] [ 1 ] /
def due_first(self):
        """instance(...)/schedule/visit[before_window][1]/@due"""
        # Only uses @due since we can't have a repeat visit on the first visit
        due = self.fixture.visit().select_raw(self.before_window()).select_raw("1").slash("@due")
        return "coalesce({}, {} - {})".format(due, SCHEDULE_MAX_DATE, XPath.date(self.anchor))
def due_first ( self ) : # Only uses @due since we can't have a repeat visit on the first visit due = self . fixture . visit ( ) . select_raw ( self . before_window ( ) ) . select_raw ( "1" ) . slash ( "@due" ) return "coalesce({}, {} - {})" . format ( due , SCHEDULE_MAX_DATE , XPath . date ( self . anchor ) )