Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
For example, Rx 123456 is a 30-day prescription with 5 refills. Hence total number of
days’ supply is 30 + (30*5) = 180 days. Each 30 days’ fill can be viewed as an ‘array’ of
days supplied. The FillNumber has an unnormalized relation as it has multiple entries.
FillNumber 00 (Jan 1st 2018), 01 (Feb 14th 2018), 02 (April 1st 2018), 03 (May 4th 2018)
PatientID RxNumber DaysSupply FillNumber Fill Date PeriodStartDate PeriodEndDate
000001 123456 30 -00 - Jan 1st 2018 Jan 1st 2018 Jun 30th 2018
-01 - Feb 14th 2018
-02 - April 1st 2018
-03 - May 4th 2018
July 27th 2018 1
I am not sure if this is the correct way of calculating PDC and would really like to get
feedback on this
SELECT PatientID, PrescriptionNumber, DaysSupply, PeriodStartDate-PeriodEndDate
AS NumberOfDaysinPeriod, sum(FillNumber)*30 AS NumberofDaysinPeriodCovered,
NumberOfDaysin PeriodCovered/NumberOfDaysinPeriod*100 AS
ProportionDaysCovered
FROM Prescriptions