Produced by Araxis Merge on 6/22/2018 9:28:21 AM Eastern Daylight 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | REFDOC_2.3_06072018.zip\REFDOC 2.3_06072018\NVCC\SQL | NVCC_vGetVAMeds.sql | Thu Jun 7 16:53:36 2018 UTC |
| 2 | REFDOC_2.3_06072018.zip\REFDOC 2.3_06072018\NVCC\SQL | NVCC_vGetVAMeds.sql | Fri Jun 22 12:48:51 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 186 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | USE [NWIC_ PanelMgmt] | |
| 2 | GO | |
| 3 | ||
| 4 | SET ANSI_N ULLS ON | |
| 5 | GO | |
| 6 | ||
| 7 | SET QUOTED _IDENTIFIE R ON | |
| 8 | GO | |
| 9 | ||
| 10 | ||
| 11 | ALTER VIEW [App].[NV CC_vGetVAM eds] | |
| 12 | ||
| 13 | AS | |
| 14 | --======== ========== ========== ========== ========== ========== ========== ========== === | |
| 15 | --Requesto r : Non Va C oordinated Care Proj ect | |
| 16 | --Author : Jerr y Kohler ( Original s cript by D r. Charles Demosthen es) | |
| 17 | --Object/S P Name : NVCC_v GetVAMeds | |
| 18 | --SERVER :
|
|
| 19 | --Data Bas e : NWIC_Pan elMgmt | |
| 20 | --Schema : app | |
| 21 | --Report : N/A | |
| 22 | --Folder : N/A | |
| 23 | --Report L oc : N/A | |
| 24 | --Job : None | |
| 25 | --Job Loc : None | |
| 26 | --Note : | |
| 27 | --Date Cre ated : 02-0 4-2016 | |
| 28 | --Last Cha nged : 02-0 4-2016 | |
| 29 | --Last Cha nged By : Jerry Kohler - N orthwest I nnovation Center (NW IC) | |
| 30 | --Reason F or Change : Remove d station parameter in order t o expand t he search | |
| 31 | -- for a patient' s VA meds from a sin gle statio n to any | |
| 32 | -- stat ion a pati ent is ass ociated wi th. | |
| 33 | -- | |
| 34 | --Purpose : Retr ieve a pat ient's med ications i ssued by V A for | |
| 35 | -- incl usion into NVCC docu mentation | |
| 36 | --======== ========== ========== ========== ========== ========== ========== ========== === | |
| 37 | ||
| 38 | WITH MyDru gs AS | |
| 39 | (-- Fak e out Enti ty Framewo rk into th inking thi s is a non -nullable column. | |
| 40 | SELECT ISNULL(Rx OutpatFill SID, 0) AS RxOutpatF illSID | |
| 41 | ,[RxOutpat SID] | |
| 42 | ,[FillType ] | |
| 43 | ,[FillNumb er] | |
| 44 | ,[RxStatus ] | |
| 45 | ,[PatientS ID] | |
| 46 | ,[Provider SID] | |
| 47 | ,[LocalDru gNameWithD ose] | |
| 48 | ,[IssueDat e] | |
| 49 | ,[FillDate Time] | |
| 50 | ,[ReleaseD ateTime] | |
| 51 | ,[Expirati onDate] | |
| 52 | ,[Dispense dDate] | |
| 53 | ,[Qty] | |
| 54 | ,[QtyNumer ic] | |
| 55 | ,[DaysSupp ly] | |
| 56 | ,Row_Numbe r()Over(pa rtition by [RxOutpat SID] Order by [FillD ateTime] d esc) AS Rn | |
| 57 | FROM [ CDWWork].[ RxOut].[Rx OutpatFill ] | |
| 58 | WHERE dispensedd ate > date add(year,- 1,getdate( )) | |
| 59 | ), | |
| 60 | ||
| 61 | Drugs WSig AS | |
| 62 | ( | |
| 63 | SELECT dl.rxoutp atsid | |
| 64 | ,dl.locald rugnamewit hdose | |
| 65 | ,cast(dl.f illdatetim e as date) as fillda te | |
| 66 | ,'Qty:' + dl.qty as qty | |
| 67 | ,dl.FillNu mber | |
| 68 | ,sig.sig | |
| 69 | ,dl.issued ate | |
| 70 | ,dl.dayssu pply | |
| 71 | FROM M yDrugs dl | |
| 72 | INNER JOIN CDWWo rk.RxOut.R xOutpatSig sig on dl .Rxoutpats id=sig.RxO utpatSID | |
| 73 | WHERE dl.Rn = 1 | |
| 74 | ) | |
| 75 | ||
| 76 | SELECT dl. rxoutpatsi d | |
| 77 | ,dl. localdrugn amewithdos e | |
| 78 | ,dl. filldate | |
| 79 | ,dl. qty | |
| 80 | ,dl. FillNumber | |
| 81 | ,iif (rx.maxref ills is nu ll,'0',rx. maxrefills ) as maxre fills | |
| 82 | ,dl. sig | |
| 83 | ,dl. issuedate | |
| 84 | ,dl. dayssupply | |
| 85 | ,rx. RxStatus | |
| 86 | ,iif (rx.NextPo ssibleFill Date is nu ll,'N/A', cast(rx.Ne xtPossible FillDate a s varchar) ) as nextp ossiblefil ldate | |
| 87 | FROM Drugs WSig dl | |
| 88 | INNER JOIN [CDWWork] .[RxOut].[ RxOutpat] rx on dl.R xoutpatsid = rx.RxOu tpatSID; | |
| 89 | ||
| 90 | ||
| 91 | ||
| 92 | GO | |
| 93 | ||
| 94 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.