Posted on 2013-01-23
I have the below query
select h.facid, h.patid, h.rxno, h.RoNo, h.PriceCd,d.sig, case when len(ltrim(coalesce(h.ccid, ''))) = 0 then ndc else h.ccid end AS 'NDC/CCID',
h.druglabelname, h.dispensedt, h.dayssupply,e.PatName,
from hrxs h
inner join Pat..vPatNames e on h.facid = e.facid and h.patid = e.patid
inner join dbo.[vw_crystal_ReorderDirectionsExpandedSig] as d on h.FacID = d.facid and h.PatID = d.patid and h.RoNo = d.rono
where h.facid = @FacID and IVType IS NOT NULL and h.DispenseDt between @MStart and @MEnd and h.MOP in(Select * from MOP
The above query gives me a list of drugs.
The client maintains an excel sheet of drugs which appear in the list above but they manually calculate the billing for those exclusion drugs as the system does not have any providence for this.The client is requesting a report to show those excel sheet exclusion drugs out of the list above.How can it be done?Can I implement those drug names in the report or should I create a table for those exclusion drugs and then populate the exclusion list by innerjoining with the above query.
Please suggest ideas.