275. EPMO Open Source Coordination Office Redaction File Detail Report

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.

275.1 Files compared

# Location File Last Modified
1 REFDOC_2.3_06072018.zip\REFDOC 2.3_06072018\NVCC\SQL usp_PMUpdateMasterLabIndexFromWorkload.sql Thu Jun 7 16:53:38 2018 UTC
2 REFDOC_2.3_06072018.zip\REFDOC 2.3_06072018\NVCC\SQL usp_PMUpdateMasterLabIndexFromWorkload.sql Fri Jun 22 12:53:40 2018 UTC

275.2 Comparison summary

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

275.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

275.4 Active regular expressions

No regular expressions were active.

275.5 Comparison detail

  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   ALTER PROC EDURE [Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromW orkload] 
  11   AS
  12   --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =
  13   --Requesto r                                : Jianji Y ang
  14   --Author                  : Stev e Schreine r
  15   --Object/S P Name                  : [Panel Mgmt].[usp _PMUpdateM asterLabIn dexFromWor kload]
  16   --SERVER                                    
D NS  . U R        
  17   --Data Bas e                                : NWIC_Pan elMgmt
  18   --Schema                                    :    
  19   --Report                                    : None Yet
  20   --Folder                                    :
  21   --Report L oc             : 
  22   --Job                     : None
  23   --Job Loc                 : None
  24   --Note                    : Runs  in about  00:01:40
  25   --Date Cre ated           : 08-0 4-2014
  26   --Last Cha nged           : 05-1 5-2015  
  27   --Last Cha nged By                 : Jianji  Yang
  28   --Reason F or Change               : exclud e NON-HDL  from 668 w hich is as signed to  LDL worklo ad code                                
  29   --Purpose                 : Upda te Panel M anagement  Master Lab  Index tab le 
  30   --                          with  lab test  with valid ate worklo ad codes.
  31   --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ===
  32   SELECT  RO W_NUMBER()  OVER(
  33                    ORDE R BY a.Tes tGroup) as  RecID,
  34                    a.Te stGroup,
  35                    a.Re sultForTes tNumeric,
  36                    a.Te stSearchCr iteria
  37   INTO    #T empTestGro ups
  38   FROM    (s elect dist inct
  39                                      tg.TestG roup,
  40                                      tg.Resul tForTestNu meric,
  41                                      tg.TestS earchCrite ria
  42                     fro m   [Panel Mgmt].[PMM asterCohor tLabTestGr oups] as t g) as a
  43  
  44  
  45   declare @B egRec int,  @EndRec i nt
  46  
  47   select  @E ndRec = ma x(RecID)
  48   from    #T empTestGro ups as tg
  49  
  50   declare @N extRec int
  51   set              @Nex tRec = 1
  52  
  53   while   (@ NextRec <=  @EndRec)
  54   begin
  55  
  56   declare @e xestr varc har(5000)
  57  
  58   declare @T estSearchN ame varcha r(20),
  59                    @Res ultForTest Numeric va rchar(4),
  60                    @Tes tGroup var char(30)
  61  
  62   select  @T estSearchN ame = '''' +tg.TestSe archCriter ia+'''',
  63                    @Res ultForTest Numeric =  tg.ResultF orTestNume ric,
  64                    @Tes tGroup = ' '''+tg.Tes tGroup+''' '
  65   from    #T empTestGro ups as tg
  66   where   tg .RecID = @ NextRec
  67  
  68   set @exest r ='
  69   insert                    [Panel Mgmt].[PMM asterLabIn dex]
  70   select 
  71                                      li.LabCh emTestSID,
  72                                      li.Sta3n ,
  73                                      li.LabCh emTestName ,
  74                                      '+@Resul tForTestNu meric+' as  ResultFor TestNumeri c,
  75                                      getdate( ) as DateE xtracted,
  76                                      '+@TestG roup+' as  TestGroup,
  77                                      null as  LOINC,
  78                                      nc.Workl oadCode
  79   from                      [CDWWo rk].[dim]. [LabChemTe st] as li
  80   left outer  join [CDW Work].[dim ].[Nationa lVALabCode ] as nc on
  81                                      li.Natio nalVALabCo deSID = nc .NationalV ALabCodeSI D
  82   inner join                [Panel Mgmt].[PMM asterCohor tSite] as  cs on
  83                                      li.Sta3n  = cs.Sta3 n
  84   where                     nc.Wor kLoadCode  like '+@Te stSearchNa me+'
  85                                      and not  exists (se lect ni.La bChemTestS ID
  86                                                       fr om [PanelM gmt].[PMMa sterLabInd ex] as ni
  87                                                                         where  li.LabChem TestSID =  ni.LabChem TestSID
  88                                                                                and li.Sta 3n = ni.St a3n)
  89   order by                  li.Sta 3n'
  90   exec (@exe str)
  91  
  92   set                                @NextRec  = @NextRe c + 1
  93  
  94   end
  95  
  96   -- remove  non HDL la b with LDL  workload  code assig ned. worki ng with lo cal CAC to  reassign  appropiate  code 
  97   -- LabChem TestSID        LabChe mTestIEN   Sta3n   La bChemTestN ame     La bChemPrint TestName         NLTN ationalVAL abCodeSID  NationalVA LabCodeSID
  98   -- 8002231 62                    7054    66 8   NON-HD L CHOLESTE ROL NHDL                      80 0522569                 80039842 9
  99  
  100   delete FRO M [NWIC_Pa nelMgmt].[ PanelMgmt] .[PMMaster LabIndex]  where labc hemtestnam e like '%N ON-HDL%'
  101  
  102   drop    ta ble #TempT estGroups    
  103  
  104   GO