I have this query:
It counts each type of error made by pharmacy technicians and lists them by tech initials. There is also a column called "Severity" that ranks the severity as major or minor.
Is it possible to have a count of major vs minor errors in there as well?
Code:
TRANSFORM Val(Nz(Count(qryMgrAIT.Key),0)) AS CountOfKey
SELECT qryMgrAIT.tblAITInfo.TechRxEInit, qryMgrAIT.CellNum, qryMgrAIT.Location, Count(qryMgrAIT.Key) AS [Total Of Key]
FROM qryMgrAIT
GROUP BY qryMgrAIT.tblAITInfo.TechRxEInit, qryMgrAIT.CellNum, qryMgrAIT.Location
PIVOT qryMgrAIT.ErrorCode In ("Wrong Drug","Strength","Quantity","Missed PT Notes","Sig (Affecting Dose)","Wrong PT (Same Name)","Wrong PT (Family)","Wrong PT","Wrong Dr. Address","Wrong Ques. Asked","DAW","Refills","Write Date","Sig (Not Affecting Dose)","Wrong MD/NP/PA in Sig","Rx Omitted","Rx Should Be???","TSTF","Non-Link Image","Right Drug Wrong Form","Allergy","DC Date","Days Supply","No Call Card","Order Count","Credit Hold Procedure","Routing");
It counts each type of error made by pharmacy technicians and lists them by tech initials. There is also a column called "Severity" that ranks the severity as major or minor.
Is it possible to have a count of major vs minor errors in there as well?