From 4eaf8dd6fd3fe829bb3667c2fc83c5728992e389 Mon Sep 17 00:00:00 2001 From: "Andy Zimolzak (2018 mbp)" Date: Sun, 7 Mar 2021 10:04:57 -0600 Subject: [PATCH] Remove Sta3n in all table names. Closes #18. --- Fobt.sql | 1928 +++++++++++++++++++++--------------------- Lung.sql | 2446 +++++++++++++++++++++++++++--------------------------- 2 files changed, 2187 insertions(+), 2187 deletions(-) diff --git a/Fobt.sql b/Fobt.sql index 14dba6a..bb9e3a1 100644 --- a/Fobt.sql +++ b/Fobt.sql @@ -16,14 +16,14 @@ -- Table names: We have mapped table names from Research data to Operational. But we currently do not have live access to Operational data to test the mappings. -- TobeAltered: --- 4. FOBT_Sta3n528_0_xxx has the input parameters, including site(s) info, study period, standard codes( CPT, ICD, ICDproc etc.). +-- 4. FOBT_0_xxx has the input parameters, including site(s) info, study period, standard codes( CPT, ICD, ICDproc etc.). -- Although these codes are standardized, if your local site(s) uses them in different flavors, consider customization. Also exam these tables after being populated to make sure codes -- used in your site(s) are all included. -- --Set your study period. -- set @sp_start='2017-01-01 00:00:00' -- set @sp_end='2017-01-31 23:59:59' -- --- 5. Set your site(s) code in table FOBT_Sta3n528_0_0_1_Sta3nSta6a. This table has the sites(s) that trigger whose data trigger will run against. The site can be CBOC as well as Hospital. +-- 5. Set your site(s) code in table FOBT_0_0_1_Sta3nSta6a. This table has the sites(s) that trigger whose data trigger will run against. The site can be CBOC as well as Hospital. -- Search for string "--Set site(s) codes here. Keep only your site(s) uncommented.". Here you input the site(s) you are interested in running and comment out the others. -- Example: -- ( 528,'528A8') -- (528) Upstate New York HCS; ALBANY, NY VAMC @@ -31,14 +31,14 @@ -- TobeAltered: -- 6. FOBT test names --- 5.1 Table FOBT_Sta3n528_0_7_FOBTLabTestName will have the list of FOBT tests your sta3n uses --- select * from MyDB.MySchema.FOBT_Sta3n528_0_7_FOBTLabTestName +-- 5.1 Table FOBT_0_7_FOBTLabTestName will have the list of FOBT tests your sta3n uses +-- select * from MyDB.MySchema.FOBT_0_7_FOBTLabTestName -- where sta3n= @Sta3n -- Exam the FOBT tests that your site(s) uses. If your site(s) uses other FOBT tests, insert them to this table as well. -- -- TobeAltered: -- 7. Red-flagged FOBT test values --- 7.1 Table FOBT_Sta3n528_0_A_RedFlagFOBTTestResult will have the list of FOBT test values which will be marked as positive. +-- 7.1 Table FOBT_0_A_RedFlagFOBTTestResult will have the list of FOBT test values which will be marked as positive. -- Add any additional codes that your site(s) might use, or remove any that your site do(es) not use by setting isRedFlag=0. -- 7.2 Search for string "-- Using Abnormal Flag". Trigger will consider FOBT value which is marked as 'Hxxx' as positive. Make corresponsing change here if it does not apply to your site(s). -- @@ -47,13 +47,13 @@ -- Always add new codes to parameter tables. Do NOT remove old codes because script still checks back for clinical history. -- -- 9. Data Set - --FOBT_Sta3n528_1_Inc_1_AllFOBTSta6a -- All FOBT tests from sta6a in the study period - --FOBT_Sta3n528_1_Inc_8_IncIns -- Positive ( red_flagged) FOBT tests from sta6a in the study period - --FOBT_Sta3n528_5_Ins_U_TriggerPos -- FOBT tests from sta6a in the study period, which come out trigger positive + --FOBT_1_Inc_1_AllFOBTSta6a -- All FOBT tests from sta6a in the study period + --FOBT_1_Inc_8_IncIns -- Positive ( red_flagged) FOBT tests from sta6a in the study period + --FOBT_5_Ins_U_TriggerPos -- FOBT tests from sta6a in the study period, which come out trigger positive -- 10. If you want to delete the intermediate table generated during execution. uncomment the block at the end of the script. -- --- 11. Numerator and denumerators table: FOBT_Sta3n528_5_Ins_X_count +-- 11. Numerator and denumerators table: FOBT_5_Ins_X_count @@ -103,9 +103,9 @@ set @ICD9Needed=1 -- set your site code -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_0_1_Sta3nSta6a') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_0_0_1_Sta3nSta6a --altered (ORD_...Dflt) --altered (temp table) - CREATE TABLE #FOBT_Sta3n528_0_0_1_Sta3nSta6a ( --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_0_0_1_Sta3nSta6a') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_0_0_1_Sta3nSta6a --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #FOBT_0_0_1_Sta3nSta6a ( --altered (ORD_...Dflt) --altered (temp table) Sta3n smallint null, Sta6a [varchar](10) NULL ) @@ -113,7 +113,7 @@ if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_0_1_Sta3nSta6a') is not null) --a -insert into #FOBT_Sta3n528_0_0_1_Sta3nSta6a (Sta3n,Sta6a) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_0_1_Sta3nSta6a (Sta3n,Sta6a) --altered (ORD_...Dflt) --altered (temp table) values ( --Set site(s) codes here. Keep only your site(s) uncommented. Comment out all the other sites. @@ -143,10 +143,10 @@ values --,(580,'580') -- (580) Houston, TX --,(541,'541') --(541) Cleveland, OH -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_1_inputP') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_0_1_inputP') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) - CREATE TABLE #FOBT_Sta3n528_0_1_inputP( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #FOBT_0_1_inputP( --altered (ORD_...Dflt) --altered (temp table) [trigger] [varchar](20) NULL, [VISN] [smallint] NULL, --Sta3n smallint null, @@ -160,7 +160,7 @@ if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_1_inputP') is not null) --altered [ICD9Needed] bit) --go -INSERT INTO #FOBT_Sta3n528_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) +INSERT INTO #FOBT_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) ([trigger] ,[VISN] --,Sta3n @@ -191,16 +191,16 @@ INSERT INTO #FOBT_Sta3n528_0_1_inputP --altered (ORD_...Dflt) --altered (temp go -select * from #FOBT_Sta3n528_0_0_1_Sta3nSta6a --altered (ORD_...Dflt) --altered (temp table) -select * from #FOBT_Sta3n528_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) +select * from #FOBT_0_0_1_Sta3nSta6a --altered (ORD_...Dflt) --altered (temp table) +select * from #FOBT_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) go -- Colon Cancer ICD9 Dx code list -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_8_ColonCancerDxICD9Code') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_0_8_ColonCancerDxICD9Code --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_0_8_ColonCancerDxICD9Code') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_0_8_ColonCancerDxICD9Code --altered (ORD_...Dflt) --altered (temp table) go - CREATE TABLE #FOBT_Sta3n528_0_8_ColonCancerDxICD9Code ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #FOBT_0_8_ColonCancerDxICD9Code ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [dx_code_type] [varchar](50) NULL, [dx_code_name] [varchar](50) NULL, @@ -208,31 +208,31 @@ go ) go -If Exists (select ICD9Needed from #FOBT_Sta3n528_0_1_inputP where ICD9Needed=1) --altered (ORD_...Dflt) --altered (temp table) +If Exists (select ICD9Needed from #FOBT_0_1_inputP where ICD9Needed=1) --altered (ORD_...Dflt) --altered (temp table) begin - insert into #FOBT_Sta3n528_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) + insert into #FOBT_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','154.0' - insert into #FOBT_Sta3n528_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) + insert into #FOBT_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','154.1' - insert into #FOBT_Sta3n528_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) + insert into #FOBT_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','154.2' - insert into #FOBT_Sta3n528_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) + insert into #FOBT_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','154.3' - insert into #FOBT_Sta3n528_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) + insert into #FOBT_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','154.8' - insert into #FOBT_Sta3n528_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) + insert into #FOBT_0_8_ColonCancerDxICD9Code ([dx_code_type], [dx_code_name] ,[ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) select distinct 'PrevColonCancer','ColonCancer', ICD9Code from CDWWork.dim.icd9 where icd9code like '153%'--'%153.[^0]%' end -- Colon Cancer ICD10 Dx code list -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_9_ColonCancerDxICD10Code') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_0_9_ColonCancerDxICD10Code') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_0_9_ColonCancerDxICD10Code --altered (ORD_...Dflt) --altered (temp table) go - CREATE TABLE #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #FOBT_0_9_ColonCancerDxICD10Code ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [dx_code_type] [varchar](50) NULL, [dx_code_name] [varchar](50) NULL, @@ -243,44 +243,44 @@ go -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C18.4' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C18.6' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C18.7' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C18.0' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C18.1' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C18.2' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C18.5' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C18.8' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C18.9' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C19.' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C20.' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C21.0' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C21.1' -insert into #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_9_ColonCancerDxICD10Code ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'PrevColonCancer','ColonCancer','C21.8' -- Clinical Exclusion ICD10 Dx code list -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_2_DxICD10CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_0_2_DxICD10CodeExc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_0_2_DxICD10CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_0_2_DxICD10CodeExc --altered (ORD_...Dflt) --altered (temp table) go - CREATE TABLE #FOBT_Sta3n528_0_2_DxICD10CodeExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #FOBT_0_2_DxICD10CodeExc ( --altered (ORD_...Dflt) --altered (temp table) -- UniqueID int Identity(1,1) not null, [dx_code_type] [varchar](50) NULL, [dx_code_name] [varchar](50) NULL, @@ -289,467 +289,467 @@ go go -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.00' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.40' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.50' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.01' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.41' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.51' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.02' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.42' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.52' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.60' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.A0' -- added 20200617 -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.61' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.62' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.A1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.A2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C93.00' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C93.01' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C93.02' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.00' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.01' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.02' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.20' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.21' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.22' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C95.00' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C95.01' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C95.02' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.3' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.4' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.7' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.8' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.9' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C78.7' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Biliary Cancer','C23.' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Biliary Cancer','C24.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Biliary Cancer','C24.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Biliary Cancer','C24.8' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Biliary Cancer','C24.9' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Esophageal Cancer','C15.3' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Esophageal Cancer','C15.4' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Esophageal Cancer','C15.5' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Esophageal Cancer','C15.8' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Esophageal Cancer','C15.9' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.4' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.3' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.5' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.6' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.8' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.9' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.3' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.4' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.5' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.6' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.7' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.8' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.9' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C79.31' --added 20200617 -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C79.40' --missing -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C79.32' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C79.49' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Ovarian Cancer','C56.9' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Ovarian Cancer','C56.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Ovarian Cancer','C56.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.3' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.4' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.7' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.8' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.9' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.00' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.01' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.02' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.10' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.11' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.12' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.30' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.31' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.32' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.80' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.81' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.82' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.90' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.91' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C34.92' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C78.00' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C78.01' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Lung Cancer','C78.02' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pleural Cancer & Mesothelioma','C38.4' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pleural Cancer & Mesothelioma','C45.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pleural Cancer & Mesothelioma','C78.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Uterine Cancer','C55.' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Peritonel, Omental & Mesenteric Cancer','C45.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Peritonel, Omental & Mesenteric Cancer','C48.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Peritonel, Omental & Mesenteric Cancer','C48.8' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Peritonel, Omental & Mesenteric Cancer','C48.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Peritonel, Omental & Mesenteric Cancer','C78.6' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Myeloma','C90.00' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Myeloma','C90.01' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Myeloma','C90.02' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Myeloma','D47.Z9' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Tracheal Cancer','C33.' --added 20200617 -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Tracheal Cancer','C78.39' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Tracheal Cancer','C78.30' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Hospice','','Z51.5' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K92.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K22.11' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K25.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K25.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K25.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K25.4' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K25.6' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K26.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K26.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K26.4' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K26.6' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K27.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K27.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K27.4' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K27.6' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K28.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K28.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K28.4' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'K28.6' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'I85.01' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'UpperGIBleeding','', 'I85.11' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','N92.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','N92.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','N92.4' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','N95.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','R31.9' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','R31.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','R31.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','R31.2' --added 20200617 -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','R31.21' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','R31.29' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','R04.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','N89.8' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','N92.5' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','N93.8' --20200617 -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','N93.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','R04.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','R04.9' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','R04.89' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'OtherBleeding','','T79.2XXA' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','Z34.00' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','Z34.80' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','Z34.90' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','Z33.1' --added 20200617 -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','Z33.3' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.00' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.10' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.291' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.40' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.211' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.291' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.291' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.30' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.511' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.521' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.611' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.621' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.891' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.892' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.893' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.899' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.90' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.91' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.92' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.93' --added 20200617 -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O09.A0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.8' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.9' --added 20200617 -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.101' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.102' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.109' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.201' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.202' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.209' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.211' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.212' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.219' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.80' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.81' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Pregnancy','','O00.90' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Thalassemia','','D56.9' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Thalassemia','','D57.40' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Thalassemia','','D57.419' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Thalassemia','','D56.0' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Thalassemia','','D56.1' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Thalassemia','','D56.2' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Thalassemia','','D56.3' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Thalassemia','','D56.5' -insert into #FOBT_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Thalassemia','','D56.8' -- Clinical Exclusion ICD10Procedure code list -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_3_PreProcICD10ProcExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_0_3_PreProcICD10ProcExc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_0_3_PreProcICD10ProcExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_0_3_PreProcICD10ProcExc --altered (ORD_...Dflt) --altered (temp table) go - CREATE TABLE #FOBT_Sta3n528_0_3_PreProcICD10ProcExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #FOBT_0_3_PreProcICD10ProcExc ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [ICD10Proc_code_type] [varchar](50) NULL, [ICD10Proc_code_Name] [varchar](50) NULL, @@ -758,27 +758,27 @@ go go -insert into #FOBT_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Colectomy','','0DTE4ZZ' -insert into #FOBT_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Colectomy','','0DTE0ZZ' -insert into #FOBT_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Colectomy','','0DTE7ZZ' -insert into #FOBT_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Colectomy','','0DTE8ZZ' -insert into #FOBT_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Colonoscopy','','0DJD8ZZ' -- Clinical Exclusion ICD9 Dx code list -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_4_DxICD9CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_0_4_DxICD9CodeExc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_0_4_DxICD9CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_0_4_DxICD9CodeExc --altered (ORD_...Dflt) --altered (temp table) go - CREATE TABLE #FOBT_Sta3n528_0_4_DxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #FOBT_0_4_DxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [dx_code_type] [varchar](50) NULL, [dx_code_name] [varchar](50) NULL, @@ -787,17 +787,17 @@ go go --Thalessemia: Any time in patient's clinical history, only apply to IDA -insert into #FOBT_Sta3n528_0_4_DxICD9CodeExc ([ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_4_DxICD9CodeExc ([ICD9Code]) --altered (ORD_...Dflt) --altered (temp table) select distinct ICD9Code from CDWWork.dim.ICD9 as dimICD9 where dimICD9.ICD9Code like -- Thalessemia '282.4%' -insert into #FOBT_Sta3n528_0_4_DxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_4_DxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) [ICD9Code] ) select distinct ICD9Code from CDWWork.dim.ICD9 as dimICD9 -where ((select ICD9Needed from #FOBT_Sta3n528_0_1_inputP)=1) and --altered (ORD_...Dflt) --altered (temp table) +where ((select ICD9Needed from #FOBT_0_1_inputP)=1) and --altered (ORD_...Dflt) --altered (temp table) -------------------------------------------------------- Terminal ( dimICD9.ICD9Code in ( @@ -939,7 +939,7 @@ where ((select ICD9Needed from #FOBT_Sta3n528_0_1_inputP)=1) and --altered (O ) -update #FOBT_Sta3n528_0_4_DxICD9CodeExc --altered (ORD_...Dflt) --altered (temp table) +update #FOBT_0_4_DxICD9CodeExc --altered (ORD_...Dflt) --altered (temp table) set dx_code_type = case when ICD9Code in ( -- Leukemia (Acute Only) @@ -1067,11 +1067,11 @@ set dx_code_type = case go -- Clinical Exclusion CPT code list - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_5_PrevProcCPTCodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_0_5_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_0_5_PrevProcCPTCodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_0_5_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) go - CREATE TABLE #FOBT_Sta3n528_0_5_PrevProcCPTCodeExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #FOBT_0_5_PrevProcCPTCodeExc ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [CPT_code_type] [varchar](50) NULL, [CPT_code_name] [varchar](50) NULL, @@ -1080,7 +1080,7 @@ go go -insert into #FOBT_Sta3n528_0_5_PrevProcCPTCodeExc ( --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_5_PrevProcCPTCodeExc ( --altered (ORD_...Dflt) --altered (temp table) [CPT_code_type], [CPT_code_name] , [CPTCode] @@ -1122,11 +1122,11 @@ Values --('colonoscopy','','44387') not exists go -- Clinical Exclusion ICD9Procedure code list -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_6_PreProcICD9ProcExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_0_6_PreProcICD9ProcExc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_0_6_PreProcICD9ProcExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_0_6_PreProcICD9ProcExc --altered (ORD_...Dflt) --altered (temp table) go - CREATE TABLE #FOBT_Sta3n528_0_6_PreProcICD9ProcExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #FOBT_0_6_PreProcICD9ProcExc ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [ICD9Proc_code_type] [varchar](50) NULL, [ICD9Proc_code_Name] [varchar](50) NULL, @@ -1135,16 +1135,16 @@ go go -- Colectomy: Any time in patient's clinical history -insert into #FOBT_Sta3n528_0_6_PreProcICD9ProcExc ([ICD9Proc_code_type], [ICD9Proc_code_Name] ,[ICD9ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_6_PreProcICD9ProcExc ([ICD9Proc_code_type], [ICD9Proc_code_Name] ,[ICD9ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Colectomy','','45.81' -insert into #FOBT_Sta3n528_0_6_PreProcICD9ProcExc ([ICD9Proc_code_type], [ICD9Proc_code_Name] ,[ICD9ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_6_PreProcICD9ProcExc ([ICD9Proc_code_type], [ICD9Proc_code_Name] ,[ICD9ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Colectomy','','45.82' -insert into #FOBT_Sta3n528_0_6_PreProcICD9ProcExc ([ICD9Proc_code_type], [ICD9Proc_code_Name] ,[ICD9ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_6_PreProcICD9ProcExc ([ICD9Proc_code_type], [ICD9Proc_code_Name] ,[ICD9ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Colectomy','','45.83' -If Exists (select ICD9Needed from #FOBT_Sta3n528_0_1_inputP where ICD9Needed=1) --altered (ORD_...Dflt) --altered (temp table) +If Exists (select ICD9Needed from #FOBT_0_1_inputP where ICD9Needed=1) --altered (ORD_...Dflt) --altered (temp table) begin -insert into #FOBT_Sta3n528_0_6_PreProcICD9ProcExc ([ICD9Proc_code_type], [ICD9Proc_code_Name] ,[ICD9ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #FOBT_0_6_PreProcICD9ProcExc ([ICD9Proc_code_type], [ICD9Proc_code_Name] ,[ICD9ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Colonoscopy','','45.23' end @@ -1152,11 +1152,11 @@ go -- FOBT test - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_7_FOBTLabTestName') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_0_7_FOBTLabTestName --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_0_7_FOBTLabTestName') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_0_7_FOBTLabTestName --altered (ORD_...Dflt) --altered (temp table) go - CREATE TABLE #FOBT_Sta3n528_0_7_FOBTLabTestName ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #FOBT_0_7_FOBTLabTestName ( --altered (ORD_...Dflt) --altered (temp table) Sta3n smallint NULL ,LabChemTestSID int NULL ,LOINC_Original varchar(50) NULL @@ -1177,304 +1177,304 @@ go -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000064483, N'14563-1', N'FOBT#1, 1/2007 thru 12/2009', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000064483, N'14563-1', N'FOBT#1, 1/2007 thru 12/2009', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000069826, N'14564-9', N'OCCULT BLOOD (FIT) #2 OF 3,12/09-1/16', N'FIT 2/3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000069826, N'14564-9', N'OCCULT BLOOD (FIT) #2 OF 3,12/09-1/16', N'FIT 2/3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000075628, N'2335-8', N'OCCULT BLOOD,SINGLE CARD,1/07 thru 12/09', N'FOBT,R') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000075628, N'2335-8', N'OCCULT BLOOD,SINGLE CARD,1/07 thru 12/09', N'FOBT,R') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000104243, N'14563-1', N'OCCULT BLOOD (FIT-R) #1 OF 1', N'FITrsch 1/1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000104243, N'14563-1', N'OCCULT BLOOD (FIT-R) #1 OF 1', N'FITrsch 1/1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000122797, N'57905-2', N'OCCULT BLOOD (FIT) #1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000122797, N'57905-2', N'OCCULT BLOOD (FIT) #1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000125995, N'29771-3', N'OCCULT BLOOD FIT RANDOM', N'FIT Ran') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000125995, N'29771-3', N'OCCULT BLOOD FIT RANDOM', N'FIT Ran') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400005260, N'14563-1', N'OCCULT BLOOD #1', N'OCC BL1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400005260, N'14563-1', N'OCCULT BLOOD #1', N'OCC BL1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400009511, N'14563-1', N'POCT-OCCULT BLOOD', N'POC OCC') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400009511, N'14563-1', N'POCT-OCCULT BLOOD', N'POC OCC') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400012497, N'14564-9', N'OCCULT BLOOD #2', N'OCC BL2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400012497, N'14564-9', N'OCCULT BLOOD #2', N'OCC BL2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400012498, N'14565-6', N'OCCULT BLOOD #3', N'OCC BL3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400012498, N'14565-6', N'OCCULT BLOOD #3', N'OCC BL3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400078585, N'14563-1', N'IFOBT #1', N'IFOBT #1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400078585, N'14563-1', N'IFOBT #1', N'IFOBT #1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400078586, N'14564-9', N'IFOBT #2', N'IFOBT #2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400078586, N'14564-9', N'IFOBT #2', N'IFOBT #2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400078587, N'14565-6', N'IFOBT #3', N'IFOBT #3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400078587, N'14565-6', N'IFOBT #3', N'IFOBT #3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400570283, N'29771-3', N'CSP-577 OCCULT BLOOD(FIT)', N'CSP-577 FIT') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (642, 1400570283, N'29771-3', N'CSP-577 OCCULT BLOOD(FIT)', N'CSP-577 FIT') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800000675, N'14565-6', N'Occult Blood #3', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800000675, N'14565-6', N'Occult Blood #3', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800036890, N'2335-8', N'OCCULT BLOOD SPOT TEST', N'GUAIAC') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800036890, N'2335-8', N'OCCULT BLOOD SPOT TEST', N'GUAIAC') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800074605, N'14563-1', N'Occult Blood #1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800074605, N'14563-1', N'Occult Blood #1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800075804, N'14564-9', N'Occult Blood #2', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800075804, N'14564-9', N'Occult Blood #2', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800224828, N'2335-8', N'CSP#577 OCCULT BLOOD(FIT)#1OF1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800224828, N'2335-8', N'CSP#577 OCCULT BLOOD(FIT)#1OF1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800257151, NULL, N'Occult Blood (FIT) #1 of 1', N'FIT') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (644, 800257151, NULL, N'Occult Blood (FIT) #1 of 1', N'FIT') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000001444, N'2335-8', N'ZZZOCCULT BLOOD (KERRVILLE ONLY)', N'ZZZOCCULT') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000001444, N'2335-8', N'ZZZOCCULT BLOOD (KERRVILLE ONLY)', N'ZZZOCCULT') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000023514, N'2335-8', N'OCCULT BLOOD DAY 1', N'OCC1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000023514, N'2335-8', N'OCCULT BLOOD DAY 1', N'OCC1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000028047, N'2335-8', N'POC OCCULT BLOOD ANCILLARY', N'POC OCB') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000028047, N'2335-8', N'POC OCCULT BLOOD ANCILLARY', N'POC OCB') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000032176, N'14565-6', N'OCCULT BLOOD DAY 3', N'OCC3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000032176, N'14565-6', N'OCCULT BLOOD DAY 3', N'OCC3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000035160, N'14565-6', N'IFOBT3', N'FOBT3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000035160, N'14565-6', N'IFOBT3', N'FOBT3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000038595, N'2335-8', N'FOBT ACCUCHECK (ED/TRIAGE ONLY)', N'FOBT(TRIAGE ONLY)') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000038595, N'2335-8', N'FOBT ACCUCHECK (ED/TRIAGE ONLY)', N'FOBT(TRIAGE ONLY)') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000053200, N'14564-9', N'ZZZIFOBT2', N'ZZZFOBT2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000053200, N'14564-9', N'ZZZIFOBT2', N'ZZZFOBT2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000097002, N'29771-3', N'IFOBT(SINGLE TEST),SCREEN', N'FOBT1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000097002, N'29771-3', N'IFOBT(SINGLE TEST),SCREEN', N'FOBT1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000097003, N'29771-3', N'IFOBT1', N'IFOBT1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (671, 1000097003, N'29771-3', N'IFOBT1', N'IFOBT1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (691, 800001613, N'2335-8', N'OCCULT BLOOD, STOOL', N'OCC BLD') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (691, 800001613, N'2335-8', N'OCCULT BLOOD, STOOL', N'OCC BLD') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (691, 800001614, N'2335-8', N'FIT', N'FIT') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (691, 800001614, N'2335-8', N'FIT', N'FIT') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (691, 800053904, N'2335-8', N'OCCULT BLOOD, STOOL (SPOT)', N'OCCBLDs') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (691, 800053904, N'2335-8', N'OCCULT BLOOD, STOOL (SPOT)', N'OCCBLDs') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (691, 800061861, N'14565-6', N'Occult Blood, Stool #3 disc 7/12/19', N'zOCCBLD3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (691, 800061861, N'14565-6', N'Occult Blood, Stool #3 disc 7/12/19', N'zOCCBLD3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (691, 800064262, N'14564-9', N'Occult Blood, Stool #2 disc 7/12/19', N'zOCCBLD2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (691, 800064262, N'14564-9', N'Occult Blood, Stool #2 disc 7/12/19', N'zOCCBLD2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400000167, NULL, N'ZZOCCULT BLOOD #3', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400000167, NULL, N'ZZOCCULT BLOOD #3', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400000167, N'14565-6', N'ZZOCCULT BLOOD #3', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400000167, N'14565-6', N'ZZOCCULT BLOOD #3', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400015216, NULL, N'ZZOCCULT BLOOD #1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400015216, NULL, N'ZZOCCULT BLOOD #1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400015216, N'14563-1', N'ZZOCCULT BLOOD #1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400015216, N'14563-1', N'ZZOCCULT BLOOD #1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400020074, NULL, N'OCCULT BLOOD CNTRL 1', N'OBC1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400020074, NULL, N'OCCULT BLOOD CNTRL 1', N'OBC1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400020074, N'2335-8', N'OCCULT BLOOD CNTRL 1', N'OBC1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400020074, N'2335-8', N'OCCULT BLOOD CNTRL 1', N'OBC1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400020761, NULL, N'OCCULT BLOOD CNTRL 2', N'OCBLDC2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400020761, NULL, N'OCCULT BLOOD CNTRL 2', N'OCBLDC2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400020761, N'2335-8', N'OCCULT BLOOD CNTRL 2', N'OCBLDC2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400020761, N'2335-8', N'OCCULT BLOOD CNTRL 2', N'OCBLDC2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400049195, NULL, N'ZZOCCULT BLOOD #2', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400049195, NULL, N'ZZOCCULT BLOOD #2', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400049195, N'14564-9', N'ZZOCCULT BLOOD #2', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400049195, N'14564-9', N'ZZOCCULT BLOOD #2', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400049217, NULL, N'OCCULT BLOOD CNTRL 3', N'OCBLDC3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400049217, NULL, N'OCCULT BLOOD CNTRL 3', N'OCBLDC3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400049217, N'2335-8', N'OCCULT BLOOD CNTRL 3', N'OCBLDC3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400049217, N'2335-8', N'OCCULT BLOOD CNTRL 3', N'OCBLDC3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400568392, N'14564-9', N'OCCULT BLD FIT #1of1', N'OC-FIT') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400568392, N'14564-9', N'OCCULT BLD FIT #1of1', N'OC-FIT') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400575623, N'2335-8', N'OCCULT BLOOD FIT #1 OF 1', N'FIT') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (512, 1400575623, N'2335-8', N'OCCULT BLOOD FIT #1 OF 1', N'FIT') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400006127, N'14565-6', N' OCCULT BLOOD (#3)', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400006127, N'14565-6', N' OCCULT BLOOD (#3)', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400007168, N'2335-8', N'OCCULT BLOOD(RANDOM)', N'FOBT-R') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400007168, N'2335-8', N'OCCULT BLOOD(RANDOM)', N'FOBT-R') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400015832, N'2335-8', N'ZZOCCULT BLOOD (WX-WO)', N'ZOCCBLD') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400015832, N'2335-8', N'ZZOCCULT BLOOD (WX-WO)', N'ZOCCBLD') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400017856, N'14564-9', N' OCCULT BLOOD (#2)', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400017856, N'14564-9', N' OCCULT BLOOD (#2)', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400023083, N'2335-8', N' OCCULT BLOOD (X3) (THRU 6/01)', N'OB(X3)') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400023083, N'2335-8', N' OCCULT BLOOD (X3) (THRU 6/01)', N'OB(X3)') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400024833, N'2335-8', N' OCCULT BLOOD(X1)(THRU 7/17/01)', N'OB(X1)') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400024833, N'2335-8', N' OCCULT BLOOD(X1)(THRU 7/17/01)', N'OB(X1)') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400047002, N'14563-1', N' OCCULT BLOOD (#1)', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400047002, N'14563-1', N' OCCULT BLOOD (#1)', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400052622, N'2335-8', N' OCCULT BLOOD (LO)(dc''d)', N'O.B.') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400052622, N'2335-8', N' OCCULT BLOOD (LO)(dc''d)', N'O.B.') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400570743, N'29771-3', N'CSP#577 OCCULT BLOOD(FIT)1OF1', N'CSP#577 FIT1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400570743, N'29771-3', N'CSP#577 OCCULT BLOOD(FIT)1OF1', N'CSP#577 FIT1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400574899, N'14563-1', N'OCCULT BLOOD (FIT)#1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (523, 1400574899, N'14563-1', N'OCCULT BLOOD (FIT)#1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400019763, N'2335-8', N'ZZOCCULT BLOOD (V2<6/28/02)', N'OCCULT ') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400019763, N'2335-8', N'ZZOCCULT BLOOD (V2<6/28/02)', N'OCCULT ') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400020529, N'14563-1', N'ZZOCCULT BLOOD (Slide 1)', N'OCCUL B') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400020529, N'14563-1', N'ZZOCCULT BLOOD (Slide 1)', N'OCCUL B') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400020827, N'14564-9', N'ZZOCCULT BLOOD (Slide 2)', N'OCCUL B') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400020827, N'14564-9', N'ZZOCCULT BLOOD (Slide 2)', N'OCCUL B') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400030173, N'14565-6', N'ZZOCCULT BLOOD (Slide 3)', N'OCCUL B') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400030173, N'14565-6', N'ZZOCCULT BLOOD (Slide 3)', N'OCCUL B') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400041975, N'14564-9', N'2ND OCCULT BLD (AL/BH/CN/SY)', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400041975, N'14564-9', N'2ND OCCULT BLD (AL/BH/CN/SY)', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400044644, N'2335-8', N'OCCULT BLOOD SPOT (AL/BH/CN/SY)', N'OB SPOT') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400044644, N'2335-8', N'OCCULT BLOOD SPOT (AL/BH/CN/SY)', N'OB SPOT') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400046138, N'2335-8', N'OCCULT BLOOD SPOT POC (BH/SY)', N'OB POC') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400046138, N'2335-8', N'OCCULT BLOOD SPOT POC (BH/SY)', N'OB POC') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400061146, N'14565-6', N'3RD OCCULT BLD (AL/BH/CN/SY)', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400061146, N'14565-6', N'3RD OCCULT BLD (AL/BH/CN/SY)', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400063272, N'14563-1', N'1ST OCCULT BLD (AL/BH/CN/SY)', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400063272, N'14563-1', N'1ST OCCULT BLD (AL/BH/CN/SY)', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400073764, N'2335-8', N'ZZOCCULT BLOOD FECES (SY<6/23/00)', N'OCCUL') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400073764, N'2335-8', N'ZZOCCULT BLOOD FECES (SY<6/23/00)', N'OCCUL') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400568735, N'2335-8', N'OCCULT BLOOD (FIT) #1 OF 3 (SY/CN/BH/AL)', N'FIT1/3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400568735, N'2335-8', N'OCCULT BLOOD (FIT) #1 OF 3 (SY/CN/BH/AL)', N'FIT1/3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400568736, N'14565-6', N'OCCULT BLOOD (FIT) #2 OF 3 (SY/CN/BH/AL)', N'FIT2/3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400568736, N'14565-6', N'OCCULT BLOOD (FIT) #2 OF 3 (SY/CN/BH/AL)', N'FIT2/3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400568737, N'14565-6', N'OCCULT BLOOD (FIT) #3 OF 3 (SY/CN/BH/AL)', N'FIT3/3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400568737, N'14565-6', N'OCCULT BLOOD (FIT) #3 OF 3 (SY/CN/BH/AL)', N'FIT3/3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400568738, N'29771-3', N'OCCULT BLOOD FIT RANDOM (BU/BH)', N'FIT Ran') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400568738, N'29771-3', N'OCCULT BLOOD FIT RANDOM (BU/BH)', N'FIT Ran') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400593832, N'57905-2', N'OCCULT BLOOD (FIT) #1 OF 1* (CRS) (BU)', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (528, 1400593832, N'57905-2', N'OCCULT BLOOD (FIT) #1 OF 1* (CRS) (BU)', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000006096, N'2335-8', N'OP OCCULT BLOOD (dc''d 11/5/07)', N'OP-OCCU') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000006096, N'2335-8', N'OP OCCULT BLOOD (dc''d 11/5/07)', N'OP-OCCU') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000009685, NULL, N'OCCULT BLOOD #2', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000009685, NULL, N'OCCULT BLOOD #2', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000009685, N'2335-8', N'OCCULT BLOOD #2', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000009685, N'2335-8', N'OCCULT BLOOD #2', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000014516, NULL, N'OCCULT BLOOD #1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000014516, NULL, N'OCCULT BLOOD #1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000014516, N'2335-8', N'OCCULT BLOOD #1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000014516, N'2335-8', N'OCCULT BLOOD #1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000061002, NULL, N'OCCULT BLOOD #3', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000061002, NULL, N'OCCULT BLOOD #3', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000061002, N'2335-8', N'OCCULT BLOOD #3', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000061002, N'2335-8', N'OCCULT BLOOD #3', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000103300, N'29771-3', N'OCCULT FIT', N'FIT') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000103300, N'29771-3', N'OCCULT FIT', N'FIT') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000105623, N'57905-2', N'CSP#577 OCCULT BLOOD (FIT) #1 of 1', N'CSP#577') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (537, 1000105623, N'57905-2', N'CSP#577 OCCULT BLOOD (FIT) #1 of 1', N'CSP#577') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400021875, N'14564-9', N'OB#2', N'OB#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400021875, N'14564-9', N'OB#2', N'OB#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400021876, N'14565-6', N'OB#3', N'OB#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400021876, N'14565-6', N'OB#3', N'OB#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400029888, N'14563-1', N'OB#1', N'OB#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400029888, N'14563-1', N'OB#1', N'OB#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400035778, N'2335-8', N'OCCULT BLOOD//DC''d 11-2016', N'OCCULT ') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400035778, N'2335-8', N'OCCULT BLOOD//DC''d 11-2016', N'OCCULT ') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400568250, N'2335-8', N'CSP#577 OCCULT BLOOD(FIT)#1OF1', N'CSP#577') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400568250, N'2335-8', N'CSP#577 OCCULT BLOOD(FIT)#1OF1', N'CSP#577') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400571692, N'29771-3', N'OCCULT BLOOD (FIT) #1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (540, 1400571692, N'29771-3', N'OCCULT BLOOD (FIT) #1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200028313, N'2335-8', N'OCC.BLD,RANDOM (Pre 4.2.07)', N'.OCCBLD') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200028313, N'2335-8', N'OCC.BLD,RANDOM (Pre 4.2.07)', N'.OCCBLD') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200090066, N'2335-8', N'OCCBLD#1(Pre 4.2.07', N'.OCC1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200090066, N'2335-8', N'OCCBLD#1(Pre 4.2.07', N'.OCC1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200091575, N'2335-8', N'OCC.BLD.,SINGLE CARD(Pre to 4.23.12)', N'.FOBT-R') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200091575, N'2335-8', N'OCC.BLD.,SINGLE CARD(Pre to 4.23.12)', N'.FOBT-R') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200093683, N'14565-6', N'OCC.BLD.,CARD#3(Pre 4.23.12', N'.OCC#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200093683, N'14565-6', N'OCC.BLD.,CARD#3(Pre 4.23.12', N'.OCC#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200093759, N'14563-1', N'OCC.BLD.,CARD#1(Pre 4.23.12)', N'.FOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200093759, N'14563-1', N'OCC.BLD.,CARD#1(Pre 4.23.12)', N'.FOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200095497, N'2335-8', N'OCCBLD#3(Pre 4.2.07', N'.OCC3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200095497, N'2335-8', N'OCCBLD#3(Pre 4.2.07', N'.OCC3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200096072, N'2335-8', N'OCCBLD#2(Pre 4.2.07', N'.OCC#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200096072, N'2335-8', N'OCCBLD#2(Pre 4.2.07', N'.OCC#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200098811, N'14564-9', N'OCC.BLD.,CARD#2(Pre 4.23.12', N'.FOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200098811, N'14564-9', N'OCC.BLD.,CARD#2(Pre 4.23.12', N'.FOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200112732, N'57905-2', N'OCCULT BLOOD (FIT) #1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200112732, N'57905-2', N'OCCULT BLOOD (FIT) #1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200114625, N'29771-3', N'OCCULT BLD (CSP#577) FIT 1/1', N'FITCSP') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (541, 1200114625, N'29771-3', N'OCCULT BLD (CSP#577) FIT 1/1', N'FITCSP') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000002072, N'29771-3', N'.OCCULT BLOOD (FIT) #1 OF 1', N'FIT 1/1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000002072, N'29771-3', N'.OCCULT BLOOD (FIT) #1 OF 1', N'FIT 1/1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000015681, N'14563-1', N'ZZZ.OCCULT BLOOD,FECES 1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000015681, N'14563-1', N'ZZZ.OCCULT BLOOD,FECES 1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000015681, N'2335-8', N'ZZZ.OCCULT BLOOD,FECES 1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000015681, N'2335-8', N'ZZZ.OCCULT BLOOD,FECES 1', N'FOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000018223, N'14563-1', N'OCCULT BLOOD,GUAIAC CARD,FECESx1', N'FOBT-S') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000018223, N'14563-1', N'OCCULT BLOOD,GUAIAC CARD,FECESx1', N'FOBT-S') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000019611, N'14564-9', N'ZZZ.OCCULT BLOOD,FECES 2 (iFOBT)', N'ZZZiFOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000019611, N'14564-9', N'ZZZ.OCCULT BLOOD,FECES 2 (iFOBT)', N'ZZZiFOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000029526, N'14565-6', N'ZZZ.OCCULT BLOOD,FECES 3 (iFOBT)', N'ZZZiFOBT#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000029526, N'14565-6', N'ZZZ.OCCULT BLOOD,FECES 3 (iFOBT)', N'ZZZiFOBT#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000033851, N'14564-9', N'ZZZ.OCCULT BLOOD,FECES 2', N'ZFOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000033851, N'14564-9', N'ZZZ.OCCULT BLOOD,FECES 2', N'ZFOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000033851, N'2335-8', N'ZZZ.OCCULT BLOOD,FECES 2', N'ZFOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000033851, N'2335-8', N'ZZZ.OCCULT BLOOD,FECES 2', N'ZFOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000038707, N'14563-1', N'ZZZ.OCCULT BLOOD,FECES 1 (iFOBT)', N'ZZZiFOBT#1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000038707, N'14563-1', N'ZZZ.OCCULT BLOOD,FECES 1 (iFOBT)', N'ZZZiFOBT#1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000051967, N'14565-6', N'ZZZ.OCCULT BLOOD,FECES 3', N'ZFOBT#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000051967, N'14565-6', N'ZZZ.OCCULT BLOOD,FECES 3', N'ZFOBT#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000051967, N'2335-8', N'ZZZ.OCCULT BLOOD,FECES 3', N'ZFOBT#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000051967, N'2335-8', N'ZZZ.OCCULT BLOOD,FECES 3', N'ZFOBT#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000104251, N'29771-3', N'CSP#577 OCCULT BLOOD(FIT)#1OF1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (549, 1000104251, N'29771-3', N'CSP#577 OCCULT BLOOD(FIT)#1OF1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000000279, N'2335-8', N'ER FOBT', N'ER FOBT') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000000279, N'2335-8', N'ER FOBT', N'ER FOBT') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000000325, N'2335-8', N'OCCULT BLOOD FIT RANDOM', N'FIT Ran') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000000325, N'2335-8', N'OCCULT BLOOD FIT RANDOM', N'FIT Ran') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000022718, N'14563-1', N'ZZFOBT CARD 1(B)', N'CARD 1(B)') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000022718, N'14563-1', N'ZZFOBT CARD 1(B)', N'CARD 1(B)') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000025007, N'14564-9', N'ZZFOBT CARD 2(L)', N'CARD 2(L)') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000025007, N'14564-9', N'ZZFOBT CARD 2(L)', N'CARD 2(L)') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000027283, N'14564-9', N'ZZFOBT #2', N'CARD 2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000027283, N'14564-9', N'ZZFOBT #2', N'CARD 2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000027289, N'14564-9', N'ZZFOBT CARD 2(B)', N'CARD 2(B)') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000027289, N'14564-9', N'ZZFOBT CARD 2(B)', N'CARD 2(B)') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000027355, N'14565-6', N'ZZFOBT CARD 3(L)', N'CARD 3(L)') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000027355, N'14565-6', N'ZZFOBT CARD 3(L)', N'CARD 3(L)') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000032285, NULL, N'ZZER FOBT #3', N'ER FOBT #3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000032285, NULL, N'ZZER FOBT #3', N'ER FOBT #3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000034075, N'14565-6', N'ZZFOBT CARD 3(B)', N'CARD3(B)') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000034075, N'14565-6', N'ZZFOBT CARD 3(B)', N'CARD3(B)') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000034854, NULL, N'ZZER FOBT #2', N'ER FOBT #2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000034854, NULL, N'ZZER FOBT #2', N'ER FOBT #2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000035704, N'56491-4', N'OCCULT BLOOD (FIT) #3 OF 3', N'FIT 3/3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000035704, N'56491-4', N'OCCULT BLOOD (FIT) #3 OF 3', N'FIT 3/3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000038375, N'14565-6', N'ZZFOBT #3', N'CARD 3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000038375, N'14565-6', N'ZZFOBT #3', N'CARD 3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000050178, NULL, N'OCCULT BLOOD-PROV(LUF)dc''d 062420', N'OCC BLD-PV') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000050178, NULL, N'OCCULT BLOOD-PROV(LUF)dc''d 062420', N'OCC BLD-PV') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000054406, N'57905-2', N'OCCULT BLOOD (FIT) #1 OF 3', N'FIT 1/3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000054406, N'57905-2', N'OCCULT BLOOD (FIT) #1 OF 3', N'FIT 1/3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000054407, N'56490-6', N'OCCULT BLOOD (FIT) #2 OF 3', N'FIT 2/3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000054407, N'56490-6', N'OCCULT BLOOD (FIT) #2 OF 3', N'FIT 2/3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000056183, N'14563-1', N'ZZFOBT #1', N'CARD 1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000056183, N'14563-1', N'ZZFOBT #1', N'CARD 1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000069542, N'14563-1', N'ZZFOBT CARD 1(L)', N'CARD 1(L)') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000069542, N'14563-1', N'ZZFOBT CARD 1(L)', N'CARD 1(L)') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000076255, NULL, N'ZZER FOBT #1', N'ER FOBT #1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000076255, NULL, N'ZZER FOBT #1', N'ER FOBT #1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000108791, N'57905-2', N'CSP#577 FIT #1 OF 1', N'CSP#577 FIT') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000108791, N'57905-2', N'CSP#577 FIT #1 OF 1', N'CSP#577 FIT') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000121175, N'29771-3', N'OCCULT BLOOD (FIT) #1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (580, 1000121175, N'29771-3', N'OCCULT BLOOD (FIT) #1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000036925, N'2335-8', N'OCCULT BLOOD RANDOM', N'FOB RAN') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000036925, N'2335-8', N'OCCULT BLOOD RANDOM', N'FOB RAN') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000043219, N'2335-8', N'POC OCCULT BLOOD-CO', N'POC_FOB') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000043219, N'2335-8', N'POC OCCULT BLOOD-CO', N'POC_FOB') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000043224, N'14565-6', N'OCCULT BLOOD #3', N'FOBT #3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000043224, N'14565-6', N'OCCULT BLOOD #3', N'FOBT #3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000068953, N'2335-8', N'OCCULT BLOOD #1', N'FOBT #1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000068953, N'2335-8', N'OCCULT BLOOD #1', N'FOBT #1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000068956, N'14564-9', N'OCCULT BLOOD #2', N'FOBT #2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000068956, N'14564-9', N'OCCULT BLOOD #2', N'FOBT #2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000068956, N'2335-8', N'OCCULT BLOOD #2', N'FOBT #2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000068956, N'2335-8', N'OCCULT BLOOD #2', N'FOBT #2') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000099307, N'14564-9', N'OCCULT BLOOD (FIT) #1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000099307, N'14564-9', N'OCCULT BLOOD (FIT) #1 OF 1', N'FIT1/1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000106227, N'57905-2', N'CSP#577 OCCULT BLOOD(FIT)#1of1', N'FIT1/ 1') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (589, 1000106227, N'57905-2', N'CSP#577 OCCULT BLOOD(FIT)#1of1', N'FIT1/ 1') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000012300, N'2335-8', N'OCCULT BLOOD,SINGLE CARD,1998 to 2/2007', N'Occ.Bl.') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000012300, N'2335-8', N'OCCULT BLOOD,SINGLE CARD,1998 to 2/2007', N'Occ.Bl.') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000013003, N'2335-8', N'L-OCCULT BLOOD-MULTIPLE,thru Jan.2007', N'OcBld') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000013003, N'2335-8', N'L-OCCULT BLOOD-MULTIPLE,thru Jan.2007', N'OcBld') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000047039, N'14565-6', N'FOBT#3, 1/2007 thru 12/2009', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000047039, N'14565-6', N'FOBT#3, 1/2007 thru 12/2009', N'FOBT#3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000050677, N'14563-1', N'OCCULT BLOOD (FIT) #1 OF 3,12/09-1/16', N'FIT 1/3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000050677, N'14563-1', N'OCCULT BLOOD (FIT) #1 OF 3,12/09-1/16', N'FIT 1/3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000053306, N'14565-6', N'OCCULT BLOOD (FIT) #3 OF 3,12/09-1/16', N'FIT 3/3') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000053306, N'14565-6', N'OCCULT BLOOD (FIT) #3 OF 3,12/09-1/16', N'FIT 3/3') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000054046, N'2335-8', N'OCCULT BLD FIT RANDOM(1of1),12/09-1/16', N'FITRAN') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000054046, N'2335-8', N'OCCULT BLD FIT RANDOM(1of1),12/09-1/16', N'FITRAN') --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000059624, N'14564-9', N'FOBT#2, 1/2007 thru 12/2009', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_7_FOBTLabTestName ([Sta3n], [LabChemTestSID], [LOINC_Original], [LabChemTestName], [LabChemPrintTestName]) VALUES (635, 1000059624, N'14564-9', N'FOBT#2, 1/2007 thru 12/2009', N'FOBT#2') --altered (ORD_...Dflt) --altered (temp table) GO ---- FOBT test LOINC code list --- if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_7_LOINC') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) --- drop table #FOBT_Sta3n528_0_7_LOINC --altered (ORD_...Dflt) --altered (temp table) +-- if (OBJECT_ID('tempdb.dbo.#FOBT_0_7_LOINC') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) +-- drop table #FOBT_0_7_LOINC --altered (ORD_...Dflt) --altered (temp table) --go --- CREATE TABLE #FOBT_Sta3n528_0_7_LOINC ( --altered (ORD_...Dflt) --altered (temp table) +-- CREATE TABLE #FOBT_0_7_LOINC ( --altered (ORD_...Dflt) --altered (temp table) -- UniqueID int Identity(1,1) not null, -- [LOINC_code_type] [varchar](50) NULL, -- [LOINC_code_name] [varchar](50) NULL, @@ -1483,7 +1483,7 @@ GO --go ---insert into #FOBT_Sta3n528_0_7_LOINC ( --altered (ORD_...Dflt) --altered (temp table) +--insert into #FOBT_0_7_LOINC ( --altered (ORD_...Dflt) --altered (temp table) -- [LOINC_code_type], -- [LOINC_code_name] , -- [LOINC] @@ -1528,11 +1528,11 @@ GO -- Positive FOBT value list -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_0_A_RedFlagFOBTTestResult') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_0_A_RedFlagFOBTTestResult') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_0_A_RedFlagFOBTTestResult --altered (ORD_...Dflt) --altered (temp table) go - CREATE TABLE #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #FOBT_0_A_RedFlagFOBTTestResult ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, Sta3n smallint null, FOBTTestResult [varchar](100) NULL, @@ -1545,89 +1545,89 @@ go -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (512, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (512, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (523, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (523, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (528, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (528, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (537, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (537, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (540, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (540, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (541, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (541, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (549, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (549, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (580, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (580, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (589, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (589, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (635, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (635, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (642, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (642, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (644, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (644, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (671, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (671, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (691, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (691, N'P', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (512, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (512, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (523, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (523, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (528, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (528, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (537, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (537, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (540, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (540, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (541, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (541, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (549, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (549, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (580, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (580, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (589, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (589, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (635, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (635, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (642, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (642, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (644, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (644, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (671, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (671, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (691, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (691, N'POS', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (512, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (512, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (523, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (523, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (528, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (528, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (537, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (537, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (540, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (540, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (541, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (541, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (549, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (549, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (580, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (580, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (589, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (589, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (635, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (635, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (642, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (642, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (644, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (644, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (671, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (671, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (691, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) +INSERT #FOBT_0_A_RedFlagFOBTTestResult ([sta3n], [FOBTTestResult], [IsRedFlag]) VALUES (691, N'Positive', 1) --altered (ORD_...Dflt) --altered (temp table) GO -------------------------------------------------------------------------------------------------------------------------------- @@ -1635,8 +1635,8 @@ GO -------------------------------------------------------------------------------------------------------------------------------- -- All FOBT tests -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_1_Inc_1_AllFOBTSta6a') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_1_Inc_1_AllFOBTSta6a --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_1_Inc_1_AllFOBTSta6a') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_1_Inc_1_AllFOBTSta6a --altered (ORD_...Dflt) --altered (temp table) SELECT [LabChemSID] ,labChem.[Sta3n] @@ -1654,7 +1654,7 @@ if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_1_Inc_1_AllFOBTSta6a') is not null) ,dimTest.[LabChemPrintTestName] ,labChem.[LOINCSID] ,LOINC.LOINC - into #FOBT_Sta3n528_1_Inc_1_AllFOBTSta6a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_1_Inc_1_AllFOBTSta6a --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[chem].[PatientLabChem] as labChem --altered (ORD_...Src) inner join CDWWork.dim.Location as loc on labChem.RequestingLocationSID=loc.LocationSID @@ -1666,22 +1666,22 @@ if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_1_Inc_1_AllFOBTSta6a') is not null) on labChem.[LabChemTestSID]=dimTest.LabChemTestSID inner join cdwwork.dim.LOINC as LOINC on labChem.LOINCSID=LOINC.LOINCSID - inner join #FOBT_Sta3n528_0_7_FOBTLabTestName as n --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_0_7_FOBTLabTestName as n --altered (ORD_...Dflt) --altered (temp table) on labChem.sta3n=n.sta3n and labchem.LabChemTestSID=n.LabChemTestSID - -- left join #FOBT_Sta3n528_0_7_LOINC as l --altered (ORD_...Dflt) --altered (temp table) + -- left join #FOBT_0_7_LOINC as l --altered (ORD_...Dflt) --altered (temp table) --on LOINC.lOINC=l.LOINC - inner join #FOBT_Sta3n528_0_0_1_Sta3nSta6a as s --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_0_0_1_Sta3nSta6a as s --altered (ORD_...Dflt) --altered (temp table) on d.sta3n=s.sta3n and d.Sta6a=s.Sta6a inner join [CDWWork].[SPatient].[SPatient] as VStatus --altered (ORD_...Src) on labChem.PatientSID=VStatus.PatientSID and labChem.sta3n=VStatus.sta3n where --labchem.CohortName='Cohort20180712' and - labChem.[LabChemSpecimenDateTime] between (select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and(select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + labChem.[LabChemSpecimenDateTime] between (select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and(select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) go -- Red flagged FOBT tests -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_1_Inc_8_IncIns') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_1_Inc_8_IncIns --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_1_Inc_8_IncIns') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_1_Inc_8_IncIns --altered (ORD_...Dflt) --altered (temp table) go @@ -1702,14 +1702,14 @@ select distinct [LabChemSID] ,VStatus.DeathDateTime as DOD ,VStatus.gender as Sex ,a.PatientSSN -into #FOBT_Sta3n528_1_Inc_8_IncIns --altered (ORD_...Dflt) --altered (temp table) -from #FOBT_Sta3n528_1_Inc_1_AllFOBTSta6a as a --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_1_Inc_8_IncIns --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_1_Inc_1_AllFOBTSta6a as a --altered (ORD_...Dflt) --altered (temp table) inner join [CDWWork].[SPatient].[SPatient] as VStatus --altered (ORD_...Src) on a.PatientSID=VStatus.PatientSID and a.sta3n=VStatus.sta3n ----PACTDiscovery --where --- [FOBT_dt] between (select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) --- and (select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +-- [FOBT_dt] between (select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +-- and (select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) --and (Abnormal like 'H%' -- or( [LabChemResultValue] like 'P' -- or [LabChemResultValue] like '%PO%' @@ -1721,11 +1721,11 @@ on a.PatientSID=VStatus.PatientSID and a.sta3n=VStatus.sta3n -- ) -- ) ----PACTDiscoveryEnd -left join #FOBT_Sta3n528_0_A_RedFlagFOBTTestResult as targetTestResult --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_A_RedFlagFOBTTestResult as targetTestResult --altered (ORD_...Dflt) --altered (temp table) on ltrim(rtrim(a.[LabChemResultValue]))=targetTestResult.FOBTTestResult and targetTestResult.IsRedFlag=1 and a.Sta3n=targetTestResult.sta3n where - [FOBT_dt] between (select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and (select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + [FOBT_dt] between (select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) and ( targetTestResult.FOBTTestResult is not null -- Using Abnormal Flag. Make corresponsing change here if it does not apply to your site. @@ -1736,13 +1736,13 @@ go -- Get other possible patientSIDs -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_1_Inc_9_IncPat') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_1_Inc_9_IncPat --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_1_Inc_9_IncPat') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_1_Inc_9_IncPat --altered (ORD_...Dflt) --altered (temp table) go select distinct VStatus.Sta3n,VStatus.PatientSID,VStatus.patientSSN, VStatus.ScrSSN,VStatus.PatientICN - into #FOBT_Sta3n528_1_Inc_9_IncPat --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_1_Inc_8_IncIns as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_1_Inc_9_IncPat --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_1_Inc_8_IncIns as a --altered (ORD_...Dflt) --altered (temp table) left join [CDWWork].[SPatient].[SPatient] as VStatus --altered (ORD_...Src) on a.patientSSN=VStatus.PatientSSN go @@ -1754,8 +1754,8 @@ go -- Extract of previous colon cancer history from patient problemlist -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_0_PrevCLCFromProblemList_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_0_PrevCLCFromProblemList_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_0_PrevCLCFromProblemList_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_0_PrevCLCFromProblemList_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) go select @@ -1765,22 +1765,22 @@ select ,ColonCancerICD9CodeList.dx_code_type as Icd9dx_code_type ,ICD10.ICD10Code,ColonCancerICD10CodeList.ICD10Code as TargetICD10Code ,ColonCancerICD10CodeList.dx_code_type as Icd10dx_code_type -into #FOBT_Sta3n528_2_ExcDx_0_PrevCLCFromProblemList_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_2_ExcDx_0_PrevCLCFromProblemList_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Outpat].[ProblemList] as Plist --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as ICD9 on Plist.ICD9SID=ICD9.ICD9SID -left join #FOBT_Sta3n528_0_8_ColonCancerDxICD9Code as ColonCancerICD9CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_8_ColonCancerDxICD9Code as ColonCancerICD9CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD9.ICD9Code=ColonCancerICD9CodeList.ICD9Code left join CDWWork.Dim.ICD10 as ICD10 on Plist.ICD10SID=ICD10.ICD10SID -left join #FOBT_Sta3n528_0_9_ColonCancerDxICD10Code as ColonCancerICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_9_ColonCancerDxICD10Code as ColonCancerICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10.ICD10Code=ColonCancerICD10CodeList.ICD10Code -inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) +inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on Plist.sta3n=p.sta3n and Plist.patientsid=p.patientsid where --CohortName='Cohort20180712' and -plist.[EnteredDateTime] >= DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) -and plist.[EnteredDateTime] <= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP), --altered (ORD_...Dflt) --altered (temp table) - (select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +plist.[EnteredDateTime] >= DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +and plist.[EnteredDateTime] <= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP), --altered (ORD_...Dflt) --altered (temp table) + (select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and ( ColonCancerICD9CodeList.dx_code_type is not null @@ -1790,8 +1790,8 @@ go -- Extract of all DX codes from outpatient table for all potential patients -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_1_OutPatDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_1_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_1_OutPatDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_1_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) SELECT [VDiagnosisSID] @@ -1805,31 +1805,31 @@ SELECT ,[VisitDateTime] ,[VDiagnosisDateTime] as dx_dt ,p.patientSSN -into #FOBT_Sta3n528_2_ExcDx_1_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_2_ExcDx_1_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[outpat].[WorkLoadVDiagnosis] as Diag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on Diag.ICD9SID=DimICD9.ICD9SID -left join #FOBT_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on Diag.ICD10SID=DimICD10.ICD10SID -left join #FOBT_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code -inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) +inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on Diag.sta3n=p.sta3n and Diag.patientsid=p.patientsid where --CohortName='Cohort20180712' and -- Thalassemia any time prior only applies to IDA -[VDiagnosisDateTime]> DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) -and [VDiagnosisDateTime]<= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP), --altered (ORD_...Dflt) --altered (temp table) - (select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +[VDiagnosisDateTime]> DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +and [VDiagnosisDateTime]<= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP), --altered (ORD_...Dflt) --altered (temp table) + (select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -- Extract of all DX Codes for all potential patients from surgical files -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_2_SurgDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_2_SurgDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_2_SurgDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_2_SurgDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) SELECT distinct surgPre.[SurgerySID] as SurgPre_SurgerySID @@ -1850,9 +1850,9 @@ SELECT distinct ,OtherPostICD10.ICD10Code as OtherPostICD10Diagnosis ,assocDxICD10.ICD10Code as assocDxICD10Diagnosis ,p.patientSSN - into #FOBT_Sta3n528_2_ExcDx_2_SurgDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_2_ExcDx_2_SurgDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Surg].[SurgeryPre] as surgPre --altered (ORD_...Src) - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on SurgPre.sta3n=p.sta3n and SurgPre.patientsid=p.patientsid left join CDWWork.dim.ICD9 as PreICD9 @@ -1880,21 +1880,21 @@ SELECT distinct on assocDx.[SurgeryPrincipalAssociatedDiagnosisICD10SID]=assocDxICD10.ICD10SID and assocDx.sta3n=assocDxICD10.sta3n where -- Thalassemia any time prior only applies to IDA - SurgPre.[SurgeryDateTime]>= DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) and --altered (ORD_...Dflt) --altered (temp table) - SurgPre.[SurgeryDateTime]<= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + SurgPre.[SurgeryDateTime]>= DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) and --altered (ORD_...Dflt) --altered (temp table) + SurgPre.[SurgeryDateTime]<= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) --and SurgPre.CohortName='Cohort20180712' --and surgDx.CohortName='Cohort20180712' --and otherPostDx.CohortName='Cohort20180712' --and assocDx.CohortName='Cohort20180712' and ( - --PreICD9.ICD9Code in (select ICD9Code from #FOBT_Sta3n528_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) - PrincipalPostOpICD9.ICD9Code in (select ICD9Code from #FOBT_Sta3n528_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) - or OtherPostICD9.ICD9Code in (select ICD9Code from #FOBT_Sta3n528_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) - or assocDxICD9.ICD9Code in (select ICD9Code from #FOBT_Sta3n528_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) + --PreICD9.ICD9Code in (select ICD9Code from #FOBT_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) + PrincipalPostOpICD9.ICD9Code in (select ICD9Code from #FOBT_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) + or OtherPostICD9.ICD9Code in (select ICD9Code from #FOBT_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) + or assocDxICD9.ICD9Code in (select ICD9Code from #FOBT_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) - or PrincipalPostOpICD10.ICD10Code in (select ICD10Code from #FOBT_Sta3n528_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) - or OtherPostICD10.ICD10Code in (select ICD10Code from #FOBT_Sta3n528_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) - or assocDxICD10.ICD10Code in (select ICD10Code from #FOBT_Sta3n528_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) + or PrincipalPostOpICD10.ICD10Code in (select ICD10Code from #FOBT_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) + or OtherPostICD10.ICD10Code in (select ICD10Code from #FOBT_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) + or assocDxICD10.ICD10Code in (select ICD10Code from #FOBT_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) ) @@ -1903,8 +1903,8 @@ SELECT distinct -- Extract of all DX codes from inpatient tables for all potential patients -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) SELECT [InpatientDiagnosisSID] ,InPatDiag.[Sta3n] @@ -1917,28 +1917,28 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[InpatientDiagnosis] as InPatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InPatDiag.ICD9SID=DimICD9.ICD9SID -left join #FOBT_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InPatDiag.ICD10SID=DimICD10.ICD10SID -left join #FOBT_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --CohortName='Cohort20180712' and -- Thalassemia any time prior only applies to IDA - [DischargeDateTime]> DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) -and [DischargeDateTime]<= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + [DischargeDateTime]> DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +and [DischargeDateTime]<= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Census501Diagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Census501Diagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT Census501DiagnosisSID @@ -1951,26 +1951,26 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[Census501Diagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #FOBT_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #FOBT_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --CohortName='Cohort20180712' and - CensusDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and CensusDateTime<= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + CensusDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and CensusDateTime<= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT CensusDiagnosisSID @@ -1983,27 +1983,27 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[CensusDiagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #FOBT_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #FOBT_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --CohortName='Cohort20180712' and - CensusDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and CensusDateTime<= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + CensusDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and CensusDateTime<= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT Inpatient501TransactionDiagnosisSID @@ -2016,27 +2016,27 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[Inpatient501TransactionDiagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #FOBT_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #FOBT_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --CohortName='Cohort20180712' and - SpecialtyTransferDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and SpecialtyTransferDateTime<= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + SpecialtyTransferDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and SpecialtyTransferDateTime<= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT InpatientDischargeDiagnosisSID , @@ -2049,27 +2049,27 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[InpatientDischargeDiagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #FOBT_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #FOBT_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --inpatDiag.CohortName='Cohort20180712' and - DischargeDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and DischargeDateTime<= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + DischargeDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and DischargeDateTime<= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT PatientTransferDiagnosisSID , InPatDiag.[Sta3n] @@ -2081,26 +2081,26 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[PatientTransferDiagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #FOBT_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #FOBT_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --CohortName='Cohort20180712' and - PatientTransferDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and PatientTransferDateTime<= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + PatientTransferDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and PatientTransferDateTime<= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT SpecialtyTransferDiagnosisSID , InPatDiag.[Sta3n] @@ -2113,28 +2113,28 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[SpecialtyTransferDiagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #FOBT_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #FOBT_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --inpatDiag.CohortName='Cohort20180712' and - SpecialtyTransferDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and SpecialtyTransferDateTime<= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + SpecialtyTransferDateTime>= DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and SpecialtyTransferDateTime<= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -- Extract of all DX Codes for all potential patients from Purchased Care -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_3_B_InpatientFeeDiagnosisDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_3_B_InpatientFeeDiagnosisDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) SELECT Diag.[Sta3n] @@ -2148,30 +2148,30 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN -into #FOBT_Sta3n528_2_ExcDx_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_2_ExcDx_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[InpatientFeeDiagnosis] as Diag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on Diag.ICD9SID=DimICD9.ICD9SID -left join #FOBT_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on Diag.ICD10SID=DimICD10.ICD10SID -left join #FOBT_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code -inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) +inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on Diag.sta3n=p.sta3n and Diag.patientsid=p.patientsid where --CohortName='Cohort20180712' and -- Thalassemia any time prior only applies to IDA - [DischargeDateTime]> DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) -and [DischargeDateTime]<= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + [DischargeDateTime]> DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +and [DischargeDateTime]<= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -- Extract of all DX Codes for all potential patients from Purchased Care - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) SELECT @@ -2185,104 +2185,104 @@ SELECT ,targetCode.dx_code_type as ICD9dx_code_type ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type -into #FOBT_Sta3n528_2_ExcDx_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_2_ExcDx_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Fee].[FeeServiceProvided] as a --altered (ORD_...Src) inner join [CDWWork].[Fee].[FeeInitialTreatment] as d --altered (ORD_...Src) on a.FeeInitialTreatmentSID=d.FeeInitialTreatmentSID left join CDWWork.Dim.ICD9 as DimICD9 on a.ICD9SID=DimICD9.ICD9SID -left join #FOBT_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on a.ICD10SID=DimICD10.ICD10SID -left join #FOBT_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #FOBT_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as c --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as c --altered (ORD_...Dflt) --altered (temp table) on a.sta3n=c.sta3n and a.patientsid=c.patientsid where --a.CohortName='Cohort20180712' and d.CohortName='Cohort20180712' and -- Thalassemia any time prior only applies to IDA - InitialTreatmentDateTime> DATEADD(yy,-1,(select sp_start from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) -and d.InitialTreatmentDateTime<= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + InitialTreatmentDateTime> DATEADD(yy,-1,(select sp_start from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +and d.InitialTreatmentDateTime<= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -- combine all exclusion diagnoses from surgical, inpatient, and outpatient, and purchased care tables -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD9') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_4_ALLDx_ICD9') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_4_ALLDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) go select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'DX-OutPat' as dataSource -into #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_2_ExcDx_1_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_2_ExcDx_4_ALLDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_1_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-InPat' as dataSource - from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code,ICD9dx_code_type as dx_code_type,'Dx-InPatFee' as dataSource - from #FOBT_Sta3n528_2_ExcDx_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code,ICD9dx_code_type as dx_code_type,'Dx-InPatFeeService' as dataSource - from #FOBT_Sta3n528_2_ExcDx_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null ------- UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-Census501Diagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-CensusDiagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-501TransactionDiagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-InpatientDischargeDiagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-PatientTransferDiagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-SpecialtyTransferDiagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null ---------------- Union select patientSSN,sta3n, PatientSID,dx_dt,PrincipalPostOpICD9Diagnosis as ICD9 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #FOBT_Sta3n528_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #FOBT_Sta3n528_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.PrincipalPostOpICD9Diagnosis=b.ICD9Code - where isnull(PrincipalPostOpICD9Diagnosis,'') in (select ICD9Code from #FOBT_Sta3n528_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(PrincipalPostOpICD9Diagnosis,'') in (select ICD9Code from #FOBT_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) Union select patientSSN,sta3n, PatientSID,dx_dt,OtherPostICD9Diagnosis as ICD9 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #FOBT_Sta3n528_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #FOBT_Sta3n528_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.OtherPostICD9Diagnosis=b.ICD9Code - where isnull(OtherPostICD9Diagnosis,'') in (select ICD9Code from #FOBT_Sta3n528_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(OtherPostICD9Diagnosis,'') in (select ICD9Code from #FOBT_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) Union select patientSSN,sta3n, PatientSID,dx_dt,assocDxICD9Diagnosis as ICD9 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #FOBT_Sta3n528_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #FOBT_Sta3n528_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.assocDxICD9Diagnosis=b.ICD9Code - where isnull(assocDxICD9Diagnosis,'') in (select ICD9Code from #FOBT_Sta3n528_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(assocDxICD9Diagnosis,'') in (select ICD9Code from #FOBT_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) go -alter table #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) +alter table #FOBT_2_ExcDx_4_ALLDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) add term_dx_dt datetime2(0), hospice_dt datetime2(0), @@ -2292,7 +2292,7 @@ alter table #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD9 --altered (ORD_...Dflt) --alt --thal_dx_dt datetime2(0), go -update #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) +update #FOBT_2_ExcDx_4_ALLDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) set term_dx_dt = case when dx_code_type='Terminal' @@ -2313,81 +2313,81 @@ set go -- combine all exclusion diagnoses from surgical, inpatient, and outpatient, and purchased care tables -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_4_ALLDx_ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_4_ALLDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) go select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'DX-OutPat' as dataSource -into #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_2_ExcDx_1_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_2_ExcDx_4_ALLDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_1_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-InPat' as dataSource - from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code,ICD10dx_code_type as dx_code_type,'Dx-InPatFee' as dataSource - from #FOBT_Sta3n528_2_ExcDx_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code,ICD10dx_code_type as dx_code_type,'Dx-InPatFeeService' as dataSource - from #FOBT_Sta3n528_2_ExcDx_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null -- UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-Census501Diagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-CensusDiagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-501TransactionDiagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-InpatientDischargeDiagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-PatientTransferDiagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-SpecialtyTransferDiagnosis' as dataSource -from #FOBT_Sta3n528_2_ExcDx_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null -- Union select patientSSN,sta3n, PatientSID,dx_dt,PrincipalPostOpICD10Diagnosis as ICD10 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #FOBT_Sta3n528_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #FOBT_Sta3n528_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.PrincipalPostOpICD10Diagnosis=b.ICD10Code - where isnull(PrincipalPostOpICD10Diagnosis,'') in (select ICD10Code from #FOBT_Sta3n528_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(PrincipalPostOpICD10Diagnosis,'') in (select ICD10Code from #FOBT_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) Union select patientSSN,sta3n, PatientSID,dx_dt,OtherPostICD10Diagnosis as ICD10 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #FOBT_Sta3n528_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #FOBT_Sta3n528_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.OtherPostICD10Diagnosis=b.ICD10Code - where isnull(OtherPostICD10Diagnosis,'') in (select ICD10Code from #FOBT_Sta3n528_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(OtherPostICD10Diagnosis,'') in (select ICD10Code from #FOBT_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) Union select patientSSN,sta3n, PatientSID,dx_dt,assocDxICD10Diagnosis as ICD10 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #FOBT_Sta3n528_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #FOBT_Sta3n528_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_2_ExcDx_2_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.assocDxICD10Diagnosis=b.ICD10Code - where isnull(assocDxICD10Diagnosis,'') in (select ICD10Code from #FOBT_Sta3n528_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(assocDxICD10Diagnosis,'') in (select ICD10Code from #FOBT_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) go -Alter table #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) +Alter table #FOBT_2_ExcDx_4_ALLDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) add term_dx_dt datetime2(0), hospice_dt datetime2(0), @@ -2400,7 +2400,7 @@ Alter table #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD10 --altered (ORD_...Dflt) --al go -update #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) +update #FOBT_2_ExcDx_4_ALLDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) set term_dx_dt= case when dx_code_type='Terminal' then dx_dt else null end, hospice_dt= case when dx_code_type='hospice' then dx_dt else null end, ugi_bleed_dx_dt= case when dx_code_type='UpperGIBleeding' then dx_dt else null end @@ -2411,8 +2411,8 @@ go -- combine all ICD9 and ICD10 exclusion diagnoses from surgical, inpatient, and outpatient, and purchased care tables -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_2_ExcDx_4_Union_ALLDx_ICD') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_2_ExcDx_4_Union_ALLDx_ICD --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_2_ExcDx_4_Union_ALLDx_ICD') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_2_ExcDx_4_Union_ALLDx_ICD --altered (ORD_...Dflt) --altered (temp table) go select @@ -2426,8 +2426,8 @@ select ,[term_dx_dt] ,[hospice_dt] ,ugi_bleed_dx_dt -into #FOBT_Sta3n528_2_ExcDx_4_Union_ALLDx_ICD --altered (ORD_...Dflt) --altered (temp table) -from #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_2_ExcDx_4_Union_ALLDx_ICD --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_4_ALLDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) union select [patientSSN] @@ -2440,156 +2440,156 @@ select ,[term_dx_dt] ,[hospice_dt] ,ugi_bleed_dx_dt -from #FOBT_Sta3n528_2_ExcDx_4_ALLDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_2_ExcDx_4_ALLDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) go -- Previous ICD procedures from inpatient tables - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) select pat.patientssn,ICDProc.sta3n,ICDProc.patientsid ,ICDProc.[ICDProcedureDateTime] ,DimICD9Proc.[ICD9ProcedureCode],TargetCode.ICD9ProcCode,TargetCode.ICD9Proc_Code_Type ,DimICD10Proc.ICD10ProcedureCode,ICD10CodeList.ICD10ProcCode,ICD10CodeList.ICD10Proc_Code_Type -into #FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[inpat].[InpatientICDProcedure] as ICDProc --altered (ORD_...Src) left join cdwwork.dim.ICD9Procedure as DimICD9Proc on ICDProc.[ICD9ProcedureSID]=DimICD9Proc.[ICD9ProcedureSID] - left join #FOBT_Sta3n528_0_6_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) + left join #FOBT_0_6_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) on DimICD9Proc.[ICD9ProcedureCode]=TargetCode.ICD9ProcCode left join cdwwork.dim.ICD10Procedure as DimICD10Proc on ICDProc.[ICD10ProcedureSID]=DimICD10Proc.[ICD10ProcedureSID] - left join #FOBT_Sta3n528_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) + left join #FOBT_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on DimICD10Proc.ICD10ProcedureCode=ICD10CodeList.ICD10ProcCode - inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #FOBT_Sta3n528_1_Inc_9_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) + inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #FOBT_1_Inc_9_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) on ICDProc.patientsid=pat.patientsid and ICDProc.sta3n=pat.sta3n where --CohortName='Cohort20180712' and -- Total Colectomy any time prior -- Colonoscopy 3 years prior - [ICDProcedureDateTime] < DateAdd(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + [ICDProcedureDateTime] < DateAdd(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.ICD9Proc_code_type is not null or ICD10CodeList.ICD10Proc_code_type is not null) go - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) select pat.patientssn,ICDProc.sta3n,ICDProc.patientsid ,ICDProc.ICDProcedureDateTime ,DimICD9Proc.[ICD9ProcedureCode],TargetCode.ICD9ProcCode,TargetCode.ICD9Proc_Code_Type ,DimICD10Proc.ICD10ProcedureCode,ICD10CodeList.ICD10ProcCode,ICD10CodeList.ICD10Proc_Code_Type -into #FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[CensusICDProcedure] as ICDProc --altered (ORD_...Src) left join cdwwork.dim.ICD9Procedure as DimICD9Proc on ICDProc.[ICD9ProcedureSID]=DimICD9Proc.[ICD9ProcedureSID] - left join #FOBT_Sta3n528_0_6_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) + left join #FOBT_0_6_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) on DimICD9Proc.[ICD9ProcedureCode]=TargetCode.ICD9ProcCode left join cdwwork.dim.ICD10Procedure as DimICD10Proc on ICDProc.[ICD10ProcedureSID]=DimICD10Proc.[ICD10ProcedureSID] - left join #FOBT_Sta3n528_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) + left join #FOBT_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on DimICD10Proc.ICD10ProcedureCode=ICD10CodeList.ICD10ProcCode - inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #FOBT_Sta3n528_1_Inc_9_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) + inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #FOBT_1_Inc_9_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) on ICDProc.patientsid=pat.patientsid and ICDProc.sta3n=pat.sta3n where --CohortName='Cohort20180712' and -- Total Colectomy any time prior -- Colonoscopy 3 years prior - [ICDProcedureDateTime] < DateAdd(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),(select sp_end from #FOBT_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + [ICDProcedureDateTime] < DateAdd(dd,(select fu_period from #FOBT_0_1_inputP),(select sp_end from #FOBT_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.ICD9Proc_code_type is not null or ICD10CodeList.ICD10Proc_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) select pat.patientssn,a.sta3n,a.patientsid,a.[SurgicalProcedureDateTime] ,DimICD9Proc.[ICD9ProcedureCode],TargetCode.ICD9Proc_Code_Type ,TargetCode.ICD9ProcCode,ICD10CodeList.ICD10Proc_Code_Type ,DimICD10Proc.[ICD10ProcedureCode],ICD10CodeList.ICD10ProcCode -into #FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[inpat].[InpatientSurgicalProcedure] as a --altered (ORD_...Src) left join cdwwork.dim.ICD9Procedure as DimICD9Proc on a.[ICD9ProcedureSID]=DimICD9Proc.[ICD9ProcedureSID] - left join #FOBT_Sta3n528_0_6_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) + left join #FOBT_0_6_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) on DimICD9Proc.[ICD9ProcedureCode]=TargetCode.ICD9ProcCode left join cdwwork.dim.ICD10Procedure as DimICD10Proc on a.[ICD10ProcedureSID]=DimICD10Proc.[ICD10ProcedureSID] - left join #FOBT_Sta3n528_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) + left join #FOBT_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on DimICD10Proc.ICD10ProcedureCode=ICD10CodeList.ICD10ProcCode - inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #FOBT_Sta3n528_1_Inc_9_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) + inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #FOBT_1_Inc_9_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) on a.patientsid=pat.patientsid and a.sta3n=pat.sta3n where --CohortName='Cohort20180712' and -- Total Colectomy any time prior -- Colonoscopy 3 years prior - [SurgicalProcedureDateTime] 75 years old -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_1_Age') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_1_Age --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_1_Age') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_1_Age --altered (ORD_...Dflt) --altered (temp table) select a.* -into #FOBT_Sta3n528_5_Ins_1_Age --altered (ORD_...Dflt) --altered (temp table) -from #FOBT_Sta3n528_1_Inc_8_IncIns as a --altered (ORD_...Dflt) --altered (temp table) - where DATEDIFF(yy,DOB,a.[CBC_dt]) >= (select age_Lower from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and DATEDIFF(yy,DOB,a.[CBC_dt]) < (select age_upper from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_5_Ins_1_Age --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_1_Inc_8_IncIns as a --altered (ORD_...Dflt) --altered (temp table) + where DATEDIFF(yy,DOB,a.[CBC_dt]) >= (select age_Lower from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and DATEDIFF(yy,DOB,a.[CBC_dt]) < (select age_upper from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) go -- Red-flagged instances: Exclude deseased patients -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_2_ALive') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_2_ALive --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_2_ALive') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_2_ALive --altered (ORD_...Dflt) --altered (temp table) select a.* -into #FOBT_Sta3n528_5_Ins_2_ALive --altered (ORD_...Dflt) --altered (temp table) -from #FOBT_Sta3n528_5_Ins_1_Age as a --altered (ORD_...Dflt) --altered (temp table) +into #FOBT_5_Ins_2_ALive --altered (ORD_...Dflt) --altered (temp table) +from #FOBT_5_Ins_1_Age as a --altered (ORD_...Dflt) --altered (temp table) where [DOD] is null or (DOD is not null and ( - DATEADD(dd,-(select fu_period from #FOBT_Sta3n528_0_1_inputP),dod)> a.cbc_dt --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,-(select fu_period from #FOBT_0_1_inputP),dod)> a.cbc_dt --altered (ORD_...Dflt) --altered (temp table) ) ) go -- Red-flagged instances: Exclude patients with previous colon cancer - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_3_PrevCRCCancer') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_3_PrevCRCCancer --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_3_PrevCRCCancer') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_3_PrevCRCCancer --altered (ORD_...Dflt) --altered (temp table) select a.* - into #FOBT_Sta3n528_5_Ins_3_PrevCRCCancer --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_2_ALive as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_3_PrevCRCCancer --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_2_ALive as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #FOBT_Sta3n528_2_ExcDx_0_PrevCLCFromProblemList_ICD9ICD10 as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #FOBT_2_ExcDx_0_PrevCLCFromProblemList_ICD9ICD10 as b --altered (ORD_...Dflt) --altered (temp table) where a.[PatientSSN] = b.[PatientSSN] and b.EnteredDateTime between dateadd(yy,-1,a.CBC_dt) and a.CBC_dt) @@ -3118,65 +3118,65 @@ go -- Red-flagged instances: Exclude patients with colectomy - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_4_colectomy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_4_colectomy --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_4_colectomy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_4_colectomy --altered (ORD_...Dflt) --altered (temp table) select a.* - into #FOBT_Sta3n528_5_Ins_4_colectomy --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_3_PrevCRCCancer as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_4_colectomy --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_3_PrevCRCCancer as a --altered (ORD_...Dflt) --altered (temp table) where not exists ( select * from ( - select patientssn, [colectomy_dt] from #FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_All_2_Colectomy --altered (ORD_...Dflt) --altered (temp table) + select patientssn, [colectomy_dt] from #FOBT_3_Exc_NonDx_3_PrevProc_All_2_Colectomy --altered (ORD_...Dflt) --altered (temp table) union - select patientssn,ExamdateTime as [colectomy_dt] from #FOBT_Sta3n528_3_Exc_NonDx_6_AllImgProcFromRad --altered (ORD_...Dflt) --altered (temp table) + select patientssn,ExamdateTime as [colectomy_dt] from #FOBT_3_Exc_NonDx_6_AllImgProcFromRad --altered (ORD_...Dflt) --altered (temp table) where cpt_code_type='colectomy' ) as b where a.[PatientSSN] = b.[PatientSSN] - and b.[colectomy_dt] <= DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),a.CBC_dt)) --altered (ORD_...Dflt) --altered (temp table) + and b.[colectomy_dt] <= DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),a.CBC_dt)) --altered (ORD_...Dflt) --altered (temp table) go -- Red-flagged instances: Exclude patients with terminal/major DX - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_5_Term') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_5_Term --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_5_Term') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_5_Term --altered (ORD_...Dflt) --altered (temp table) select a.* - into #FOBT_Sta3n528_5_Ins_5_Term --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_4_colectomy as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_5_Term --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_4_colectomy as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #FOBT_Sta3n528_2_ExcDx_4_Union_ALLDx_ICD as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #FOBT_2_ExcDx_4_Union_ALLDx_ICD as b --altered (ORD_...Dflt) --altered (temp table) where a.[PatientSSN] = b.[PatientSSN] - and b.[term_dx_dt] between DATEADD(yy,-1,a.CBC_dt) and DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),a.CBC_dt)) --altered (ORD_...Dflt) --altered (temp table) + and b.[term_dx_dt] between DATEADD(yy,-1,a.CBC_dt) and DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),a.CBC_dt)) --altered (ORD_...Dflt) --altered (temp table) go -- Red-flagged instances: Exclude patients with hospice/palliative diagnosis - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_6_Hospice') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_6_Hospice --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_6_Hospice') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_6_Hospice --altered (ORD_...Dflt) --altered (temp table) select a.* - into #FOBT_Sta3n528_5_Ins_6_Hospice --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_5_Term as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_6_Hospice --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_5_Term as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #FOBT_Sta3n528_2_ExcDx_4_Union_ALLDx_ICD as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #FOBT_2_ExcDx_4_Union_ALLDx_ICD as b --altered (ORD_...Dflt) --altered (temp table) where a.[PatientSSN] = b.[PatientSSN] - and b.[hospice_dt] between DATEADD(yy,-1,a.CBC_dt) and DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),a.CBC_dt)) --altered (ORD_...Dflt) --altered (temp table) + and b.[hospice_dt] between DATEADD(yy,-1,a.CBC_dt) and DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),a.CBC_dt)) --altered (ORD_...Dflt) --altered (temp table) go -- Red-flagged instances: Exclude patients with hospice/palliative care - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_6B1_Inpat_HospiceSpecialty') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_6B1_Inpat_HospiceSpecialty --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_6B1_Inpat_HospiceSpecialty') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_6B1_Inpat_HospiceSpecialty --altered (ORD_...Dflt) --altered (temp table) go select * - into #FOBT_Sta3n528_5_Ins_6B1_Inpat_HospiceSpecialty --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_6_Hospice --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_6B1_Inpat_HospiceSpecialty --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_6_Hospice --altered (ORD_...Dflt) --altered (temp table) except SELECT x.* - from #FOBT_Sta3n528_5_Ins_6_Hospice as x --altered (ORD_...Dflt) --altered (temp table) - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_6_Hospice as x --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on x.PatientSSN=p.PatientSSN inner join [CDWWork].[Inpat].[Inpatient] as a --altered (ORD_...Src) on a.Sta3n=p.sta3n and a.PatientSID=p.patientsid @@ -3184,20 +3184,20 @@ go on a.DischargeFromSpecialtySID=s.SpecialtySID and a.sta3n=s.sta3n where ltrim(rtrim(s.PTFCode)) in ('96','1F') and a.[DischargeDateTime] between DATEADD(yy,-1,x.CBC_dt) and - DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),x.CBC_dt) --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),x.CBC_dt) --altered (ORD_...Dflt) --altered (temp table) -- Red-flagged instances: Exclude patients with VA Paid/Fee Based hospice/palliative care - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_6B2_Hospice_FeeInpatInvoice_PurposeOfVisit') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_6B2_Hospice_FeeInpatInvoice_PurposeOfVisit --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_6B2_Hospice_FeeInpatInvoice_PurposeOfVisit') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_6B2_Hospice_FeeInpatInvoice_PurposeOfVisit --altered (ORD_...Dflt) --altered (temp table) go select * - into #FOBT_Sta3n528_5_Ins_6B2_Hospice_FeeInpatInvoice_PurposeOfVisit --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_6B1_Inpat_HospiceSpecialty --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_6B2_Hospice_FeeInpatInvoice_PurposeOfVisit --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_6B1_Inpat_HospiceSpecialty --altered (ORD_...Dflt) --altered (temp table) except SELECT x.* - from #FOBT_Sta3n528_5_Ins_6B1_Inpat_HospiceSpecialty as x --altered (ORD_...Dflt) --altered (temp table) - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_6B1_Inpat_HospiceSpecialty as x --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on x.PatientSSN=p.PatientSSN inner join [CDWWork].[Fee].[FeeInpatInvoice] as a --altered (ORD_...Src) on a.Sta3n=p.sta3n and a.PatientSID=p.patientsid @@ -3205,24 +3205,24 @@ go on a.FeePurposeOfVisitSID=b.FeePurposeOfVisitSID where ltrim(rtrim(b.AustinCode)) in ('43','37','38','77','78') and a.TreatmentFromDateTime between DATEADD(yy,-1,x.CBC_dt) and - DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),x.CBC_dt) --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),x.CBC_dt) --altered (ORD_...Dflt) --altered (temp table) go -- Red-flagged instances: Exclude patients with VA Paid/Fee Based hospice/palliative care - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_6B3_Hospice_FeeServiceProvided_HCFAType') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_6B3_Hospice_FeeServiceProvided_HCFAType --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_6B3_Hospice_FeeServiceProvided_HCFAType') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_6B3_Hospice_FeeServiceProvided_HCFAType --altered (ORD_...Dflt) --altered (temp table) go select * - into #FOBT_Sta3n528_5_Ins_6B3_Hospice_FeeServiceProvided_HCFAType --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_6B2_Hospice_FeeInpatInvoice_PurposeOfVisit as x --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_6B3_Hospice_FeeServiceProvided_HCFAType --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_6B2_Hospice_FeeInpatInvoice_PurposeOfVisit as x --altered (ORD_...Dflt) --altered (temp table) except SELECT x.* - from #FOBT_Sta3n528_5_Ins_6B2_Hospice_FeeInpatInvoice_PurposeOfVisit as x --altered (ORD_...Dflt) --altered (temp table) - inner join #FOBT_Sta3n528_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_6B2_Hospice_FeeInpatInvoice_PurposeOfVisit as x --altered (ORD_...Dflt) --altered (temp table) + inner join #FOBT_1_Inc_9_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on x.PatientSSN=p.PatientSSN inner join [CDWWork].[fee].[FeeServiceProvided] as a --altered (ORD_...Src) on a.Sta3n=p.sta3n and a.PatientSID=p.patientsid @@ -3233,19 +3233,19 @@ go -- where ltrim(rtrim(b.IBTypeOfServiceCode)) in ('34','H','Y') and where ltrim(rtrim(b.IBTypeOfServiceCode)) in ('34','H') and d.[InitialTreatmentDateTime] between DATEADD(yy,-1,x.CBC_dt) and - DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),x.CBC_dt) --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),x.CBC_dt) --altered (ORD_...Dflt) --altered (temp table) go -- Red-flagged instances: Exclude patients with hospice/palliative referral - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_6D1_Hospice_Refer_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_6D1_Hospice_Refer_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_6D1_Hospice_Refer_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_6D1_Hospice_Refer_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) select * - into #FOBT_Sta3n528_5_Ins_6D1_Hospice_Refer_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_6B3_Hospice_FeeServiceProvided_HCFAType as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_6D1_Hospice_Refer_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_6B3_Hospice_FeeServiceProvided_HCFAType as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #FOBT_Sta3n528_5_Exc_NonDx_9_VisitTIUConsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #FOBT_5_Exc_NonDx_9_VisitTIUConsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) where ( b.PrimaryStopCode in (351,353) or b.SecondaryStopCode in (351,353) or b.ConStopCode in (351,353) or (b.[ConsultToRequestserviceName] like '%Hospice%' or b.[ConsultToRequestserviceName] like '%palliative%' @@ -3253,38 +3253,38 @@ go ) and a.patientSSN = b.patientSSN and (coalesce(b.ReferenceDateTime,b.visitDateTime) between DATEADD(yy,-1, convert(varchar(10),a.CBC_dt,120)+cast('00:00:00.000' as datetime)) - and DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP), convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime))) --altered (ORD_...Dflt) --altered (temp table) - and datediff(dd,b.visitDateTime,b.ReferenceDateTime)<(select fu_period from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and DATEADD(dd,(select fu_period from #FOBT_0_1_inputP), convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime))) --altered (ORD_...Dflt) --altered (temp table) + and datediff(dd,b.visitDateTime,b.ReferenceDateTime)<(select fu_period from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ) go -- Red-flagged instances: Exclude patients with UGI Bleeding - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_7_UGIBleed') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_7_UGIBleed --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_7_UGIBleed') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_7_UGIBleed --altered (ORD_...Dflt) --altered (temp table) select a.* - into #FOBT_Sta3n528_5_Ins_7_UGIBleed --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_6D1_Hospice_Refer_joinByConsultSID as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_7_UGIBleed --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_6D1_Hospice_Refer_joinByConsultSID as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #FOBT_Sta3n528_2_ExcDx_4_Union_ALLDx_ICD as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #FOBT_2_ExcDx_4_Union_ALLDx_ICD as b --altered (ORD_...Dflt) --altered (temp table) where a.[PatientSSN] = b.[PatientSSN] and b.[ugi_bleed_dx_dt] between DATEADD(mm,-6,a.CBC_dt) and a.CBC_dt) go -- Red-flagged instances: Exclude patients with prior ColonScpy done - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_8_ColonScpy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_8_ColonScpy --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_8_ColonScpy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_8_ColonScpy --altered (ORD_...Dflt) --altered (temp table) select a.* - into #FOBT_Sta3n528_5_Ins_8_ColonScpy --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_7_UGIBleed as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_8_ColonScpy --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_7_UGIBleed as a --altered (ORD_...Dflt) --altered (temp table) where not exists ( select * from ( - select patientssn, [colonoscopy_dt] from #FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_All_1_ColonScpy --altered (ORD_...Dflt) --altered (temp table) + select patientssn, [colonoscopy_dt] from #FOBT_3_Exc_NonDx_3_PrevProc_All_1_ColonScpy --altered (ORD_...Dflt) --altered (temp table) union - select patientssn,ExamdateTime as [colonoscopy_dt] from #FOBT_Sta3n528_3_Exc_NonDx_6_AllImgProcFromRad --altered (ORD_...Dflt) --altered (temp table) + select patientssn,ExamdateTime as [colonoscopy_dt] from #FOBT_3_Exc_NonDx_6_AllImgProcFromRad --altered (ORD_...Dflt) --altered (temp table) where cpt_code_type='colonoscopy' ) as b where a.[PatientSSN] = b.[PatientSSN] and b.[colonoscopy_dt] between DATEADD(yy,-3,a.CBC_dt) and a.CBC_dt) @@ -3297,32 +3297,32 @@ go -------------------------------------------------------------------------------------------------------------------------------- -- Red-flagged instances: Exclude patients with follow up ColonScpy - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_9_ColonScpy_60d') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_9_ColonScpy_60d --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_9_ColonScpy_60d') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_9_ColonScpy_60d --altered (ORD_...Dflt) --altered (temp table) select a.* - into #FOBT_Sta3n528_5_Ins_9_ColonScpy_60d --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_8_ColonScpy as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_9_ColonScpy_60d --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_8_ColonScpy as a --altered (ORD_...Dflt) --altered (temp table) where not exists ( select * from ( - select patientssn, [colonoscopy_dt] from #FOBT_Sta3n528_3_Exc_NonDx_3_PrevProc_All_1_ColonScpy --altered (ORD_...Dflt) --altered (temp table) + select patientssn, [colonoscopy_dt] from #FOBT_3_Exc_NonDx_3_PrevProc_All_1_ColonScpy --altered (ORD_...Dflt) --altered (temp table) union - select patientssn,ExamdateTime as [colonoscopy_dt] from #FOBT_Sta3n528_3_Exc_NonDx_6_AllImgProcFromRad --altered (ORD_...Dflt) --altered (temp table) + select patientssn,ExamdateTime as [colonoscopy_dt] from #FOBT_3_Exc_NonDx_6_AllImgProcFromRad --altered (ORD_...Dflt) --altered (temp table) where cpt_code_type='colonoscopy' ) as b where a.[PatientSSN] = b.[PatientSSN] and b.[colonoscopy_dt] between (convert(varchar(10),a.CBC_dt,120)+cast('00:00:00.000' as datetime)) - and (DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime)))) --altered (ORD_...Dflt) --altered (temp table) + and (DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime)))) --altered (ORD_...Dflt) --altered (temp table) go -- Red-flagged instances: Exclude patients with follow up GI Referral - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_A') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_A --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_A') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_A --altered (ORD_...Dflt) --altered (temp table) select a.* -- - into #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_A --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_9_ColonScpy_60d as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_A --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_9_ColonScpy_60d as a --altered (ORD_...Dflt) --altered (temp table) where not exists -- - (select * from #FOBT_Sta3n528_5_Exc_NonDx_9_VisitTIUConsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #FOBT_5_Exc_NonDx_9_VisitTIUConsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) where ( b.PrimaryStopCode in (33,307,321) or b.SecondaryStopCode in (33,307,321) or b.ConStopCode in (33,307,321) or b.[ConsultToRequestserviceName] like '%Gastro%' or b.[ConsultToRequestserviceName] like '%GI %' @@ -3332,18 +3332,18 @@ go and isnull(b.SecondaryStopCodeName,'') not like '%telephone%' and a.patientSSN = b.patientSSN and (b.visitDateTime between (convert(varchar(10),a.CBC_dt,120)+cast('00:00:00.000' as datetime)) - and (DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime))))) --altered (ORD_...Dflt) --altered (temp table) + and (DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime))))) --altered (ORD_...Dflt) --altered (temp table) go - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_B1') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_B1 --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_B1') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_B1 --altered (ORD_...Dflt) --altered (temp table) select a.* -- - into #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_B1 --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_A as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_B1 --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_A as a --altered (ORD_...Dflt) --altered (temp table) where not exists -- - (select * from #FOBT_Sta3n528_5_Exc_NonDx_9_VisitTIUConsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #FOBT_5_Exc_NonDx_9_VisitTIUConsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) where ( b.PrimaryStopCode in (33,307,321) or b.SecondaryStopCode in (33,307,321) or b.ConStopCode in (33,307,321) or b.[ConsultToRequestserviceName] like '%Gastro%' or b.[ConsultToRequestserviceName] like '%GI %' @@ -3353,21 +3353,21 @@ go and isnull(b.SecondaryStopCodeName,'') not like '%telephone%' and a.patientSSN = b.patientSSN and (b.ReferenceDateTime between (convert(varchar(10),a.CBC_dt,120)+cast('00:00:00.000' as datetime)) - and (DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime)))) --altered (ORD_...Dflt) --altered (temp table) - and datediff(dd,b.visitDateTime,b.ReferenceDateTime)<(select fu_period from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime)))) --altered (ORD_...Dflt) --altered (temp table) + and datediff(dd,b.visitDateTime,b.ReferenceDateTime)<(select fu_period from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) and b.PrimaryStopCodeSID=-1 ) go - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_B2') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_B2 --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_B2') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_B2 --altered (ORD_...Dflt) --altered (temp table) select a.* -- - into #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_B2 --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_B1 as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_B2 --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_B1 as a --altered (ORD_...Dflt) --altered (temp table) where not exists -- - (select * from #FOBT_Sta3n528_5_Exc_NonDx_9_VisitTIUConsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #FOBT_5_Exc_NonDx_9_VisitTIUConsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) where ( b.PrimaryStopCode in (33,307,321) or b.SecondaryStopCode in (33,307,321) or b.ConStopCode in (33,307,321) or b.[ConsultToRequestserviceName] like '%Gastro%' or b.[ConsultToRequestserviceName] like '%GI %' @@ -3377,21 +3377,21 @@ go and isnull(b.SecondaryStopCodeName,'') not like '%telephone%' and a.patientSSN = b.patientSSN and (b.VisitDatetime between (convert(varchar(10),a.CBC_dt,120)+cast('00:00:00.000' as datetime)) - and (DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime)))) --altered (ORD_...Dflt) --altered (temp table) + and (DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime)))) --altered (ORD_...Dflt) --altered (temp table) and b.PrimaryStopCodeSID<>-1 and isnull( b.PrimaryStopCode,'') not in (33,307,321) and isnull( b.SecondaryStopCode,'') not in (33,307,321) ) go - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) select a.* -- - into #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID_B2 as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID_B2 as a --altered (ORD_...Dflt) --altered (temp table) where not exists -- - (select * from #FOBT_Sta3n528_5_Exc_NonDx_9_VisitTIUConsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #FOBT_5_Exc_NonDx_9_VisitTIUConsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) where ( b.PrimaryStopCode in (33,307,321) or b.SecondaryStopCode in (33,307,321) or b.ConStopCode in (33,307,321) or b.[ConsultToRequestserviceName] like '%Gastro%' or b.[ConsultToRequestserviceName] like '%GI %' @@ -3401,8 +3401,8 @@ go and isnull(b.SecondaryStopCodeName,'') not like '%telephone%' and a.patientSSN = b.patientSSN and (b.ReferenceDateTime between (convert(varchar(10),a.CBC_dt,120)+cast('00:00:00.000' as datetime)) - and (DATEADD(dd,(select fu_period from #FOBT_Sta3n528_0_1_inputP),convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime)))) --altered (ORD_...Dflt) --altered (temp table) - and datediff(dd,b.visitDateTime,b.ReferenceDateTime)<(select fu_period from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (DATEADD(dd,(select fu_period from #FOBT_0_1_inputP),convert(varchar(10),a.CBC_dt,120)+cast('23:59:59.997' as datetime)))) --altered (ORD_...Dflt) --altered (temp table) + and datediff(dd,b.visitDateTime,b.ReferenceDateTime)<(select fu_period from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) and b.PrimaryStopCodeSID<>-1 and ( b.PrimaryStopCode in (33,307,321) or b.SecondaryStopCode in (33,307,321)) ) @@ -3412,36 +3412,36 @@ go ----- 6. Trigger positive FOBT tests from potential patients -------------------------------------------------------------------------------------------------------------------------------- - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_U_TriggerPos') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_U_TriggerPos') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) select * - into #FOBT_Sta3n528_5_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) - where CBC_dt between (select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and (select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + where CBC_dt between (select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) union - select * from #FOBT_Sta3n528_5_Ins_A01_GIRefer60d_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) - where CBC_dt between (select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and (select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + select * from #FOBT_5_Ins_A01_GIRefer60d_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + where CBC_dt between (select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_V_FirstOfPat') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_V_FirstOfPat --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_V_FirstOfPat') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_V_FirstOfPat --altered (ORD_...Dflt) --altered (temp table) SELECT a.* - into #FOBT_Sta3n528_5_Ins_V_FirstOfPat --altered (ORD_...Dflt) --altered (temp table) - from #FOBT_Sta3n528_5_Ins_U_TriggerPos as a --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_V_FirstOfPat --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_U_TriggerPos as a --altered (ORD_...Dflt) --altered (temp table) inner join ( select a.patientssn, min(a.CBC_dt) as FirstClueDate - from #FOBT_Sta3n528_5_Ins_U_TriggerPos as a --altered (ORD_...Dflt) --altered (temp table) - where a.CBC_dt between (select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and (select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_U_TriggerPos as a --altered (ORD_...Dflt) --altered (temp table) + where a.CBC_dt between (select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by a.patientssn ) as sub on a.patientssn=sub.patientssn and a.CBC_dt=sub.FirstClueDate - where a.CBC_dt between (select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and (select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + where a.CBC_dt between (select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) go @@ -3450,68 +3450,68 @@ go -------------------------------------------------------------------------------------------------------------------------------- -- Numerator and Denumerator -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_X_count') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_X_count --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_X_count') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_X_count --altered (ORD_...Dflt) --altered (temp table) go -- Numerator and Denumerator -if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_X_count') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #FOBT_Sta3n528_5_Ins_X_count --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#FOBT_5_Ins_X_count') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #FOBT_5_Ins_X_count --altered (ORD_...Dflt) --altered (temp table) go With -- number of FOBT test performed NumOfTotalFOBTTest (sta3n,sta6a,[Year],[Month],NumOfTotalFOBTTest) as (select sta3n,sta6a,datepart(year,FOBT_dt) as [Year],datepart(MONTH,FOBT_dt) as[Month],count(distinct concat( PatientSSN,FOBT_dt )) as NumOfTotalFOBTTest - from #FOBT_Sta3n528_1_Inc_1_AllFOBTSta6a --altered (ORD_...Dflt) --altered (temp table) - where FOBT_dt >=(select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and FOBT_dt <=(select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_1_Inc_1_AllFOBTSta6a --altered (ORD_...Dflt) --altered (temp table) + where FOBT_dt >=(select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and FOBT_dt <=(select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,Sta6a,datepart(year,FOBT_dt),datepart(MONTH,FOBT_dt)--,PatientSSN,FOBT_dt ) -- number of patients with FOBT test performed ,NumOfTotalPatWithFOBTTest (sta3n,sta6a,[Year],[Month],NumOfTotalPatWithFOBTTest) as (select sta3n,sta6a, datepart(year,FOBT_dt) as [Year],datepart(MONTH,FOBT_dt) as[Month],count(distinct patientssn ) as NumOfTotalPatWithFOBTTest - from #FOBT_Sta3n528_1_Inc_1_AllFOBTSta6a --altered (ORD_...Dflt) --altered (temp table) - where FOBT_dt >=(select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and FOBT_dt <=(select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_1_Inc_1_AllFOBTSta6a --altered (ORD_...Dflt) --altered (temp table) + where FOBT_dt >=(select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and FOBT_dt <=(select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,Sta6a,datepart(year,FOBT_dt),datepart(MONTH,FOBT_dt) ) -- number of FOBT test which are red-flageed ,NumOfRedFlaggedFOBTTest(sta3n,sta6a,[Year],[Month],NumOfRedFlaggedFOBTTest) as (select sta3n,sta6a,datepart(year,CBC_dt) as [Year],datepart(MONTH,CBC_dt) as[Month],count(distinct concat( PatientSSN,CBC_dt ) ) as NumOfRedFlaggedFOBTTest - from #FOBT_Sta3n528_1_Inc_8_IncIns --altered (ORD_...Dflt) --altered (temp table) - where CBC_dt >=(select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and CBC_dt <=(select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_1_Inc_8_IncIns --altered (ORD_...Dflt) --altered (temp table) + where CBC_dt >=(select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and CBC_dt <=(select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,sta6a,datepart(year,CBC_dt),datepart(MONTH,CBC_dt) ) -- number of patients with red-flagged FOBT test ,NumOfPatWithRedFlaggedFOBTTest(sta3n,sta6a,[Year],[Month],NumOfPatWithRedFlaggedFOBTTest) as (select sta3n,sta6a,datepart(year,CBC_dt) as [Year],datepart(MONTH,CBC_dt) as[Month],count(distinct patientssn ) as NumOfPatWithRedFlaggedFOBTTest - from #FOBT_Sta3n528_1_Inc_8_IncIns --altered (ORD_...Dflt) --altered (temp table) - where CBC_dt >=(select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and CBC_dt <=(select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_1_Inc_8_IncIns --altered (ORD_...Dflt) --altered (temp table) + where CBC_dt >=(select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and CBC_dt <=(select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,sta6a,datepart(year,CBC_dt),datepart(MONTH,CBC_dt) ) -- number of FOBT tests which come out as trigger positive ,NumOfTriggerPosFOBTTest(sta3n,sta6a,[Year],[Month],NumOfTriggerPosFOBTTest) as (select sta3n,sta6a,datepart(year,CBC_dt) as [Year],datepart(MONTH,CBC_dt) as[Month],count(distinct concat( PatientSSN,CBC_dt ) ) as NumOfTriggerPosFOBTTest - from #FOBT_Sta3n528_5_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) - where CBC_dt >=(select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and CBC_dt <=(select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) + where CBC_dt >=(select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and CBC_dt <=(select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,sta6a,datepart(year,CBC_dt),datepart(MONTH,CBC_dt) ) --number of patients with trigger positive FOBT test ,NumOfTriggerPosPat(sta3n,sta6a,[Year],[Month],NumOfTriggerPosPat) as (select sta3n,sta6a,datepart(year,CBC_dt) as [Year],datepart(MONTH,CBC_dt) as[Month],count(distinct patientssn ) as NumOfTriggerPosPat - from #FOBT_Sta3n528_5_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) - where CBC_dt >=(select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and CBC_dt <=(select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #FOBT_5_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) + where CBC_dt >=(select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and CBC_dt <=(select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,sta6a,datepart(year,CBC_dt),datepart(MONTH,CBC_dt) ) select - (select run_dt from #FOBT_Sta3n528_0_1_inputP) as run_dt --altered (ORD_...Dflt) --altered (temp table) - ,(select sp_start from #FOBT_Sta3n528_0_1_inputP) as sp_start --altered (ORD_...Dflt) --altered (temp table) - ,(select sp_end from #FOBT_Sta3n528_0_1_inputP) as sp_end --altered (ORD_...Dflt) --altered (temp table) + (select run_dt from #FOBT_0_1_inputP) as run_dt --altered (ORD_...Dflt) --altered (temp table) + ,(select sp_start from #FOBT_0_1_inputP) as sp_start --altered (ORD_...Dflt) --altered (temp table) + ,(select sp_end from #FOBT_0_1_inputP) as sp_end --altered (ORD_...Dflt) --altered (temp table) ,a.sta3n,a.sta6a,a.[Year],a.[month] ,isnull(NumOfTotalFOBTTest,0) as NumOfTotalFOBTTest ,isnull(NumOfTotalPatWithFOBTTest,0) as NumOfTotalPatWithFOBTTest @@ -3519,7 +3519,7 @@ if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_X_count') is not null) --alter ,isnull(NumOfPatWithRedFlaggedFOBTTest,0) as NumOfPatWithRedFlaggedFOBTTest ,isnull(NumOfTriggerPosFOBTTest,0) as NumOfTriggerPosFOBTTest ,isnull(NumOfTriggerPosPat,0) as NumOfTriggerPosPat - into #FOBT_Sta3n528_5_Ins_X_count --altered (ORD_...Dflt) --altered (temp table) + into #FOBT_5_Ins_X_count --altered (ORD_...Dflt) --altered (temp table) from NumOfTotalFOBTTest as a left join NumOfTotalPatWithFOBTTest as b on a.sta3n=b.sta3n and a.sta6a=b.sta6a and a.[year]=b.[year] and a.[Month]=b.[Month] @@ -3534,22 +3534,22 @@ if (OBJECT_ID('tempdb.dbo.#FOBT_Sta3n528_5_Ins_X_count') is not null) --alter go -select * from #FOBT_Sta3n528_5_Ins_X_count --altered (ORD_...Dflt) --altered (temp table) +select * from #FOBT_5_Ins_X_count --altered (ORD_...Dflt) --altered (temp table) order by sta3n,sta6a,[year],[month] ----data set ---- all fobt tests from sta6a in the study period ---select * from #FOBT_Sta3n528_1_Inc_1_AllFOBTSta6a --altered (ORD_...Dflt) --altered (temp table) ---where FOBT_dt between (select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) --- and (select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) --- and Sta6a in (select sta6a from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +--select * from #FOBT_1_Inc_1_AllFOBTSta6a --altered (ORD_...Dflt) --altered (temp table) +--where FOBT_dt between (select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +-- and (select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +-- and Sta6a in (select sta6a from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ---- red flagged fobt tests from sta6a in the study period ---select * from #FOBT_Sta3n528_1_Inc_8_IncIns --altered (ORD_...Dflt) --altered (temp table) ---where CBC_dt between (select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) --- and (select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) --- and Sta6a in (select sta6a from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +--select * from #FOBT_1_Inc_8_IncIns --altered (ORD_...Dflt) --altered (temp table) +--where CBC_dt between (select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +-- and (select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +-- and Sta6a in (select sta6a from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ---- trigger positive fobt tests from sta6a in the study period ---select * from #FOBT_Sta3n528_5_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) ---where CBC_dt between (select sp_start from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) --- and (select sp_end from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) --- and Sta6a in (select sta6a from #FOBT_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +--select * from #FOBT_5_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) +--where CBC_dt between (select sp_start from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +-- and (select sp_end from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +-- and Sta6a in (select sta6a from #FOBT_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) diff --git a/Lung.sql b/Lung.sql index b5db7ef..508107b 100644 --- a/Lung.sql +++ b/Lung.sql @@ -16,14 +16,14 @@ -- Table names: We have mapped table names from Research data to Operational. But we currently do not have live access to Operational data to test the mappings. -- TobeAltered: --- 4. Table MyDB.[MySchema].Lung_Sta3n528_0_xxx has the input parameters, including study period, standard codes( CPT, ICD, ICDproc etc.). +-- 4. Table MyDB.[MySchema].Lung_0_xxx has the input parameters, including study period, standard codes( CPT, ICD, ICDproc etc.). -- Although these codes are standardized, if your local site uses them in different flavors, consider customization. Also exam these tables after being populated to make sure codes -- used in your site are all included. -- set @sp_start='2017-01-01 00:00:00' -- set @sp_end='2017-01-31 23:59:59' -- -- TobeAltered: --- 5. Set site(s) code. Table Lung_Sta3n528_0_0_1_Sta3nSta6a has the site(s) whose data the trigger runs against. The site can be CBOC as well as Hospital. +-- 5. Set site(s) code. Table Lung_0_0_1_Sta3nSta6a has the site(s) whose data the trigger runs against. The site can be CBOC as well as Hospital. -- Search for string "--Set site(s) codes here. Keep only your site(s) uncommented". Here you input the site(s) you are interested in running and comment out the others. -- Example: -- ( 528,'528A8') -- (528) Upstate New York HCS; ALBANY, NY VAMC @@ -31,9 +31,9 @@ -- -- TobeAltered: -- 6. Red-flagged chest image Diagnostic Codes --- Table MyDB.[MySchema].[Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode] will have the list of red-flagged chest image Diagnostic Codes. +-- Table MyDB.[MySchema].[Lung_0_A_RedFlagXRayCTDiagnosticCode] will have the list of red-flagged chest image Diagnostic Codes. -- Add any additional codes that your site might use, or remove any that your site does not use by setting isRedFlag=0. --- select * from #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode --altered (temp table) +-- select * from #Lung_0_A_RedFlagXRayCTDiagnosticCode --altered (temp table) -- where sta3n=@yourSta3n -- -- 7. Other possible changes @@ -42,13 +42,13 @@ -- -- -- 8. Data Set --- --#Lung_Sta3n528_1_In_2_All_Chest_XRayCT_Sta6a -- All chest images from sta6a in the study period --altered (temp table) --- --#Lung_Sta3n528_1_In_3_RedFlagXRayCT -- Abnormal (red_flagged) chest images from sta6a in the study period --altered (temp table) --- --#Lung_Sta3n528_3_Ins_U_TriggerPos -- Chest images from sta6a in the study period which come out trigger positive --altered (temp table) +-- --#Lung_1_In_2_All_Chest_XRayCT_Sta6a -- All chest images from sta6a in the study period --altered (temp table) +-- --#Lung_1_In_3_RedFlagXRayCT -- Abnormal (red_flagged) chest images from sta6a in the study period --altered (temp table) +-- --#Lung_3_Ins_U_TriggerPos -- Chest images from sta6a in the study period which come out trigger positive --altered (temp table) -- -- 9. If you want to delete the intermediate table generated during execution. uncomment the block at the end of the script. -- --- 10. Numerator and denumerators: select * from #Lung_Sta3n528_4_01_Count --altered (temp table) +-- 10. Numerator and denumerators: select * from #Lung_4_01_Count --altered (temp table) @@ -87,15 +87,15 @@ set @fu_period=30 set @age=18 set @ICD9Needed=1 -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_0_1_Sta3nSta6a') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_0_0_1_Sta3nSta6a --altered (ORD_...Dflt) --altered (temp table) - CREATE TABLE #Lung_Sta3n528_0_0_1_Sta3nSta6a ( --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_0_0_1_Sta3nSta6a') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_0_0_1_Sta3nSta6a --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #Lung_0_0_1_Sta3nSta6a ( --altered (ORD_...Dflt) --altered (temp table) Sta3n smallint null, Sta6a [varchar](10) NULL ) -insert into #Lung_Sta3n528_0_0_1_Sta3nSta6a (Sta3n,Sta6a) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_0_1_Sta3nSta6a (Sta3n,Sta6a) --altered (ORD_...Dflt) --altered (temp table) values ( --Set site(s) codes here. Keep only your site(s) uncommented. @@ -124,10 +124,10 @@ values --,(541,'541') --(541) Cleveland, OH -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_1_inputP') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_0_1_inputP') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) - CREATE TABLE #Lung_Sta3n528_0_1_inputP( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #Lung_0_1_inputP( --altered (ORD_...Dflt) --altered (temp table) [trigger] [varchar](20) NULL, isVISN bit null, isSta3n bit null, @@ -142,7 +142,7 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_1_inputP') is not null) --altered [age] [smallint] NULL) -INSERT INTO #Lung_Sta3n528_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) +INSERT INTO #Lung_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) ([trigger] ,isVISN ,isSta3n @@ -174,16 +174,16 @@ INSERT INTO #Lung_Sta3n528_0_1_inputP --altered (ORD_...Dflt) --altered (temp go select [trigger],ICD9Needed,run_dt,sp_start,sp_end,fu_period,age - from #Lung_Sta3n528_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) + from #Lung_0_1_inputP --altered (ORD_...Dflt) --altered (temp table) -select * from #Lung_Sta3n528_0_0_1_Sta3nSta6a --altered (ORD_...Dflt) --altered (temp table) +select * from #Lung_0_0_1_Sta3nSta6a --altered (ORD_...Dflt) --altered (temp table) -- CPT Code lists for Lung images -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_2_0_LungImg') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_0_2_0_LungImg --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_0_2_0_LungImg') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_0_2_0_LungImg --altered (ORD_...Dflt) --altered (temp table) - CREATE TABLE #Lung_Sta3n528_0_2_0_LungImg ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #Lung_0_2_0_LungImg ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [img_code_type] [varchar](50) NULL, [img_code_name] [varchar](50) NULL, @@ -191,7 +191,7 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_2_0_LungImg') is not null) --al ) go -insert into #Lung_Sta3n528_0_2_0_LungImg ([img_code_type],[img_code_name],[ImgCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_0_LungImg ([img_code_type],[img_code_name],[ImgCode]) --altered (ORD_...Dflt) --altered (temp table) values ( 'CT','','71275') ,( 'CT','','71250') @@ -231,10 +231,10 @@ values go -- ICD10 Diagnostic Code list -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_2_DxICD10CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_0_2_DxICD10CodeExc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_0_2_DxICD10CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_0_2_DxICD10CodeExc --altered (ORD_...Dflt) --altered (temp table) - CREATE TABLE #Lung_Sta3n528_0_2_DxICD10CodeExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #Lung_0_2_DxICD10CodeExc ( --altered (ORD_...Dflt) --altered (temp table) --UniqueID int Identity(1,1) not null, [dx_code_type] [varchar](50) NULL, [dx_code_name] [varchar](50) NULL, @@ -242,239 +242,239 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_2_DxICD10CodeExc') is not null) ) go -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.00' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.40' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.50' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.01' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.41' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.51' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.02' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.42' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.52' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.60' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.A0' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C93.00' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C93.01' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C93.02' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.00' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.01' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.02' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.20' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.21' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C94.22' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C95.00' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C95.01' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C95.02' --added 20200617 was overlooked from Umair's new codes -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.61' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.62' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.A1' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Leukemia (Acute Only)','C92.A2' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.0' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.2' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.3' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.4' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.7' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.8' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.1' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C22.9' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Hepatocelllular Cancer','C78.7' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Biliary Cancer','C23.' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Biliary Cancer','C24.0' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Biliary Cancer','C24.1' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Biliary Cancer','C24.8' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Biliary Cancer','C24.9' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Esophageal Cancer','C15.3' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Esophageal Cancer','C15.4' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Esophageal Cancer','C15.5' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Esophageal Cancer','C15.8' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Esophageal Cancer','C15.9' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.0' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.4' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.3' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.1' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.2' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.5' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.6' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.8' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Gastric Cancer','C16.9' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.0' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.1' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.2' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.3' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.4' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.5' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.6' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.7' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.8' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C71.9' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C79.31' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C79.32' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer','C79.49' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Brain Cancer', 'C79.40' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Ovarian Cancer','C56.9' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Ovarian Cancer','C56.1' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Ovarian Cancer','C56.2' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.0' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.1' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.2' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.3' --added 20200617 which were missing -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.4' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.7' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.8' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Pancreatic Cancer','C25.9' --'Pleural Cancer & Mesothelioma' is kind of Lung Cancer itself. Should not be in the exclusion ---insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +--insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) --select 'Terminal','Pleural Cancer & Mesothelioma','C38.4' ---insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +--insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) --select 'Terminal','Pleural Cancer & Mesothelioma','C45.0' ---insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +--insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) --select 'Terminal','Pleural Cancer & Mesothelioma','C78.2' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Uterine Cancer','C55.' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Peritonel, Omental & Mesenteric Cancer','C45.1' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Peritonel, Omental & Mesenteric Cancer','C48.1' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Peritonel, Omental & Mesenteric Cancer','C48.8' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Peritonel, Omental & Mesenteric Cancer','C48.2' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Peritonel, Omental & Mesenteric Cancer','C78.6' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Myeloma','C90.00' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Myeloma','C90.01' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Myeloma','C90.02' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Myeloma','D47.Z9' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Terminal','Tracheal Cancer','C33.' ---insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +--insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) --select 'Terminal','Tracheal Cancer','C78.39' ---insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +--insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) --select 'Terminal','Tracheal Cancer','C78.30' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Hospice','','Z51.5' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Tuberculosis','','A15.0' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Tuberculosis','','A15.5' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Tuberculosis','','A15.6' -insert into #Lung_Sta3n528_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_2_DxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'Tuberculosis','','A15.7' -- ICD10Proc Code lists -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_3_PreProcICD10ProcExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_0_3_PreProcICD10ProcExc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_0_3_PreProcICD10ProcExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_0_3_PreProcICD10ProcExc --altered (ORD_...Dflt) --altered (temp table) - CREATE TABLE #Lung_Sta3n528_0_3_PreProcICD10ProcExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #Lung_0_3_PreProcICD10ProcExc ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [ICD10Proc_code_type] [varchar](50) NULL, [ICD10Proc_code_Name] [varchar](50) NULL, @@ -482,865 +482,865 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_3_PreProcICD10ProcExc') is not null) ) go -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B933ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B934ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B937ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B938ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B943ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B944ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B947ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B948ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B953ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B954ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B957ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B958ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B963ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B964ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B967ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B968ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B973ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B974ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B977ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B978ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B983ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B984ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B987ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B988ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B993ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B994ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B997ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B998ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B9B3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B9B4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B9B7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0B9B8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB33ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB34ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB37ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB38ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB43ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB44ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB47ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB48ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB53ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB54ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB57ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB58ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB63ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB64ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB67ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB68ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB73ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB74ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB77ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB78ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB83ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB84ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB87ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB88ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB93ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB94ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB97ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BB98ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BBB3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BBB4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BBB7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BBB8ZX' --20200522 -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD34ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD38ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD44ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD48ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD54ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD58ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD64ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD68ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD74ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD78ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD84ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD88ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD94ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BD98ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BDB4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedBiopsyBronchus','0BDB8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0B930ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0B940ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0B950ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0B960ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0B970ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0B980ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0B990ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0B9B0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0BB30ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0BB40ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0BB50ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0BB60ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0BB70ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0BB80ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0BB90ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyBronchus','0BBB0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9C3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9C4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9C7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9D3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9D4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9D7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9F3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9F4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9F7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9G3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9G4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9G7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9H3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9H4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9H7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9J3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9J4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9J7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9K3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9K4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9K7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9L3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9L4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9L7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9M3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9M4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0B9M7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BBC3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BBD3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BBF3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BBG3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BBH3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BBJ3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BBK3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BBL3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BBM3ZX' --20200522 -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BDC8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BDD8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BDF8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BDG8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BDH8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BDJ8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BDK8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BDL8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNneedleBiopsyLung','0BDM8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedEndoscopicBiopsyLung','0B9K8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedEndoscopicBiopsyLung','0B9L8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedEndoscopicBiopsyLung','0B9M8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedEndoscopicBiopsyLung','0BBK7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedEndoscopicBiopsyLung','0BBK8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedEndoscopicBiopsyLung','0BBL7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedEndoscopicBiopsyLung','0BBL8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedEndoscopicBiopsyLung','0BBM4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedEndoscopicBiopsyLung','0BBM7ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedEndoscopicBiopsyLung','0BBM8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyLung','0B9K0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyLung','0B9L0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyLung','0B9M0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyLung','0BBK0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyLung','0BBL0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','OpenBiopsyLung','0BBM0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ThoracoscopicPleuralBiopsy','0BBC4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ThoracoscopicPleuralBiopsy','0BBD4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ThoracoscopicPleuralBiopsy','0BBF4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ThoracoscopicPleuralBiopsy','0BBG4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ThoracoscopicPleuralBiopsy','0BBH4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ThoracoscopicPleuralBiopsy','0BBJ4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ThoracoscopicPleuralBiopsy','0BBK4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ThoracoscopicPleuralBiopsy','0BBL4ZX' --20200522 -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ThoracoscopicPleuralBiopsy','0BBN4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ThoracoscopicPleuralBiopsy','0BBP4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','BiopsyChestWall','0W980ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','BiopsyChestWall','0W983ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','BiopsyChestWall','0W984ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','BiopsyChestWall','0WB80ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','BiopsyChestWall','0WB83ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','BiopsyChestWall','0WB84ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','BiopsyChestWall','0WB8XZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0B9N0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0B9N3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0B9N4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0B9P0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0B9P3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0B9P4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0BBN0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0BBN3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0BBP0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0BBP3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0W990ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0W993ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0W994ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0W9B0ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0W9B3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0W9B4ZX' --20200522 -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0B9N8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0B9P8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0BBN8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','PleuraBiopsy','0BBP8ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNeedleBiopsyMediastinum','0W9C3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNeedleBiopsyMediastinum','0W9C4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNeedleBiopsyMediastinum','0WBC3ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungBiopsy','ClosedNeedleBiopsyMediastinum','0WBC4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BBN4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BBP4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BJ08ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0WJQ4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0WJC4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BJ08ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BJK8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BJL8ZZ' --20200522 -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BBC4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BBD4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BBF4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BBG4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BBH4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BBJ4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BBK4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BBL4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BBM4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BDC4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BDD4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BDF4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BDG4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BDH4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BDJ4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BDL4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BDM4ZX' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BJ08ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BJK8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'Bronchoscopy','','0BJL8ZZ' -- Lung surgery -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B534ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B538ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B544ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B548ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B554ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B558ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B564ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B568ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B574ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B578ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B584ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B588ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B594ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B598ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5B4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5B8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB34ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB38ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB44ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB48ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB54ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB58ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB64ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB68ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB74ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB78ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB84ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB88ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB94ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB98ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBB4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBB8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B530ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B533ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B537ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B540ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B543ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B547ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B550ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B553ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B557ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B560ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B563ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B567ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B570ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B573ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B577ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B580ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B583ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B587ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B590ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B593ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B597ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5B0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5B3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5B7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB30ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB33ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB37ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB40ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB43ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB47ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB50ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB53ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB57ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB60ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB63ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB67ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB70ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB73ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB77ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB80ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB83ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB87ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB90ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB93ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BB97ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBB0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBB3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBB7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT30ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT34ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT40ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT44ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT50ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT54ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT60ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT64ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT70ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT74ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT80ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT84ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT90ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BT94ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTB0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBK4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBL4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5K0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5L0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5M0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5K3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5L3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5M3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5K4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5L4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5M4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5K7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5K8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5L7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5L8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5M7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5M8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5K8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5L8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5M8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBK8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBL8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBM4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBM8ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5K0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5K3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5K7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5L0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5L3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5L7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5M0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5M3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0B5M7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBK0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBK3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBK7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBL0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBL3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBL7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBM0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBM3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBM7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBC4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBD4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBF4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBG4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBH4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBJ4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBK4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBL4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTH4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBK0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBK3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBK7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBL0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBL3ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BBL7ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTC4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTD4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTF4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTG4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTJ4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTC0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTD0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTF0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTG0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTJ0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','02JA0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0WJC0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BJ04ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0WJQ4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTK4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTL4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTM4ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTK0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTL0ZZ' -insert into #Lung_Sta3n528_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_3_PreProcICD10ProcExc ([ICD10Proc_code_type], [ICD10Proc_code_Name] ,[ICD10ProcCode]) --altered (ORD_...Dflt) --altered (temp table) select 'LungSurgery','','0BTM0ZZ' -- ICD9 Diagnostic Code list -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_4_DxICD9CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_0_4_DxICD9CodeExc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_0_4_DxICD9CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_0_4_DxICD9CodeExc --altered (ORD_...Dflt) --altered (temp table) - CREATE TABLE #Lung_Sta3n528_0_4_DxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #Lung_0_4_DxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [dx_code_type] [varchar](50) NULL, [dx_code_name] [varchar](50) NULL, @@ -1349,11 +1349,11 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_4_DxICD9CodeExc') is not null) go -insert into #Lung_Sta3n528_0_4_DxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_4_DxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) [ICD9Code] ) select distinct ICD9Code from CDWWork.dim.ICD9 as dimICD9 -where (select ICD9Needed from #Lung_Sta3n528_0_1_inputP)=1 --altered (ORD_...Dflt) --altered (temp table) +where (select ICD9Needed from #Lung_0_1_inputP)=1 --altered (ORD_...Dflt) --altered (temp table) and (dimICD9.ICD9Code like '157.%' -- Leukemia (Acute Only) or dimICD9.ICD9Code like @@ -1409,7 +1409,7 @@ where (select ICD9Needed from #Lung_Sta3n528_0_1_inputP)=1 --altered (ORD_... ) ) -update #Lung_Sta3n528_0_4_DxICD9CodeExc --altered (ORD_...Dflt) --altered (temp table) +update #Lung_0_4_DxICD9CodeExc --altered (ORD_...Dflt) --altered (temp table) set dx_code_type = case when -- Pancreatic Cancer ICD9Code like '157.%' @@ -1471,10 +1471,10 @@ update #Lung_Sta3n528_0_4_DxICD9CodeExc --altered (ORD_...Dflt) --altered ( -- ICD9Proc Code list -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_5_PreProcICD9ProcExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_0_5_PreProcICD9ProcExc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_0_5_PreProcICD9ProcExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_0_5_PreProcICD9ProcExc --altered (ORD_...Dflt) --altered (temp table) - CREATE TABLE #Lung_Sta3n528_0_5_PreProcICD9ProcExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #Lung_0_5_PreProcICD9ProcExc ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [ICD9Proc_code_type] [varchar](50) NULL, [ICD9Proc_code_Name] [varchar](50) NULL, @@ -1482,8 +1482,8 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_5_PreProcICD9ProcExc') is not null) ) go -If Exists (select ICD9Needed from #Lung_Sta3n528_0_1_inputP where ICD9Needed=1) --altered (ORD_...Dflt) --altered (temp table) - insert into #Lung_Sta3n528_0_5_PreProcICD9ProcExc ([ICD9Proc_code_type],[ICD9Proc_code_Name],[ICD9ProcCode]) --altered (ORD_...Dflt) --altered (temp table) +If Exists (select ICD9Needed from #Lung_0_1_inputP where ICD9Needed=1) --altered (ORD_...Dflt) --altered (temp table) + insert into #Lung_0_5_PreProcICD9ProcExc ([ICD9Proc_code_type],[ICD9Proc_code_Name],[ICD9ProcCode]) --altered (ORD_...Dflt) --altered (temp table) values( 'LungSurgery','','32.0') ,( 'LungSurgery','','32.01') ,( 'LungSurgery','','32.09') @@ -1525,10 +1525,10 @@ If Exists (select ICD9Needed from #Lung_Sta3n528_0_1_inputP where ICD9Needed=1) -- ICD10 diagnostic code list for lung cancer -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_0_6_LungCancerDxICD10CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_0_6_LungCancerDxICD10CodeExc --altered (ORD_...Dflt) --altered (temp table) - CREATE TABLE #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #Lung_0_6_LungCancerDxICD10CodeExc ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [dx_code_type] [varchar](50) NULL, [dx_code_name] [varchar](50) NULL, @@ -1537,58 +1537,58 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc') is not n go -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.00' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.01' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.02' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.10' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.11' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.12' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.2' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.30' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.31' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.32' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.80' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.81' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.82' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.90' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.91' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C34.92' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C78.00' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C78.01' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C78.02' --'Pleural Cancer & Mesothelioma' cancer is kind of lung cancer -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C38.4' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C45.0' -insert into #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_6_LungCancerDxICD10CodeExc ([dx_code_type], [dx_code_name] ,[ICD10Code]) --altered (ORD_...Dflt) --altered (temp table) select 'RecentActiveLungC','Lung Cancer','C78.2' -- ICD9 diagnostic code list for lung cancer -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_7_LungCancerDxICD9CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_0_7_LungCancerDxICD9CodeExc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_0_7_LungCancerDxICD9CodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_0_7_LungCancerDxICD9CodeExc --altered (ORD_...Dflt) --altered (temp table) - CREATE TABLE #Lung_Sta3n528_0_7_LungCancerDxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #Lung_0_7_LungCancerDxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [dx_code_type] [varchar](50) NULL, [dx_code_name] [varchar](50) NULL, @@ -1596,13 +1596,13 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_7_LungCancerDxICD9CodeExc') is not nu ) go -insert into #Lung_Sta3n528_0_7_LungCancerDxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_7_LungCancerDxICD9CodeExc ( --altered (ORD_...Dflt) --altered (temp table) [dx_code_type], [dx_code_name], [ICD9Code] ) select distinct 'RecentActiveLungC','', ICD9Code from CDWWork.dim.ICD9 as dimICD9 -where (select ICD9Needed from #Lung_Sta3n528_0_1_inputP)=1 --altered (ORD_...Dflt) --altered (temp table) +where (select ICD9Needed from #Lung_0_1_inputP)=1 --altered (ORD_...Dflt) --altered (temp table) and( DimICD9.ICD9Code like '162.2%' or DimICD9.ICD9Code like '162.3%' or DimICD9.ICD9Code like '162.4%' @@ -1616,11 +1616,11 @@ where (select ICD9Needed from #Lung_Sta3n528_0_1_inputP)=1 --altered (ORD_... go -- CPT procedure code list -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_8_PrevProcCPTCodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_0_8_PrevProcCPTCodeExc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) go - CREATE TABLE #Lung_Sta3n528_0_8_PrevProcCPTCodeExc ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #Lung_0_8_PrevProcCPTCodeExc ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, [CPT_code_type] [varchar](50) NULL, [CPT_code_name] [varchar](50) NULL, @@ -1628,7 +1628,7 @@ go ) go -insert into #Lung_Sta3n528_0_8_PrevProcCPTCodeExc ( --altered (ORD_...Dflt) --altered (temp table) +insert into #Lung_0_8_PrevProcCPTCodeExc ( --altered (ORD_...Dflt) --altered (temp table) [CPT_code_type], [CPT_code_name] , [CPTCode] @@ -1745,11 +1745,11 @@ go -- Chest XRay/CT RadiologyDiagnosticCode list ( which will be red-flagged) -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_0_A_RedFlagXRayCTDiagnosticCode') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_0_A_RedFlagXRayCTDiagnosticCode --altered (ORD_...Dflt) --altered (temp table) go - CREATE TABLE #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ( --altered (ORD_...Dflt) --altered (temp table) + CREATE TABLE #Lung_0_A_RedFlagXRayCTDiagnosticCode ( --altered (ORD_...Dflt) --altered (temp table) UniqueID int Identity(1,1) not null, Sta3n smallint null, RadiologyDiagnosticCode [varchar](100) NULL, @@ -1761,239 +1761,239 @@ go -- Add red-flagged RadiologyDiagnosticCode. Check if all the codes used in your site are included -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'POSSIBLE MALIGNANCY', 1, 800001068) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'POSSIBLE MALIGNANCY', 1, 800001068) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 800001096) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 800001096) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 800001097) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 800001097) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 800001098) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 800001098) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 800001113) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 800001113) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'HIGHLY SUGGESTIVE OF MALIGNANCY', 1, 800001142) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'HIGHLY SUGGESTIVE OF MALIGNANCY', 1, 800001142) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 800001146) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 800001146) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'POSSIBLE MALIGNANCY', 1, 800001883) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'POSSIBLE MALIGNANCY', 1, 800001883) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 800001904) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 800001904) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 800001905) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 800001905) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 800001906) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 800001906) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 800001921) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 800001921) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'LESION SUSPICIOUS FOR LUNG CA', 1, 800001925) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'LESION SUSPICIOUS FOR LUNG CA', 1, 800001925) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'ABNORMALITY: POSSIBLE MALIGNANCY, ATTN. NEEDED', 1, 800001928) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'ABNORMALITY: POSSIBLE MALIGNANCY, ATTN. NEEDED', 1, 800001928) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 800001933) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (691, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 800001933) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'PULMONARY NODULE PRESENT', 1, 800002109) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (644, N'PULMONARY NODULE PRESENT', 1, 800002109) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'HIGHLY SUG OF MALIG, TK ACTION', 1, 1000000002) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'HIGHLY SUG OF MALIG, TK ACTION', 1, 1000000002) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'SUSPICIOUS ABNORM, CONSIDER BX', 1, 1000000003) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'SUSPICIOUS ABNORM, CONSIDER BX', 1, 1000000003) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'POSSIBLE MALIGNANCY', 1, 1000000340) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'POSSIBLE MALIGNANCY', 1, 1000000340) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000000361) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000000361) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000000362) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000000362) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000000363) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000000363) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000000378) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000000378) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1000000416) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (537, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1000000416) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'POSSIBLE MALIGNANCY', 1, 1000000423) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'POSSIBLE MALIGNANCY', 1, 1000000423) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000000446) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000000446) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000000447) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000000447) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000000448) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000000448) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'IMPORTANT REPORT/POSSIBLE MALIGNANCY', 1, 1000000462) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'IMPORTANT REPORT/POSSIBLE MALIGNANCY', 1, 1000000462) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000000463) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000000463) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'POSSIBLE MALIGNANCY', 1, 1000000782) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'POSSIBLE MALIGNANCY', 1, 1000000782) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'NEW UNSUSPECTED MALIGNANCY F/U ACTION NEEDED', 1, 1000000785) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'NEW UNSUSPECTED MALIGNANCY F/U ACTION NEEDED', 1, 1000000785) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000000815) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000000815) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000000816) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000000816) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000000817) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000000817) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000000831) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000000831) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'Suspicious for New Malignancy Need FU', 1, 1000000835) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'Suspicious for New Malignancy Need FU', 1, 1000000835) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1000000854) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1000000854) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'POSSIBLE MALIGNANCY', 1, 1000001015) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'POSSIBLE MALIGNANCY', 1, 1000001015) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000001036) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000001036) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000001037) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000001037) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000001038) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000001038) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000001053) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000001053) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'CLINICAL ALERT-POSS. MALIGNANCY-E-MAIL', 1, 1000001064) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'CLINICAL ALERT-POSS. MALIGNANCY-E-MAIL', 1, 1000001064) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'CLINICAL ALERT-POSSIBLE MALIGNANCY', 1, 1000001069) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'CLINICAL ALERT-POSSIBLE MALIGNANCY', 1, 1000001069) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'POSSIBLE MALIGNACY, FOLLOW-UP NEEDED', 1, 1000001073) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (589, N'POSSIBLE MALIGNACY, FOLLOW-UP NEEDED', 1, 1000001073) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'POSSIBLE MALIGNANCY', 1, 1000001552) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'POSSIBLE MALIGNANCY', 1, 1000001552) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'SUSPICIOUS FOR MALIGNANCY-CLINICAL FOLLOW-UP ACTION NEEDED', 1, 1000001555) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'SUSPICIOUS FOR MALIGNANCY-CLINICAL FOLLOW-UP ACTION NEEDED', 1, 1000001555) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000001583) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000001583) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000001584) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000001584) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000001585) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000001585) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000001600) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000001600) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'Suspicious for New Malignancy Need FU ', 1, 1000001605) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'Suspicious for New Malignancy Need FU ', 1, 1000001605) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'PULMONARY EMBOLISM, IMMEDIATE ATTN NEEDED', 1, 1000001615) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'PULMONARY EMBOLISM, IMMEDIATE ATTN NEEDED', 1, 1000001615) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'PULMONARY EMBOLISM, IMMEDIATE ATTN NEEDED', 1, 1000001617) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'PULMONARY EMBOLISM, IMMEDIATE ATTN NEEDED', 1, 1000001617) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'NODULES 4mm TO LESS THAN 2cm', 1, 1000001619) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'NODULES 4mm TO LESS THAN 2cm', 1, 1000001619) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'NODULES/MASSES GREATER THAN 2cm', 1, 1000001620) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'NODULES/MASSES GREATER THAN 2cm', 1, 1000001620) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1000001628) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1000001628) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'POSSIBLE MALIGNANCY', 1, 1000002243) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'POSSIBLE MALIGNANCY', 1, 1000002243) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000002263) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1000002263) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000002264) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1000002264) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000002265) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1000002265) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000002279) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1000002279) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1000002307) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (671, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1000002307) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'NODULES LESS THAN 6 MM', 1, 1000002593) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'NODULES LESS THAN 6 MM', 1, 1000002593) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'NODULES 6MM TO LESS THEN 2CM', 1, 1000002594) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (635, N'NODULES 6MM TO LESS THEN 2CM', 1, 1000002594) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'POSSIBLE MALIGNANCY', 1, 1200000692) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'POSSIBLE MALIGNANCY', 1, 1200000692) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'MASS LESION', 1, 1200000694) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'MASS LESION', 1, 1200000694) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1200000698) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1200000698) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'LUNG - SUSPICION FOR CANCER', 1, 1200000722) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'LUNG - SUSPICION FOR CANCER', 1, 1200000722) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1200000727) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1200000727) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1200000728) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1200000728) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1200000729) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1200000729) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1200000745) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1200000745) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1200000747) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1200000747) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'LUNG MASS-IMMEDIATE ATTENTION NEEDED.', 1, 1200000753) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (541, N'LUNG MASS-IMMEDIATE ATTENTION NEEDED.', 1, 1200000753) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'POSSIBLE MALIGNANCY', 1, 1400000304) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'POSSIBLE MALIGNANCY', 1, 1400000304) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1400000317) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1400000317) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1400000325) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1400000325) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1400000326) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1400000326) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1400000327) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1400000327) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1400000342) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (512, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1400000342) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'POSSIBLE MALIGNANCY', 1, 1400000451) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'POSSIBLE MALIGNANCY', 1, 1400000451) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1400000472) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1400000472) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1400000473) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1400000473) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1400000474) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1400000474) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1400000489) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1400000489) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1400000495) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'POSSIBLE MALIGNANCY, FOLLOW-UP NEEDED', 1, 1400000495) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'Possible Malignancy', 1, 1400000529) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'Possible Malignancy', 1, 1400000529) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'Lung Lesion for follow-up team', 1, 1400000530) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'Lung Lesion for follow-up team', 1, 1400000530) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'Possible Malignancy ', 1, 1400000537) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'Possible Malignancy ', 1, 1400000537) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'Lung lesion for follow up team', 1, 1400000538) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'Lung lesion for follow up team', 1, 1400000538) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'LUNG NODULE FOLLOW UP', 1, 1400000540) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (523, N'LUNG NODULE FOLLOW UP', 1, 1400000540) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'POSSIBLE MALIGNANCY', 1, 1400000629) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'POSSIBLE MALIGNANCY', 1, 1400000629) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1400000650) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1400000650) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1400000651) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1400000651) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1400000652) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1400000652) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1400000667) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1400000667) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'SUSPICIOUS FINDINGS,FU STUDY RECOM', 1, 1400000669) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'SUSPICIOUS FINDINGS,FU STUDY RECOM', 1, 1400000669) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'POSS PROBABLE TUMOR, PROVIDER NOTIFIED', 1, 1400000672) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'POSS PROBABLE TUMOR, PROVIDER NOTIFIED', 1, 1400000672) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'CATEGORY 5 HIGHLY SUGG MALIGNANCY', 1, 1400000688) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'CATEGORY 5 HIGHLY SUGG MALIGNANCY', 1, 1400000688) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'POSSIBLE MALIGNANCY, FOLLOWUP NEEDED', 1, 1400000716) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (528, N'POSSIBLE MALIGNANCY, FOLLOWUP NEEDED', 1, 1400000716) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'POSSIBLE MALIGNANCY', 1, 1400000805) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'POSSIBLE MALIGNANCY', 1, 1400000805) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1400000824) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1400000824) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1400000825) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1400000825) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1400000826) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1400000826) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1400000840) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1400000840) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'POSS MALIGN, F/U NEEDED, ALERT SENT ', 1, 1400000843) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (540, N'POSS MALIGN, F/U NEEDED, ALERT SENT ', 1, 1400000843) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'POSSIBLE MALIGNANCY', 1, 1400001450) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'POSSIBLE MALIGNANCY', 1, 1400001450) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1400001471) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'LUNGRADS 4A: SUSPICIOUS NODULE', 1, 1400001471) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1400001472) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'LUNGRADS 4B: SUSPICIOUS NODULE', 1, 1400001472) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1400001473) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'LUNGRADS 4X: SUSPICIOUS NODULE WITH ADDITIONAL FEATURES', 1, 1400001473) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1400001488) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'INCIDENTAL LUNG NODULE(NONSCREENING)', 1, 1400001488) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'MAJOR ABNORMALITY/POSSIBLE MALIGNANCY', 1, 1400002196) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (642, N'MAJOR ABNORMALITY/POSSIBLE MALIGNANCY', 1, 1400002196) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'SOLID MASS, IRREGULAR MARGINS', 1, 1000000476) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'SOLID MASS, IRREGULAR MARGINS', 1, 1000000476) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'NEW LESIONS, ATTN. NEEDED', 1, 1000000466) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (549, N'NEW LESIONS, ATTN. NEEDED', 1, 1000000466) --altered (ORD_...Dflt) --altered (temp table) GO -INSERT #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'POSSIBLE NEW LUNG CANCER', 1, 1000002624) --altered (ORD_...Dflt) --altered (temp table) +INSERT #Lung_0_A_RedFlagXRayCTDiagnosticCode ([sta3n], [RadiologyDiagnosticCode], [isRedFlag], [RadiologyDiagnosticCodeSID]) VALUES (580, N'POSSIBLE NEW LUNG CANCER', 1, 1000002624) --altered (ORD_...Dflt) --altered (temp table) GO @@ -2002,8 +2002,8 @@ GO -------------------------------------------------------------------------------------------------------------------------------- -- Extract of all chest XRay/CT during study period + follow-up days -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_1_In_1_All_Chest_XRayCTPET') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_1_In_1_All_Chest_XRayCTPET --altered (ORD_...Dflt) --altered (temp table) select [RadiologyExamSID] @@ -2037,10 +2037,10 @@ select [RadiologyExamSID] ,[ClinicStopRecordedFlag] ,[VisitSID] ,[NuclearMedicineExamSID] -into #Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET --altered (ORD_...Dflt) --altered (temp table) +into #Lung_1_In_1_All_Chest_XRayCTPET --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Rad].[RadiologyExam] as Rad --altered (ORD_...Src) --NeedToSwitch -inner join #Lung_Sta3n528_0_0_1_Sta3nSta6a as s --altered (ORD_...Dflt) --altered (temp table) +inner join #Lung_0_0_1_Sta3nSta6a as s --altered (ORD_...Dflt) --altered (temp table) on Rad.Sta3n=s.sta3n left join CDWWork.Dim.location as b on Rad.RequestingLocationSID=b.LocationSID @@ -2050,7 +2050,7 @@ left join cdwwork.dim.[RadiologyProcedure] as prc on rad.sta3n=prc.sta3n and rad.[RadiologyProcedureSID]=prc.[RadiologyProcedureSID] left join cdwwork.dim.CPT as code on prc.CPTSID=code.CPTSID and prc.sta3n=code.sta3n -inner join #Lung_Sta3n528_0_2_0_LungImg as TargetImg --altered (ORD_...Dflt) --altered (temp table) +inner join #Lung_0_2_0_LungImg as TargetImg --altered (ORD_...Dflt) --altered (temp table) on TargetImg.ImgCode=code.CPTCode left join cdwwork.dim.[RadiologyExamStatus] as sta on Rad.sta3n=sta.sta3n and Rad.[RadiologyExamStatusSID]=sta.[RadiologyExamStatusSID] @@ -2060,21 +2060,21 @@ on Rad.sta3n=diag.sta3n and Rad.[RadiologyDiagnosticCodeSID]=diag.[RadiologyDiag on Rad.sta3n=VistaSite.Sta3n where --Rad.CohortName='Cohort20180712' and Rad.ExamDateTime - between (select sp_start from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --Clue Date Range+followup --altered (ORD_...Dflt) --altered (temp table) + between (select sp_start from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and DATEADD(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --Clue Date Range+followup --altered (ORD_...Dflt) --altered (temp table) and sta.[RadiologyExamStatus] like'%COMPLETE%' go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET_SSN') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET_SSN --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_1_In_1_All_Chest_XRayCTPET_SSN') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_1_In_1_All_Chest_XRayCTPET_SSN --altered (ORD_...Dflt) --altered (temp table) select distinct b.patientSSN,convert(varchar(10),b.BirthDateTime,120) as DOB,convert(varchar(10),b.DeathDateTime,120) as DOD,b.Gender as Sex ,a.* - into #Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET_SSN --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_1_In_1_All_Chest_XRayCTPET_SSN --altered (ORD_...Dflt) --altered (temp table) + from #Lung_1_In_1_All_Chest_XRayCTPET as a --altered (ORD_...Dflt) --altered (temp table) left join [CDWWork].[SPatient].[SPatient] as b --altered (ORD_...Src) on a.sta3n=b.sta3n and a.[PatientSID]=b.patientsid --where CohortName='Cohort20180712' @@ -2083,30 +2083,30 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET_SSN') is not -- All Chest_XRay/CT images during study period from local site sta6a - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_1_In_2_All_Chest_XRayCT_Sta6a') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_1_In_2_All_Chest_XRayCT_Sta6a --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_1_In_2_All_Chest_XRayCT_Sta6a') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_1_In_2_All_Chest_XRayCT_Sta6a --altered (ORD_...Dflt) --altered (temp table) - select Rad.* into #Lung_Sta3n528_1_In_2_All_Chest_XRayCT_Sta6a --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET_SSN as Rad --altered (ORD_...Dflt) --altered (temp table) + select Rad.* into #Lung_1_In_2_All_Chest_XRayCT_Sta6a --altered (ORD_...Dflt) --altered (temp table) + from #Lung_1_In_1_All_Chest_XRayCTPET_SSN as Rad --altered (ORD_...Dflt) --altered (temp table) --NeedToSwitch - inner join #Lung_Sta3n528_0_0_1_Sta3nSta6a as s --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_0_0_1_Sta3nSta6a as s --altered (ORD_...Dflt) --altered (temp table) on Rad.Sta6a=s.sta6a where [img_code_type] in ('CT','XRay') and ExamDateTime - between (select sp_start from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and (select sp_end from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + between (select sp_start from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (select sp_end from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) go -- Chest_XRay/CT images that are flagged during study period from your site -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_1_In_3_RedFlagXRayCT') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_1_In_3_RedFlagXRayCT --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_1_In_3_RedFlagXRayCT') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_1_In_3_RedFlagXRayCT --altered (ORD_...Dflt) --altered (temp table) -select Rad.* into #Lung_Sta3n528_1_In_3_RedFlagXRayCT --altered (ORD_...Dflt) --altered (temp table) -from #Lung_Sta3n528_1_In_2_All_Chest_XRayCT_Sta6a as Rad --altered (ORD_...Dflt) --altered (temp table) +select Rad.* into #Lung_1_In_3_RedFlagXRayCT --altered (ORD_...Dflt) --altered (temp table) +from #Lung_1_In_2_All_Chest_XRayCT_Sta6a as Rad --altered (ORD_...Dflt) --altered (temp table) --NeedToSwitch -inner join #Lung_Sta3n528_0_A_RedFlagXRayCTDiagnosticCode as code --altered (ORD_...Dflt) --altered (temp table) +inner join #Lung_0_A_RedFlagXRayCTDiagnosticCode as code --altered (ORD_...Dflt) --altered (temp table) on rad.[RadiologyDiagnosticCode]=code.[RadiologyDiagnosticCode] and rad.Sta3n=code.Sta3n and code.isRedFlag=1 go @@ -2114,8 +2114,8 @@ go -- Red-flagged instances in study period - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_1_In_6_IncIns') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_1_In_6_IncIns --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_1_In_6_IncIns') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_1_In_6_IncIns --altered (ORD_...Dflt) --altered (temp table) select distinct [RadiologyExamSID] @@ -2152,21 +2152,21 @@ select distinct ,DOB ,DOD ,Sex -into #Lung_Sta3n528_1_In_6_IncIns --altered (ORD_...Dflt) --altered (temp table) -from #Lung_Sta3n528_1_In_3_RedFlagXRayCT as Rad --altered (ORD_...Dflt) --altered (temp table) -where ExamDateTime between (select sp_start from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and (select sp_end from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +into #Lung_1_In_6_IncIns --altered (ORD_...Dflt) --altered (temp table) +from #Lung_1_In_3_RedFlagXRayCT as Rad --altered (ORD_...Dflt) --altered (temp table) +where ExamDateTime between (select sp_start from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (select sp_end from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) go -- Get other possible patientSID outside your sta3n - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_1_In_8_IncPat') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_1_In_8_IncPat --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_1_In_8_IncPat') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_1_In_8_IncPat --altered (ORD_...Dflt) --altered (temp table) select distinct VStatus.Sta3n,VStatus.PatientSID,VStatus.patientSSN, VStatus.ScrSSN,VStatus.PatientICN - into #Lung_Sta3n528_1_In_8_IncPat --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_1_In_6_IncIns as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_1_In_8_IncPat --altered (ORD_...Dflt) --altered (temp table) + from #Lung_1_In_6_IncIns as a --altered (ORD_...Dflt) --altered (temp table) left join [CDWWork].[SPatient].[SPatient] as VStatus --altered (ORD_...Src) on a.patientSSN=VStatus.PatientSSN --where CohortName='Cohort20180712' @@ -2182,8 +2182,8 @@ go -------------------------------------------------------------------------------------------------------------------------------- -- Extract of all DX Codes for all potential patients from surgical files -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_1_SurgDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_1_SurgDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_1_SurgDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_1_SurgDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) SELECT distinct @@ -2205,9 +2205,9 @@ SELECT distinct ,OtherPostICD10.ICD10Code as OtherPostICD10Diagnosis ,assocDxICD10.ICD10Code as assocDxICD10Diagnosis ,p.patientSSN - into #Lung_Sta3n528_2_Ex_1_SurgDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + into #Lung_2_Ex_1_SurgDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Surg].[SurgeryPre] as surgPre --altered (ORD_...Src) - inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on SurgPre.sta3n=p.sta3n and SurgPre.patientsid=p.patientsid left join CDWWork.dim.ICD9 as PreICD9 @@ -2234,21 +2234,21 @@ SELECT distinct left join CDWWork.dim.ICD10 as assocDxICD10 on assocDx.[SurgeryPrincipalAssociatedDiagnosisICD10SID]=assocDxICD10.ICD10SID and assocDx.sta3n=assocDxICD10.sta3n where - SurgPre.[SurgeryDateTime]>= DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) and --altered (ORD_...Dflt) --altered (temp table) - SurgPre.[SurgeryDateTime]<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + SurgPre.[SurgeryDateTime]>= DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) and --altered (ORD_...Dflt) --altered (temp table) + SurgPre.[SurgeryDateTime]<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) --and SurgPre.CohortName='Cohort20180712' --and surgDx.CohortName='Cohort20180712' --and otherPostDx.CohortName='Cohort20180712' --and assocDx.CohortName='Cohort20180712' and ( - --PreICD9.ICD9Code in (select ICD9Code from #Lung_Sta3n528_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) - PrincipalPostOpICD9.ICD9Code in (select ICD9Code from #Lung_Sta3n528_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) - or OtherPostICD9.ICD9Code in (select ICD9Code from #Lung_Sta3n528_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) - or assocDxICD9.ICD9Code in (select ICD9Code from #Lung_Sta3n528_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) + --PreICD9.ICD9Code in (select ICD9Code from #Lung_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) + PrincipalPostOpICD9.ICD9Code in (select ICD9Code from #Lung_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) + or OtherPostICD9.ICD9Code in (select ICD9Code from #Lung_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) + or assocDxICD9.ICD9Code in (select ICD9Code from #Lung_0_4_DxICD9CodeExc) --altered (ORD_...Dflt) --altered (temp table) - or PrincipalPostOpICD10.ICD10Code in (select ICD10Code from #Lung_Sta3n528_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) - or OtherPostICD10.ICD10Code in (select ICD10Code from #Lung_Sta3n528_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) - or assocDxICD10.ICD10Code in (select ICD10Code from #Lung_Sta3n528_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) + or PrincipalPostOpICD10.ICD10Code in (select ICD10Code from #Lung_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) + or OtherPostICD10.ICD10Code in (select ICD10Code from #Lung_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) + or assocDxICD10.ICD10Code in (select ICD10Code from #Lung_0_2_DxICD10CodeExc) --altered (ORD_...Dflt) --altered (temp table) ) @@ -2256,8 +2256,8 @@ SELECT distinct -- Extract of all DX codes from outpatient table for all potential patients -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_2_OutPatDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_2_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_2_OutPatDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_2_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) SELECT [VDiagnosisSID] @@ -2271,22 +2271,22 @@ SELECT ,[VisitDateTime] ,[VDiagnosisDateTime] as dx_dt ,p.patientSSN -into #Lung_Sta3n528_2_Ex_2_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #Lung_2_Ex_2_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[outpat].[WorkLoadVDiagnosis] as Diag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on Diag.ICD9SID=DimICD9.ICD9SID -left join #Lung_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on Diag.ICD10SID=DimICD10.ICD10SID -left join #Lung_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code -inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) +inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on Diag.sta3n=p.sta3n and Diag.patientsid=p.patientsid where --CohortName='Cohort20180712' and -[VDiagnosisDateTime]> DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) -and [VDiagnosisDateTime]<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP), --altered (ORD_...Dflt) --altered (temp table) - (select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +[VDiagnosisDateTime]> DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +and [VDiagnosisDateTime]<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP), --altered (ORD_...Dflt) --altered (temp table) + (select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go @@ -2294,8 +2294,8 @@ go -- Extract of all DX codes from inpatient tables for all potential patients -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_3_A_InPatDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) SELECT [InpatientDiagnosisSID] ,InPatDiag.[Sta3n] @@ -2308,28 +2308,28 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + into #Lung_2_Ex_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[InpatientDiagnosis] as InPatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InPatDiag.ICD9SID=DimICD9.ICD9SID -left join #Lung_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InPatDiag.ICD10SID=DimICD10.ICD10SID -left join #Lung_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --CohortName='Cohort20180712' and - [DischargeDateTime]> DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) -and [DischargeDateTime]<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + [DischargeDateTime]> DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +and [DischargeDateTime]<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Census501Diagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Census501Diagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT Census501DiagnosisSID @@ -2342,26 +2342,26 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) + into #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[Census501Diagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #Lung_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #Lung_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --CohortName='Cohort20180712' and - CensusDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and CensusDateTime<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + CensusDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and CensusDateTime<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT CensusDiagnosisSID @@ -2374,27 +2374,27 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) + into #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[CensusDiagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #Lung_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #Lung_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --CohortName='Cohort20180712' and - CensusDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and CensusDateTime<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + CensusDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and CensusDateTime<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT Inpatient501TransactionDiagnosisSID @@ -2407,27 +2407,27 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) + into #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[Inpatient501TransactionDiagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #Lung_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #Lung_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --CohortName='Cohort20180712' and - SpecialtyTransferDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and SpecialtyTransferDateTime<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + SpecialtyTransferDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and SpecialtyTransferDateTime<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT InpatientDischargeDiagnosisSID , @@ -2440,27 +2440,27 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) + into #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[InpatientDischargeDiagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #Lung_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #Lung_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --inpatDiag.CohortName='Cohort20180712' and - DischargeDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and DischargeDateTime<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + DischargeDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and DischargeDateTime<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT PatientTransferDiagnosisSID , InPatDiag.[Sta3n] @@ -2472,26 +2472,26 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) + into #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[PatientTransferDiagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #Lung_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #Lung_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --CohortName='Cohort20180712' and - PatientTransferDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and PatientTransferDateTime<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + PatientTransferDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and PatientTransferDateTime<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) SELECT SpecialtyTransferDiagnosisSID , InPatDiag.[Sta3n] @@ -2504,28 +2504,28 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN - into #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) + into #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[SpecialtyTransferDiagnosis] as InpatDiag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on InpatDiag.ICD9SID=DimICD9.ICD9SID -left join #Lung_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on InpatDiag.ICD10SID=DimICD10.ICD10SID -left join #Lung_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on InpatDiag.sta3n=p.sta3n and InpatDiag.patientsid=p.patientsid where --inpatDiag.CohortName='Cohort20180712' and - SpecialtyTransferDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and SpecialtyTransferDateTime<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + SpecialtyTransferDateTime>= DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and SpecialtyTransferDateTime<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -- Extract of all DX Codes for all potential patients from Purchased Care -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_3_B_InpatientFeeDiagnosisDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_3_B_InpatientFeeDiagnosisDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) SELECT Diag.[Sta3n] @@ -2539,29 +2539,29 @@ SELECT ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type ,p.patientSSN -into #Lung_Sta3n528_2_Ex_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #Lung_2_Ex_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[InpatientFeeDiagnosis] as Diag --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as DimICD9 on Diag.ICD9SID=DimICD9.ICD9SID -left join #Lung_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on Diag.ICD10SID=DimICD10.ICD10SID -left join #Lung_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code -inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) +inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on Diag.sta3n=p.sta3n and Diag.patientsid=p.patientsid where --CohortName='Cohort20180712' and - DischargeDateTime> DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) -and DischargeDateTime<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + DischargeDateTime> DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +and DischargeDateTime<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -- Extract of all DX Codes for all potential patients from Purchased Care - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) SELECT @@ -2575,196 +2575,196 @@ SELECT ,targetCode.dx_code_type as ICD9dx_code_type ,ICD10CodeList.ICD10Code as ICD10Code ,ICD10CodeList.dx_code_type as ICD10dx_code_type -into #Lung_Sta3n528_2_Ex_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #Lung_2_Ex_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Fee].[FeeServiceProvided] as a --altered (ORD_...Src) inner join [CDWWork].[Fee].[FeeInitialTreatment] as d --altered (ORD_...Src) on a.FeeInitialTreatmentSID=d.FeeInitialTreatmentSID left join CDWWork.Dim.ICD9 as DimICD9 on a.ICD9SID=DimICD9.ICD9SID -left join #Lung_Sta3n528_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_4_DxICD9CodeExc as targetCode --altered (ORD_...Dflt) --altered (temp table) on targetCode.ICD9Code=DimICD9.ICD9Code left join CDWWork.Dim.ICD10 as DimICD10 on a.ICD10SID=DimICD10.ICD10SID -left join #Lung_Sta3n528_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_2_DxICD10CodeExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10CodeList.ICD10Code=DimICD10.ICD10Code - inner join #Lung_Sta3n528_1_In_8_IncPat as c --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as c --altered (ORD_...Dflt) --altered (temp table) on a.sta3n=c.sta3n and a.patientsid=c.patientsid where --a.CohortName='Cohort20180712' and d.CohortName='Cohort20180712' and - InitialTreatmentDateTime> DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) -and d.InitialTreatmentDateTime<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + InitialTreatmentDateTime> DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +and d.InitialTreatmentDateTime<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and (TargetCode.dx_code_type is not null or ICD10CodeList.dx_code_type is not null) go -- Extract of all exclusion diagnoses from surgical, inpatient, and outpatient tables -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_4_AllDx_ICD9') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_4_AllDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_4_AllDx_ICD9') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_4_AllDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) go select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'DX-OutPat' as dataSource -into #Lung_Sta3n528_2_Ex_4_AllDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_2_Ex_2_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #Lung_2_Ex_4_AllDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_2_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-InPat' as dataSource - from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code,ICD9dx_code_type as dx_code_type,'Dx-InPatFee' as dataSource - from #Lung_Sta3n528_2_Ex_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code,ICD9dx_code_type as dx_code_type,'Dx-InPatFeeService' as dataSource - from #Lung_Sta3n528_2_Ex_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null -- UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-Census501Diagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-CensusDiagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-501TransactionDiagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-InpatientDischargeDiagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-PatientTransferDiagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD9Code as ICD9,ICD9dx_code_type as dx_code_type,'Dx-SpecialtyTransferDiagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD9dx_code_type is not null ---------------- Union select patientSSN,sta3n, PatientSID,dx_dt,PrincipalPostOpICD9Diagnosis as ICD9 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #Lung_Sta3n528_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #Lung_Sta3n528_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.PrincipalPostOpICD9Diagnosis=b.ICD9Code - where isnull(PrincipalPostOpICD9Diagnosis,'') in (select ICD9Code from #Lung_Sta3n528_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(PrincipalPostOpICD9Diagnosis,'') in (select ICD9Code from #Lung_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) Union select patientSSN,sta3n, PatientSID,dx_dt,OtherPostICD9Diagnosis as ICD9 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #Lung_Sta3n528_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #Lung_Sta3n528_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.OtherPostICD9Diagnosis=b.ICD9Code - where isnull(OtherPostICD9Diagnosis,'') in (select ICD9Code from #Lung_Sta3n528_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(OtherPostICD9Diagnosis,'') in (select ICD9Code from #Lung_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) Union select patientSSN,sta3n, PatientSID,dx_dt,assocDxICD9Diagnosis as ICD9 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #Lung_Sta3n528_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #Lung_Sta3n528_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_0_4_DxICD9CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.assocDxICD9Diagnosis=b.ICD9Code - where isnull(assocDxICD9Diagnosis,'') in (select ICD9Code from #Lung_Sta3n528_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(assocDxICD9Diagnosis,'') in (select ICD9Code from #Lung_0_4_DxICD9CodeExc ) --altered (ORD_...Dflt) --altered (temp table) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_4_AllDx_ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_4_AllDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_4_AllDx_ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_4_AllDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) go select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'DX-OutPat' as dataSource -into #Lung_Sta3n528_2_Ex_4_AllDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_2_Ex_2_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #Lung_2_Ex_4_AllDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_2_OutPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-InPat' as dataSource - from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code,ICD10dx_code_type as dx_code_type,'Dx-InPatFee' as dataSource - from #Lung_Sta3n528_2_Ex_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_3_B_InpatientFeeDiagnosisDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code,ICD10dx_code_type as dx_code_type,'Dx-InPatFeeService' as dataSource - from #Lung_Sta3n528_2_Ex_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_3_C_FeeICDDxFromFeeServiceProvided_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null -- UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-Census501Diagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Census501Diagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-CensusDiagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_CensusDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-501TransactionDiagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_Inpat_Inpatient501TransactionDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-InpatientDischargeDiagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_InpatientDischargeDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-PatientTransferDiagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_SpecialtyTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null UNION select patientSSN,sta3n,PatientSID,dx_dt,ICD10Code as ICD10,ICD10dx_code_type as dx_code_type,'Dx-SpecialtyTransferDiagnosis' as dataSource -from #Lung_Sta3n528_2_Ex_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_3_A_InPatDx_ICD9ICD10_PatientTransferDiagnosis --altered (ORD_...Dflt) --altered (temp table) where ICD10dx_code_type is not null ---------------- Union select patientSSN,sta3n, PatientSID,dx_dt,PrincipalPostOpICD10Diagnosis as ICD10 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #Lung_Sta3n528_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #Lung_Sta3n528_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.PrincipalPostOpICD10Diagnosis=b.ICD10Code - where isnull(PrincipalPostOpICD10Diagnosis,'') in (select ICD10Code from #Lung_Sta3n528_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(PrincipalPostOpICD10Diagnosis,'') in (select ICD10Code from #Lung_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) Union select patientSSN,sta3n, PatientSID,dx_dt,OtherPostICD10Diagnosis as ICD10 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #Lung_Sta3n528_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #Lung_Sta3n528_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.OtherPostICD10Diagnosis=b.ICD10Code - where isnull(OtherPostICD10Diagnosis,'') in (select ICD10Code from #Lung_Sta3n528_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(OtherPostICD10Diagnosis,'') in (select ICD10Code from #Lung_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) Union select patientSSN,sta3n, PatientSID,dx_dt,assocDxICD10Diagnosis as ICD10 ,b.dx_code_type ,'Dx-Surg' as dataSource - from #Lung_Sta3n528_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) - inner join #Lung_Sta3n528_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) + from #Lung_2_Ex_1_SurgDx_ICD9ICD10 as a --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_0_2_DxICD10CodeExc as b --altered (ORD_...Dflt) --altered (temp table) on a.assocDxICD10Diagnosis=b.ICD10Code - where isnull(assocDxICD10Diagnosis,'') in (select ICD10Code from #Lung_Sta3n528_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) + where isnull(assocDxICD10Diagnosis,'') in (select ICD10Code from #Lung_0_2_DxICD10CodeExc ) --altered (ORD_...Dflt) --altered (temp table) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_4_UnionAllDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_4_UnionAllDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_4_UnionAllDx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_4_UnionAllDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) go select patientSSN,Sta3n,PatientSID,dx_dt,ICD9 as ICDCode,dataSource,dx_code_type -into #Lung_Sta3n528_2_Ex_4_UnionAllDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) -from #Lung_Sta3n528_2_Ex_4_AllDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) +into #Lung_2_Ex_4_UnionAllDx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_4_AllDx_ICD9 --altered (ORD_...Dflt) --altered (temp table) Union ALL select patientSSN,Sta3n,PatientSID,dx_dt,ICD10,dataSource,dx_code_type -from #Lung_Sta3n528_2_Ex_4_AllDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) +from #Lung_2_Ex_4_AllDx_ICD10 --altered (ORD_...Dflt) --altered (temp table) go -- Look into ProblemList for Previous ACTIVE lung canccer -- ProblemList data is very spotty -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_2_Ex_7_ProblemListLC_Dx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_2_Ex_7_ProblemListLC_Dx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_2_Ex_7_ProblemListLC_Dx_ICD9ICD10') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_2_Ex_7_ProblemListLC_Dx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) go select @@ -2774,22 +2774,22 @@ select ,CancerICD9CodeList.dx_code_type as Icd9dx_code_type ,ICD10.ICD10Code,CancerICD10CodeList.ICD10Code as TargetICD10Code ,CancerICD10CodeList.dx_code_type as Icd10dx_code_type -into #Lung_Sta3n528_2_Ex_7_ProblemListLC_Dx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) +into #Lung_2_Ex_7_ProblemListLC_Dx_ICD9ICD10 --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Outpat].[ProblemList] as Plist --altered (ORD_...Src) left join CDWWork.Dim.ICD9 as ICD9 on Plist.ICD9SID=ICD9.ICD9SID -left join #Lung_Sta3n528_0_7_LungCancerDxICD9CodeExc as CancerICD9CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_7_LungCancerDxICD9CodeExc as CancerICD9CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD9.ICD9Code=CancerICD9CodeList.ICD9Code left join CDWWork.Dim.ICD10 as ICD10 on Plist.ICD10SID=ICD10.ICD10SID -left join #Lung_Sta3n528_0_6_LungCancerDxICD10CodeExc as CancerICD10CodeList --altered (ORD_...Dflt) --altered (temp table) +left join #Lung_0_6_LungCancerDxICD10CodeExc as CancerICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on ICD10.ICD10Code=CancerICD10CodeList.ICD10Code -inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) +inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on Plist.sta3n=p.sta3n and Plist.patientsid=p.patientsid where --CohortName='Cohort20180712' and -plist.RecordedDateTime >= DATEADD(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) -and plist.RecordedDateTime <= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP), --altered (ORD_...Dflt) --altered (temp table) - (select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +plist.RecordedDateTime >= DATEADD(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) +and plist.RecordedDateTime <= DATEADD(dd,(select fu_period from #Lung_0_1_inputP), --altered (ORD_...Dflt) --altered (temp table) + (select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) and ( CancerICD9CodeList.dx_code_type is not null @@ -2802,150 +2802,150 @@ go --Inpatient Procedure from all potential patients -- Previous ICD procedures from inpatient tables - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) select pat.patientssn,ICDProc.sta3n,ICDProc.patientsid ,ICDProc.[ICDProcedureDateTime] ,DimICD9Proc.[ICD9ProcedureCode],TargetCode.ICD9ProcCode,TargetCode.ICD9Proc_Code_Type ,DimICD10Proc.ICD10ProcedureCode,ICD10CodeList.ICD10ProcCode,ICD10CodeList.ICD10Proc_Code_Type -into #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[inpat].[InpatientICDProcedure] as ICDProc --altered (ORD_...Src) left join cdwwork.dim.ICD9Procedure as DimICD9Proc on ICDProc.[ICD9ProcedureSID]=DimICD9Proc.[ICD9ProcedureSID] - left join #Lung_Sta3n528_0_5_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) + left join #Lung_0_5_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) on DimICD9Proc.[ICD9ProcedureCode]=TargetCode.ICD9ProcCode left join cdwwork.dim.ICD10Procedure as DimICD10Proc on ICDProc.[ICD10ProcedureSID]=DimICD10Proc.[ICD10ProcedureSID] - left join #Lung_Sta3n528_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) + left join #Lung_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on DimICD10Proc.ICD10ProcedureCode=ICD10CodeList.ICD10ProcCode - inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_Sta3n528_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) + inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) on ICDProc.patientsid=pat.patientsid and ICDProc.sta3n=pat.sta3n where --CohortName='Cohort20180712' and - ([ICDProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and [ICDProcedureDateTime]<= DateAdd(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + ([ICDProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and [ICDProcedureDateTime]<= DateAdd(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) ) and (TargetCode.ICD9Proc_code_type is not null or ICD10CodeList.ICD10Proc_code_type is not null) go - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) select pat.patientssn,ICDProc.sta3n,ICDProc.patientsid ,ICDProc.ICDProcedureDateTime ,DimICD9Proc.[ICD9ProcedureCode],TargetCode.ICD9ProcCode,TargetCode.ICD9Proc_Code_Type ,DimICD10Proc.ICD10ProcedureCode,ICD10CodeList.ICD10ProcCode,ICD10CodeList.ICD10Proc_Code_Type -into #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[CensusICDProcedure] as ICDProc --altered (ORD_...Src) left join cdwwork.dim.ICD9Procedure as DimICD9Proc on ICDProc.[ICD9ProcedureSID]=DimICD9Proc.[ICD9ProcedureSID] - left join #Lung_Sta3n528_0_5_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) + left join #Lung_0_5_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) on DimICD9Proc.[ICD9ProcedureCode]=TargetCode.ICD9ProcCode left join cdwwork.dim.ICD10Procedure as DimICD10Proc on ICDProc.[ICD10ProcedureSID]=DimICD10Proc.[ICD10ProcedureSID] - left join #Lung_Sta3n528_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) + left join #Lung_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on DimICD10Proc.ICD10ProcedureCode=ICD10CodeList.ICD10ProcCode - inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_Sta3n528_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) + inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) on ICDProc.patientsid=pat.patientsid and ICDProc.sta3n=pat.sta3n where --CohortName='Cohort20180712' and - ([ICDProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and [ICDProcedureDateTime]<= DateAdd(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + ([ICDProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and [ICDProcedureDateTime]<= DateAdd(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) ) and (TargetCode.ICD9Proc_code_type is not null or ICD10CodeList.ICD10Proc_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) select pat.patientssn,a.sta3n,a.patientsid,a.[SurgicalProcedureDateTime] ,DimICD9Proc.[ICD9ProcedureCode],TargetCode.ICD9Proc_Code_Type ,TargetCode.ICD9ProcCode,ICD10CodeList.ICD10Proc_Code_Type ,DimICD10Proc.[ICD10ProcedureCode],ICD10CodeList.ICD10ProcCode -into #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[inpat].[InpatientSurgicalProcedure] as a --altered (ORD_...Src) left join cdwwork.dim.ICD9Procedure as DimICD9Proc on a.[ICD9ProcedureSID]=DimICD9Proc.[ICD9ProcedureSID] - left join #Lung_Sta3n528_0_5_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) + left join #Lung_0_5_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) on DimICD9Proc.[ICD9ProcedureCode]=TargetCode.ICD9ProcCode left join cdwwork.dim.ICD10Procedure as DimICD10Proc on a.[ICD10ProcedureSID]=DimICD10Proc.[ICD10ProcedureSID] - left join #Lung_Sta3n528_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) + left join #Lung_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on DimICD10Proc.ICD10ProcedureCode=ICD10CodeList.ICD10ProcCode - inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_Sta3n528_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) + inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) on a.patientsid=pat.patientsid and a.sta3n=pat.sta3n where --CohortName='Cohort20180712' and - ([SurgicalProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and [SurgicalProcedureDateTime]<= DateAdd(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + ([SurgicalProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and [SurgicalProcedureDateTime]<= DateAdd(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) ) and (TargetCode.ICD9Proc_code_type is not null or ICD10CodeList.ICD10Proc_code_type is not null) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_3_HLP_CensusSurgICD_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_3_HLP_CensusSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_3_PrevProc_3_HLP_CensusSurgICD_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_3_PrevProc_3_HLP_CensusSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) select pat.patientssn,a.sta3n,a.patientsid ,a.SurgicalProcedureDateTime ,DimICD9Proc.[ICD9ProcedureCode],TargetCode.ICD9ProcCode,TargetCode.ICD9Proc_Code_Type ,DimICD10Proc.ICD10ProcedureCode,ICD10CodeList.ICD10ProcCode,ICD10CodeList.ICD10Proc_Code_Type -into #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_3_HLP_CensusSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_3_PrevProc_3_HLP_CensusSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[CensusSurgicalProcedure] as a --altered (ORD_...Src) left join cdwwork.dim.ICD9Procedure as DimICD9Proc on a.[ICD9ProcedureSID]=DimICD9Proc.[ICD9ProcedureSID] - left join #Lung_Sta3n528_0_5_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) + left join #Lung_0_5_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) on DimICD9Proc.[ICD9ProcedureCode]=TargetCode.ICD9ProcCode left join cdwwork.dim.ICD10Procedure as DimICD10Proc on a.[ICD10ProcedureSID]=DimICD10Proc.[ICD10ProcedureSID] - left join #Lung_Sta3n528_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) + left join #Lung_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on DimICD10Proc.ICD10ProcedureCode=ICD10CodeList.ICD10ProcCode - inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_Sta3n528_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) + inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) on a.patientsid=pat.patientsid and a.sta3n=pat.sta3n where --CohortName='Cohort20180712' and - ([SurgicalProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and [SurgicalProcedureDateTime]<= DateAdd(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + ([SurgicalProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and [SurgicalProcedureDateTime]<= DateAdd(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) ) and (TargetCode.ICD9Proc_code_type is not null or ICD10CodeList.ICD10Proc_code_type is not null) go - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_4_HLP_FeeICDProc_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_4_HLP_FeeICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_3_PrevProc_4_HLP_FeeICDProc_Inpat_ICD9ProcICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_3_PrevProc_4_HLP_FeeICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) select pat.patientssn,a.sta3n,b.patientsid ,b.[TreatmentFromDateTime] ,DimICD9Proc.[ICD9ProcedureCode],TargetCode.ICD9ProcCode,TargetCode.ICD9Proc_Code_Type ,DimICD10Proc.ICD10ProcedureCode,ICD10CodeList.ICD10ProcCode,ICD10CodeList.ICD10Proc_Code_Type - into #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_4_HLP_FeeICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Exc_NonDx_3_PrevProc_4_HLP_FeeICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) from [CDWWork].[Fee].[FeeInpatInvoiceICDProcedure] as a --altered (ORD_...Src) inner join[CDWWork].[Fee].[FeeInpatInvoice] as b --altered (ORD_...Src) on a.FeeInpatInvoiceSID=b.FeeInpatInvoiceSID left join cdwwork.dim.ICD9Procedure as DimICD9Proc on a.[ICD9ProcedureSID]=DimICD9Proc.[ICD9ProcedureSID] - left join #Lung_Sta3n528_0_5_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) + left join #Lung_0_5_PreProcICD9ProcExc as TargetCode --altered (ORD_...Dflt) --altered (temp table) on DimICD9Proc.[ICD9ProcedureCode]=TargetCode.ICD9ProcCode left join cdwwork.dim.ICD10Procedure as DimICD10Proc on a.[ICD10ProcedureSID]=DimICD10Proc.[ICD10ProcedureSID] - left join #Lung_Sta3n528_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) + left join #Lung_0_3_PreProcICD10ProcExc as ICD10CodeList --altered (ORD_...Dflt) --altered (temp table) on DimICD10Proc.ICD10ProcedureCode=ICD10CodeList.ICD10ProcCode - inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_Sta3n528_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) + inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) on b.patientsid=pat.patientsid and b.sta3n=pat.sta3n where --a.CohortName='Cohort20180712' and b.CohortName='Cohort20180712' and - ([TreatmentFromDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and [TreatmentFromDateTime]<= DateAdd(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + ([TreatmentFromDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and [TreatmentFromDateTime]<= DateAdd(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) ) and (TargetCode.ICD9Proc_code_type is not null or ICD10CodeList.ICD10Proc_code_type is not null) go -- combine all Icd9Procedure from inpatient tables -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc --altered (ORD_...Dflt) --altered (temp table) select patientssn ,[sta3n] @@ -2954,8 +2954,8 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAll ,[ICD9ProcedureCode] ,ICD9Proc_Code_Type ,'Inp-InpICD' as datasource - into #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) where ICD9Proc_code_type is not null union select patientssn @@ -2965,7 +2965,7 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAll ,[ICD9ProcedureCode] ,ICD9Proc_Code_Type ,'Inp-CensusICD' as datasource - from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) where ICD9Proc_code_type is not null union select patientssn @@ -2975,7 +2975,7 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAll ,[ICD9ProcedureCode] ,ICD9Proc_Code_Type ,'Inp-InpSurg' as datasource - from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) where ICD9Proc_code_type is not null union select patientssn @@ -2985,7 +2985,7 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAll ,ICD9Proc_Code_Type ,[ICD9ProcedureCode] ,'Inp-CensusSurg' as datasource - from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_3_HLP_CensusSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Exc_NonDx_3_PrevProc_3_HLP_CensusSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) where ICD9Proc_code_type is not null union select patientssn @@ -2995,15 +2995,15 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAll ,[ICD9ProcedureCode] ,ICD9Proc_Code_Type ,'Inp-FeeICDProc' as datasource - from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_4_HLP_FeeICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Exc_NonDx_3_PrevProc_4_HLP_FeeICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) where ICD9Proc_code_type is not null go -- combine all Icd10Procedure from inpatient tables -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc --altered (ORD_...Dflt) --altered (temp table) select patientssn @@ -3013,8 +3013,8 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAll ,[ICD10ProcedureCode] ,ICD10Proc_Code_Type ,'Inp-InpICD' as datasource - into #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Exc_NonDx_3_PrevProc_0_HLP_InPICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) where ICD10Proc_code_type is not null union select patientssn @@ -3024,7 +3024,7 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAll ,[ICD10ProcedureCode] ,ICD10Proc_Code_Type ,'Inp-CensusICD' as datasource - from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Exc_NonDx_3_PrevProc_1_HLP_CensusICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) where ICD10Proc_code_type is not null union select patientssn @@ -3034,7 +3034,7 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAll ,[ICD10ProcedureCode] ,ICD10Proc_Code_Type ,'Inp-InpSurg' as datasource - from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Exc_NonDx_3_PrevProc_2_HLP_InPSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) where ICD10Proc_code_type is not null union select patientssn @@ -3044,7 +3044,7 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAll ,ICD10Proc_Code_Type ,[ICD10ProcedureCode] ,'Inp-CensusSurg' as datasource - from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_3_HLP_CensusSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Exc_NonDx_3_PrevProc_3_HLP_CensusSurgICD_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) where ICD10Proc_code_type is not null union select patientssn @@ -3054,7 +3054,7 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAll ,[ICD10ProcedureCode] ,ICD10Proc_Code_Type ,'Inp-FeeICDProc' as datasource - from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_4_HLP_FeeICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Exc_NonDx_3_PrevProc_4_HLP_FeeICDProc_Inpat_ICD9ProcICD10Proc --altered (ORD_...Dflt) --altered (temp table) where ICD10Proc_code_type is not null @@ -3064,33 +3064,33 @@ go -- Inpatien CPT procedure -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) select pat.patientssn,pat.scrssn,CPTProc.sta3n,CPTProc.patientsid,CPTProc.[CPTProcedureDateTime] ,DimCPT.[CPTCode],DimCPT.CPTName,DimCPT.CPTDescription ,CPT_code_type, patientICN -into #Lung_Sta3n528_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Inpat].[InpatientCPTProcedure] as CPTProc --altered (ORD_...Src) inner join cdwwork.dim.CPT as DimCPT on CPTProc.[CPTSID]=DimCPT.CPTSID inner join - (select CPT_code_type,CPTCode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) + (select CPT_code_type,CPTCode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) union - select img_code_type,ImgCode as CPTCode from #Lung_Sta3n528_0_2_0_LungImg --altered (ORD_...Dflt) --altered (temp table) + select img_code_type,ImgCode as CPTCode from #Lung_0_2_0_LungImg --altered (ORD_...Dflt) --altered (temp table) ) as TargetCode on DimCPT.CPTCode=TargetCode.CPTCode -inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_Sta3n528_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) +inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) on CPTProc.patientsid=pat.patientsid and CPTProc.sta3n=pat.sta3n where --CPTProc.CohortName='Cohort20180712' and - CPTProc.[CPTProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and CPTProc.[CPTProcedureDateTime] <= DateAdd(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + CPTProc.[CPTProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and CPTProc.[CPTProcedureDateTime] <= DateAdd(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) go -- Outpatient CPT procedure -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_5_PrevProc_Outpat') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_5_PrevProc_Outpat') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) SELECT p.patientSSN, @@ -3105,27 +3105,27 @@ SELECT ,VProc.[VProcedureDateTime] ,VProc.[CPRSOrderSID] ,p.ScrSSN,p.patientICN -into #Lung_Sta3n528_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Outpat].[WorkloadVProcedure] as VProc --altered (ORD_...Src) inner join CDWWork.[Dim].[CPT] as DimCPT on VProc.[CPTSID]=DimCPT.CPTSID inner join - (select CPT_code_type,CPTCode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) + (select CPT_code_type,CPTCode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) union - select img_code_type,ImgCode as CPTCode from #Lung_Sta3n528_0_2_0_LungImg --altered (ORD_...Dflt) --altered (temp table) + select img_code_type,ImgCode as CPTCode from #Lung_0_2_0_LungImg --altered (ORD_...Dflt) --altered (temp table) ) as TargetCode on DimCPT.CPTCode=TargetCode.CPTCode -inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) +inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on VProc.sta3n=p.sta3n and VProc.patientsid=p.patientsid where --VProc.CohortName='Cohort20180712' and - [VProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and [VProcedureDateTime] <= DateAdd(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + [VProcedureDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and [VProcedureDateTime] <= DateAdd(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) go -- Surgical CPT procedures -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_6_PrevProc_surg') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) SELECT @@ -3145,9 +3145,9 @@ SELECT ,OtherCPT.CPTCode as OtherProcedureCode ,OtherCPT.CPTDescription as OtherProcedureDescription ,p.patientSSN -into #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Surg].[SurgeryPre] as surgPre --altered (ORD_...Src) - inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on SurgPre.sta3n=p.sta3n and SurgPre.patientsid=p.patientsid left join[CDWWork].[Surg].[SurgeryProcedureDiagnosisCode]as surgDx --altered (ORD_...Src) on surgPre.SurgerySID=SurgDx.SurgerySID and surgPre.sta3n=SurgDx.sta3n @@ -3158,28 +3158,28 @@ FROM [CDWWork].[Surg].[SurgeryPre] as surgPre --altered (ORD_...Src) left join CDWWork.dim.CPT as OtherCPT on assocProc.OtherProcedureCPTSID=OtherCPT.CPTSID and assocProc.sta3n=OtherCPT.sta3n where - SurgPre.[SurgeryDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and SurgPre.[SurgeryDateTime] <= DateAdd(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + SurgPre.[SurgeryDateTime] >= DateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and SurgPre.[SurgeryDateTime] <= DateAdd(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) --and SurgPre.CohortName='Cohort20180712' --and surgDx.CohortName='Cohort20180712' --and assocProc.CohortName='Cohort20180712' and ( PrincipalCPT.CPTCode in - (select CPTCode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) + (select CPTCode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) union - select ImgCode as CPTCode from #Lung_Sta3n528_0_2_0_LungImg) --altered (ORD_...Dflt) --altered (temp table) + select ImgCode as CPTCode from #Lung_0_2_0_LungImg) --altered (ORD_...Dflt) --altered (temp table) or OtherCPT.CPTCode in - (select CPTCode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) + (select CPTCode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) union - select ImgCode as CPTCode from #Lung_Sta3n528_0_2_0_LungImg) --altered (ORD_...Dflt) --altered (temp table) + select ImgCode as CPTCode from #Lung_0_2_0_LungImg) --altered (ORD_...Dflt) --altered (temp table) ) go --Fee CPT procedure -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) SELECT Pat.patientssn @@ -3191,244 +3191,244 @@ SELECT ,[AmountPaid] ,DimCPT.CPTCode,DimCPT.CPTName ,CPT_code_type -into #Lung_Sta3n528_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) FROM [CDWWork].[Fee].[FeeServiceProvided] as a --altered (ORD_...Src) inner join [CDWWork].[Fee].[FeeInitialTreatment] as d --altered (ORD_...Src) on a.FeeInitialTreatmentSID=d.FeeInitialTreatmentSID inner join cdwwork.dim.CPT as DimCPT on a.[ServiceProvidedCPTSID]=DimCPT.[CPTSID] inner join -(select CPT_code_type,CPTCode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +(select CPT_code_type,CPTCode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) union -select img_code_type,ImgCode as CPTCode from #Lung_Sta3n528_0_2_0_LungImg --altered (ORD_...Dflt) --altered (temp table) +select img_code_type,ImgCode as CPTCode from #Lung_0_2_0_LungImg --altered (ORD_...Dflt) --altered (temp table) ) as TargetCode on DimCPT.CPTCode=TargetCode.CPTCode -inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_Sta3n528_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) +inner join (select distinct ScrSSN,patientSSN,patientICN,sta3n,patientsid from #Lung_1_In_8_IncPat) as pat --altered (ORD_...Dflt) --altered (temp table) on a.sta3n=pat.sta3n and a.patientsid=pat.patientsid where --a.CohortName='Cohort20180712' and d.CohortName='Cohort20180712' and - InitialTreatmentDateTime >= DateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and InitialTreatmentDateTime <= DateAdd(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + InitialTreatmentDateTime >= DateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and InitialTreatmentDateTime <= DateAdd(dd,(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) go -- LungBiopsy procedure -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_8_PrevProc_AllNonDxProcICD9ICD10Proc_LungBiopsy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_8_PrevProc_AllNonDxProcICD9ICD10Proc_LungBiopsy --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_8_PrevProc_AllNonDxProcICD9ICD10Proc_LungBiopsy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_8_PrevProc_AllNonDxProcICD9ICD10Proc_LungBiopsy --altered (ORD_...Dflt) --altered (temp table) select patientSSN,sta3n,patientSID,[Proc_dt] as LungBiopsy_dt,'LungBiopsy-InPatICD' as datasource,ICD9ProcedureCode as 'CPTOrICD','LungBiopsy' as code_type -into #Lung_Sta3n528_3_Exc_NonDx_8_PrevProc_AllNonDxProcICD9ICD10Proc_LungBiopsy --altered (ORD_...Dflt) --altered (temp table) -from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_8_PrevProc_AllNonDxProcICD9ICD10Proc_LungBiopsy --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc --altered (ORD_...Dflt) --altered (temp table) where [Proc_dt] is not null and ICD9Proc_code_type='LungBiopsy' union select patientSSN,sta3n,patientSID,[Proc_dt] as LungBiopsy_dt,'LungBiopsy-InPatICD' as datasource,ICD10ProcedureCode as 'CPTOrICD','LungBiopsy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc --altered (ORD_...Dflt) --altered (temp table) where [Proc_dt] is not null and [ICD10Proc_code_type]='LungBiopsy' union select patientSSN,sta3n,patientSID,[CPTProcedureDateTime] as LungBiopsy_dt,'LungBiopsy-InPatCPT' as datasource,[CPTCode] as 'CPTOrICD','LungBiopsy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) where [CPTProcedureDateTime] is not null and CPT_code_type='LungBiopsy' union select patientSSN,sta3n,patientSID,[VProcedureDateTime] as LungBiopsy_dt ,'LungBiopsy-OutPat' as datasource,[CPTCode] as 'CPTOrICD','LungBiopsy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) where [VProcedureDateTime] is not null and CPT_code_type='LungBiopsy' UNION select patientSSN,sta3n,patientSID,[DateOfOperation] as LungBiopsy_dt,'LungBiopsy-Surg' as datasource, [PrincipalProcedureCode] as 'CPTOrICD','LungBiopsy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) - where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) + where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) where cpt_code_type='LungBiopsy') UNION select patientSSN,sta3n,patientSID,[DateOfOperation] as LungBiopsy_dt,'LungBiopsy-Surg' as datasource, OtherProcedureCode as 'CPTOrICD','LungBiopsy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) - where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) + where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) where cpt_code_type='LungBiopsy') union select patientSSN,sta3n,patientSID,InitialTreatmentDateTime as LungBiopsy_dt,'LungBiopsy-FeeCPT' as datasource, [CPTCode] as 'CPTOrICD','LungBiopsy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) where InitialTreatmentDateTime is not null and CPT_code_type='LungBiopsy' go -- Bronchoscopy procedure -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_9_PrevProc_AllNonDxProcICD9ICD10Proc_Bronchoscopy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_9_PrevProc_AllNonDxProcICD9ICD10Proc_Bronchoscopy --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_9_PrevProc_AllNonDxProcICD9ICD10Proc_Bronchoscopy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_9_PrevProc_AllNonDxProcICD9ICD10Proc_Bronchoscopy --altered (ORD_...Dflt) --altered (temp table) select patientSSN,sta3n,patientSID,[Proc_dt] as Bronchoscopy_dt,'Bronchoscopy-InPatICD' as datasource,ICD9ProcedureCode as 'CPTOrICD','Bronchoscopy' as code_type -into #Lung_Sta3n528_3_Exc_NonDx_9_PrevProc_AllNonDxProcICD9ICD10Proc_Bronchoscopy --altered (ORD_...Dflt) --altered (temp table) -from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_9_PrevProc_AllNonDxProcICD9ICD10Proc_Bronchoscopy --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc --altered (ORD_...Dflt) --altered (temp table) where [Proc_dt] is not null and ICD9Proc_code_type='Bronchoscopy' union select patientSSN,sta3n,patientSID,[Proc_dt] as Bronchoscopy_dt,'Bronchoscopy-InPatICD' as datasource,ICD10ProcedureCode as 'CPTOrICD','Bronchoscopy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc --altered (ORD_...Dflt) --altered (temp table) where [Proc_dt] is not null and [ICD10Proc_code_type]='Bronchoscopy' union select patientSSN,sta3n,patientSID,[CPTProcedureDateTime] as Bronchoscopy_dt,'Bronchoscopy-InPatCPT' as datasource,[CPTCode] as 'CPTOrICD','Bronchoscopy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) where [CPTProcedureDateTime] is not null and CPT_code_type='Bronchoscopy' union select patientSSN,sta3n,patientSID,[VProcedureDateTime] as Bronchoscopy_dt ,'Bronchoscopy-OutPat' as datasource,[CPTCode] as 'CPTOrICD','Bronchoscopy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) where [VProcedureDateTime] is not null and CPT_code_type='Bronchoscopy' UNION select patientSSN,sta3n,patientSID,[DateOfOperation] as Bronchoscopy_dt,'Bronchoscopy-Surg' as datasource, [PrincipalProcedureCode] as 'CPTOrICD','Bronchoscopy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) - where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) + where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) where cpt_code_type='Bronchoscopy') UNION select patientSSN,sta3n,patientSID,[DateOfOperation] as Bronchoscopy_dt,'Bronchoscopy-Surg' as datasource, OtherProcedureCode as 'CPTOrICD','Bronchoscopy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) - where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) + where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) where cpt_code_type='Bronchoscopy') union select patientSSN,sta3n,patientSID,InitialTreatmentDateTime as Bronchoscopy_dt,'Bronchoscopy-FeeCPT' as datasource, [CPTCode] as 'CPTOrICD','Bronchoscopy' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) where InitialTreatmentDateTime is not null and CPT_code_type='Bronchoscopy' go --Lung Surgery -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_A_PrevProc_AllNonDxProcICD9ICD10Proc_LungSurgery') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_A_PrevProc_AllNonDxProcICD9ICD10Proc_LungSurgery --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_A_PrevProc_AllNonDxProcICD9ICD10Proc_LungSurgery') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_A_PrevProc_AllNonDxProcICD9ICD10Proc_LungSurgery --altered (ORD_...Dflt) --altered (temp table) select patientSSN,sta3n,patientSID,[Proc_dt] as LungSurgery_dt,'LungSurgery-InPatICD' as datasource,ICD9ProcedureCode as 'CPTOrICD','LungSurgery' as code_type -into #Lung_Sta3n528_3_Exc_NonDx_A_PrevProc_AllNonDxProcICD9ICD10Proc_LungSurgery --altered (ORD_...Dflt) --altered (temp table) -from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_A_PrevProc_AllNonDxProcICD9ICD10Proc_LungSurgery --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD9Proc --altered (ORD_...Dflt) --altered (temp table) where [Proc_dt] is not null and ICD9Proc_code_type='LungSurgery' union select patientSSN,sta3n,patientSID,[Proc_dt] as LungSurgery_dt,'LungSurgery-InPatICD' as datasource,ICD10ProcedureCode as 'CPTOrICD','LungSurgery' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_3_PrevProc_Inpat_0_UnionAllInpICD10Proc --altered (ORD_...Dflt) --altered (temp table) where [Proc_dt] is not null and [ICD10Proc_code_type]='LungSurgery' union select patientSSN,sta3n,patientSID,[CPTProcedureDateTime] as LungSurgery_dt,'LungSurgery-InPatCPT' as datasource,[CPTCode] as 'CPTOrICD','LungSurgery' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) where [CPTProcedureDateTime] is not null and CPT_code_type='LungSurgery' union select patientSSN,sta3n,patientSID,[VProcedureDateTime] as LungSurgery_dt ,'LungSurgery-OutPat' as datasource,[CPTCode] as 'CPTOrICD','LungSurgery' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) where [VProcedureDateTime] is not null and CPT_code_type='LungSurgery' UNION select patientSSN,sta3n,patientSID,[DateOfOperation] as LungSurgery_dt,'LungSurgery-Surg' as datasource, [PrincipalProcedureCode] as 'CPTOrICD','LungSurgery' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) - where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) + where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) where cpt_code_type='LungSurgery') UNION select patientSSN,sta3n,patientSID,[DateOfOperation] as LungSurgery_dt,'LungSurgery-Surg' as datasource, OtherProcedureCode as 'CPTOrICD','LungSurgery' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) - where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) + where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) where cpt_code_type='LungSurgery') union select patientSSN,sta3n,patientSID,InitialTreatmentDateTime as LungSurgery_dt,'LungSurgery-FeeCPT' as datasource, [CPTCode] as 'CPTOrICD','LungSurgery' as code_type -from #Lung_Sta3n528_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) where InitialTreatmentDateTime is not null and CPT_code_type='LungSurgery' go -- Chest XRay -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_E_PrevProc_AllNonDxProcICD9ICD10Proc_XRay') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_E_PrevProc_AllNonDxProcICD9ICD10Proc_XRay --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_E_PrevProc_AllNonDxProcICD9ICD10Proc_XRay') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_E_PrevProc_AllNonDxProcICD9ICD10Proc_XRay --altered (ORD_...Dflt) --altered (temp table) select patientSSN,sta3n,patientSID,InitialTreatmentDateTime as Img_dt,'XRAY-FeeCPT' as datasource, [CPTCode] as 'CPTOrICD','XRay' as code_type -into #Lung_Sta3n528_3_Exc_NonDx_E_PrevProc_AllNonDxProcICD9ICD10Proc_XRay --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_E_PrevProc_AllNonDxProcICD9ICD10Proc_XRay --altered (ORD_...Dflt) --altered (temp table) --union ---from #Lung_Sta3n528_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) -- where [CPTProcedureDateTime] is not null -- and CPT_code_type ='XRay' --union --select patientSSN,sta3n,patientSID,[VProcedureDateTime] as Img_dt ,'XRAY-OutPat' as datasource,[CPTCode] as 'CPTOrICD','XRay' as code_type ---from #Lung_Sta3n528_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) -- where [VProcedureDateTime] is not null -- and CPT_code_type ='XRay' -- UNION --select patientSSN,sta3n,patientSID,[DateOfOperation] as Img_dt,'XRAY-Surg' as datasource, [PrincipalProcedureCode] as 'CPTOrICD','XRay' as code_type ---from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) --- where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) +-- where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) -- where cpt_code_type='XRay') -- UNION --select patientSSN,sta3n,patientSID,[DateOfOperation] as Img_dt,'XRAY-Surg' as datasource, OtherProcedureCode as 'CPTOrICD','XRay' as code_type ---from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) --- where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) +-- where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) -- where cpt_code_type='XRay') -from #Lung_Sta3n528_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) where InitialTreatmentDateTime is not null and CPT_code_type ='XRay' go --Chest CT -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_F_PrevProc_AllNonDxProcICD9ICD10Proc_CT') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_F_PrevProc_AllNonDxProcICD9ICD10Proc_CT --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_F_PrevProc_AllNonDxProcICD9ICD10Proc_CT') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_F_PrevProc_AllNonDxProcICD9ICD10Proc_CT --altered (ORD_...Dflt) --altered (temp table) select patientSSN,sta3n,patientSID,InitialTreatmentDateTime as Img_dt,'CT-FeeCPT' as datasource, [CPTCode] as 'CPTOrICD','CT' as code_type -into #Lung_Sta3n528_3_Exc_NonDx_F_PrevProc_AllNonDxProcICD9ICD10Proc_CT --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_F_PrevProc_AllNonDxProcICD9ICD10Proc_CT --altered (ORD_...Dflt) --altered (temp table) --union --select patientSSN,sta3n,patientSID,[CPTProcedureDateTime] as img_dt,'CT-InPatCPT' as datasource,[CPTCode] as 'CPTOrICD','CT' as code_type ---from #Lung_Sta3n528_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) -- where [CPTProcedureDateTime] is not null -- and CPT_code_type ='CT' --union --select patientSSN,sta3n,patientSID,[VProcedureDateTime] as Img_dt ,'CT-OutPat' as datasource,[CPTCode] as 'CPTOrICD','CT' as code_type ---from #Lung_Sta3n528_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) -- where [VProcedureDateTime] is not null -- and CPT_code_type ='CT' -- UNION --select patientSSN,sta3n,patientSID,[DateOfOperation] as Img_dt,'CT-Surg' as datasource, [PrincipalProcedureCode] as 'CPTOrICD','CT' as code_type ---from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) --- where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) +-- where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) -- where cpt_code_type='CT') -- UNION --select patientSSN,sta3n,patientSID,[DateOfOperation] as Img_dt,'CT-Surg' as datasource, OtherProcedureCode as 'CPTOrICD','CT' as code_type ---from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) --- where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) +-- where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) -- where cpt_code_type='CT') -from #Lung_Sta3n528_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) where InitialTreatmentDateTime is not null and CPT_code_type ='CT' go --Chest PET -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Exc_NonDx_G_PrevProc_AllNonDxProcICD9ICD10Proc_PET') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Exc_NonDx_G_PrevProc_AllNonDxProcICD9ICD10Proc_PET --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Exc_NonDx_G_PrevProc_AllNonDxProcICD9ICD10Proc_PET') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Exc_NonDx_G_PrevProc_AllNonDxProcICD9ICD10Proc_PET --altered (ORD_...Dflt) --altered (temp table) select patientSSN,sta3n,patientSID,InitialTreatmentDateTime as Img_dt,'PET-FeeCPT' as datasource, [CPTCode] as 'CPTOrICD','PET' as code_type -into #Lung_Sta3n528_3_Exc_NonDx_G_PrevProc_AllNonDxProcICD9ICD10Proc_PET --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Exc_NonDx_G_PrevProc_AllNonDxProcICD9ICD10Proc_PET --altered (ORD_...Dflt) --altered (temp table) --union --select patientSSN,sta3n,patientSID,[CPTProcedureDateTime] as img_dt,'PET-InPatCPT' as datasource,[CPTCode] as 'CPTOrICD','PET' as code_type ---from #Lung_Sta3n528_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_4_PrevProc_Inpat_1_CPT --altered (ORD_...Dflt) --altered (temp table) -- where [CPTProcedureDateTime] is not null -- and CPT_code_type ='PET' --union --select patientSSN,sta3n,patientSID,[VProcedureDateTime] as Img_dt ,'PET-OutPat' as datasource,[CPTCode] as 'CPTOrICD','PET' as code_type ---from #Lung_Sta3n528_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_5_PrevProc_Outpat --altered (ORD_...Dflt) --altered (temp table) -- where [VProcedureDateTime] is not null -- and CPT_code_type ='PET' -- UNION --select patientSSN,sta3n,patientSID,[DateOfOperation] as Img_dt,'PET-Surg' as datasource, [PrincipalProcedureCode] as 'CPTOrICD','PET' as code_type ---from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) --- where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) +-- where isnull([PrincipalProcedureCode],'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) -- where cpt_code_type='PET') -- UNION --select patientSSN,sta3n,patientSID,[DateOfOperation] as Img_dt,'PET-Surg' as datasource, OtherProcedureCode as 'CPTOrICD','PET' as code_type ---from #Lung_Sta3n528_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) --- where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_Sta3n528_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) +--from #Lung_3_Exc_NonDx_6_PrevProc_surg --altered (ORD_...Dflt) --altered (temp table) +-- where isnull(OtherProcedureCode,'') in (select cptcode from #Lung_0_8_PrevProcCPTCodeExc --altered (ORD_...Dflt) --altered (temp table) -- where cpt_code_type='PET') -from #Lung_Sta3n528_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Exc_NonDx_7_PrevProc_FeeServiceProvidedCPT --altered (ORD_...Dflt) --altered (temp table) where InitialTreatmentDateTime is not null and CPT_code_type ='PET' go @@ -3436,47 +3436,47 @@ go -- Visit,referral and physician's note from potential patient -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_9_Ex_0_AllVisits_Hlp1') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_9_Ex_0_AllVisits_Hlp1 --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_9_Ex_0_AllVisits_Hlp1') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_9_Ex_0_AllVisits_Hlp1 --altered (ORD_...Dflt) --altered (temp table) select p.patientSSN ,V.Sta3n,V.PatientSID,V.Visitsid,V.VisitDatetime,V.primaryStopcodeSID,V.SecondaryStopcodeSID -into #Lung_Sta3n528_3_Ins_9_Ex_0_AllVisits_Hlp1 --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Ins_9_Ex_0_AllVisits_Hlp1 --altered (ORD_...Dflt) --altered (temp table) from [CDWWork].[Outpat].[Visit] as V --altered (ORD_...Src) inner join (select distinct pat.*,ins.ExamDateTime - from #Lung_Sta3n528_1_In_8_IncPat as pat --altered (ORD_...Dflt) --altered (temp table) - left join #Lung_Sta3n528_1_In_6_IncIns as ins --altered (ORD_...Dflt) --altered (temp table) + from #Lung_1_In_8_IncPat as pat --altered (ORD_...Dflt) --altered (temp table) + left join #Lung_1_In_6_IncIns as ins --altered (ORD_...Dflt) --altered (temp table) on pat.patientSSN=ins.PatientSSN ) as p on v.sta3n=p.sta3n and v.patientsid=p.patientsid and v.VisitDateTime between dateAdd(yy,-1,p.ExamDateTime) - and DateAdd(dd,30+(select fu_period from #Lung_Sta3n528_0_1_inputP),p.ExamDateTime) --altered (ORD_...Dflt) --altered (temp table) + and DateAdd(dd,30+(select fu_period from #Lung_0_1_inputP),p.ExamDateTime) --altered (ORD_...Dflt) --altered (temp table) where --CohortName='Cohort20180712' and - V.VisitDateTime between dateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - and DateAdd(dd,30+(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + V.VisitDateTime between dateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + and DateAdd(dd,30+(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_9_Ex_1_AllVisits') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_9_Ex_1_AllVisits --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_9_Ex_1_AllVisits') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_9_Ex_1_AllVisits --altered (ORD_...Dflt) --altered (temp table) select PatientSSN,VisitSID,VisitDateTime,PrimaryStopCodeSID,SecondaryStopCodeSID - into #Lung_Sta3n528_3_Ins_9_Ex_1_AllVisits --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_9_Ex_0_AllVisits_Hlp1 --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_9_Ex_1_AllVisits --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_9_Ex_0_AllVisits_Hlp1 --altered (ORD_...Dflt) --altered (temp table) union select PatientSSN,VisitSID,VisitDateTime,PrimaryStopCodeSID,SecondaryStopCodeSID - from #Lung_Sta3n528_3_Ins_9_Ex_0_AllVisits_Hlp1 --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_9_Ex_0_AllVisits_Hlp1 --altered (ORD_...Dflt) --altered (temp table) go -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_9_Ex_1_AllVisits_StopCode') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_9_Ex_1_AllVisits_StopCode --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_9_Ex_1_AllVisits_StopCode') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_9_Ex_1_AllVisits_StopCode --altered (ORD_...Dflt) --altered (temp table) select v.*,code1.stopcode as PrimaryStopCode,code1.stopcodename as PrimaryStopCodeName ,code2.stopcode as SecondaryStopCode,code2.stopcodename as SecondaryStopCodeName - into #Lung_Sta3n528_3_Ins_9_Ex_1_AllVisits_StopCode --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_9_Ex_1_AllVisits as V --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_9_Ex_1_AllVisits_StopCode --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_9_Ex_1_AllVisits as V --altered (ORD_...Dflt) --altered (temp table) left join [CDWWork].[Dim].[StopCode] as code1 on V.PrimaryStopCodeSID=code1.StopCodeSID left join [CDWWork].[Dim].[StopCode] as code2 @@ -3485,20 +3485,20 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_9_Ex_1_AllVisits_StopCode') is no go --Physician's notes from the visit -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_9_Ex_2_VisitTIU') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_9_Ex_2_VisitTIU --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_9_Ex_2_VisitTIU') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_9_Ex_2_VisitTIU --altered (ORD_...Dflt) --altered (temp table) select v.* ,T.[TIUDocumentSID],T.[EntryDateTime],T.[ReferenceDateTime] ,e.tiustandardtitle,T.ConsultSID - into #Lung_Sta3n528_3_Ins_9_Ex_2_VisitTIU --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_9_Ex_1_AllVisits_StopCode as V --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_9_Ex_2_VisitTIU --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_9_Ex_1_AllVisits_StopCode as V --altered (ORD_...Dflt) --altered (temp table) left join [CDWWork].[TIU].[TIUDocument] as T --altered (ORD_...Src) on T.VisitSID=V.Visitsid --and T.CohortName='Cohort20180712' --more filter - --and T.[EntryDateTime] between dateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - -- and DateAdd(dd,30+(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + --and T.[EntryDateTime] between dateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + -- and DateAdd(dd,30+(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) left join cdwwork.dim.[TIUDocumentDefinition] as d on t.[TIUDocumentDefinitionSID]=d.[TIUDocumentDefinitionSID] left join cdwwork.dim.TIUStandardTitle as e @@ -3510,8 +3510,8 @@ go -- Referrals -- E-Consult shares the same stop code as the physical location -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) select v.* ,c.requestDateTime as ReferralRequestDateTime,c.OrderStatusSID as ConsultOrderStatusSID, @@ -3521,13 +3521,13 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_9_Ex_3_VisitTIUconsult_joinByCons c.[InpatOutpat], -- the ordering person to indicate if the service is to be rendered on an outpatient or Inpatients basis. c.[RemoteService], d.StopCode as ConStopCode - into #Lung_Sta3n528_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_9_Ex_2_VisitTIU as V --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_9_Ex_2_VisitTIU as V --altered (ORD_...Dflt) --altered (temp table) left join [CDWWork].[Con].[Consult] as C --altered (ORD_...Src) on C.ConsultSID=V.ConsultSID --and CohortName='Cohort20180712' --more filter - --and C.[requestDateTime] between dateAdd(yy,-1,(select sp_start from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) - -- and DateAdd(dd,30+(select fu_period from #Lung_Sta3n528_0_1_inputP),(select sp_end from #Lung_Sta3n528_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + --and C.[requestDateTime] between dateAdd(yy,-1,(select sp_start from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) + -- and DateAdd(dd,30+(select fu_period from #Lung_0_1_inputP),(select sp_end from #Lung_0_1_inputP)) --altered (ORD_...Dflt) --altered (temp table) left join CDWWork.dim.AssociatedStopCode as d on c.ToRequestserviceSID=d.RequestServiceSID @@ -3538,90 +3538,90 @@ go -------------------------------------------------------------------------------------------------------------------------------- -- Red-flagged instances: Exclude patients <18 years old -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_0_1_In_4_Age') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_0_1_In_4_Age --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_0_1_In_4_Age') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_0_1_In_4_Age --altered (ORD_...Dflt) --altered (temp table) select Rad.* -into #Lung_Sta3n528_3_Ins_0_1_In_4_Age --altered (ORD_...Dflt) --altered (temp table) -from #Lung_Sta3n528_1_In_6_IncIns as Rad --altered (ORD_...Dflt) --altered (temp table) -where (DATEDIFF(yy,DOB,Rad.[ExamDateTime]) >= (select age from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Ins_0_1_In_4_Age --altered (ORD_...Dflt) --altered (temp table) +from #Lung_1_In_6_IncIns as Rad --altered (ORD_...Dflt) --altered (temp table) +where (DATEDIFF(yy,DOB,Rad.[ExamDateTime]) >= (select age from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) or patientssn is null ) go -- Red-flagged instances: Exclude deseased patients -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_0_2_In_5_Alive') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_0_2_In_5_Alive --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_0_2_In_5_Alive') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_0_2_In_5_Alive --altered (ORD_...Dflt) --altered (temp table) -select age.* into #Lung_Sta3n528_3_Ins_0_2_In_5_Alive --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_0_1_In_4_Age as age --altered (ORD_...Dflt) --altered (temp table) +select age.* into #Lung_3_Ins_0_2_In_5_Alive --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_0_1_In_4_Age as age --altered (ORD_...Dflt) --altered (temp table) where [DOD] is null or (DOD is not null and ( - DATEADD(dd,-(select fu_period from #Lung_Sta3n528_0_1_inputP),dod)>age.ExamDateTime --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,-(select fu_period from #Lung_0_1_inputP),dod)>age.ExamDateTime --altered (ORD_...Dflt) --altered (temp table) ) ) go -- Red-flagged instances: Exclude patients with previous lung cancer -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_1_Ex_LungCancer') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_1_Ex_LungCancer --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_1_Ex_LungCancer') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_1_Ex_LungCancer --altered (ORD_...Dflt) --altered (temp table) go select a.* -into #Lung_Sta3n528_3_Ins_1_Ex_LungCancer --altered (ORD_...Dflt) --altered (temp table) -from #Lung_Sta3n528_3_Ins_0_2_In_5_Alive as a --altered (ORD_...Dflt) --altered (temp table) +into #Lung_3_Ins_1_Ex_LungCancer --altered (ORD_...Dflt) --altered (temp table) +from #Lung_3_Ins_0_2_In_5_Alive as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #Lung_Sta3n528_2_Ex_7_ProblemListLC_Dx_ICD9ICD10 as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #Lung_2_Ex_7_ProblemListLC_Dx_ICD9ICD10 as b --altered (ORD_...Dflt) --altered (temp table) where a.[PatientSSN] = b.[PatientSSN] and (b.RecordedDateTime between DATEADD(yy,-1,a.[ExamDateTime]) and a.[ExamDateTime])) go -- Red-flagged instances: Exclude patients with terminal/major DX - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_2_Ex_Termi_Major') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_2_Ex_Termi_Major --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_2_Ex_Termi_Major') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_2_Ex_Termi_Major --altered (ORD_...Dflt) --altered (temp table) go select * - into #Lung_Sta3n528_3_Ins_2_Ex_Termi_Major --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_1_Ex_LungCancer as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_2_Ex_Termi_Major --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_1_Ex_LungCancer as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #Lung_Sta3n528_2_Ex_4_UnionAllDx_ICD9ICD10 as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #Lung_2_Ex_4_UnionAllDx_ICD9ICD10 as b --altered (ORD_...Dflt) --altered (temp table) where a.[PatientSSN] = b.[PatientSSN] and b.dx_code_type='Terminal' and - (b.dx_dt between DATEADD(yy,-1,a.[ExamDateTime]) and DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),a.[ExamDateTime]))) --altered (ORD_...Dflt) --altered (temp table) + (b.dx_dt between DATEADD(yy,-1,a.[ExamDateTime]) and DATEADD(dd,(select fu_period from #Lung_0_1_inputP),a.[ExamDateTime]))) --altered (ORD_...Dflt) --altered (temp table) go -- Red-flagged instances: Exclude patients with hospice/palliative diagnosis - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_3_Ex_Hospi_1_ByDx') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_3_Ex_Hospi_1_ByDx --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_3_Ex_Hospi_1_ByDx') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_3_Ex_Hospi_1_ByDx --altered (ORD_...Dflt) --altered (temp table) go select * - into #Lung_Sta3n528_3_Ins_3_Ex_Hospi_1_ByDx --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_2_Ex_Termi_Major as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_3_Ex_Hospi_1_ByDx --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_2_Ex_Termi_Major as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #Lung_Sta3n528_2_Ex_4_UnionAllDx_ICD9ICD10 as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #Lung_2_Ex_4_UnionAllDx_ICD9ICD10 as b --altered (ORD_...Dflt) --altered (temp table) where a.[PatientSSN] = b.[PatientSSN] and b.dx_code_type='Hospice' and b.dx_dt between DATEADD(yy,-1,a.[ExamDateTime] ) and - DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),a.[ExamDateTime])) --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,(select fu_period from #Lung_0_1_inputP),a.[ExamDateTime])) --altered (ORD_...Dflt) --altered (temp table) go -- Red-flagged instances: Exclude patients with hospice/palliative care - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_3_Ex_Hospi_2_Fee') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_3_Ex_Hospi_2_Fee --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_3_Ex_Hospi_2_Fee') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_3_Ex_Hospi_2_Fee --altered (ORD_...Dflt) --altered (temp table) go select * - into #Lung_Sta3n528_3_Ins_3_Ex_Hospi_2_Fee --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_3_Ex_Hospi_1_ByDx --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_3_Ex_Hospi_2_Fee --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_3_Ex_Hospi_1_ByDx --altered (ORD_...Dflt) --altered (temp table) except SELECT x.* - from #Lung_Sta3n528_3_Ins_3_Ex_Hospi_1_ByDx as x --altered (ORD_...Dflt) --altered (temp table) - inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_3_Ex_Hospi_1_ByDx as x --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on x.PatientSSN=p.PatientSSN inner join [CDWWork].[Fee].[FeeInpatInvoice] as a --altered (ORD_...Src) on a.Sta3n=p.sta3n and a.PatientSID=p.patientsid @@ -3629,22 +3629,22 @@ go on a.FeePurposeOfVisitSID=b.FeePurposeOfVisitSID where ltrim(rtrim(b.AustinCode)) in ('43','37','38','77','78') and a.TreatmentFromDateTime between DATEADD(yy,-1,x.ExamDateTime) and - DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),x.ExamDateTime) --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,(select fu_period from #Lung_0_1_inputP),x.ExamDateTime) --altered (ORD_...Dflt) --altered (temp table) go -- Red-flagged instances: Exclude patients with Inpatient hospice/palliative care - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_3_Ex_Hospi_3_ByPTF') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_3_Ex_Hospi_3_ByPTF --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_3_Ex_Hospi_3_ByPTF') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_3_Ex_Hospi_3_ByPTF --altered (ORD_...Dflt) --altered (temp table) select * - into #Lung_Sta3n528_3_Ins_3_Ex_Hospi_3_ByPTF --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_3_Ex_Hospi_2_Fee --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_3_Ex_Hospi_3_ByPTF --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_3_Ex_Hospi_2_Fee --altered (ORD_...Dflt) --altered (temp table) except SELECT x.* - from #Lung_Sta3n528_3_Ins_3_Ex_Hospi_2_Fee as x --altered (ORD_...Dflt) --altered (temp table) - inner join #Lung_Sta3n528_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_3_Ex_Hospi_2_Fee as x --altered (ORD_...Dflt) --altered (temp table) + inner join #Lung_1_In_8_IncPat as p --altered (ORD_...Dflt) --altered (temp table) on x.PatientSSN=p.PatientSSN inner join [CDWWork].[Inpat].[Inpatient] as a --altered (ORD_...Src) on a.Sta3n=p.sta3n and a.PatientSID=p.patientsid @@ -3652,20 +3652,20 @@ go on a.DischargeFromSpecialtySID=s.SpecialtySID and a.sta3n=s.sta3n where ltrim(rtrim(s.PTFCode)) in ('96','1F') and a.[DischargeDateTime] between DATEADD(yy,-1,x.ExamDateTime) and - DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),x.ExamDateTime) --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,(select fu_period from #Lung_0_1_inputP),x.ExamDateTime) --altered (ORD_...Dflt) --altered (temp table) go -- Red-flagged instances: Exclude patients with hospice/palliative referral - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_3_Ex_Hospi_3_Refer_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_3_Ex_Hospi_3_Refer_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_3_Ex_Hospi_3_Refer_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_3_Ex_Hospi_3_Refer_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) select * - into #Lung_Sta3n528_3_Ins_3_Ex_Hospi_3_Refer_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_3_Ex_Hospi_3_ByPTF as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_3_Ex_Hospi_3_Refer_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_3_Ex_Hospi_3_ByPTF as a --altered (ORD_...Dflt) --altered (temp table) where not exists - ( select * from #Lung_Sta3n528_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) + ( select * from #Lung_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) where ( --With Stopcode b.[primaryStopcode] in (351,353) or b.[secondaryStopcode] in (351,353) or b.ConStopCode in (351,353) --Hospice @@ -3678,27 +3678,27 @@ go and isnull(b.SecondaryStopCodeName,'') not like '%telephone%' and a.patientSSN = b.patientSSN and (coalesce(b.ReferenceDateTime,b.visitdatetime) between DATEADD(yy,-1, convert(varchar(10),a.ExamDateTime,120)+cast('00:00:00.000' as datetime)) - and DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP), convert(varchar(10),a.ExamDateTime,120)+cast('23:59:59.997' as datetime))) --altered (ORD_...Dflt) --altered (temp table) - and (datediff(dd,b.visitDateTime,isnull(b.ReferenceDateTime,b.visitDateTime))<(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - or datediff(dd,isnull(b.ReferenceDateTime,b.visitDateTime),b.visitDateTime)<(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and DATEADD(dd,(select fu_period from #Lung_0_1_inputP), convert(varchar(10),a.ExamDateTime,120)+cast('23:59:59.997' as datetime))) --altered (ORD_...Dflt) --altered (temp table) + and (datediff(dd,b.visitDateTime,isnull(b.ReferenceDateTime,b.visitDateTime))<(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + or datediff(dd,isnull(b.ReferenceDateTime,b.visitDateTime),b.visitDateTime)<(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ) ) go -- Red-flagged instances: Exclude patients with tuberculosis diagnosis - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_4_Ex_Tuber') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_4_Ex_Tuber --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_4_Ex_Tuber') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_4_Ex_Tuber --altered (ORD_...Dflt) --altered (temp table) go select * - into #Lung_Sta3n528_3_Ins_4_Ex_Tuber --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_3_Ex_Hospi_3_Refer_joinByConsultSID as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_4_Ex_Tuber --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_3_Ex_Hospi_3_Refer_joinByConsultSID as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #Lung_Sta3n528_2_Ex_4_UnionAllDx_ICD9ICD10 as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #Lung_2_Ex_4_UnionAllDx_ICD9ICD10 as b --altered (ORD_...Dflt) --altered (temp table) where a.[PatientSSN] = b.[PatientSSN] and b.dx_code_type='Tuberculosis' and (b.dx_dt between DATEADD(yy,-1,a.[ExamDateTime]) and - DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP),a.[ExamDateTime])) --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,(select fu_period from #Lung_0_1_inputP),a.[ExamDateTime])) --altered (ORD_...Dflt) --altered (temp table) ) go @@ -3708,51 +3708,51 @@ go -------------------------------------------------------------------------------------------------------------------------------- -- Red-flagged instances: Exclude patients with LungBiopsy completed - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_A_LungBiopsy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_A_LungBiopsy --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_7_OutCome_Lung_Proc_A_LungBiopsy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_7_OutCome_Lung_Proc_A_LungBiopsy --altered (ORD_...Dflt) --altered (temp table) select * - into #Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_A_LungBiopsy --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_4_Ex_Tuber as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_7_OutCome_Lung_Proc_A_LungBiopsy --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_4_Ex_Tuber as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #Lung_Sta3n528_3_Exc_NonDx_8_PrevProc_AllNonDxProcICD9ICD10Proc_LungBiopsy as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #Lung_3_Exc_NonDx_8_PrevProc_AllNonDxProcICD9ICD10Proc_LungBiopsy as b --altered (ORD_...Dflt) --altered (temp table) where a.patientSSN = b.PatientSSN and - b.LungBiopsy_dt between DATEADD(dd,-(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + b.LungBiopsy_dt between DATEADD(dd,-(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ,convert(varchar(10),a.ExamDateTime,120)+cast('00:00:00' as datetime)) - and DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and DATEADD(dd,(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ,convert(varchar(10),a.ExamDateTime,120)+cast('23:59:59:997' as datetime))) go -- Red-flagged instances: Exclude patients with Bronchoscopy completed - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_B_Bronchoscopy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_B_Bronchoscopy --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_7_OutCome_Lung_Proc_B_Bronchoscopy') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_7_OutCome_Lung_Proc_B_Bronchoscopy --altered (ORD_...Dflt) --altered (temp table) select * - into #Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_B_Bronchoscopy --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_A_LungBiopsy as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_7_OutCome_Lung_Proc_B_Bronchoscopy --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_7_OutCome_Lung_Proc_A_LungBiopsy as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #Lung_Sta3n528_3_Exc_NonDx_9_PrevProc_AllNonDxProcICD9ICD10Proc_Bronchoscopy as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #Lung_3_Exc_NonDx_9_PrevProc_AllNonDxProcICD9ICD10Proc_Bronchoscopy as b --altered (ORD_...Dflt) --altered (temp table) where a.patientSSN = b.PatientSSN and - b.Bronchoscopy_dt between DATEADD(dd,-(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + b.Bronchoscopy_dt between DATEADD(dd,-(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ,convert(varchar(10),a.ExamDateTime,120)+cast('00:00:00' as datetime)) - and DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and DATEADD(dd,(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ,convert(varchar(10),a.ExamDateTime,120)+cast('23:59:59:997' as datetime))) go -- Red-flagged instances: Exclude patients with Lung Surgery completed - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_C_LungSurgery') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_C_LungSurgery --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_7_OutCome_Lung_Proc_C_LungSurgery') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_7_OutCome_Lung_Proc_C_LungSurgery --altered (ORD_...Dflt) --altered (temp table) select * - into #Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_C_LungSurgery --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_B_Bronchoscopy as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_7_OutCome_Lung_Proc_C_LungSurgery --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_7_OutCome_Lung_Proc_B_Bronchoscopy as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #Lung_Sta3n528_3_Exc_NonDx_A_PrevProc_AllNonDxProcICD9ICD10Proc_LungSurgery as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #Lung_3_Exc_NonDx_A_PrevProc_AllNonDxProcICD9ICD10Proc_LungSurgery as b --altered (ORD_...Dflt) --altered (temp table) where a.patientSSN = b.PatientSSN and - b.LungSurgery_dt between DATEADD(dd,-(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + b.LungSurgery_dt between DATEADD(dd,-(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ,convert(varchar(10),a.ExamDateTime,120)+cast('00:00:00' as datetime)) - and DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and DATEADD(dd,(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ,convert(varchar(10),a.ExamDateTime,120)+cast('23:59:59:997' as datetime))) go @@ -3760,63 +3760,63 @@ go -- Red-flagged instances: Exclude patients with follow up chest XRay completed - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_A_XRay') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_A_XRay --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_8_OutCome_Rep_Img_A_XRay') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_8_OutCome_Rep_Img_A_XRay --altered (ORD_...Dflt) --altered (temp table) select a.* - into #Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_A_XRay --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_7_OutCome_Lung_Proc_C_LungSurgery as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_8_OutCome_Rep_Img_A_XRay --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_7_OutCome_Lung_Proc_C_LungSurgery as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from (select PatientSSN,ExamDateTime,img_code_type from #Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET_SSN --altered (ORD_...Dflt) --altered (temp table) + (select * from (select PatientSSN,ExamDateTime,img_code_type from #Lung_1_In_1_All_Chest_XRayCTPET_SSN --altered (ORD_...Dflt) --altered (temp table) where [img_code_type]='XRay' - union select patientssn, img_dt as ExamDateTime,code_type as img_code_type from #Lung_Sta3n528_3_Exc_NonDx_E_PrevProc_AllNonDxProcICD9ICD10Proc_XRay --altered (ORD_...Dflt) --altered (temp table) + union select patientssn, img_dt as ExamDateTime,code_type as img_code_type from #Lung_3_Exc_NonDx_E_PrevProc_AllNonDxProcICD9ICD10Proc_XRay --altered (ORD_...Dflt) --altered (temp table) where code_type='XRAY' ) as b where a.PatientSSN = b.patientSSN and (b.ExamDateTime > a.examDateTime - and b.ExamDateTime<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and b.ExamDateTime<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ,(convert(varchar(10),a.ExamDateTime,120)+cast('23:59:59.997' as datetime)))) and b.[img_code_type]='XRay' ) go -- Red-flagged instances: Exclude patients with follow up chest CT completed - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_B_CT') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_B_CT --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_8_OutCome_Rep_Img_B_CT') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_8_OutCome_Rep_Img_B_CT --altered (ORD_...Dflt) --altered (temp table) select a.* - into #Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_B_CT --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_A_XRay as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_8_OutCome_Rep_Img_B_CT --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_8_OutCome_Rep_Img_A_XRay as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from (select PatientSSN,ExamDateTime,img_code_type from #Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET_SSN --altered (ORD_...Dflt) --altered (temp table) + (select * from (select PatientSSN,ExamDateTime,img_code_type from #Lung_1_In_1_All_Chest_XRayCTPET_SSN --altered (ORD_...Dflt) --altered (temp table) where [img_code_type]='CT' - union select patientssn, img_dt as ExamDateTime,code_type as img_code_type from #Lung_Sta3n528_3_Exc_NonDx_F_PrevProc_AllNonDxProcICD9ICD10Proc_CT --altered (ORD_...Dflt) --altered (temp table) + union select patientssn, img_dt as ExamDateTime,code_type as img_code_type from #Lung_3_Exc_NonDx_F_PrevProc_AllNonDxProcICD9ICD10Proc_CT --altered (ORD_...Dflt) --altered (temp table) where code_type='CT' ) as b where a.PatientSSN = b.patientSSN and (b.ExamDateTime > a.ExamDateTime - and b.ExamDateTime<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and b.ExamDateTime<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ,(convert(varchar(10),a.ExamDateTime,120)+cast('23:59:59.997' as datetime)))) and b.[img_code_type]='CT' ) go -- Red-flagged instances: Exclude patients with follow up chest PET completed - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_C_PET') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_C_PET --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_8_OutCome_Rep_Img_C_PET') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_8_OutCome_Rep_Img_C_PET --altered (ORD_...Dflt) --altered (temp table) select a.* - into #Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_C_PET --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_B_CT as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_8_OutCome_Rep_Img_C_PET --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_8_OutCome_Rep_Img_B_CT as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from (select PatientSSN,ExamDateTime,img_code_type from #Lung_Sta3n528_1_In_1_All_Chest_XRayCTPET_SSN --altered (ORD_...Dflt) --altered (temp table) + (select * from (select PatientSSN,ExamDateTime,img_code_type from #Lung_1_In_1_All_Chest_XRayCTPET_SSN --altered (ORD_...Dflt) --altered (temp table) where [img_code_type]='PET' - union select patientssn, img_dt as ExamDateTime,code_type as img_code_type from #Lung_Sta3n528_3_Exc_NonDx_G_PrevProc_AllNonDxProcICD9ICD10Proc_PET --altered (ORD_...Dflt) --altered (temp table) + union select patientssn, img_dt as ExamDateTime,code_type as img_code_type from #Lung_3_Exc_NonDx_G_PrevProc_AllNonDxProcICD9ICD10Proc_PET --altered (ORD_...Dflt) --altered (temp table) where code_type='PET' ) as b where a.PatientSSN = b.patientSSN and (b.ExamDateTime > a.ExamDateTime - and b.ExamDateTime<= DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and b.ExamDateTime<= DATEADD(dd,(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ,(convert(varchar(10),a.ExamDateTime,120)+cast('23:59:59.997' as datetime)))) and b.[img_code_type]='PET' ) @@ -3824,14 +3824,14 @@ go -- Red-flagged instances: Exclude patients with pulm consult completed - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_D_OutCome_refer_1_pulm_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_D_OutCome_refer_1_pulm_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_D_OutCome_refer_1_pulm_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_D_OutCome_refer_1_pulm_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) select * - into #Lung_Sta3n528_3_Ins_D_OutCome_refer_1_pulm_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_8_OutCome_Rep_Img_C_PET as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_D_OutCome_refer_1_pulm_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_8_OutCome_Rep_Img_C_PET as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #Lung_Sta3n528_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #Lung_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) where ( --With Stopcode b.PrimaryStopCode in (312,104) or b.SecondaryStopCode in (312,104) or b.ConStopCode in (312,104) @@ -3862,24 +3862,24 @@ go and isnull(b.SecondaryStopCodeName,'') not like '%telephone%' and a.patientSSN = b.patientSSN and (coalesce(b.ReferenceDateTime,b.visitdatetime) between (convert(varchar(10),a.ExamDateTime,120)+cast('00:00:00.000' as datetime)) and - DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) , convert(varchar(10),a.ExamDateTime,120)+cast('23:59:59.997' as datetime))) - and (datediff(dd,b.visitDateTime,isnull(b.ReferenceDateTime,b.visitDateTime))<(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - or datediff(dd,isnull(b.ReferenceDateTime,b.visitDateTime),b.visitDateTime)<(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (datediff(dd,b.visitDateTime,isnull(b.ReferenceDateTime,b.visitDateTime))<(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + or datediff(dd,isnull(b.ReferenceDateTime,b.visitDateTime),b.visitDateTime)<(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) )) go -- Red-flagged instances: Exclude patients with THORACIC SURGERY consult completed - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_D_OutCome_refer_3_ThoracicSurgery_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_D_OutCome_refer_3_ThoracicSurgery_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_D_OutCome_refer_3_ThoracicSurgery_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_D_OutCome_refer_3_ThoracicSurgery_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) select * - into #Lung_Sta3n528_3_Ins_D_OutCome_refer_3_ThoracicSurgery_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_D_OutCome_refer_1_pulm_joinByConsultSID as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_D_OutCome_refer_3_ThoracicSurgery_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_D_OutCome_refer_1_pulm_joinByConsultSID as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #Lung_Sta3n528_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #Lung_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) where ( --With Stopcode b.[primaryStopcode] in (413,64) or b.[SecondaryStopcode] in (413,64) or b.ConStopCode in (413,64) @@ -3898,25 +3898,25 @@ go and isnull(b.SecondaryStopCodeName,'') not like '%telephone%' and a.patientSSN = b.patientSSN and (coalesce(b.ReferenceDateTime,b.visitdatetime) between (convert(varchar(10),a.ExamDateTime,120)+cast('00:00:00.000' as datetime)) and - DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) , convert(varchar(10),a.ExamDateTime,120)+cast('23:59:59.997' as datetime))) - and (datediff(dd,b.visitDateTime,isnull(b.ReferenceDateTime,b.visitDateTime))<(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (datediff(dd,b.visitDateTime,isnull(b.ReferenceDateTime,b.visitDateTime))<(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) -- make sure not 2 or 3 years off - or datediff(dd,isnull(b.ReferenceDateTime,b.visitDateTime),b.visitDateTime)<(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + or datediff(dd,isnull(b.ReferenceDateTime,b.visitDateTime),b.visitDateTime)<(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) )) go -- Red-flagged instances: Exclude patients with Tumor Board conference completed - if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_D_OutCome_refer_4_TumorBoard_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_D_OutCome_refer_4_TumorBoard_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_D_OutCome_refer_4_TumorBoard_joinByConsultSID') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_D_OutCome_refer_4_TumorBoard_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) select * - into #Lung_Sta3n528_3_Ins_D_OutCome_refer_4_TumorBoard_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_D_OutCome_refer_3_ThoracicSurgery_joinByConsultSID as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_D_OutCome_refer_4_TumorBoard_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_D_OutCome_refer_3_ThoracicSurgery_joinByConsultSID as a --altered (ORD_...Dflt) --altered (temp table) where not exists - (select * from #Lung_Sta3n528_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) + (select * from #Lung_3_Ins_9_Ex_3_VisitTIUconsult_joinByConsultSID as b --altered (ORD_...Dflt) --altered (temp table) where ( ((b.[primaryStopcode] in (316) or b.[SecondaryStopcode] in (316) or b.ConStopCode in (316)) --oncology --and [tiustandardtitle] like '%Tumor%Board%' @@ -3928,10 +3928,10 @@ go --Tumor, stopcode+title and a.patientSSN = b.patientSSN and (coalesce(b.ReferenceDateTime,b.visitdatetime) between (convert(varchar(10),a.ExamDateTime,120)+cast('00:00:00.000' as datetime)) and - DATEADD(dd,(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + DATEADD(dd,(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) , convert(varchar(10),a.ExamDateTime,120)+cast('23:59:59.997' as datetime))) - and (datediff(dd,b.visitDateTime,isnull(b.ReferenceDateTime,b.visitDateTime))<(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - or datediff(dd,isnull(b.ReferenceDateTime,b.visitDateTime),b.visitDateTime)<(select fu_period from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (datediff(dd,b.visitDateTime,isnull(b.ReferenceDateTime,b.visitDateTime))<(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + or datediff(dd,isnull(b.ReferenceDateTime,b.visitDateTime),b.visitDateTime)<(select fu_period from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) ) ) go @@ -3942,28 +3942,28 @@ go -------------------------------------------------------------------------------------------------------------------------------- -- Trigger Positive instances -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_U_TriggerPos') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_U_TriggerPos') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) select distinct * - into #Lung_Sta3n528_3_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_D_OutCome_refer_4_TumorBoard_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_D_OutCome_refer_4_TumorBoard_joinByConsultSID --altered (ORD_...Dflt) --altered (temp table) go -- First instance in the study period in case of multiple trigger position instances, -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_3_Ins_V_TriggerPos_FirstOfPat_SP') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_3_Ins_V_TriggerPos_FirstOfPat_SP --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_3_Ins_V_TriggerPos_FirstOfPat_SP') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_3_Ins_V_TriggerPos_FirstOfPat_SP --altered (ORD_...Dflt) --altered (temp table) go select * - into #Lung_Sta3n528_3_Ins_V_TriggerPos_FirstOfPat_SP --altered (ORD_...Dflt) --altered (temp table) - from #Lung_Sta3n528_3_Ins_U_TriggerPos as a --altered (ORD_...Dflt) --altered (temp table) + into #Lung_3_Ins_V_TriggerPos_FirstOfPat_SP --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_U_TriggerPos as a --altered (ORD_...Dflt) --altered (temp table) where not exists (select * - from #Lung_Sta3n528_3_Ins_U_TriggerPos as b --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_U_TriggerPos as b --altered (ORD_...Dflt) --altered (temp table) where a.PatientSSN = b.patientSSN and b.ExamDateTime < a.ExamDateTime) - and a.[ExamDateTime] between (select sp_start from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and (select sp_end from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and a.[ExamDateTime] between (select sp_start from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and (select sp_end from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) go @@ -3972,63 +3972,63 @@ go -------------------------------------------------------------------------------------------------------------------------------- -- Numerator and Denumerator -if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_4_01_Count') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) - drop table #Lung_Sta3n528_4_01_Count --altered (ORD_...Dflt) --altered (temp table) +if (OBJECT_ID('tempdb.dbo.#Lung_4_01_Count') is not null) --altered (ORD_...Dflt) --altered (object_id temp table) + drop table #Lung_4_01_Count --altered (ORD_...Dflt) --altered (temp table) go With -- number of Chest XRay/CT performed NumOfTotalChestXRayCT (sta3n,sta6a,[Year],[Month],NumOfTotalChestXRayCT) as (select sta3n,sta6a,datepart(year,ExamDateTime) as [Year],datepart(MONTH,ExamDateTime) as[Month],count(distinct RadiologyExamSID ) as NumOfTotalChestXRayCT - from #Lung_Sta3n528_1_In_2_All_Chest_XRayCT_Sta6a --altered (ORD_...Dflt) --altered (temp table) - where ExamDateTime >=(select sp_start from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and ExamDateTime <=(select sp_end from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #Lung_1_In_2_All_Chest_XRayCT_Sta6a --altered (ORD_...Dflt) --altered (temp table) + where ExamDateTime >=(select sp_start from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and ExamDateTime <=(select sp_end from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,Sta6a,datepart(year,ExamDateTime),datepart(MONTH,ExamDateTime) ) -- number of patients with Chest XRay/CT performed ,NumOfTotalPatWithChestXRayCT (sta3n,sta6a,[Year],[Month],NumOfTotalPatWithChestXRayCT) as (select sta3n,sta6a, datepart(year,ExamDateTime) as [Year],datepart(MONTH,ExamDateTime) as[Month],count(distinct patientssn ) as NumOfTotalPatWithChestXRayCT - from #Lung_Sta3n528_1_In_2_All_Chest_XRayCT_Sta6a --altered (ORD_...Dflt) --altered (temp table) - where ExamDateTime >=(select sp_start from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and ExamDateTime <=(select sp_end from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #Lung_1_In_2_All_Chest_XRayCT_Sta6a --altered (ORD_...Dflt) --altered (temp table) + where ExamDateTime >=(select sp_start from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and ExamDateTime <=(select sp_end from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,Sta6a,datepart(year,ExamDateTime),datepart(MONTH,ExamDateTime) ) -- number of Chest XRay/CT which are red-flageed ,NumOfRedFlaggedChestXRayCT(sta3n,sta6a,[Year],[Month],NumOfRedFlaggedChestXRayCT) as (select sta3n,sta6a,datepart(year,ExamDateTime) as [Year],datepart(MONTH,ExamDateTime) as[Month],count(distinct RadiologyExamSID ) as NumOfRedFlaggedChestXRayCT - from #Lung_Sta3n528_1_In_3_RedFlagXRayCT --altered (ORD_...Dflt) --altered (temp table) - where ExamDateTime >=(select sp_start from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and ExamDateTime <=(select sp_end from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #Lung_1_In_3_RedFlagXRayCT --altered (ORD_...Dflt) --altered (temp table) + where ExamDateTime >=(select sp_start from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and ExamDateTime <=(select sp_end from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,sta6a,datepart(year,ExamDateTime),datepart(MONTH,ExamDateTime) ) -- number of patients with red-flagged Chest XRay/CT ,NumOfPatWithRedFlaggedChestXRayCT(sta3n,sta6a,[Year],[Month],NumOfPatWithRedFlaggedChestXRayCT) as (select sta3n,sta6a,datepart(year,ExamDateTime) as [Year],datepart(MONTH,ExamDateTime) as[Month],count(distinct patientssn ) as NumOfPatWithRedFlaggedChestXRayCT - from #Lung_Sta3n528_1_In_3_RedFlagXRayCT --altered (ORD_...Dflt) --altered (temp table) - where ExamDateTime >=(select sp_start from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and ExamDateTime <=(select sp_end from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #Lung_1_In_3_RedFlagXRayCT --altered (ORD_...Dflt) --altered (temp table) + where ExamDateTime >=(select sp_start from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and ExamDateTime <=(select sp_end from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,sta6a,datepart(year,ExamDateTime),datepart(MONTH,ExamDateTime) ) -- number of Chest XRay/CT which come out trigger positive ,NumOfTriggerPosChestXRayCT(sta3n,sta6a,[Year],[Month],NumOfTriggerPosChestXRayCT) as (select sta3n,sta6a,datepart(year,ExamDateTime) as [Year],datepart(MONTH,ExamDateTime) as[Month],count(distinct RadiologyExamSID ) as NumOfTriggerPosChestXRayCT - from #Lung_Sta3n528_3_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) - where ExamDateTime >=(select sp_start from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and ExamDateTime <=(select sp_end from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) + where ExamDateTime >=(select sp_start from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and ExamDateTime <=(select sp_end from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,sta6a,datepart(year,ExamDateTime),datepart(MONTH,ExamDateTime) ) -- number of patients with trigger positive Chest XRay/CT ,NumOfTriggerPosPat(sta3n,sta6a,[Year],[Month],NumOfTriggerPosPat) as (select sta3n,sta6a,datepart(year,ExamDateTime) as [Year],datepart(MONTH,ExamDateTime) as[Month],count(distinct patientssn ) as NumOfTriggerPosPat - from #Lung_Sta3n528_3_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) - where ExamDateTime >=(select sp_start from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) - and ExamDateTime <=(select sp_end from #Lung_Sta3n528_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + from #Lung_3_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) + where ExamDateTime >=(select sp_start from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) + and ExamDateTime <=(select sp_end from #Lung_0_1_inputP) --altered (ORD_...Dflt) --altered (temp table) group by sta3n,sta6a,datepart(year,ExamDateTime),datepart(MONTH,ExamDateTime) ) select - (select run_dt from #Lung_Sta3n528_0_1_inputP) as run_dt --altered (ORD_...Dflt) --altered (temp table) - ,(select sp_start from #Lung_Sta3n528_0_1_inputP) as sp_start --altered (ORD_...Dflt) --altered (temp table) - ,(select sp_end from #Lung_Sta3n528_0_1_inputP) as sp_end --altered (ORD_...Dflt) --altered (temp table) + (select run_dt from #Lung_0_1_inputP) as run_dt --altered (ORD_...Dflt) --altered (temp table) + ,(select sp_start from #Lung_0_1_inputP) as sp_start --altered (ORD_...Dflt) --altered (temp table) + ,(select sp_end from #Lung_0_1_inputP) as sp_end --altered (ORD_...Dflt) --altered (temp table) ,a.sta3n,a.sta6a,a.[Year],a.[month] ,isnull(NumOfTotalChestXRayCT,0) as NumOfTotalChestXRayCT ,isnull(NumOfTotalPatWithChestXRayCT,0) as NumOfTotalPatWithChestXRayCT @@ -4036,7 +4036,7 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_4_01_Count') is not null) --altered ,isnull(NumOfPatWithRedFlaggedChestXRayCT,0) as NumOfPatWithRedFlaggedChestXRayCT ,isnull(NumOfTriggerPosChestXRayCT,0) as NumOfTriggerPosChestXRayCT ,isnull(NumOfTriggerPosPat,0) as NumOfTriggerPosPat - into #Lung_Sta3n528_4_01_Count --altered (ORD_...Dflt) --altered (temp table) + into #Lung_4_01_Count --altered (ORD_...Dflt) --altered (temp table) from NumOfTotalChestXRayCT as a left join NumOfTotalPatWithChestXRayCT as b on a.sta3n=b.sta3n and a.sta6a=b.sta6a and a.[year]=b.[year] and a.[Month]=b.[Month] @@ -4051,12 +4051,12 @@ if (OBJECT_ID('tempdb.dbo.#Lung_Sta3n528_4_01_Count') is not null) --altered go -select * from #Lung_Sta3n528_4_01_Count --altered (ORD_...Dflt) --altered (temp table) +select * from #Lung_4_01_Count --altered (ORD_...Dflt) --altered (temp table) order by sta3n,sta6a,[year],[month] ---- data set: Chest XRay/CT performed ---select * from #Lung_Sta3n528_1_In_2_All_Chest_XRayCT_Sta6a --altered (ORD_...Dflt) --altered (temp table) +--select * from #Lung_1_In_2_All_Chest_XRayCT_Sta6a --altered (ORD_...Dflt) --altered (temp table) ---- data set: Chest XRay/CT which are red-flaged ---select * from #Lung_Sta3n528_1_In_3_RedFlagXRayCT --altered (ORD_...Dflt) --altered (temp table) +--select * from #Lung_1_In_3_RedFlagXRayCT --altered (ORD_...Dflt) --altered (temp table) ---- data set: Chest XRay/CT which come out trigger positive ---select * from #Lung_Sta3n528_3_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table) +--select * from #Lung_3_Ins_U_TriggerPos --altered (ORD_...Dflt) --altered (temp table)