No problem, @Akshay. Any feedback to clarify the language limitatons in the tool would be helpful.

The statement ‘between 1 day after and 730 days after index’ does mean column G. Between 1 day after and 730 days after means that the ‘insulin day after index’ must be between 1 and 730.

The ‘between’ part of the statement means that the value of the days to insulin must fall with the range of numbers starting with your first value (1) and your second value (730). The ‘before’ and ‘after’ part is saying how you want to add your value to the index date as ‘days before’ means subtract, and '‘days after’ means add. If you changed your range to say 'between 30 days before and 730 days after index, then if you calculated the days to insulin, any value between -30 and +730 would match column G (30 days before means the index date minus 30 days).

So, looking at your column headings, I understand some of the confusion now: saying ‘Between 1 and 730 das FROM index date’ is operating in a mode where you think of a time window (in this case 730 days) and you say where that 730 day window starts from the start date. That’s one way of thinking of it, but the way the tool works is that you specify the window as a lower bound and upper bound by specifying where the lower bound shoudl be set (1 day after) and the uper bound (730 days after).

Another question for you: in row 3,4 and 5, you calculated 1064 days to insulin from index. In column H, you say 'between 1 day after index and 730 days after index) but I’m not seeing how 1065, 1127 or 1063 days would result in a Y in that column since those values are greater than 730. Could you clarify this? I think I am missing somthing.

One last point on the ‘before - after’ syntax of defining the range: if you don’t want to specify a lower bound or an upper bound, then you can use the ‘All days’ option…if you want to say that the inslulin had to appear any time after 1 day after index, you would say ‘Between 1 day after and all days after index’. If you did it that way, then the 1065, 1127 and 1063 records would be returned because there’s no upper bound to where you are allowed to find the insulin, just as long as it is found 1 day after the index. (days to insulin must be 1 or more).

Hope this helps.