Created
October 11, 2011 15:23
-
-
Save msarchet/1278384 to your computer and use it in GitHub Desktop.
Schedule Facility Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select | |
RXInfo.Patient, | |
RXInfo.Number, | |
Facility.Name, | |
RxInfo.RefillNumber | |
From scriptassist.RXInfo AS RXInfo | |
Left Join scriptAssist.Patient As PatientT On PatientT.PatientId = RXInfo.PatientID | |
Left Join scriptAssist.Facility On Facility.FacilityID = PatientT.FacilityID | |
Where | |
RXInfo.Schedule In ('2','3','4','5') | |
And ISNull(PatientT.FacilityID, 0) > 0 | |
Order By | |
Facility.Name, | |
RxInfo.Patient, | |
RxInfo.Number, | |
RXInfo.RefillNumber |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment