82. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 1/31/2018 9:02:23 AM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

82.1 Files compared

# Location File Last Modified
1 NVCC_2.2_01162018.zip\NVCC\SQL NVCC_usp_GetVAMeds.sql Thu Oct 19 16:37:26 2017 UTC
2 NVCC_2.2_01162018.zip\NVCC\SQL NVCC_usp_GetVAMeds.sql Wed Jan 31 13:37:32 2018 UTC

82.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 216
Changed 1 2
Inserted 0 0
Removed 0 0

82.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

82.4 Active regular expressions

No regular expressions were active.

82.5 Comparison detail

  1   --USE [NWI C_PanelMgm t]
  2   --GO
  3  
  4   SET ANSI_N ULLS ON
  5   GO
  6  
  7   SET QUOTED _IDENTIFIE R ON
  8   GO
  9  
  10   IF (SELECT  OBJECT_ID ('App.NVCC _usp_GetVA Meds')) IS  NOT NULL
  11           DR OP PROCEDU RE App.NVC C_usp_GetV AMeds
  12   GO
  13  
  14   CREATE PRO CEDURE [Ap p].[NVCC_u sp_GetVAMe ds]
  15           @p id bigint  -- this is  the patie ntsid
  16  
  17   -- NOTICE:
  18   -- Do not  edit the s tored proc edure live  on the se rver. Code  to genera te
  19   -- the pro cedures is  stored in  the proje ct reposit ory. Any c hanges mad e
  20   -- that ar e not reco rded in th e reposito ry will be  overwritt en.
  21  
  22   AS
  23   --======== ========== ========== ========== ========== ========== ========== ========== ===
  24   --Requesto r                                : Non Va C oordinated  Care Proj ect
  25   --Author                  : Jerr y Kohler ( Original s cript by D r. Charles  Demosthen es)
  26   --Object/S P Name                  : NVCC_u sp_GetVAMe ds
  27   --SERVER                                    SERVER        
  28   --Data Bas e                                : NWIC_Pan elMgmt
  29   --Schema                                    : app
  30   --Report                                    : N/A
  31   --Folder                                    : N/A
  32   --Report L oc             : N/A
  33   --Job                     : None
  34   --Job Loc                 : None
  35   --Note                    : 
  36   --Date Cre ated           : 02-0 4-2016
  37   --
  38   --Last Cha nged           : 08-2 3-2016
  39   --Last Cha nged By                 : Jerry  Kohler - N orthwest I nnovation  Center (NW IC)
  40   --Reason F or Change               : Users  registerin g complain ts that RE FDOC is no t showing
  41   --                          the  same numbe r of curre nt prescri ptions as  CPRS.
  42   --                          Afte r a meetin g with Jud y & Dr. D  they had u s change
  43   --                          the  criteria t o all pres criptions  released o ver the la st
  44   --                          year  regardles s of statu s or curre ntly takin g (see
  45   --                          comm ents embed ded below)
  46   --
  47   --Last Cha nged           : 08-2 2-2016
  48   --Last Cha nged By                 : Brian  Diggs - No rthwest In novation C enter (NWI C)
  49   --Reason F or Change               : Reconc iled with  version on  server.
  50   --                          Upda ted docume ntation an d creation /signing s tandards
  51   --                                 : Remove d station  parameter  in order t o expand t he search
  52   --                          for  a patient' s VA meds  from a sin gle statio n to any
  53   --                          stat ion a pati ent is ass ociated wi th.
  54   --
  55   --Purpose                 : Retr ieve a pat ient's med ications i ssued by V A for
  56   --                          incl usion into  NVCC docu mentation
  57   --======== ========== ========== ========== ========== ========== ========== ========== ===
  58  
  59  
  60   BEGIN
  61       -- SET  NOCOUNT O N added to  prevent e xtra resul t sets fro m
  62       -- int erfering w ith SELECT  statement s.
  63       SET NO COUNT ON;
  64  
  65       WITH M yDrugs AS
  66          (
  67   --      de clare @PID  int = 100 0862763
  68   --      se lect PTSid  from [app ].[udf_All PatientsSI Ds](@pid)
  69           SE LECT ROF.S ta3n
  70                  ,ROF.[ RxOutpatSI D]
  71                  ,ROF.[ FillNumber ]
  72                  ,RO.[R xStatus]
  73                  ,ROF.[ LocalDrugN ameWithDos e]
  74                  ,ROF.[ IssueDate]
  75                  ,ROF.[ FillDateTi me]
  76                               ,RO. NextPossib leFillDate
  77                  ,ROF.[ Qty]
  78                  ,ROF.[ DaysSupply ]
  79                               ,RO. [MaxRefill s]
  80                  ,Row_N umber() OV ER(partiti on by ROF. [LocalDrug NameWithDo se] Order  by ROF.[Fi llDateTime ] desc) AS  Rn
  81           FR OM [CDWWor k].[RxOut] .[RxOutpat Fill] ROF
  82                             INNER  JOIN CDWWo rk.RxOut.R xOutpat AS  RO
  83                                      ON ROF.R xOutpatSID  = RO.RxOu tpatSID
  84           WH ERE ROF.pa tientsid i n (select  PTSid from  [app].[ud f_AllPatie ntsSIDs](@ pid)) 
  85              AND (Relea seDateTime  > dateadd (year, -1,  SYSDATETI ME()))
  86                      AN D ReleaseD ateTime IS  NOT NULL
  87          )
  88       
  89           SE LECT dl.St a3n
  90                  ,dl.rx outpatsid
  91                  ,dl.lo caldrugnam ewithdose
  92                  ,cast( dl.filldat etime as d ate) as fi lldate
  93                  ,dl.qt y as qty
  94                  ,dl.Fi llNumber
  95                  ,sig.s ig
  96                  ,dl.is suedate
  97                               ,iif (dl.NextPo ssibleFill Date is nu ll,'N/A',  cast(dl.Ne xtPossible FillDate a s varchar) ) as nextp ossiblefil ldate
  98                               ,iif (dl.maxref ills is nu ll,'0',dl. maxrefills ) as maxre fills
  99                               ,dl. DaysSupply  AS dayssu pply
  100                               ,dl. RxStatus
  101           FR OM MyDrugs  dl
  102           IN NER JOIN C DWWork.RxO ut.RxOutpa tSig sig o n dl.Rxout patsid=sig .RxOutpatS ID
  103           WH ERE dl.Rn  = 1
  104       ORDER  BY dl.RxSt atus, dl.F illDateTim e desc;
  105       
  106   END;
  107   GO
  108  
  109   EXEC sp_Si gnAppObjec t 'NVCC_us p_GetVAMed s';