234. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/22/2018 9:28:20 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.

234.1 Files compared

# Location File Last Modified
1 REFDOC_2.3_06072018.zip\REFDOC 2.3_06072018\NVCC\OriginalSQLScripts usp_PMUpdateMasterLabIndexFromLOINC.sql Thu Jun 7 16:53:36 2018 UTC
2 REFDOC_2.3_06072018.zip\REFDOC 2.3_06072018\NVCC\OriginalSQLScripts usp_PMUpdateMasterLabIndexFromLOINC.sql Thu Jun 21 20:23:47 2018 UTC

234.2 Comparison summary

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

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

234.4 Active regular expressions

No regular expressions were active.

234.5 Comparison detail

  1   USE [NWIC_ PanelMgmt]
  2   GO
  3  
  4   /****** Ob ject:  Sto redProcedu re [PanelM gmt].[usp_ PMUpdateMa sterLabInd exFromLOIN C]    Scri pt Date: 1 2/28/2015  1:55:27 PM  ******/
  5   SET ANSI_N ULLS ON
  6   GO
  7  
  8   SET QUOTED _IDENTIFIE R ON
  9   GO
  10  
  11  
  12  
  13   --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =
  14   --Requesto r                                : Jianji Y ang
  15   --Author                  : Stev e Schreine r
  16   --Object/S P Name                  : [Panel Mgmt].[usp _PMUpdateM asterLabIn dexfromLOI NC]
  17   --SERVER                                    
D NS . U R        
  18   --Data Bas e                                : NWIC_Pan elMgmt
  19   --Schema                                    :    
  20   --Report                                    : None Yet
  21   --Folder                                    :
  22   --Report L oc             : 
  23   --Job                     : None
  24   --Job Loc                 : None
  25   --Note                    : 
  26   --Date Cre ated           : 08-0 4-2014
  27   --Last Cha nged           :   
  28   --Last Cha nged By                 : 
  29   --Reason F or Change               :                                 
  30   --Purpose                 : Upda te Panel M anagement  Master Lab  Index tab le 
  31   -----                                         with lab  test with  valid LOI NC codes.
  32   --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ===
  33  
  34   CREATE PRO CEDURE [Pa nelMgmt].[ usp_PMUpda teMasterLa bIndexFrom LOINC_Orig inal] 
  35   AS
  36  
  37   set              noco unt on
  38  
  39   select  RO W_NUMBER()  OVER(
  40                    ORDE R BY lc.Te stGroup) a s RecID,
  41                    cast (li.LOINCS ID as varc har(50)) a s LOINCSID ,
  42                    li.S ta3n,
  43                    lc.L OINC,
  44                    lc.T estGroup,
  45                    lc.R esultForTe stNumeric,
  46                    cast (cast(date add(yy,lc. YearSearch Criteria,g etdate())  as date) a s varchar( 50)) as Ye arSearchDa te
  47   into    #T empLOINCSI D
  48   from    [P anelMgmt]. [PMMasterC ohortLabTe stGroupsLO INCCodes]  as lc
  49   inner join  [CDWWork] .[dim].[LO INC] as li  on
  50                    lc.L OINC = li. LOINC
  51   inner join  [PanelMgm t].[PMMast erCohortSi te] as cs  on
  52                    li.S ta3n = cs. Sta3n;
  53  
  54   declare @B egRec int,  @EndRec i nt
  55  
  56   select  @E ndRec = ma x(RecID)
  57   from    #T empLOINCSI D as ls;
  58  
  59   declare @N extRec int
  60   set              @Nex tRec = 1
  61  
  62   while   (@ NextRec <=  @EndRec)
  63   begin
  64  
  65   declare @e xestr varc har(5000);
  66  
  67   declare @L OINCSID va rchar(50),
  68                    @Res ultForTest Numeric va rchar(4),
  69                    @Tes tGroup var char(30),
  70                    @LOI NC varchar (50),
  71                    @Yea rSearchDat e varchar( 50);
  72  
  73   select  @L OINCSID =  ''''+ls.LO INCSID+''' ',
  74                    @LOI NC = ''''+ ls.LOINC+' ''',
  75                    @Res ultForTest Numeric =  ls.ResultF orTestNume ric,
  76                    @Tes tGroup = ' '''+ls.Tes tGroup+''' ',
  77                    @Yea rSearchDat e = ''''+l s.YearSear chDate+''' '
  78   from    #T empLOINCSI D as ls
  79   where   ls .RecID = @ NextRec;
  80  
  81   set @exest r ='
  82   insert                    [Panel Mgmt].[PMM asterLabIn dex]
  83   select                    distin ct
  84                                      li.LabCh emTestSID,
  85                                      li.Sta3n ,
  86                                      li.LabCh emTestName ,
  87                                      '+@Resul tForTestNu meric+' as  ResultFor TestNumeri c,
  88                                      getdate( ) as DateE xtracted,
  89                                      '+@TestG roup+' as  TestGroup,
  90                                      '+@LOINC +'as LOINC ,
  91                                      NULL as  WorkloadCo de
  92   from                      [CDWWo rk].[Chem] .[LabChem]  lc
  93   inner join                [CDWWo rk].[dim]. [LabChemTe st] as li  on
  94                                      lc.LabCh emTestSID  = li.LabCh emTestSID
  95   where                     lc.LOI NCSID = '+ @LOINCSID+ '
  96                                      and lc.L abChemSpec imenDateTi me > '+@Ye arSearchDa te+'
  97                                      and not  exists (se lect ni.La bChemTestS ID
  98                                                       fr om [PanelM gmt].[PMMa sterLabInd ex] as ni
  99                                                                         where  li.LabChem TestSID =  ni.LabChem TestSID
  100                                                                                and li.Sta 3n = ni.St a3n)'
  101  
  102   exec (@exe str)
  103  
  104   set              @Nex tRec = @Ne xtRec + 1
  105  
  106   end;
  107  
  108   drop table  #TempLOIN CSID;
  109  
  110   update  [P anelMgmt]. [PMMasterC ohortLabTe stGroupsLO INCCodes]
  111   set              Last Update = c ast(getdat e() as dat e);
  112  
  113  
  114  
  115  
  116  
  117  
  118   GO
  119  
  120