Produced by Araxis Merge on 1/31/2018 9:02:24 AM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | NVCC_2.2_01162018.zip\NVCC\SQL | usp_SSNToSID.sql | Thu Oct 19 16:37:26 2017 UTC |
| 2 | NVCC_2.2_01162018.zip\NVCC\SQL | usp_SSNToSID.sql | Wed Jan 31 13:44:11 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 244 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | USE [NWIC_ PanelMgmt] | |
| 2 | GO | |
| 3 | /****** Ob ject: Sto redProcedu re [PanelM gmt].[usp_ SSNToSID] Script Date: 3/10 /2016 3:02 :17 PM *** ***/ | |
| 4 | SET ANSI_N ULLS ON | |
| 5 | GO | |
| 6 | SET QUOTED _IDENTIFIE R ON | |
| 7 | GO | |
| 8 | ||
| 9 | ALTER PROC EDURE [Pan elMgmt].[u sp_SSNToSI D] | |
| 10 | AS | |
| 11 | --======== ========== ========== ========== ========== ========== ========== ========== ==== | |
| 12 | --Requesto r : Non Va Coordin ated Care Project, b ut produce s a great | |
| 13 | -- gene ral use ta ble for an y applicat ion. | |
| 14 | --Author : Jerr y Kohler - Northwest Innovatio n Center | |
| 15 | --Object/S P Name : usp_ SSNToSID | |
| 16 | --Server : SERVER | |
| 17 | --Data Bas e : NWIC _PanelMgmt | |
| 18 | --Schema : Pane lMgmt | |
| 19 | --Report : N/A | |
| 20 | --Folder : N/A | |
| 21 | --Report L oc : N/A | |
| 22 | --Job : None | |
| 23 | --Job Loc : None | |
| 24 | --Note : | |
| 25 | --Date Cre ated : 03-1 0-2016 | |
| 26 | -- | |
| 27 | -- | |
| 28 | --Last Cha nged : 04-0 5-2016 | |
| 29 | --Last Cha nged By : Jerry Kohler - N WIC | |
| 30 | --Reason F or Change : Add te st patient data. | |
| 31 | -- | |
| 32 | --Purpose : To c reate a ta ble to tra nslate bet ween sever al types o f | |
| 33 | -- pati ent identi fication: | |
| 34 | -- - SSN | |
| 35 | -- - SID | |
| 36 | -- - ICN | |
| 37 | -- - Name (las t,first) | |
| 38 | -- - CPRSKey ( first char acter of l ast name, comma, las t4) | |
| 39 | --======== ========== ========== ========== ========== ========== ========== ========== ==== | |
| 40 | ||
| 41 | BEGIN | |
| 42 | ||
| 43 | IF (SE LECT OBJEC T_ID('App. SSNToSID') ) IS NOT N ULL | |
| 44 | DROP T ABLE App.S SNToSID | |
| 45 | ||
| 46 | Create table App .SSNToSID | |
| 47 | ( | |
| 48 | [S ta3n] [sma llint] NOT NULL, | |
| 49 | [P atientSSN] [varchar] (50) NULL, | |
| 50 | [P atientSID] [int] NUL L, | |
| 51 | [P atientICN] [varchar] (55) NULL, | |
| 52 | [P atientName ] [varchar ](100) NUL L, | |
| 53 | [C PRSKey] [v archar](10 ) NULL | |
| 54 | ) O N [DefFG] with (DATA _COMPRESSI ON = PAGE) | |
| 55 | ||
| 56 | ||
| 57 | Insert into App. SSNToSID([ Sta3n] | |
| 58 | ,[ PatientSSN ] | |
| 59 | ,[ PatientSID ] | |
| 60 | ,[ PatientICN ] | |
| 61 | ,[ PatientNam e] | |
| 62 | ,[ CPRSKey]) | |
| 63 | ( | |
| 64 | selec t [Sta3n] | |
| 65 | ,[Patient SSN] | |
| 66 | ,[Patient SID] | |
| 67 | ,[Patient ICN] | |
| 68 | ,[Patient Name] | |
| 69 | ,LEFT([Pa tientLastN ame], 1) + ',' + RIG HT([Patien tSSN], 4) AS [CPRSKe y] | |
| 70 | from CDWWork.SP atient.SPa tient | |
| 71 | where [PatientS SN] Not In ('*Missin g*', '*Unk nown at th is time*') | |
| 72 | and (Deceased = 'N' OR DateOfDeat h is NULL) | |
| 73 | and (TestPati entFlag = 'N' OR Tes tPatientFl ag is NULL ) | |
| 74 | and PatientSS N Not Like '0000%' | |
| 75 | and PatientLa stName Not Like 'ZZ% ' | |
| 76 | ) | |
| 77 | ||
| 78 | -- Ins ert any te st patient s you may want to in clude here . | |
| 79 | -- CPRS-L ike | |
| 80 | -- Sta3 n SSN SID ICN Name Search Key | |
| 81 | Insert into App. SSNToSID v alues (648 , '0000001 59', 17502 250, '101 1547954', 'ZZTEST,CA RRIE', 'Z,01 59') | |
| 82 | Insert into App. SSNToSID v alues (648 , '0000004 97', 17530 694, '101 2220080', 'ZZTEST,AN NA', 'Z,04 97') | |
| 83 | Insert into App. SSNToSID v alues (648 , '0000001 53', 17559 856, '101 1542528', 'ZZTEST,AN DY', 'Z,01 53') | |
| 84 | Insert into App. SSNToSID v alues (648 , '0000000 11', 17609 955, '101 1546137', 'ZZTEST,GI SELA AMAND A', 'Z,00 11') | |
| 85 | Insert into App. SSNToSID v alues (648 , '0000022 22', 17631 146, '101 2396218', 'ZZTEST,CA ROL', 'Z,22 22') | |
| 86 | Insert into App. SSNToSID v alues (648 , '0000019 87', 17633 012, '101 2494561', 'ZZTEST,BL AKE', 'Z,19 87') | |
| 87 | Insert into App. SSNToSID v alues (648 , '0000001 60', 17665 704, '101 1564667', 'ZZTEST,CA THY', 'Z,01 60') | |
| 88 | Insert into App. SSNToSID v alues (648 , '0000012 13', 26032 119, '101 5788783', 'ZZTEST,BE TTY A III' , 'Z,12 13') | |
| 89 | Insert into App. SSNToSID v alues (648 , '0000065 15', 80005 7847, '101 6052270', 'ZZTEST,MI NDY ROSE', 'Z,65 15') | |
| 90 | Insert into App. SSNToSID v alues (648 , '0000000 14', 80015 9161, '101 6424386', 'ZZTEST,CE NDY', 'Z,00 14') | |
| 91 | Insert into App. SSNToSID v alues (648 , '0000023 89', 80035 9466, '101 7060395', 'ZZTEST,HE RBERT SAMU EL', 'Z,23 89') | |
| 92 | ||
| 93 | ||
| 94 | Create clustered index SSN ToSID_Sta3 n_PatientS SN | |
| 95 | on App .SSNToSID (Sta3n, Pa tientSSN) | |
| 96 | with ( SORT_IN_TE MPDB = ON, DATA_COMP RESSION = PAGE) | |
| 97 | on [De fFG] | |
| 98 | ||
| 99 | ||
| 100 | Create noncluste red index SSNToSID_P atientICN on App.SSN ToSID (Pat ientICN) | |
| 101 | includ e (Patient SID, Patie ntSSN, Sta 3n) | |
| 102 | with ( SORT_IN_TE MPDB = ON, DATA_COMP RESSION = PAGE) | |
| 103 | on [De fFG] | |
| 104 | ||
| 105 | ||
| 106 | Create noncluste red index SSNToSID_P atientSID on App.SSN ToSID (Pat ientSID) | |
| 107 | includ e (Patient ICN) | |
| 108 | with ( SORT_IN_TE MPDB = ON, DATA_COMP RESSION = PAGE) | |
| 109 | on [De fFG] | |
| 110 | ||
| 111 | ||
| 112 | Create noncluste red index SSNToSID_P atientName on App.SS NToSID (Pa tientName) | |
| 113 | includ e (Patient ICN, Patie ntSID, Pat ientSSN, S ta3n) | |
| 114 | with ( SORT_IN_TE MPDB = ON, DATA_COMP RESSION = PAGE) | |
| 115 | on [De fFG] | |
| 116 | ||
| 117 | ||
| 118 | Create noncluste red index SSNToSID_C PRSKey on App.SSNToS ID (CPRSKe y) | |
| 119 | includ e (Patient ICN, Patie ntSID, Pat ientSSN, S ta3n) | |
| 120 | with ( SORT_IN_TE MPDB = ON, DATA_COMP RESSION = PAGE) | |
| 121 | on [De fFG] | |
| 122 | ||
| 123 | END |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.