I am fine with this for drugs. Make sure you limit it to drugs, and even give the counter example of inpatient admissions where the convention is that duration = end_date - start_date, to emphasize that this is only for drugs. Or if you don’t want to give the other formula, at least make it clear that you only add a day for drugs. You know, even a device should not add a day because the dates are likely procedures (insertion and removal) and that duration is simple subtraction. Drugs are different because the patient picks up pills from a pharmacy and starts taking them.
I would not mention 12 hours as a justification because that wouldn’t be the average. E.g., you know that they started before they stopped, so 2/3 would be a better average. But don’t go there. Plus if it is one dose per day, then I would want to know the number of days that they took a dose and not worry about the fact that the first dose was a little late that day.
You also need to be explicit about the definition of the start_date. It is the first date that the patient took any pill. (It could have been the first day that the patient is taking a full dose.) This is fine and covers the situation where there is a loading dose.
Then the ETL’s job is to set the stop_date, if it is calculated, to your formula given that you know the duration. What if you have the actual stop date and duration and they don’t follow your formula? Should you force your stop date to be a day earlier to fit the duration?
Here is another wrinkle. Some CDMs will have timestamps, too. Some databases have actual times that the drug started and stopped (e.g., inpatient MAR). Then the timestamp’s day portion and the calculated stop_date may not match. E.g., if we know the patient took a qid drug for 10 days, and the timestamps say Jan 1 at 6pm to Jan 11 at 12 noon, the ETL will set the start date to Jan 1 and the stop date to Jan 10, so now the timestamp and lone date do not match. Is that ok?
George