Two things that might eventually be nice to include (but are currently not hindering any projects, so are really not urgent):
Matching on time-updated variables. At the moment, matching on something like STP is imprecise with dynamic index dates because whilst this can be extracted on the index dates for the cases, it can only be extracted at some fixed date for controls. Although you could use the same fixed date for cases and controls, this might lead to discrepancies on the actual index date. It would be really nice to be able to match based on STP derived at the case index date for both cases and controls. Appreciate that's likely very complex to implement. For geographical attributes it's also unlikely to make a large difference, but there may be future use cases where you want to match on something like some lab value at the case index dates. A workaround for something like STP would be to matched based on some fix date, re-extract STP after matching using patients.with_value_from_file, and then exclude all cases + all their controls if case STP is different, and just the individual control if control STP is different (assuming we've matched to more than one control per case).
Allow date exclusion variables within a range. date_exclusion_variables currently supports before and after, it would be really nice to add between. An example here is that we want to exclude patients that are pregnant within 274 days of the case index dates from the pool of potential control, but not those that are pregnant ever before. Essentially what would be useful is:
Two things that might eventually be nice to include (but are currently not hindering any projects, so are really not urgent):
patients.with_value_from_file
, and then exclude all cases + all their controls if case STP is different, and just the individual control if control STP is different (assuming we've matched to more than one control per case).before
andafter
, it would be really nice to addbetween
. An example here is that we want to exclude patients that are pregnant within 274 days of the case index dates from the pool of potential control, but not those that are pregnant ever before. Essentially what would be useful is: