4. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 1/31/2018 9:02:09 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.

4.1 Files compared

# Location File Last Modified
1 NVCC_2.2_01162018.zip\NVCC\Database\obj\Debug Model.xml Fri Jan 12 14:55:52 2018 UTC
2 NVCC_2.2_01162018.zip\NVCC\Database\obj\Debug Model.xml Mon Jan 29 17:23:46 2018 UTC

4.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 8 66708
Changed 7 18
Inserted 0 0
Removed 0 0

4.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

4.4 Active regular expressions

No regular expressions were active.

4.5 Comparison detail

  1   <?xml 
  2     version="1 .0" 
  3     encoding=" utf-8"
  4   ?>
  5   <DataSchem aModel 
  6     FileFormat Version="1 .2" 
  7     SchemaVers ion="2.4" 
  8     DspName="M icrosoft.D ata.Tools. Schema.Sql .Sql120Dat abaseSchem aProvider"  
  9     CollationL cid="1033"  
  10     CollationC aseSensiti ve="False"  
  11     xmlns="htt p://schema s.microsof t.com/sqls erver/dac/ Serializat ion/2012/0 2"
  12   >
  13             
  14     <Header>
  15                       
  16      <CustomDat
  17       Category=" AnsiNulls"
  18      >
  19                                 
  20       <Metadata 
  21        Name="Ansi Nulls" 
  22        Value="Tru e" 
  23       />
  24                        
  25      </CustomDa ta>
  26                       
  27      <CustomDat
  28       Category=" QuotedIden tifier"
  29      >
  30                                 
  31       <Metadata 
  32        Name="Quot edIdentifi er" 
  33        Value="Tru e" 
  34       />
  35                        
  36      </CustomDa ta>
  37                       
  38      <CustomDat
  39       Category=" Compatibil ityMode"
  40      >
  41                                 
  42       <Metadata 
  43        Name="Comp atibilityM ode" 
  44        Value="120
  45       />
  46                        
  47      </CustomDa ta>
  48                       
  49      <CustomDat
  50       Category=" Reference"  
  51       Type="SqlS chema"
  52      >
  53                                 
  54       <Metadata 
  55        Name="File Name" 
  56        Value="C:\ DEVELOPMEN T\REFDOC\N VCC\DATABA SE\CDWWORK .DACPAC" 
  57       />
  58                                 
  59       <Metadata 
  60        Name="Logi calName" 
  61        Value="CDW Work.dacpa c" 
  62       />
  63                                 
  64       <Metadata 
  65        Name="Exte rnalParts"  
  66        Value="[CD WWork]" 
  67       />
  68                                 
  69       <Metadata 
  70        Name="Supp ressMissin gDependenc iesErrors"  
  71        Value="Fal se" 
  72       />
  73                        
  74      </CustomDa ta>
  75                       
  76      <CustomDat
  77       Category=" Reference"  
  78       Type="SqlS chema"
  79      >
  80                                 
  81       <Metadata 
  82        Name="File Name" 
  83        Value="C:\ DEVELOPMEN T\REFDOC\N VCC\DATABA SE\SPV.DAC PAC" 
  84       />
  85                                 
  86       <Metadata 
  87        Name="Logi calName" 
  88        Value="SPV .dacpac" 
  89       />
  90                                 
  91       <Metadata 
  92        Name="Exte rnalParts"  
  93        Value="[SP V]" 
  94       />
  95                                 
  96       <Metadata 
  97        Name="Supp ressMissin gDependenc iesErrors"  
  98        Value="Fal se" 
  99       />
  100                        
  101      </CustomDa ta>
  102                       
  103      <CustomDat
  104       Category=" Reference"  
  105       Type="Asse mbly"
  106      >
  107                                 
  108       <Metadata 
  109        Name="Logi calName" 
  110        Value="Dat abase.dll"  
  111       />
  112                                 
  113       <Metadata 
  114        Name="File Name" 
  115        Value="C:\ DEVELOPMEN T\REFDOC\N VCC\DATABA SE\OBJ\DEB UG\DATABAS E.DLL" 
  116       />
  117                                 
  118       <Metadata 
  119        Name="Asse mblyName" 
  120        Value="Dat abase" 
  121       />
  122                                 
  123       <Metadata 
  124        Name="Perm issionSet"  
  125        Value="SAF E" 
  126       />
  127                                 
  128       <Metadata 
  129        Name="Owne r" 
  130        Value="" 
  131       />
  132                                 
  133       <Metadata 
  134        Name="Gene rateSqlClr Ddl" 
  135        Value="Tru e" 
  136       />
  137                                 
  138       <Metadata 
  139        Name="IsVi sible" 
  140        Value="Tru e" 
  141       />
  142                                 
  143       <Metadata 
  144        Name="IsMo delAware" 
  145        Value="Tru e" 
  146       />
  147                                 
  148       <Metadata 
  149        Name="Skip CreationIf Empty" 
  150        Value="Tru e" 
  151       />
  152                                 
  153       <Metadata 
  154        Name="Asse mblySymbol sName" 
  155        Value="C:\ Developmen t\REFDOC\N VCC\Databa se\obj\Deb ug\Databas e.pdb" 
  156       />
  157                        
  158      </CustomDa ta>
  159                       
  160      <CustomDat
  161       Category=" SqlCmdVari ables" 
  162       Type="SqlC mdVariable
  163      />
  164              
  165     </Header>
  166             
  167     <Model>
  168                       
  169      <Element 
  170       Type="SqlD atabaseOpt ions"
  171      >
  172                                 
  173       <Property 
  174        Name="Coll ation" 
  175        Value="SQL _Latin1_Ge neral_CP1_ CI_AS" 
  176       />
  177                                 
  178       <Property 
  179        Name="IsAn siNullDefa ultOn" 
  180        Value="Tru e" 
  181       />
  182                                 
  183       <Property 
  184        Name="IsAn siNullsOn"  
  185        Value="Tru e" 
  186       />
  187                                 
  188       <Property 
  189        Name="IsAn siWarnings On" 
  190        Value="Tru e" 
  191       />
  192                                 
  193       <Property 
  194        Name="IsAr ithAbortOn
  195        Value="Tru e" 
  196       />
  197                                 
  198       <Property 
  199        Name="IsCo ncatNullYi eldsNullOn
  200        Value="Tru e" 
  201       />
  202                                 
  203       <Property 
  204        Name="IsTo rnPageProt ectionOn" 
  205        Value="Fal se" 
  206       />
  207                                 
  208       <Property 
  209        Name="IsFu llTextEnab led" 
  210        Value="Tru e" 
  211       />
  212                                 
  213       <Property 
  214        Name="Page VerifyMode
  215        Value="3" 
  216       />
  217                                 
  218       <Property 
  219        Name="Defa ultLanguag e" 
  220        Value="" 
  221       />
  222                                 
  223       <Property 
  224        Name="Defa ultFullTex tLanguage"  
  225        Value="" 
  226       />
  227                                 
  228       <Relations hip 
  229        Name="Defa ultFilegro up"
  230       >
  231                                           
  232        <Entry>
  233                                                    
  234         <Reference
  235          Name="[Def FG]" 
  236         />
  237                                            
  238        </Entry>
  239                                  
  240       </Relation ship>
  241                        
  242      </Element>
  243                       
  244      <Element 
  245       Type="SqlD efaultCons traint"
  246      >
  247                                 
  248       <Property 
  249        Name="Defa ultExpress ionScript"
  250       >
  251                                           
  252        <Value>
  253         <![CDATA[0 ]]>
  254        </Value>
  255                                  
  256       </Property >
  257                                 
  258       <Relations hip 
  259        Name="Defi ningTable"
  260       >
  261                                           
  262        <Entry>
  263                                                    
  264         <Reference
  265          Name="[App ].[NVCC_Us ersV2]" 
  266         />
  267                                            
  268        </Entry>
  269                                  
  270       </Relation ship>
  271                                 
  272       <Relations hip 
  273        Name="ForC olumn"
  274       >
  275                                           
  276        <Entry>
  277                                                    
  278         <Reference
  279          Name="[App ].[NVCC_Us ersV2].[Ca nAnnounce]
  280         />
  281                                            
  282        </Entry>
  283                                  
  284       </Relation ship>
  285                                 
  286       <Annotatio
  287        Type="SqlI nlineConst raintAnnot ation" 
  288        Disambigua tor="4" 
  289       />
  290                        
  291      </Element>
  292                       
  293      <Element 
  294       Type="SqlD efaultCons traint"
  295      >
  296                                 
  297       <Property 
  298        Name="Defa ultExpress ionScript"
  299       >
  300                                           
  301        <Value>
  302         <![CDATA[0 ]]>
  303        </Value>
  304                                  
  305       </Property >
  306                                 
  307       <Relations hip 
  308        Name="Defi ningTable"
  309       >
  310                                           
  311        <Entry>
  312                                                    
  313         <Reference
  314          Name="[App ].[NVCC_Us ersV2]" 
  315         />
  316                                            
  317        </Entry>
  318                                  
  319       </Relation ship>
  320                                 
  321       <Relations hip 
  322        Name="ForC olumn"
  323       >
  324                                           
  325        <Entry>
  326                                                    
  327         <Reference
  328          Name="[App ].[NVCC_Us ersV2].[Ca nReport]" 
  329         />
  330                                            
  331        </Entry>
  332                                  
  333       </Relation ship>
  334                                 
  335       <Annotatio
  336        Type="SqlI nlineConst raintAnnot ation" 
  337        Disambigua tor="5" 
  338       />
  339                        
  340      </Element>
  341                       
  342      <Element 
  343       Type="SqlD efaultCons traint"
  344      >
  345                                 
  346       <Property 
  347        Name="Defa ultExpress ionScript"
  348       >
  349                                           
  350        <Value>
  351         <![CDATA[0 ]]>
  352        </Value>
  353                                  
  354       </Property >
  355                                 
  356       <Relations hip 
  357        Name="Defi ningTable"
  358       >
  359                                           
  360        <Entry>
  361                                                    
  362         <Reference
  363          Name="[App ].[NVCC_Us erFaciliti es]" 
  364         />
  365                                            
  366        </Entry>
  367                                  
  368       </Relation ship>
  369                                 
  370       <Relations hip 
  371        Name="ForC olumn"
  372       >
  373                                           
  374        <Entry>
  375                                                    
  376         <Reference
  377          Name="[App ].[NVCC_Us erFaciliti es].[admin ]" 
  378         />
  379                                            
  380        </Entry>
  381                                  
  382       </Relation ship>
  383                                 
  384       <Annotatio
  385        Type="SqlI nlineConst raintAnnot ation" 
  386        Disambigua tor="6" 
  387       />
  388                        
  389      </Element>
  390                       
  391      <Element 
  392       Type="SqlP rimaryKeyC onstraint"
  393      >
  394                                 
  395       <Relations hip 
  396        Name="Colu mnSpecific ations"
  397       >
  398                                           
  399        <Entry>
  400                                                    
  401         <Element 
  402          Type="SqlI ndexedColu mnSpecific ation"
  403         >
  404                                                              
  405          <Relations hip 
  406           Name="Colu mn"
  407          >
  408                                                                        
  409           <Entry>
  410                                                                                  
  411            <Reference
  412             Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  413            />
  414                                                                         
  415           </Entry>
  416                                                               
  417          </Relation ship>
  418                                                     
  419         </Element>
  420                                            
  421        </Entry>
  422                                  
  423       </Relation ship>
  424                                 
  425       <Relations hip 
  426        Name="Defi ningTable"
  427       >
  428                                           
  429        <Entry>
  430                                                    
  431         <Reference
  432          Name="[App ].[udf_All PatientsSI Ds]" 
  433         />
  434                                            
  435        </Entry>
  436                                  
  437       </Relation ship>
  438                                 
  439       <Annotatio
  440        Type="SqlI nlineConst raintAnnot ation" 
  441        Disambigua tor="7" 
  442       />
  443                        
  444      </Element>
  445                       
  446      <Element 
  447       Type="SqlP rimaryKeyC onstraint"
  448      >
  449                                 
  450       <Relations hip 
  451        Name="Colu mnSpecific ations"
  452       >
  453                                           
  454        <Entry>
  455                                                    
  456         <Element 
  457          Type="SqlI ndexedColu mnSpecific ation"
  458         >
  459                                                              
  460          <Relations hip 
  461           Name="Colu mn"
  462          >
  463                                                                        
  464           <Entry>
  465                                                                                  
  466            <Reference
  467             Name="[App ].[NVCC_Us ersV2].[Us erId]" 
  468            />
  469                                                                         
  470           </Entry>
  471                                                               
  472          </Relation ship>
  473                                                     
  474         </Element>
  475                                            
  476        </Entry>
  477                                  
  478       </Relation ship>
  479                                 
  480       <Relations hip 
  481        Name="Defi ningTable"
  482       >
  483                                           
  484        <Entry>
  485                                                    
  486         <Reference
  487          Name="[App ].[NVCC_Us ersV2]" 
  488         />
  489                                            
  490        </Entry>
  491                                  
  492       </Relation ship>
  493                                 
  494       <Annotatio
  495        Type="SqlI nlineConst raintAnnot ation" 
  496        Disambigua tor="8" 
  497       />
  498                        
  499      </Element>
  500                       
  501      <Element 
  502       Type="SqlP rimaryKeyC onstraint"
  503      >
  504                                 
  505       <Property 
  506        Name="IsCl ustered" 
  507        Value="Fal se" 
  508       />
  509                                 
  510       <Relations hip 
  511        Name="Colu mnSpecific ations"
  512       >
  513                                           
  514        <Entry>
  515                                                    
  516         <Element 
  517          Type="SqlI ndexedColu mnSpecific ation"
  518         >
  519                                                              
  520          <Relations hip 
  521           Name="Colu mn"
  522          >
  523                                                                        
  524           <Entry>
  525                                                                                  
  526            <Reference
  527             Name="[App ].[NVCC_Us erFaciliti es].[UserF acilityId]
  528            />
  529                                                                         
  530           </Entry>
  531                                                               
  532          </Relation ship>
  533                                                     
  534         </Element>
  535                                            
  536        </Entry>
  537                                  
  538       </Relation ship>
  539                                 
  540       <Relations hip 
  541        Name="Defi ningTable"
  542       >
  543                                           
  544        <Entry>
  545                                                    
  546         <Reference
  547          Name="[App ].[NVCC_Us erFaciliti es]" 
  548         />
  549                                            
  550        </Entry>
  551                                  
  552       </Relation ship>
  553                                 
  554       <Annotatio
  555        Type="SqlI nlineConst raintAnnot ation" 
  556        Disambigua tor="9" 
  557       />
  558                        
  559      </Element>
  560                       
  561      <Element 
  562       Type="SqlS chema" 
  563       Name="[App ]"
  564      >
  565                                 
  566       <Relations hip 
  567        Name="Auth orizer"
  568       >
  569                                           
  570        <Entry>
  571                                                    
  572         <Reference
  573          Name="[uCC _REFDOC]" 
  574         />
  575                                            
  576        </Entry>
  577                                  
  578       </Relation ship>
  579                        
  580      </Element>
  581                       
  582      <Element 
  583       Type="SqlT able" 
  584       Name="[App ].[AllCDWP atients]"
  585      >
  586                                 
  587       <Property 
  588        Name="IsAn siNullsOn"  
  589        Value="Tru e" 
  590       />
  591                                 
  592       <Relations hip 
  593        Name="Colu mns"
  594       >
  595                                           
  596        <Entry>
  597                                                    
  598         <Element 
  599          Type="SqlS impleColum n" 
  600          Name="[App ].[AllCDWP atients].[ Sta3n]"
  601         >
  602                                                              
  603          <Property 
  604           Name="IsNu llable" 
  605           Value="Fal se" 
  606          />
  607                                                              
  608          <Relations hip 
  609           Name="Type Specifier"
  610          >
  611                                                                        
  612           <Entry>
  613                                                                                  
  614            <Element 
  615             Type="SqlT ypeSpecifi er"
  616            >
  617                                                                                            
  618             <Relations hip 
  619              Name="Type "
  620             >
  621                                                                                                     
  622              <Entry>
  623                                                                                                               
  624               <Reference
  625                ExternalSo urce="Buil tIns" 
  626                Name="[sma llint]" 
  627               />
  628                                                                                                      
  629              </Entry>
  630                                                                                             
  631             </Relation ship>
  632                                                                                   
  633            </Element>
  634                                                                         
  635           </Entry>
  636                                                               
  637          </Relation ship>
  638                                                     
  639         </Element>
  640                                            
  641        </Entry>
  642                                           
  643        <Entry>
  644                                                    
  645         <Element 
  646          Type="SqlS impleColum n" 
  647          Name="[App ].[AllCDWP atients].[ PatientIEN ]"
  648         >
  649                                                              
  650          <Relations hip 
  651           Name="Type Specifier"
  652          >
  653                                                                        
  654           <Entry>
  655                                                                                  
  656            <Element 
  657             Type="SqlT ypeSpecifi er"
  658            >
  659                                                                                            
  660             <Property 
  661              Name="Leng th" 
  662              Value="50"  
  663             />
  664                                                                                            
  665             <Relations hip 
  666              Name="Type "
  667             >
  668                                                                                                     
  669              <Entry>
  670                                                                                                               
  671               <Reference
  672                ExternalSo urce="Buil tIns" 
  673                Name="[var char]" 
  674               />
  675                                                                                                      
  676              </Entry>
  677                                                                                             
  678             </Relation ship>
  679                                                                                   
  680            </Element>
  681                                                                         
  682           </Entry>
  683                                                               
  684          </Relation ship>
  685                                                     
  686         </Element>
  687                                            
  688        </Entry>
  689                                           
  690        <Entry>
  691                                                    
  692         <Element 
  693          Type="SqlS impleColum n" 
  694          Name="[App ].[AllCDWP atients].[ PatientSSN ]"
  695         >
  696                                                              
  697          <Relations hip 
  698           Name="Type Specifier"
  699          >
  700                                                                        
  701           <Entry>
  702                                                                                  
  703            <Element 
  704             Type="SqlT ypeSpecifi er"
  705            >
  706                                                                                            
  707             <Property 
  708              Name="Leng th" 
  709              Value="50"  
  710             />
  711                                                                                            
  712             <Relations hip 
  713              Name="Type "
  714             >
  715                                                                                                     
  716              <Entry>
  717                                                                                                               
  718               <Reference
  719                ExternalSo urce="Buil tIns" 
  720                Name="[var char]" 
  721               />
  722                                                                                                      
  723              </Entry>
  724                                                                                             
  725             </Relation ship>
  726                                                                                   
  727            </Element>
  728                                                                         
  729           </Entry>
  730                                                               
  731          </Relation ship>
  732                                                     
  733         </Element>
  734                                            
  735        </Entry>
  736                                           
  737        <Entry>
  738                                                    
  739         <Element 
  740          Type="SqlS impleColum n" 
  741          Name="[App ].[AllCDWP atients].[ PatientSID ]"
  742         >
  743                                                              
  744          <Property 
  745           Name="IsNu llable" 
  746           Value="Fal se" 
  747          />
  748                                                              
  749          <Relations hip 
  750           Name="Type Specifier"
  751          >
  752                                                                        
  753           <Entry>
  754                                                                                  
  755            <Element 
  756             Type="SqlT ypeSpecifi er"
  757            >
  758                                                                                            
  759             <Relations hip 
  760              Name="Type "
  761             >
  762                                                                                                     
  763              <Entry>
  764                                                                                                               
  765               <Reference
  766                ExternalSo urce="Buil tIns" 
  767                Name="[int ]" 
  768               />
  769                                                                                                      
  770              </Entry>
  771                                                                                             
  772             </Relation ship>
  773                                                                                   
  774            </Element>
  775                                                                         
  776           </Entry>
  777                                                               
  778          </Relation ship>
  779                                                     
  780         </Element>
  781                                            
  782        </Entry>
  783                                           
  784        <Entry>
  785                                                    
  786         <Element 
  787          Type="SqlS impleColum n" 
  788          Name="[App ].[AllCDWP atients].[ PatientICN ]"
  789         >
  790                                                              
  791          <Relations hip 
  792           Name="Type Specifier"
  793          >
  794                                                                        
  795           <Entry>
  796                                                                                  
  797            <Element 
  798             Type="SqlT ypeSpecifi er"
  799            >
  800                                                                                            
  801             <Property 
  802              Name="Leng th" 
  803              Value="50"  
  804             />
  805                                                                                            
  806             <Relations hip 
  807              Name="Type "
  808             >
  809                                                                                                     
  810              <Entry>
  811                                                                                                               
  812               <Reference
  813                ExternalSo urce="Buil tIns" 
  814                Name="[var char]" 
  815               />
  816                                                                                                      
  817              </Entry>
  818                                                                                             
  819             </Relation ship>
  820                                                                                   
  821            </Element>
  822                                                                         
  823           </Entry>
  824                                                               
  825          </Relation ship>
  826                                                     
  827         </Element>
  828                                            
  829        </Entry>
  830                                  
  831       </Relation ship>
  832                                 
  833       <Relations hip 
  834        Name="Sche ma"
  835       >
  836                                           
  837        <Entry>
  838                                                    
  839         <Reference
  840          Name="[App ]" 
  841         />
  842                                            
  843        </Entry>
  844                                  
  845       </Relation ship>
  846                        
  847      </Element>
  848                       
  849      <Element 
  850       Type="SqlI ndex" 
  851       Name="[App ].[AllCDWP atients].[ AllCDWPati ents_Patie ntICN]"
  852      >
  853                                 
  854       <Relations hip 
  855        Name="Colu mnSpecific ations"
  856       >
  857                                           
  858        <Entry>
  859                                                    
  860         <Element 
  861          Type="SqlI ndexedColu mnSpecific ation"
  862         >
  863                                                              
  864          <Relations hip 
  865           Name="Colu mn"
  866          >
  867                                                                        
  868           <Entry>
  869                                                                                  
  870            <Reference
  871             Name="[App ].[AllCDWP atients].[ PatientICN ]" 
  872            />
  873                                                                         
  874           </Entry>
  875                                                               
  876          </Relation ship>
  877                                                     
  878         </Element>
  879                                            
  880        </Entry>
  881                                  
  882       </Relation ship>
  883                                 
  884       <Relations hip 
  885        Name="Data Compressio nOptions"
  886       >
  887                                           
  888        <Entry>
  889                                                    
  890         <Element 
  891          Type="SqlD ataCompres sionOption "
  892         >
  893                                                              
  894          <Property 
  895           Name="Comp ressionLev el" 
  896           Value="2" 
  897          />
  898                                                              
  899          <Property 
  900           Name="Part itionNumbe r" 
  901           Value="1" 
  902          />
  903                                                     
  904         </Element>
  905                                            
  906        </Entry>
  907                                  
  908       </Relation ship>
  909                                 
  910       <Relations hip 
  911        Name="Incl udedColumn s"
  912       >
  913                                           
  914        <Entry>
  915                                                    
  916         <Reference
  917          Name="[App ].[AllCDWP atients].[ PatientSID ]" 
  918         />
  919                                            
  920        </Entry>
  921                                           
  922        <Entry>
  923                                                    
  924         <Reference
  925          Name="[App ].[AllCDWP atients].[ PatientSSN ]" 
  926         />
  927                                            
  928        </Entry>
  929                                           
  930        <Entry>
  931                                                    
  932         <Reference
  933          Name="[App ].[AllCDWP atients].[ Sta3n]" 
  934         />
  935                                            
  936        </Entry>
  937                                  
  938       </Relation ship>
  939                                 
  940       <Relations hip 
  941        Name="Inde xedObject"
  942       >
  943                                           
  944        <Entry>
  945                                                    
  946         <Reference
  947          Name="[App ].[AllCDWP atients]" 
  948         />
  949                                            
  950        </Entry>
  951                                  
  952       </Relation ship>
  953                        
  954      </Element>
  955                       
  956      <Element 
  957       Type="SqlI ndex" 
  958       Name="[App ].[AllCDWP atients].[ AllCDWPati ents_Patie ntSID]"
  959      >
  960                                 
  961       <Relations hip 
  962        Name="Colu mnSpecific ations"
  963       >
  964                                           
  965        <Entry>
  966                                                    
  967         <Element 
  968          Type="SqlI ndexedColu mnSpecific ation"
  969         >
  970                                                              
  971          <Relations hip 
  972           Name="Colu mn"
  973          >
  974                                                                        
  975           <Entry>
  976                                                                                  
  977            <Reference
  978             Name="[App ].[AllCDWP atients].[ PatientSID ]" 
  979            />
  980                                                                         
  981           </Entry>
  982                                                               
  983          </Relation ship>
  984                                                     
  985         </Element>
  986                                            
  987        </Entry>
  988                                  
  989       </Relation ship>
  990                                 
  991       <Relations hip 
  992        Name="Data Compressio nOptions"
  993       >
  994                                           
  995        <Entry>
  996                                                    
  997         <Element 
  998          Type="SqlD ataCompres sionOption "
  999         >
  1000                                                              
  1001          <Property 
  1002           Name="Comp ressionLev el" 
  1003           Value="2" 
  1004          />
  1005                                                              
  1006          <Property 
  1007           Name="Part itionNumbe r" 
  1008           Value="1" 
  1009          />
  1010                                                     
  1011         </Element>
  1012                                            
  1013        </Entry>
  1014                                  
  1015       </Relation ship>
  1016                                 
  1017       <Relations hip 
  1018        Name="Incl udedColumn s"
  1019       >
  1020                                           
  1021        <Entry>
  1022                                                    
  1023         <Reference
  1024          Name="[App ].[AllCDWP atients].[ PatientICN ]" 
  1025         />
  1026                                            
  1027        </Entry>
  1028                                  
  1029       </Relation ship>
  1030                                 
  1031       <Relations hip 
  1032        Name="Inde xedObject"
  1033       >
  1034                                           
  1035        <Entry>
  1036                                                    
  1037         <Reference
  1038          Name="[App ].[AllCDWP atients]" 
  1039         />
  1040                                            
  1041        </Entry>
  1042                                  
  1043       </Relation ship>
  1044                        
  1045      </Element>
  1046                       
  1047      <Element 
  1048       Type="SqlI ndex" 
  1049       Name="[App ].[AllCDWP atients].[ AllCDWPati ents_Sta3n _PatientSS N]"
  1050      >
  1051                                 
  1052       <Property 
  1053        Name="IsCl ustered" 
  1054        Value="Tru e" 
  1055       />
  1056                                 
  1057       <Relations hip 
  1058        Name="Colu mnSpecific ations"
  1059       >
  1060                                           
  1061        <Entry>
  1062                                                    
  1063         <Element 
  1064          Type="SqlI ndexedColu mnSpecific ation"
  1065         >
  1066                                                              
  1067          <Relations hip 
  1068           Name="Colu mn"
  1069          >
  1070                                                                        
  1071           <Entry>
  1072                                                                                  
  1073            <Reference
  1074             Name="[App ].[AllCDWP atients].[ Sta3n]" 
  1075            />
  1076                                                                         
  1077           </Entry>
  1078                                                               
  1079          </Relation ship>
  1080                                                     
  1081         </Element>
  1082                                            
  1083        </Entry>
  1084                                           
  1085        <Entry>
  1086                                                    
  1087         <Element 
  1088          Type="SqlI ndexedColu mnSpecific ation"
  1089         >
  1090                                                              
  1091          <Relations hip 
  1092           Name="Colu mn"
  1093          >
  1094                                                                        
  1095           <Entry>
  1096                                                                                  
  1097            <Reference
  1098             Name="[App ].[AllCDWP atients].[ PatientSSN ]" 
  1099            />
  1100                                                                         
  1101           </Entry>
  1102                                                               
  1103          </Relation ship>
  1104                                                     
  1105         </Element>
  1106                                            
  1107        </Entry>
  1108                                  
  1109       </Relation ship>
  1110                                 
  1111       <Relations hip 
  1112        Name="Data Compressio nOptions"
  1113       >
  1114                                           
  1115        <Entry>
  1116                                                    
  1117         <Element 
  1118          Type="SqlD ataCompres sionOption "
  1119         >
  1120                                                              
  1121          <Property 
  1122           Name="Comp ressionLev el" 
  1123           Value="2" 
  1124          />
  1125                                                              
  1126          <Property 
  1127           Name="Part itionNumbe r" 
  1128           Value="1" 
  1129          />
  1130                                                     
  1131         </Element>
  1132                                            
  1133        </Entry>
  1134                                  
  1135       </Relation ship>
  1136                                 
  1137       <Relations hip 
  1138        Name="Inde xedObject"
  1139       >
  1140                                           
  1141        <Entry>
  1142                                                    
  1143         <Reference
  1144          Name="[App ].[AllCDWP atients]" 
  1145         />
  1146                                            
  1147        </Entry>
  1148                                  
  1149       </Relation ship>
  1150                        
  1151      </Element>
  1152                       
  1153      <Element 
  1154       Type="SqlD efaultCons traint" 
  1155       Name="[App ].[DF_Anno uncement_C reationDT] "
  1156      >
  1157                                 
  1158       <Property 
  1159        Name="Defa ultExpress ionScript"
  1160       >
  1161                                           
  1162        <Value>
  1163         <![CDATA[( sysutcdate time())]]>
  1164        </Value>
  1165                                  
  1166       </Property >
  1167                                 
  1168       <Relations hip 
  1169        Name="Defi ningTable"
  1170       >
  1171                                           
  1172        <Entry>
  1173                                                    
  1174         <Reference
  1175          Name="[App ].[NVCC_An nouncement ]" 
  1176         />
  1177                                            
  1178        </Entry>
  1179                                  
  1180       </Relation ship>
  1181                                 
  1182       <Relations hip 
  1183        Name="ForC olumn"
  1184       >
  1185                                           
  1186        <Entry>
  1187                                                    
  1188         <Reference
  1189          Name="[App ].[NVCC_An nouncement ].[Creatio nDT]" 
  1190         />
  1191                                            
  1192        </Entry>
  1193                                  
  1194       </Relation ship>
  1195                                 
  1196       <Annotatio
  1197        Type="SqlI nlineConst raintAnnot ation" 
  1198        Disambigua tor="10" 
  1199       />
  1200                        
  1201      </Element>
  1202                       
  1203      <Element 
  1204       Type="SqlT able" 
  1205       Name="[App ].[NVCC_Ac cessLog]"
  1206      >
  1207                                 
  1208       <Property 
  1209        Name="IsAn siNullsOn"  
  1210        Value="Tru e" 
  1211       />
  1212                                 
  1213       <Relations hip 
  1214        Name="Colu mns"
  1215       >
  1216                                           
  1217        <Entry>
  1218                                                    
  1219         <Element 
  1220          Type="SqlS impleColum n" 
  1221          Name="[App ].[NVCC_Ac cessLog].[ AccessLogI D]"
  1222         >
  1223                                                              
  1224          <Property 
  1225           Name="IsNu llable" 
  1226           Value="Fal se" 
  1227          />
  1228                                                              
  1229          <Property 
  1230           Name="IsId entity" 
  1231           Value="Tru e" 
  1232          />
  1233                                                              
  1234          <Relations hip 
  1235           Name="Type Specifier"
  1236          >
  1237                                                                        
  1238           <Entry>
  1239                                                                                  
  1240            <Element 
  1241             Type="SqlT ypeSpecifi er"
  1242            >
  1243                                                                                            
  1244             <Relations hip 
  1245              Name="Type "
  1246             >
  1247                                                                                                     
  1248              <Entry>
  1249                                                                                                               
  1250               <Reference
  1251                ExternalSo urce="Buil tIns" 
  1252                Name="[int ]" 
  1253               />
  1254                                                                                                      
  1255              </Entry>
  1256                                                                                             
  1257             </Relation ship>
  1258                                                                                   
  1259            </Element>
  1260                                                                         
  1261           </Entry>
  1262                                                               
  1263          </Relation ship>
  1264                                                     
  1265         </Element>
  1266                                            
  1267        </Entry>
  1268                                           
  1269        <Entry>
  1270                                                    
  1271         <Element 
  1272          Type="SqlS impleColum n" 
  1273          Name="[App ].[NVCC_Ac cessLog].[ HostName]"
  1274         >
  1275                                                              
  1276          <Relations hip 
  1277           Name="Type Specifier"
  1278          >
  1279                                                                        
  1280           <Entry>
  1281                                                                                  
  1282            <Element 
  1283             Type="SqlT ypeSpecifi er"
  1284            >
  1285                                                                                            
  1286             <Property 
  1287              Name="Leng th" 
  1288              Value="80"  
  1289             />
  1290                                                                                            
  1291             <Relations hip 
  1292              Name="Type "
  1293             >
  1294                                                                                                     
  1295              <Entry>
  1296                                                                                                               
  1297               <Reference
  1298                ExternalSo urce="Buil tIns" 
  1299                Name="[var char]" 
  1300               />
  1301                                                                                                      
  1302              </Entry>
  1303                                                                                             
  1304             </Relation ship>
  1305                                                                                   
  1306            </Element>
  1307                                                                         
  1308           </Entry>
  1309                                                               
  1310          </Relation ship>
  1311                                                     
  1312         </Element>
  1313                                            
  1314        </Entry>
  1315                                           
  1316        <Entry>
  1317                                                    
  1318         <Element 
  1319          Type="SqlS impleColum n" 
  1320          Name="[App ].[NVCC_Ac cessLog].[ UserID]"
  1321         >
  1322                                                              
  1323          <Relations hip 
  1324           Name="Type Specifier"
  1325          >
  1326                                                                        
  1327           <Entry>
  1328                                                                                  
  1329            <Element 
  1330             Type="SqlT ypeSpecifi er"
  1331            >
  1332                                                                                            
  1333             <Property 
  1334              Name="Leng th" 
  1335              Value="50"  
  1336             />
  1337                                                                                            
  1338             <Relations hip 
  1339              Name="Type "
  1340             >
  1341                                                                                                     
  1342              <Entry>
  1343                                                                                                               
  1344               <Reference
  1345                ExternalSo urce="Buil tIns" 
  1346                Name="[var char]" 
  1347               />
  1348                                                                                                      
  1349              </Entry>
  1350                                                                                             
  1351             </Relation ship>
  1352                                                                                   
  1353            </Element>
  1354                                                                         
  1355           </Entry>
  1356                                                               
  1357          </Relation ship>
  1358                                                     
  1359         </Element>
  1360                                            
  1361        </Entry>
  1362                                           
  1363        <Entry>
  1364                                                    
  1365         <Element 
  1366          Type="SqlS impleColum n" 
  1367          Name="[App ].[NVCC_Ac cessLog].[ AccessDate Time]"
  1368         >
  1369                                                              
  1370          <Relations hip 
  1371           Name="Type Specifier"
  1372          >
  1373                                                                        
  1374           <Entry>
  1375                                                                                  
  1376            <Element 
  1377             Type="SqlT ypeSpecifi er"
  1378            >
  1379                                                                                            
  1380             <Relations hip 
  1381              Name="Type "
  1382             >
  1383                                                                                                     
  1384              <Entry>
  1385                                                                                                               
  1386               <Reference
  1387                ExternalSo urce="Buil tIns" 
  1388                Name="[dat etime]" 
  1389               />
  1390                                                                                                      
  1391              </Entry>
  1392                                                                                             
  1393             </Relation ship>
  1394                                                                                   
  1395            </Element>
  1396                                                                         
  1397           </Entry>
  1398                                                               
  1399          </Relation ship>
  1400                                                     
  1401         </Element>
  1402                                            
  1403        </Entry>
  1404                                           
  1405        <Entry>
  1406                                                    
  1407         <Element 
  1408          Type="SqlS impleColum n" 
  1409          Name="[App ].[NVCC_Ac cessLog].[ Action]"
  1410         >
  1411                                                              
  1412          <Relations hip 
  1413           Name="Type Specifier"
  1414          >
  1415                                                                        
  1416           <Entry>
  1417                                                                                  
  1418            <Element 
  1419             Type="SqlT ypeSpecifi er"
  1420            >
  1421                                                                                            
  1422             <Property 
  1423              Name="Leng th" 
  1424              Value="255
  1425             />
  1426                                                                                            
  1427             <Relations hip 
  1428              Name="Type "
  1429             >
  1430                                                                                                     
  1431              <Entry>
  1432                                                                                                               
  1433               <Reference
  1434                ExternalSo urce="Buil tIns" 
  1435                Name="[var char]" 
  1436               />
  1437                                                                                                      
  1438              </Entry>
  1439                                                                                             
  1440             </Relation ship>
  1441                                                                                   
  1442            </Element>
  1443                                                                         
  1444           </Entry>
  1445                                                               
  1446          </Relation ship>
  1447                                                     
  1448         </Element>
  1449                                            
  1450        </Entry>
  1451                                           
  1452        <Entry>
  1453                                                    
  1454         <Element 
  1455          Type="SqlS impleColum n" 
  1456          Name="[App ].[NVCC_Ac cessLog].[ PatientSID ]"
  1457         >
  1458                                                              
  1459          <Relations hip 
  1460           Name="Type Specifier"
  1461          >
  1462                                                                        
  1463           <Entry>
  1464                                                                                  
  1465            <Element 
  1466             Type="SqlT ypeSpecifi er"
  1467            >
  1468                                                                                            
  1469             <Relations hip 
  1470              Name="Type "
  1471             >
  1472                                                                                                     
  1473              <Entry>
  1474                                                                                                               
  1475               <Reference
  1476                ExternalSo urce="Buil tIns" 
  1477                Name="[int ]" 
  1478               />
  1479                                                                                                      
  1480              </Entry>
  1481                                                                                             
  1482             </Relation ship>
  1483                                                                                   
  1484            </Element>
  1485                                                                         
  1486           </Entry>
  1487                                                               
  1488          </Relation ship>
  1489                                                     
  1490         </Element>
  1491                                            
  1492        </Entry>
  1493                                           
  1494        <Entry>
  1495                                                    
  1496         <Element 
  1497          Type="SqlS impleColum n" 
  1498          Name="[App ].[NVCC_Ac cessLog].[ ElapsedTim e]"
  1499         >
  1500                                                              
  1501          <Relations hip 
  1502           Name="Type Specifier"
  1503          >
  1504                                                                        
  1505           <Entry>
  1506                                                                                  
  1507            <Element 
  1508             Type="SqlT ypeSpecifi er"
  1509            >
  1510                                                                                            
  1511             <Property 
  1512              Name="Prec ision" 
  1513              Value="53"  
  1514             />
  1515                                                                                            
  1516             <Relations hip 
  1517              Name="Type "
  1518             >
  1519                                                                                                     
  1520              <Entry>
  1521                                                                                                               
  1522               <Reference
  1523                ExternalSo urce="Buil tIns" 
  1524                Name="[flo at]" 
  1525               />
  1526                                                                                                      
  1527              </Entry>
  1528                                                                                             
  1529             </Relation ship>
  1530                                                                                   
  1531            </Element>
  1532                                                                         
  1533           </Entry>
  1534                                                               
  1535          </Relation ship>
  1536                                                     
  1537         </Element>
  1538                                            
  1539        </Entry>
  1540                                           
  1541        <Entry>
  1542                                                    
  1543         <Element 
  1544          Type="SqlS impleColum n" 
  1545          Name="[App ].[NVCC_Ac cessLog].[ DatabaseSe rverName]"
  1546         >
  1547                                                              
  1548          <Relations hip 
  1549           Name="Type Specifier"
  1550          >
  1551                                                                        
  1552           <Entry>
  1553                                                                                  
  1554            <Element 
  1555             Type="SqlT ypeSpecifi er"
  1556            >
  1557                                                                                            
  1558             <Property 
  1559              Name="Leng th" 
  1560              Value="50"  
  1561             />
  1562                                                                                            
  1563             <Relations hip 
  1564              Name="Type "
  1565             >
  1566                                                                                                     
  1567              <Entry>
  1568                                                                                                               
  1569               <Reference
  1570                ExternalSo urce="Buil tIns" 
  1571                Name="[var char]" 
  1572               />
  1573                                                                                                      
  1574              </Entry>
  1575                                                                                             
  1576             </Relation ship>
  1577                                                                                   
  1578            </Element>
  1579                                                                         
  1580           </Entry>
  1581                                                               
  1582          </Relation ship>
  1583                                                     
  1584         </Element>
  1585                                            
  1586        </Entry>
  1587                                  
  1588       </Relation ship>
  1589                                 
  1590       <Relations hip 
  1591        Name="Sche ma"
  1592       >
  1593                                           
  1594        <Entry>
  1595                                                    
  1596         <Reference
  1597          Name="[App ]" 
  1598         />
  1599                                            
  1600        </Entry>
  1601                                  
  1602       </Relation ship>
  1603                                 
  1604       <Annotatio
  1605        Type="SqlI nlineConst raintAnnot ation" 
  1606        Disambigua tor="11" 
  1607       />
  1608                        
  1609      </Element>
  1610                       
  1611      <Element 
  1612       Type="SqlI ndex" 
  1613       Name="[App ].[NVCC_Ac cessLog].[ NVCC_Acces sLog_HostN ame_UserID _AccessDat eTime]"
  1614      >
  1615                                 
  1616       <Property 
  1617        Name="IsCl ustered" 
  1618        Value="Tru e" 
  1619       />
  1620                                 
  1621       <Relations hip 
  1622        Name="Colu mnSpecific ations"
  1623       >
  1624                                           
  1625        <Entry>
  1626                                                    
  1627         <Element 
  1628          Type="SqlI ndexedColu mnSpecific ation"
  1629         >
  1630                                                              
  1631          <Relations hip 
  1632           Name="Colu mn"
  1633          >
  1634                                                                        
  1635           <Entry>
  1636                                                                                  
  1637            <Reference
  1638             Name="[App ].[NVCC_Ac cessLog].[ UserID]" 
  1639            />
  1640                                                                         
  1641           </Entry>
  1642                                                               
  1643          </Relation ship>
  1644                                                     
  1645         </Element>
  1646                                            
  1647        </Entry>
  1648                                           
  1649        <Entry>
  1650                                                    
  1651         <Element 
  1652          Type="SqlI ndexedColu mnSpecific ation"
  1653         >
  1654                                                              
  1655          <Relations hip 
  1656           Name="Colu mn"
  1657          >
  1658                                                                        
  1659           <Entry>
  1660                                                                                  
  1661            <Reference
  1662             Name="[App ].[NVCC_Ac cessLog].[ HostName]"  
  1663            />
  1664                                                                         
  1665           </Entry>
  1666                                                               
  1667          </Relation ship>
  1668                                                     
  1669         </Element>
  1670                                            
  1671        </Entry>
  1672                                           
  1673        <Entry>
  1674                                                    
  1675         <Element 
  1676          Type="SqlI ndexedColu mnSpecific ation"
  1677         >
  1678                                                              
  1679          <Relations hip 
  1680           Name="Colu mn"
  1681          >
  1682                                                                        
  1683           <Entry>
  1684                                                                                  
  1685            <Reference
  1686             Name="[App ].[NVCC_Ac cessLog].[ AccessDate Time]" 
  1687            />
  1688                                                                         
  1689           </Entry>
  1690                                                               
  1691          </Relation ship>
  1692                                                     
  1693         </Element>
  1694                                            
  1695        </Entry>
  1696                                  
  1697       </Relation ship>
  1698                                 
  1699       <Relations hip 
  1700        Name="Data Compressio nOptions"
  1701       >
  1702                                           
  1703        <Entry>
  1704                                                    
  1705         <Element 
  1706          Type="SqlD ataCompres sionOption "
  1707         >
  1708                                                              
  1709          <Property 
  1710           Name="Comp ressionLev el" 
  1711           Value="2" 
  1712          />
  1713                                                              
  1714          <Property 
  1715           Name="Part itionNumbe r" 
  1716           Value="1" 
  1717          />
  1718                                                     
  1719         </Element>
  1720                                            
  1721        </Entry>
  1722                                  
  1723       </Relation ship>
  1724                                 
  1725       <Relations hip 
  1726        Name="Inde xedObject"
  1727       >
  1728                                           
  1729        <Entry>
  1730                                                    
  1731         <Reference
  1732          Name="[App ].[NVCC_Ac cessLog]" 
  1733         />
  1734                                            
  1735        </Entry>
  1736                                  
  1737       </Relation ship>
  1738                        
  1739      </Element>
  1740                       
  1741      <Element 
  1742       Type="SqlT able" 
  1743       Name="[App ].[NVCC_An nouncement ]"
  1744      >
  1745                                 
  1746       <Property 
  1747        Name="IsAn siNullsOn"  
  1748        Value="Tru e" 
  1749       />
  1750                                 
  1751       <Relations hip 
  1752        Name="Colu mns"
  1753       >
  1754                                           
  1755        <Entry>
  1756                                                    
  1757         <Element 
  1758          Type="SqlS impleColum n" 
  1759          Name="[App ].[NVCC_An nouncement ].[Announc ementID]"
  1760         >
  1761                                                              
  1762          <Property 
  1763           Name="IsNu llable" 
  1764           Value="Fal se" 
  1765          />
  1766                                                              
  1767          <Property 
  1768           Name="IsId entity" 
  1769           Value="Tru e" 
  1770          />
  1771                                                              
  1772          <Relations hip 
  1773           Name="Type Specifier"
  1774          >
  1775                                                                        
  1776           <Entry>
  1777                                                                                  
  1778            <Element 
  1779             Type="SqlT ypeSpecifi er"
  1780            >
  1781                                                                                            
  1782             <Relations hip 
  1783              Name="Type "
  1784             >
  1785                                                                                                     
  1786              <Entry>
  1787                                                                                                               
  1788               <Reference
  1789                ExternalSo urce="Buil tIns" 
  1790                Name="[int ]" 
  1791               />
  1792                                                                                                      
  1793              </Entry>
  1794                                                                                             
  1795             </Relation ship>
  1796                                                                                   
  1797            </Element>
  1798                                                                         
  1799           </Entry>
  1800                                                               
  1801          </Relation ship>
  1802                                                     
  1803         </Element>
  1804                                            
  1805        </Entry>
  1806                                           
  1807        <Entry>
  1808                                                    
  1809         <Element 
  1810          Type="SqlS impleColum n" 
  1811          Name="[App ].[NVCC_An nouncement ].[Announc ementTypeI D]"
  1812         >
  1813                                                              
  1814          <Property 
  1815           Name="IsNu llable" 
  1816           Value="Fal se" 
  1817          />
  1818                                                              
  1819          <Relations hip 
  1820           Name="Type Specifier"
  1821          >
  1822                                                                        
  1823           <Entry>
  1824                                                                                  
  1825            <Element 
  1826             Type="SqlT ypeSpecifi er"
  1827            >
  1828                                                                                            
  1829             <Relations hip 
  1830              Name="Type "
  1831             >
  1832                                                                                                     
  1833              <Entry>
  1834                                                                                                               
  1835               <Reference
  1836                ExternalSo urce="Buil tIns" 
  1837                Name="[int ]" 
  1838               />
  1839                                                                                                      
  1840              </Entry>
  1841                                                                                             
  1842             </Relation ship>
  1843                                                                                   
  1844            </Element>
  1845                                                                         
  1846           </Entry>
  1847                                                               
  1848          </Relation ship>
  1849                                                     
  1850         </Element>
  1851                                            
  1852        </Entry>
  1853                                           
  1854        <Entry>
  1855                                                    
  1856         <Element 
  1857          Type="SqlS impleColum n" 
  1858          Name="[App ].[NVCC_An nouncement ].[Creator ]"
  1859         >
  1860                                                              
  1861          <Property 
  1862           Name="IsNu llable" 
  1863           Value="Fal se" 
  1864          />
  1865                                                              
  1866          <Relations hip 
  1867           Name="Type Specifier"
  1868          >
  1869                                                                        
  1870           <Entry>
  1871                                                                                  
  1872            <Element 
  1873             Type="SqlT ypeSpecifi er"
  1874            >
  1875                                                                                            
  1876             <Property 
  1877              Name="Leng th" 
  1878              Value="50"  
  1879             />
  1880                                                                                            
  1881             <Relations hip 
  1882              Name="Type "
  1883             >
  1884                                                                                                     
  1885              <Entry>
  1886                                                                                                               
  1887               <Reference
  1888                ExternalSo urce="Buil tIns" 
  1889                Name="[var char]" 
  1890               />
  1891                                                                                                      
  1892              </Entry>
  1893                                                                                             
  1894             </Relation ship>
  1895                                                                                   
  1896            </Element>
  1897                                                                         
  1898           </Entry>
  1899                                                               
  1900          </Relation ship>
  1901                                                     
  1902         </Element>
  1903                                            
  1904        </Entry>
  1905                                           
  1906        <Entry>
  1907                                                    
  1908         <Element 
  1909          Type="SqlS impleColum n" 
  1910          Name="[App ].[NVCC_An nouncement ].[Creatio nDT]"
  1911         >
  1912                                                              
  1913          <Property 
  1914           Name="IsNu llable" 
  1915           Value="Fal se" 
  1916          />
  1917                                                              
  1918          <Relations hip 
  1919           Name="Type Specifier"
  1920          >
  1921                                                                        
  1922           <Entry>
  1923                                                                                  
  1924            <Element 
  1925             Type="SqlT ypeSpecifi er"
  1926            >
  1927                                                                                            
  1928             <Property 
  1929              Name="Scal e" 
  1930              Value="7" 
  1931             />
  1932                                                                                            
  1933             <Relations hip 
  1934              Name="Type "
  1935             >
  1936                                                                                                     
  1937              <Entry>
  1938                                                                                                               
  1939               <Reference
  1940                ExternalSo urce="Buil tIns" 
  1941                Name="[dat etime2]" 
  1942               />
  1943                                                                                                      
  1944              </Entry>
  1945                                                                                             
  1946             </Relation ship>
  1947                                                                                   
  1948            </Element>
  1949                                                                         
  1950           </Entry>
  1951                                                               
  1952          </Relation ship>
  1953                                                              
  1954          <AttachedA nnotation 
  1955           Disambigua tor="10" 
  1956          />
  1957                                                     
  1958         </Element>
  1959                                            
  1960        </Entry>
  1961                                           
  1962        <Entry>
  1963                                                    
  1964         <Element 
  1965          Type="SqlS impleColum n" 
  1966          Name="[App ].[NVCC_An nouncement ].[Expirat ionDT]"
  1967         >
  1968                                                              
  1969          <Relations hip 
  1970           Name="Type Specifier"
  1971          >
  1972                                                                        
  1973           <Entry>
  1974                                                                                  
  1975            <Element 
  1976             Type="SqlT ypeSpecifi er"
  1977            >
  1978                                                                                            
  1979             <Property 
  1980              Name="Scal e" 
  1981              Value="7" 
  1982             />
  1983                                                                                            
  1984             <Relations hip 
  1985              Name="Type "
  1986             >
  1987                                                                                                     
  1988              <Entry>
  1989                                                                                                               
  1990               <Reference
  1991                ExternalSo urce="Buil tIns" 
  1992                Name="[dat etime2]" 
  1993               />
  1994                                                                                                      
  1995              </Entry>
  1996                                                                                             
  1997             </Relation ship>
  1998                                                                                   
  1999            </Element>
  2000                                                                         
  2001           </Entry>
  2002                                                               
  2003          </Relation ship>
  2004                                                     
  2005         </Element>
  2006                                            
  2007        </Entry>
  2008                                           
  2009        <Entry>
  2010                                                    
  2011         <Element 
  2012          Type="SqlS impleColum n" 
  2013          Name="[App ].[NVCC_An nouncement ].[Text]"
  2014         >
  2015                                                              
  2016          <Relations hip 
  2017           Name="Type Specifier"
  2018          >
  2019                                                                        
  2020           <Entry>
  2021                                                                                  
  2022            <Element 
  2023             Type="SqlT ypeSpecifi er"
  2024            >
  2025                                                                                            
  2026             <Property 
  2027              Name="Leng th" 
  2028              Value="400 0" 
  2029             />
  2030                                                                                            
  2031             <Relations hip 
  2032              Name="Type "
  2033             >
  2034                                                                                                     
  2035              <Entry>
  2036                                                                                                               
  2037               <Reference
  2038                ExternalSo urce="Buil tIns" 
  2039                Name="[nva rchar]" 
  2040               />
  2041                                                                                                      
  2042              </Entry>
  2043                                                                                             
  2044             </Relation ship>
  2045                                                                                   
  2046            </Element>
  2047                                                                         
  2048           </Entry>
  2049                                                               
  2050          </Relation ship>
  2051                                                     
  2052         </Element>
  2053                                            
  2054        </Entry>
  2055                                  
  2056       </Relation ship>
  2057                                 
  2058       <Relations hip 
  2059        Name="Sche ma"
  2060       >
  2061                                           
  2062        <Entry>
  2063                                                    
  2064         <Reference
  2065          Name="[App ]" 
  2066         />
  2067                                            
  2068        </Entry>
  2069                                  
  2070       </Relation ship>
  2071                                 
  2072       <Annotatio
  2073        Type="SqlI nlineConst raintAnnot ation" 
  2074        Disambigua tor="12" 
  2075       />
  2076                        
  2077      </Element>
  2078                       
  2079      <Element 
  2080       Type="SqlI ndex" 
  2081       Name="[App ].[NVCC_An nouncement ].[Announc ementTypeI D_Announce ment]"
  2082      >
  2083                                 
  2084       <Relations hip 
  2085        Name="Colu mnSpecific ations"
  2086       >
  2087                                           
  2088        <Entry>
  2089                                                    
  2090         <Element 
  2091          Type="SqlI ndexedColu mnSpecific ation"
  2092         >
  2093                                                              
  2094          <Relations hip 
  2095           Name="Colu mn"
  2096          >
  2097                                                                        
  2098           <Entry>
  2099                                                                                  
  2100            <Reference
  2101             Name="[App ].[NVCC_An nouncement ].[Announc ementTypeI D]" 
  2102            />
  2103                                                                         
  2104           </Entry>
  2105                                                               
  2106          </Relation ship>
  2107                                                     
  2108         </Element>
  2109                                            
  2110        </Entry>
  2111                                  
  2112       </Relation ship>
  2113                                 
  2114       <Relations hip 
  2115        Name="Data Compressio nOptions"
  2116       >
  2117                                           
  2118        <Entry>
  2119                                                    
  2120         <Element 
  2121          Type="SqlD ataCompres sionOption "
  2122         >
  2123                                                              
  2124          <Property 
  2125           Name="Comp ressionLev el" 
  2126           Value="2" 
  2127          />
  2128                                                              
  2129          <Property 
  2130           Name="Part itionNumbe r" 
  2131           Value="1" 
  2132          />
  2133                                                     
  2134         </Element>
  2135                                            
  2136        </Entry>
  2137                                  
  2138       </Relation ship>
  2139                                 
  2140       <Relations hip 
  2141        Name="Inde xedObject"
  2142       >
  2143                                           
  2144        <Entry>
  2145                                                    
  2146         <Reference
  2147          Name="[App ].[NVCC_An nouncement ]" 
  2148         />
  2149                                            
  2150        </Entry>
  2151                                  
  2152       </Relation ship>
  2153                        
  2154      </Element>
  2155                       
  2156      <Element 
  2157       Type="SqlI ndex" 
  2158       Name="[App ].[NVCC_An nouncement ].[Exiprat ionDT_Anno uncement]"
  2159      >
  2160                                 
  2161       <Relations hip 
  2162        Name="Colu mnSpecific ations"
  2163       >
  2164                                           
  2165        <Entry>
  2166                                                    
  2167         <Element 
  2168          Type="SqlI ndexedColu mnSpecific ation"
  2169         >
  2170                                                              
  2171          <Relations hip 
  2172           Name="Colu mn"
  2173          >
  2174                                                                        
  2175           <Entry>
  2176                                                                                  
  2177            <Reference
  2178             Name="[App ].[NVCC_An nouncement ].[Expirat ionDT]" 
  2179            />
  2180                                                                         
  2181           </Entry>
  2182                                                               
  2183          </Relation ship>
  2184                                                     
  2185         </Element>
  2186                                            
  2187        </Entry>
  2188                                  
  2189       </Relation ship>
  2190                                 
  2191       <Relations hip 
  2192        Name="Data Compressio nOptions"
  2193       >
  2194                                           
  2195        <Entry>
  2196                                                    
  2197         <Element 
  2198          Type="SqlD ataCompres sionOption "
  2199         >
  2200                                                              
  2201          <Property 
  2202           Name="Comp ressionLev el" 
  2203           Value="2" 
  2204          />
  2205                                                              
  2206          <Property 
  2207           Name="Part itionNumbe r" 
  2208           Value="1" 
  2209          />
  2210                                                     
  2211         </Element>
  2212                                            
  2213        </Entry>
  2214                                  
  2215       </Relation ship>
  2216                                 
  2217       <Relations hip 
  2218        Name="Inde xedObject"
  2219       >
  2220                                           
  2221        <Entry>
  2222                                                    
  2223         <Reference
  2224          Name="[App ].[NVCC_An nouncement ]" 
  2225         />
  2226                                            
  2227        </Entry>
  2228                                  
  2229       </Relation ship>
  2230                        
  2231      </Element>
  2232                       
  2233      <Element 
  2234       Type="SqlT able" 
  2235       Name="[App ].[NVCC_Di mAnnouncem ent]"
  2236      >
  2237                                 
  2238       <Property 
  2239        Name="IsAn siNullsOn"  
  2240        Value="Tru e" 
  2241       />
  2242                                 
  2243       <Relations hip 
  2244        Name="Colu mns"
  2245       >
  2246                                           
  2247        <Entry>
  2248                                                    
  2249         <Element 
  2250          Type="SqlS impleColum n" 
  2251          Name="[App ].[NVCC_Di mAnnouncem ent].[Anno uncementTy peID]"
  2252         >
  2253                                                              
  2254          <Property 
  2255           Name="IsNu llable" 
  2256           Value="Fal se" 
  2257          />
  2258                                                              
  2259          <Relations hip 
  2260           Name="Type Specifier"
  2261          >
  2262                                                                        
  2263           <Entry>
  2264                                                                                  
  2265            <Element 
  2266             Type="SqlT ypeSpecifi er"
  2267            >
  2268                                                                                            
  2269             <Relations hip 
  2270              Name="Type "
  2271             >
  2272                                                                                                     
  2273              <Entry>
  2274                                                                                                               
  2275               <Reference
  2276                ExternalSo urce="Buil tIns" 
  2277                Name="[int ]" 
  2278               />
  2279                                                                                                      
  2280              </Entry>
  2281                                                                                             
  2282             </Relation ship>
  2283                                                                                   
  2284            </Element>
  2285                                                                         
  2286           </Entry>
  2287                                                               
  2288          </Relation ship>
  2289                                                     
  2290         </Element>
  2291                                            
  2292        </Entry>
  2293                                           
  2294        <Entry>
  2295                                                    
  2296         <Element 
  2297          Type="SqlS impleColum n" 
  2298          Name="[App ].[NVCC_Di mAnnouncem ent].[Anno uncementTy pe]"
  2299         >
  2300                                                              
  2301          <Relations hip 
  2302           Name="Type Specifier"
  2303          >
  2304                                                                        
  2305           <Entry>
  2306                                                                                  
  2307            <Element 
  2308             Type="SqlT ypeSpecifi er"
  2309            >
  2310                                                                                            
  2311             <Property 
  2312              Name="Leng th" 
  2313              Value="20"  
  2314             />
  2315                                                                                            
  2316             <Relations hip 
  2317              Name="Type "
  2318             >
  2319                                                                                                     
  2320              <Entry>
  2321                                                                                                               
  2322               <Reference
  2323                ExternalSo urce="Buil tIns" 
  2324                Name="[nva rchar]" 
  2325               />
  2326                                                                                                      
  2327              </Entry>
  2328                                                                                             
  2329             </Relation ship>
  2330                                                                                   
  2331            </Element>
  2332                                                                         
  2333           </Entry>
  2334                                                               
  2335          </Relation ship>
  2336                                                     
  2337         </Element>
  2338                                            
  2339        </Entry>
  2340                                  
  2341       </Relation ship>
  2342                                 
  2343       <Relations hip 
  2344        Name="Sche ma"
  2345       >
  2346                                           
  2347        <Entry>
  2348                                                    
  2349         <Reference
  2350          Name="[App ]" 
  2351         />
  2352                                            
  2353        </Entry>
  2354                                  
  2355       </Relation ship>
  2356                                 
  2357       <Annotatio
  2358        Type="SqlI nlineConst raintAnnot ation" 
  2359        Disambigua tor="13" 
  2360       />
  2361                        
  2362      </Element>
  2363                       
  2364      <Element 
  2365       Type="SqlT able" 
  2366       Name="[App ].[NVCC_HI PAATerms]"
  2367      >
  2368                                 
  2369       <Property 
  2370        Name="IsAn siNullsOn"  
  2371        Value="Tru e" 
  2372       />
  2373                                 
  2374       <Relations hip 
  2375        Name="Colu mns"
  2376       >
  2377                                           
  2378        <Entry>
  2379                                                    
  2380         <Element 
  2381          Type="SqlS impleColum n" 
  2382          Name="[App ].[NVCC_HI PAATerms]. [term]"
  2383         >
  2384                                                              
  2385          <Property 
  2386           Name="IsNu llable" 
  2387           Value="Fal se" 
  2388          />
  2389                                                              
  2390          <Relations hip 
  2391           Name="Type Specifier"
  2392          >
  2393                                                                        
  2394           <Entry>
  2395                                                                                  
  2396            <Element 
  2397             Type="SqlT ypeSpecifi er"
  2398            >
  2399                                                                                            
  2400             <Property 
  2401              Name="Leng th" 
  2402              Value="35"  
  2403             />
  2404                                                                                            
  2405             <Relations hip 
  2406              Name="Type "
  2407             >
  2408                                                                                                     
  2409              <Entry>
  2410                                                                                                               
  2411               <Reference
  2412                ExternalSo urce="Buil tIns" 
  2413                Name="[var char]" 
  2414               />
  2415                                                                                                      
  2416              </Entry>
  2417                                                                                             
  2418             </Relation ship>
  2419                                                                                   
  2420            </Element>
  2421                                                                         
  2422           </Entry>
  2423                                                               
  2424          </Relation ship>
  2425                                                     
  2426         </Element>
  2427                                            
  2428        </Entry>
  2429                                  
  2430       </Relation ship>
  2431                                 
  2432       <Relations hip 
  2433        Name="Sche ma"
  2434       >
  2435                                           
  2436        <Entry>
  2437                                                    
  2438         <Reference
  2439          Name="[App ]" 
  2440         />
  2441                                            
  2442        </Entry>
  2443                                  
  2444       </Relation ship>
  2445                                 
  2446       <Annotatio
  2447        Type="SqlI nlineConst raintAnnot ation" 
  2448        Disambigua tor="14" 
  2449       />
  2450                        
  2451      </Element>
  2452                       
  2453      <Element 
  2454       Type="SqlT able" 
  2455       Name="[App ].[NVCC_Pr oductionLo g]"
  2456      >
  2457                                 
  2458       <Property 
  2459        Name="IsAn siNullsOn"  
  2460        Value="Tru e" 
  2461       />
  2462                                 
  2463       <Relations hip 
  2464        Name="Colu mns"
  2465       >
  2466                                           
  2467        <Entry>
  2468                                                    
  2469         <Element 
  2470          Type="SqlS impleColum n" 
  2471          Name="[App ].[NVCC_Pr oductionLo g].[Access LogID]"
  2472         >
  2473                                                              
  2474          <Property 
  2475           Name="IsNu llable" 
  2476           Value="Fal se" 
  2477          />
  2478                                                              
  2479          <Relations hip 
  2480           Name="Type Specifier"
  2481          >
  2482                                                                        
  2483           <Entry>
  2484                                                                                  
  2485            <Element 
  2486             Type="SqlT ypeSpecifi er"
  2487            >
  2488                                                                                            
  2489             <Relations hip 
  2490              Name="Type "
  2491             >
  2492                                                                                                     
  2493              <Entry>
  2494                                                                                                               
  2495               <Reference
  2496                ExternalSo urce="Buil tIns" 
  2497                Name="[int ]" 
  2498               />
  2499                                                                                                      
  2500              </Entry>
  2501                                                                                             
  2502             </Relation ship>
  2503                                                                                   
  2504            </Element>
  2505                                                                         
  2506           </Entry>
  2507                                                               
  2508          </Relation ship>
  2509                                                     
  2510         </Element>
  2511                                            
  2512        </Entry>
  2513                                           
  2514        <Entry>
  2515                                                    
  2516         <Element 
  2517          Type="SqlS impleColum n" 
  2518          Name="[App ].[NVCC_Pr oductionLo g].[UserID ]"
  2519         >
  2520                                                              
  2521          <Property 
  2522           Name="IsNu llable" 
  2523           Value="Fal se" 
  2524          />
  2525                                                              
  2526          <Relations hip 
  2527           Name="Type Specifier"
  2528          >
  2529                                                                        
  2530           <Entry>
  2531                                                                                  
  2532            <Element 
  2533             Type="SqlT ypeSpecifi er"
  2534            >
  2535                                                                                            
  2536             <Property 
  2537              Name="Leng th" 
  2538              Value="50"  
  2539             />
  2540                                                                                            
  2541             <Relations hip 
  2542              Name="Type "
  2543             >
  2544                                                                                                     
  2545              <Entry>
  2546                                                                                                               
  2547               <Reference
  2548                ExternalSo urce="Buil tIns" 
  2549                Name="[var char]" 
  2550               />
  2551                                                                                                      
  2552              </Entry>
  2553                                                                                             
  2554             </Relation ship>
  2555                                                                                   
  2556            </Element>
  2557                                                                         
  2558           </Entry>
  2559                                                               
  2560          </Relation ship>
  2561                                                     
  2562         </Element>
  2563                                            
  2564        </Entry>
  2565                                           
  2566        <Entry>
  2567                                                    
  2568         <Element 
  2569          Type="SqlS impleColum n" 
  2570          Name="[App ].[NVCC_Pr oductionLo g].[Access DateTime]"
  2571         >
  2572                                                              
  2573          <Property 
  2574           Name="IsNu llable" 
  2575           Value="Fal se" 
  2576          />
  2577                                                              
  2578          <Relations hip 
  2579           Name="Type Specifier"
  2580          >
  2581                                                                        
  2582           <Entry>
  2583                                                                                  
  2584            <Element 
  2585             Type="SqlT ypeSpecifi er"
  2586            >
  2587                                                                                            
  2588             <Relations hip 
  2589              Name="Type "
  2590             >
  2591                                                                                                     
  2592              <Entry>
  2593                                                                                                               
  2594               <Reference
  2595                ExternalSo urce="Buil tIns" 
  2596                Name="[dat etime]" 
  2597               />
  2598                                                                                                      
  2599              </Entry>
  2600                                                                                             
  2601             </Relation ship>
  2602                                                                                   
  2603            </Element>
  2604                                                                         
  2605           </Entry>
  2606                                                               
  2607          </Relation ship>
  2608                                                     
  2609         </Element>
  2610                                            
  2611        </Entry>
  2612                                           
  2613        <Entry>
  2614                                                    
  2615         <Element 
  2616          Type="SqlS impleColum n" 
  2617          Name="[App ].[NVCC_Pr oductionLo g].[Patien tSID]"
  2618         >
  2619                                                              
  2620          <Property 
  2621           Name="IsNu llable" 
  2622           Value="Fal se" 
  2623          />
  2624                                                              
  2625          <Relations hip 
  2626           Name="Type Specifier"
  2627          >
  2628                                                                        
  2629           <Entry>
  2630                                                                                  
  2631            <Element 
  2632             Type="SqlT ypeSpecifi er"
  2633            >
  2634                                                                                            
  2635             <Relations hip 
  2636              Name="Type "
  2637             >
  2638                                                                                                     
  2639              <Entry>
  2640                                                                                                               
  2641               <Reference
  2642                ExternalSo urce="Buil tIns" 
  2643                Name="[int ]" 
  2644               />
  2645                                                                                                      
  2646              </Entry>
  2647                                                                                             
  2648             </Relation ship>
  2649                                                                                   
  2650            </Element>
  2651                                                                         
  2652           </Entry>
  2653                                                               
  2654          </Relation ship>
  2655                                                     
  2656         </Element>
  2657                                            
  2658        </Entry>
  2659                                           
  2660        <Entry>
  2661                                                    
  2662         <Element 
  2663          Type="SqlS impleColum n" 
  2664          Name="[App ].[NVCC_Pr oductionLo g].[Patien tICN]"
  2665         >
  2666                                                              
  2667          <Relations hip 
  2668           Name="Type Specifier"
  2669          >
  2670                                                                        
  2671           <Entry>
  2672                                                                                  
  2673            <Element 
  2674             Type="SqlT ypeSpecifi er"
  2675            >
  2676                                                                                            
  2677             <Property 
  2678              Name="Leng th" 
  2679              Value="50"  
  2680             />
  2681                                                                                            
  2682             <Relations hip 
  2683              Name="Type "
  2684             >
  2685                                                                                                     
  2686              <Entry>
  2687                                                                                                               
  2688               <Reference
  2689                ExternalSo urce="Buil tIns" 
  2690                Name="[var char]" 
  2691               />
  2692                                                                                                      
  2693              </Entry>
  2694                                                                                             
  2695             </Relation ship>
  2696                                                                                   
  2697            </Element>
  2698                                                                         
  2699           </Entry>
  2700                                                               
  2701          </Relation ship>
  2702                                                     
  2703         </Element>
  2704                                            
  2705        </Entry>
  2706                                           
  2707        <Entry>
  2708                                                    
  2709         <Element 
  2710          Type="SqlS impleColum n" 
  2711          Name="[App ].[NVCC_Pr oductionLo g].[Sta3n] "
  2712         >
  2713                                                              
  2714          <Property 
  2715           Name="IsNu llable" 
  2716           Value="Fal se" 
  2717          />
  2718                                                              
  2719          <Relations hip 
  2720           Name="Type Specifier"
  2721          >
  2722                                                                        
  2723           <Entry>
  2724                                                                                  
  2725            <Element 
  2726             Type="SqlT ypeSpecifi er"
  2727            >
  2728                                                                                            
  2729             <Relations hip 
  2730              Name="Type "
  2731             >
  2732                                                                                                     
  2733              <Entry>
  2734                                                                                                               
  2735               <Reference
  2736                ExternalSo urce="Buil tIns" 
  2737                Name="[sma llint]" 
  2738               />
  2739                                                                                                      
  2740              </Entry>
  2741                                                                                             
  2742             </Relation ship>
  2743                                                                                   
  2744            </Element>
  2745                                                                         
  2746           </Entry>
  2747                                                               
  2748          </Relation ship>
  2749                                                     
  2750         </Element>
  2751                                            
  2752        </Entry>
  2753                                  
  2754       </Relation ship>
  2755                                 
  2756       <Relations hip 
  2757        Name="Sche ma"
  2758       >
  2759                                           
  2760        <Entry>
  2761                                                    
  2762         <Reference
  2763          Name="[App ]" 
  2764         />
  2765                                            
  2766        </Entry>
  2767                                  
  2768       </Relation ship>
  2769                        
  2770      </Element>
  2771                       
  2772      <Element 
  2773       Type="SqlI ndex" 
  2774       Name="[App ].[NVCC_Pr oductionLo g].[NVCC_P roductionL og_AccessD ateTime_Us erID]"
  2775      >
  2776                                 
  2777       <Property 
  2778        Name="IsCl ustered" 
  2779        Value="Tru e" 
  2780       />
  2781                                 
  2782       <Relations hip 
  2783        Name="Colu mnSpecific ations"
  2784       >
  2785                                           
  2786        <Entry>
  2787                                                    
  2788         <Element 
  2789          Type="SqlI ndexedColu mnSpecific ation"
  2790         >
  2791                                                              
  2792          <Relations hip 
  2793           Name="Colu mn"
  2794          >
  2795                                                                        
  2796           <Entry>
  2797                                                                                  
  2798            <Reference
  2799             Name="[App ].[NVCC_Pr oductionLo g].[Access DateTime]"  
  2800            />
  2801                                                                         
  2802           </Entry>
  2803                                                               
  2804          </Relation ship>
  2805                                                     
  2806         </Element>
  2807                                            
  2808        </Entry>
  2809                                           
  2810        <Entry>
  2811                                                    
  2812         <Element 
  2813          Type="SqlI ndexedColu mnSpecific ation"
  2814         >
  2815                                                              
  2816          <Relations hip 
  2817           Name="Colu mn"
  2818          >
  2819                                                                        
  2820           <Entry>
  2821                                                                                  
  2822            <Reference
  2823             Name="[App ].[NVCC_Pr oductionLo g].[UserID ]" 
  2824            />
  2825                                                                         
  2826           </Entry>
  2827                                                               
  2828          </Relation ship>
  2829                                                     
  2830         </Element>
  2831                                            
  2832        </Entry>
  2833                                  
  2834       </Relation ship>
  2835                                 
  2836       <Relations hip 
  2837        Name="Data Compressio nOptions"
  2838       >
  2839                                           
  2840        <Entry>
  2841                                                    
  2842         <Element 
  2843          Type="SqlD ataCompres sionOption "
  2844         >
  2845                                                              
  2846          <Property 
  2847           Name="Comp ressionLev el" 
  2848           Value="2" 
  2849          />
  2850                                                              
  2851          <Property 
  2852           Name="Part itionNumbe r" 
  2853           Value="1" 
  2854          />
  2855                                                     
  2856         </Element>
  2857                                            
  2858        </Entry>
  2859                                  
  2860       </Relation ship>
  2861                                 
  2862       <Relations hip 
  2863        Name="Inde xedObject"
  2864       >
  2865                                           
  2866        <Entry>
  2867                                                    
  2868         <Reference
  2869          Name="[App ].[NVCC_Pr oductionLo g]" 
  2870         />
  2871                                            
  2872        </Entry>
  2873                                  
  2874       </Relation ship>
  2875                        
  2876      </Element>
  2877                       
  2878      <Element 
  2879       Type="SqlI ndex" 
  2880       Name="[App ].[NVCC_Pr oductionLo g].[NVCC_P roductionL og_Sta3n]"
  2881      >
  2882                                 
  2883       <Relations hip 
  2884        Name="Colu mnSpecific ations"
  2885       >
  2886                                           
  2887        <Entry>
  2888                                                    
  2889         <Element 
  2890          Type="SqlI ndexedColu mnSpecific ation"
  2891         >
  2892                                                              
  2893          <Relations hip 
  2894           Name="Colu mn"
  2895          >
  2896                                                                        
  2897           <Entry>
  2898                                                                                  
  2899            <Reference
  2900             Name="[App ].[NVCC_Pr oductionLo g].[Sta3n]
  2901            />
  2902                                                                         
  2903           </Entry>
  2904                                                               
  2905          </Relation ship>
  2906                                                     
  2907         </Element>
  2908                                            
  2909        </Entry>
  2910                                  
  2911       </Relation ship>
  2912                                 
  2913       <Relations hip 
  2914        Name="Data Compressio nOptions"
  2915       >
  2916                                           
  2917        <Entry>
  2918                                                    
  2919         <Element 
  2920          Type="SqlD ataCompres sionOption "
  2921         >
  2922                                                              
  2923          <Property 
  2924           Name="Comp ressionLev el" 
  2925           Value="2" 
  2926          />
  2927                                                              
  2928          <Property 
  2929           Name="Part itionNumbe r" 
  2930           Value="1" 
  2931          />
  2932                                                     
  2933         </Element>
  2934                                            
  2935        </Entry>
  2936                                  
  2937       </Relation ship>
  2938                                 
  2939       <Relations hip 
  2940        Name="Incl udedColumn s"
  2941       >
  2942                                           
  2943        <Entry>
  2944                                                    
  2945         <Reference
  2946          Name="[App ].[NVCC_Pr oductionLo g].[Patien tICN]" 
  2947         />
  2948                                            
  2949        </Entry>
  2950                                  
  2951       </Relation ship>
  2952                                 
  2953       <Relations hip 
  2954        Name="Inde xedObject"
  2955       >
  2956                                           
  2957        <Entry>
  2958                                                    
  2959         <Reference
  2960          Name="[App ].[NVCC_Pr oductionLo g]" 
  2961         />
  2962                                            
  2963        </Entry>
  2964                                  
  2965       </Relation ship>
  2966                        
  2967      </Element>
  2968                       
  2969      <Element 
  2970       Type="SqlP rocedure" 
  2971       Name="[App ].[NVCC_Re build_Sens itiveDxCod esTable]"
  2972      >
  2973                                 
  2974       <Property 
  2975        Name="Body Script"
  2976       >
  2977                                           
  2978        <Value>
  2979         <![CDATA[
  2980         --======== ========== ========== ========== ========== ========== ========== ========== ===
  2981         --Requesto r              : Non  Va Coordin ated Care  Project
  2982         --Author                  : Jerr y Kohler
  2983         --Object/S P Name         : Rebu ild_Sensit iveDxCodes Table
  2984         --Server                  : 
  2985         --Data Bas e              : CC_R EFDOC
  2986         --Schema                  : app
  2987         --Report                  : N/A
  2988         --Folder                  : N/A
  2989         --Report L oc             : N/A
  2990         --Job                     : None
  2991         --Job Loc                 : None
  2992         --Note                    : 
  2993         --Date Cre ated           : 01-2 1-2016
  2994         --
  2995         --Changed                 : 
  2996         --Changed  By             : 
  2997         --Reason F or Change      : 
  2998         --
  2999         --
  3000         --Purpose                 : Rebu ild table  App.NVCC_S ensitiveDx Codes, an  intermedia ry
  3001         --                          cach e of sensi tive diagn ostic code s to impro ve NVCC
  3002         --                          appl ication pe rformance  by elimina ting the n eed for a
  3003         --                          sepa rate step  to obtain  the ICD co de SIDS.
  3004         --======== ========== ========== ========== ========== ========== ========== ========== ===
  3005         BEGIN
  3006        
  3007            SET NOC OUNT ON;
  3008        
  3009            IF (SEL ECT OBJECT _ID('app.N VCC_Sensit iveDxCodes ', 'U')) I S NOT NULL
  3010               DROP  TABLE App .NVCC_Sens itiveDxCod es
  3011        
  3012            CREATE  TABLE [App ].[NVCC_Se nsitiveDxC odes](
  3013                     [CodingSy stem]  [va rchar](12)  NOT NULL,
  3014                     [Sta3n]          [sm allint] NU LL,
  3015                     [ICDSID]         [in t] NULL,
  3016                     [Code]           [va rchar](12)  NOT NULL,
  3017                     [Diagnosi sText] [va rchar](255 ) NOT NULL ,
  3018                     [AbuseDx]        [in t] NULL,
  3019                     [SickleDx ]      [in t] NULL,
  3020                     [HIVDx]          [in t] NULL
  3021            ) ON [D efFG] WITH  (DATA_COM PRESSION =  PAGE)
  3022        
  3023            CREATE  UNIQUE CLU STERED IND EX [NVCC_S ensitiveDx Codes_ICDS ID]
  3024            ON [App ].[NVCC_Se nsitiveDxC odes] (ICD SID ASC)
  3025            WITH (S ORT_IN_TEM PDB = ON,  ONLINE = O FF, FILLFA CTOR = 95,  DATA_COMP RESSION =  PAGE)
  3026            ON [Def FG]
  3027        
  3028            INSERT  INTO App.N VCC_Sensit iveDxCodes  (CodingSy stem, Sta3 n, ICDSID,  Code, Dia gnosisText , AbuseDx,  SickleDx,  HIVDx)
  3029            SELECT  c.CodingSy stem
  3030                       ,i.Sta3 n
  3031                       ,i.ICDS ID
  3032                       ,c.Code
  3033                       ,i.ICDD iagnosisTe xt
  3034                       ,c.Abus eDx
  3035                       ,c.Sick leDx
  3036                       ,c.HIVD x
  3037            FROM [A pp].[NVCC_ SensitiveD xBaseCodes ] c
  3038            INNER J OIN PanelM gmt.vICD A S i ON c.C ode = i.IC DCode
  3039        
  3040        
  3041            CREATE  UNIQUE NON CLUSTERED  INDEX [NVC C_Sensitiv eDxCodes_S ta3n_ICDCo de]
  3042            ON [App ].[NVCC_Se nsitiveDxC odes] (Sta 3n, Code)
  3043            INCLUDE  (Diagnosi sText, Abu seDx, Sick leDx, HIVD x)
  3044            WITH (S ORT_IN_TEM PDB = ON,  ONLINE = O FF, FILLFA CTOR = 95,  DATA_COMP RESSION =  PAGE)
  3045            ON [Def FG]
  3046        
  3047         --select d istinct St a3n from A pp.NVCC_Se nsitiveDxC odes order  by Sta3n
  3048         --select c ode,count( *) from Ap p.NVCC_Sen sitiveDxCo des group  by code or der by cod e
  3049        
  3050         END]]>
  3051        </Value>
  3052                                  
  3053       </Property >
  3054                                 
  3055       <Property 
  3056        Name="IsAn siNullsOn"  
  3057        Value="Tru e" 
  3058       />
  3059                                 
  3060       <Relations hip 
  3061        Name="Body Dependenci es"
  3062       >
  3063                                           
  3064        <Entry>
  3065                                                    
  3066         <Reference
  3067          Name="[App ].[NVCC_Se nsitiveDxC odes]" 
  3068         />
  3069                                            
  3070        </Entry>
  3071                                           
  3072        <Entry>
  3073                                                    
  3074         <Reference
  3075          Name="[App ].[NVCC_Se nsitiveDxC odes]" 
  3076         />
  3077                                            
  3078        </Entry>
  3079                                           
  3080        <Entry>
  3081                                                    
  3082         <Reference
  3083          Name="[Def FG]" 
  3084         />
  3085                                            
  3086        </Entry>
  3087                                           
  3088        <Entry>
  3089                                                    
  3090         <Reference
  3091          Name="[App ].[NVCC_Se nsitiveDxC odes].[Cod ingSystem]
  3092         />
  3093                                            
  3094        </Entry>
  3095                                           
  3096        <Entry>
  3097                                                    
  3098         <Reference
  3099          ExternalSo urce="Buil tIns" 
  3100          Name="[var char]" 
  3101         />
  3102                                            
  3103        </Entry>
  3104                                           
  3105        <Entry>
  3106                                                    
  3107         <Reference
  3108          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sta 3n]" 
  3109         />
  3110                                            
  3111        </Entry>
  3112                                           
  3113        <Entry>
  3114                                                    
  3115         <Reference
  3116          ExternalSo urce="Buil tIns" 
  3117          Name="[sma llint]" 
  3118         />
  3119                                            
  3120        </Entry>
  3121                                           
  3122        <Entry>
  3123                                                    
  3124         <Reference
  3125          Name="[App ].[NVCC_Se nsitiveDxC odes].[ICD SID]" 
  3126         />
  3127                                            
  3128        </Entry>
  3129                                           
  3130        <Entry>
  3131                                                    
  3132         <Reference
  3133          ExternalSo urce="Buil tIns" 
  3134          Name="[int ]" 
  3135         />
  3136                                            
  3137        </Entry>
  3138                                           
  3139        <Entry>
  3140                                                    
  3141         <Reference
  3142          Name="[App ].[NVCC_Se nsitiveDxC odes].[Cod e]" 
  3143         />
  3144                                            
  3145        </Entry>
  3146                                           
  3147        <Entry>
  3148                                                    
  3149         <Reference
  3150          ExternalSo urce="Buil tIns" 
  3151          Name="[var char]" 
  3152         />
  3153                                            
  3154        </Entry>
  3155                                           
  3156        <Entry>
  3157                                                    
  3158         <Reference
  3159          Name="[App ].[NVCC_Se nsitiveDxC odes].[Dia gnosisText ]" 
  3160         />
  3161                                            
  3162        </Entry>
  3163                                           
  3164        <Entry>
  3165                                                    
  3166         <Reference
  3167          ExternalSo urce="Buil tIns" 
  3168          Name="[var char]" 
  3169         />
  3170                                            
  3171        </Entry>
  3172                                           
  3173        <Entry>
  3174                                                    
  3175         <Reference
  3176          Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]" 
  3177         />
  3178                                            
  3179        </Entry>
  3180                                           
  3181        <Entry>
  3182                                                    
  3183         <Reference
  3184          ExternalSo urce="Buil tIns" 
  3185          Name="[int ]" 
  3186         />
  3187                                            
  3188        </Entry>
  3189                                           
  3190        <Entry>
  3191                                                    
  3192         <Reference
  3193          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]" 
  3194         />
  3195                                            
  3196        </Entry>
  3197                                           
  3198        <Entry>
  3199                                                    
  3200         <Reference
  3201          ExternalSo urce="Buil tIns" 
  3202          Name="[int ]" 
  3203         />
  3204                                            
  3205        </Entry>
  3206                                           
  3207        <Entry>
  3208                                                    
  3209         <Reference
  3210          Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]" 
  3211         />
  3212                                            
  3213        </Entry>
  3214                                           
  3215        <Entry>
  3216                                                    
  3217         <Reference
  3218          ExternalSo urce="Buil tIns" 
  3219          Name="[int ]" 
  3220         />
  3221                                            
  3222        </Entry>
  3223                                           
  3224        <Entry>
  3225                                                    
  3226         <Reference
  3227          Name="[App ].[NVCC_Se nsitiveDxC odes].[NVC C_Sensitiv eDxCodes_I CDSID]" 
  3228         />
  3229                                            
  3230        </Entry>
  3231                                           
  3232        <Entry>
  3233                                                    
  3234         <Reference
  3235          Name="[App ].[NVCC_Se nsitiveDxC odes]" 
  3236         />
  3237                                            
  3238        </Entry>
  3239                                           
  3240        <Entry>
  3241                                                    
  3242         <Reference
  3243          Name="[App ].[NVCC_Se nsitiveDxC odes].[ICD SID]" 
  3244         />
  3245                                            
  3246        </Entry>
  3247                                           
  3248        <Entry>
  3249                                                    
  3250         <Reference
  3251          Name="[App ].[NVCC_Se nsitiveDxC odes]" 
  3252         />
  3253                                            
  3254        </Entry>
  3255                                           
  3256        <Entry>
  3257                                                    
  3258         <Reference
  3259          Name="[App ].[NVCC_Se nsitiveDxC odes].[Cod ingSystem]
  3260         />
  3261                                            
  3262        </Entry>
  3263                                           
  3264        <Entry>
  3265                                                    
  3266         <Reference
  3267          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sta 3n]" 
  3268         />
  3269                                            
  3270        </Entry>
  3271                                           
  3272        <Entry>
  3273                                                    
  3274         <Reference
  3275          Name="[App ].[NVCC_Se nsitiveDxC odes].[ICD SID]" 
  3276         />
  3277                                            
  3278        </Entry>
  3279                                           
  3280        <Entry>
  3281                                                    
  3282         <Reference
  3283          Name="[App ].[NVCC_Se nsitiveDxC odes].[Cod e]" 
  3284         />
  3285                                            
  3286        </Entry>
  3287                                           
  3288        <Entry>
  3289                                                    
  3290         <Reference
  3291          Name="[App ].[NVCC_Se nsitiveDxC odes].[Dia gnosisText ]" 
  3292         />
  3293                                            
  3294        </Entry>
  3295                                           
  3296        <Entry>
  3297                                                    
  3298         <Reference
  3299          Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]" 
  3300         />
  3301                                            
  3302        </Entry>
  3303                                           
  3304        <Entry>
  3305                                                    
  3306         <Reference
  3307          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]" 
  3308         />
  3309                                            
  3310        </Entry>
  3311                                           
  3312        <Entry>
  3313                                                    
  3314         <Reference
  3315          Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]" 
  3316         />
  3317                                            
  3318        </Entry>
  3319                                           
  3320        <Entry>
  3321                                                    
  3322         <Reference
  3323          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]"  
  3324         />
  3325                                            
  3326        </Entry>
  3327                                           
  3328        <Entry>
  3329                                                    
  3330         <Reference
  3331          Name="[Pan elMgmt].[v ICD]" 
  3332         />
  3333                                            
  3334        </Entry>
  3335                                           
  3336        <Entry>
  3337                                                    
  3338         <Reference
  3339          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]. [Code]" 
  3340         />
  3341                                            
  3342        </Entry>
  3343                                           
  3344        <Entry>
  3345                                                    
  3346         <Reference
  3347          Name="[Pan elMgmt].[v ICD].[ICDC ode]" 
  3348         />
  3349                                            
  3350        </Entry>
  3351                                           
  3352        <Entry>
  3353                                                    
  3354         <Reference
  3355          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]. [CodingSys tem]" 
  3356         />
  3357                                            
  3358        </Entry>
  3359                                           
  3360        <Entry>
  3361                                                    
  3362         <Reference
  3363          Name="[Pan elMgmt].[v ICD].[Sta3 n]" 
  3364         />
  3365                                            
  3366        </Entry>
  3367                                           
  3368        <Entry>
  3369                                                    
  3370         <Reference
  3371          Name="[Pan elMgmt].[v ICD].[ICDS ID]" 
  3372         />
  3373                                            
  3374        </Entry>
  3375                                           
  3376        <Entry>
  3377                                                    
  3378         <Reference
  3379          Name="[Pan elMgmt].[v ICD].[ICDD iagnosisTe xt]" 
  3380         />
  3381                                            
  3382        </Entry>
  3383                                           
  3384        <Entry>
  3385                                                    
  3386         <Reference
  3387          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]. [AbuseDx]"  
  3388         />
  3389                                            
  3390        </Entry>
  3391                                           
  3392        <Entry>
  3393                                                    
  3394         <Reference
  3395          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]. [SickleDx]
  3396         />
  3397                                            
  3398        </Entry>
  3399                                           
  3400        <Entry>
  3401                                                    
  3402         <Reference
  3403          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]. [HIVDx]" 
  3404         />
  3405                                            
  3406        </Entry>
  3407                                           
  3408        <Entry>
  3409                                                    
  3410         <Reference
  3411          Name="[App ].[NVCC_Se nsitiveDxC odes].[NVC C_Sensitiv eDxCodes_S ta3n_ICDCo de]" 
  3412         />
  3413                                            
  3414        </Entry>
  3415                                           
  3416        <Entry>
  3417                                                    
  3418         <Reference
  3419          Name="[App ].[NVCC_Se nsitiveDxC odes]" 
  3420         />
  3421                                            
  3422        </Entry>
  3423                                           
  3424        <Entry>
  3425                                                    
  3426         <Reference
  3427          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sta 3n]" 
  3428         />
  3429                                            
  3430        </Entry>
  3431                                           
  3432        <Entry>
  3433                                                    
  3434         <Reference
  3435          Name="[App ].[NVCC_Se nsitiveDxC odes].[Cod e]" 
  3436         />
  3437                                            
  3438        </Entry>
  3439                                           
  3440        <Entry>
  3441                                                    
  3442         <Reference
  3443          Name="[App ].[NVCC_Se nsitiveDxC odes].[Dia gnosisText ]" 
  3444         />
  3445                                            
  3446        </Entry>
  3447                                           
  3448        <Entry>
  3449                                                    
  3450         <Reference
  3451          Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]" 
  3452         />
  3453                                            
  3454        </Entry>
  3455                                           
  3456        <Entry>
  3457                                                    
  3458         <Reference
  3459          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]" 
  3460         />
  3461                                            
  3462        </Entry>
  3463                                           
  3464        <Entry>
  3465                                                    
  3466         <Reference
  3467          Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]" 
  3468         />
  3469                                            
  3470        </Entry>
  3471                                  
  3472       </Relation ship>
  3473                                 
  3474       <Relations hip 
  3475        Name="Sche ma"
  3476       >
  3477                                           
  3478        <Entry>
  3479                                                    
  3480         <Reference
  3481          Name="[App ]" 
  3482         />
  3483                                            
  3484        </Entry>
  3485                                  
  3486       </Relation ship>
  3487                                 
  3488       <Annotatio
  3489        Type="SysC ommentsObj ectAnnotat ion"
  3490       >
  3491                                           
  3492        <Property 
  3493         Name="Crea teOffset" 
  3494         Value="2" 
  3495        />
  3496                                           
  3497        <Property 
  3498         Name="Leng th" 
  3499         Value="276 2" 
  3500        />
  3501                                           
  3502        <Property 
  3503         Name="Star tLine" 
  3504         Value="1" 
  3505        />
  3506                                           
  3507        <Property 
  3508         Name="Star tColumn" 
  3509         Value="1" 
  3510        />
  3511                                           
  3512        <Property 
  3513         Name="Head erContents
  3514         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_Rebu ild_Sensit iveDxCodes Table]&#xD ;&#xA;&#xD ;&#xA;AS" 
  3515        />
  3516                                  
  3517       </Annotati on>
  3518                        
  3519      </Element>
  3520                       
  3521      <Element 
  3522       Type="SqlT able" 
  3523       Name="[App ].[NVCC_Se nsitiveDxB aseCodes]"
  3524      >
  3525                                 
  3526       <Property 
  3527        Name="IsAn siNullsOn"  
  3528        Value="Tru e" 
  3529       />
  3530                                 
  3531       <Relations hip 
  3532        Name="Colu mns"
  3533       >
  3534                                           
  3535        <Entry>
  3536                                                    
  3537         <Element 
  3538          Type="SqlS impleColum n" 
  3539          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]. [CodingSys tem]"
  3540         >
  3541                                                              
  3542          <Property 
  3543           Name="IsNu llable" 
  3544           Value="Fal se" 
  3545          />
  3546                                                              
  3547          <Relations hip 
  3548           Name="Type Specifier"
  3549          >
  3550                                                                        
  3551           <Entry>
  3552                                                                                  
  3553            <Element 
  3554             Type="SqlT ypeSpecifi er"
  3555            >
  3556                                                                                            
  3557             <Property 
  3558              Name="Leng th" 
  3559              Value="12"  
  3560             />
  3561                                                                                            
  3562             <Relations hip 
  3563              Name="Type "
  3564             >
  3565                                                                                                     
  3566              <Entry>
  3567                                                                                                               
  3568               <Reference
  3569                ExternalSo urce="Buil tIns" 
  3570                Name="[var char]" 
  3571               />
  3572                                                                                                      
  3573              </Entry>
  3574                                                                                             
  3575             </Relation ship>
  3576                                                                                   
  3577            </Element>
  3578                                                                         
  3579           </Entry>
  3580                                                               
  3581          </Relation ship>
  3582                                                     
  3583         </Element>
  3584                                            
  3585        </Entry>
  3586                                           
  3587        <Entry>
  3588                                                    
  3589         <Element 
  3590          Type="SqlS impleColum n" 
  3591          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]. [Code]"
  3592         >
  3593                                                              
  3594          <Property 
  3595           Name="IsNu llable" 
  3596           Value="Fal se" 
  3597          />
  3598                                                              
  3599          <Relations hip 
  3600           Name="Type Specifier"
  3601          >
  3602                                                                        
  3603           <Entry>
  3604                                                                                  
  3605            <Element 
  3606             Type="SqlT ypeSpecifi er"
  3607            >
  3608                                                                                            
  3609             <Property 
  3610              Name="Leng th" 
  3611              Value="12"  
  3612             />
  3613                                                                                            
  3614             <Relations hip 
  3615              Name="Type "
  3616             >
  3617                                                                                                     
  3618              <Entry>
  3619                                                                                                               
  3620               <Reference
  3621                ExternalSo urce="Buil tIns" 
  3622                Name="[var char]" 
  3623               />
  3624                                                                                                      
  3625              </Entry>
  3626                                                                                             
  3627             </Relation ship>
  3628                                                                                   
  3629            </Element>
  3630                                                                         
  3631           </Entry>
  3632                                                               
  3633          </Relation ship>
  3634                                                     
  3635         </Element>
  3636                                            
  3637        </Entry>
  3638                                           
  3639        <Entry>
  3640                                                    
  3641         <Element 
  3642          Type="SqlS impleColum n" 
  3643          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]. [Diagnosis Text]"
  3644         >
  3645                                                              
  3646          <Property 
  3647           Name="IsNu llable" 
  3648           Value="Fal se" 
  3649          />
  3650                                                              
  3651          <Relations hip 
  3652           Name="Type Specifier"
  3653          >
  3654                                                                        
  3655           <Entry>
  3656                                                                                  
  3657            <Element 
  3658             Type="SqlT ypeSpecifi er"
  3659            >
  3660                                                                                            
  3661             <Property 
  3662              Name="Leng th" 
  3663              Value="250
  3664             />
  3665                                                                                            
  3666             <Relations hip 
  3667              Name="Type "
  3668             >
  3669                                                                                                     
  3670              <Entry>
  3671                                                                                                               
  3672               <Reference
  3673                ExternalSo urce="Buil tIns" 
  3674                Name="[var char]" 
  3675               />
  3676                                                                                                      
  3677              </Entry>
  3678                                                                                             
  3679             </Relation ship>
  3680                                                                                   
  3681            </Element>
  3682                                                                         
  3683           </Entry>
  3684                                                               
  3685          </Relation ship>
  3686                                                     
  3687         </Element>
  3688                                            
  3689        </Entry>
  3690                                           
  3691        <Entry>
  3692                                                    
  3693         <Element 
  3694          Type="SqlS impleColum n" 
  3695          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]. [AbuseDx]"
  3696         >
  3697                                                              
  3698          <Relations hip 
  3699           Name="Type Specifier"
  3700          >
  3701                                                                        
  3702           <Entry>
  3703                                                                                  
  3704            <Element 
  3705             Type="SqlT ypeSpecifi er"
  3706            >
  3707                                                                                            
  3708             <Relations hip 
  3709              Name="Type "
  3710             >
  3711                                                                                                     
  3712              <Entry>
  3713                                                                                                               
  3714               <Reference
  3715                ExternalSo urce="Buil tIns" 
  3716                Name="[int ]" 
  3717               />
  3718                                                                                                      
  3719              </Entry>
  3720                                                                                             
  3721             </Relation ship>
  3722                                                                                   
  3723            </Element>
  3724                                                                         
  3725           </Entry>
  3726                                                               
  3727          </Relation ship>
  3728                                                     
  3729         </Element>
  3730                                            
  3731        </Entry>
  3732                                           
  3733        <Entry>
  3734                                                    
  3735         <Element 
  3736          Type="SqlS impleColum n" 
  3737          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]. [SickleDx] "
  3738         >
  3739                                                              
  3740          <Relations hip 
  3741           Name="Type Specifier"
  3742          >
  3743                                                                        
  3744           <Entry>
  3745                                                                                  
  3746            <Element 
  3747             Type="SqlT ypeSpecifi er"
  3748            >
  3749                                                                                            
  3750             <Relations hip 
  3751              Name="Type "
  3752             >
  3753                                                                                                     
  3754              <Entry>
  3755                                                                                                               
  3756               <Reference
  3757                ExternalSo urce="Buil tIns" 
  3758                Name="[int ]" 
  3759               />
  3760                                                                                                      
  3761              </Entry>
  3762                                                                                             
  3763             </Relation ship>
  3764                                                                                   
  3765            </Element>
  3766                                                                         
  3767           </Entry>
  3768                                                               
  3769          </Relation ship>
  3770                                                     
  3771         </Element>
  3772                                            
  3773        </Entry>
  3774                                           
  3775        <Entry>
  3776                                                    
  3777         <Element 
  3778          Type="SqlS impleColum n" 
  3779          Name="[App ].[NVCC_Se nsitiveDxB aseCodes]. [HIVDx]"
  3780         >
  3781                                                              
  3782          <Relations hip 
  3783           Name="Type Specifier"
  3784          >
  3785                                                                        
  3786           <Entry>
  3787                                                                                  
  3788            <Element 
  3789             Type="SqlT ypeSpecifi er"
  3790            >
  3791                                                                                            
  3792             <Relations hip 
  3793              Name="Type "
  3794             >
  3795                                                                                                     
  3796              <Entry>
  3797                                                                                                               
  3798               <Reference
  3799                ExternalSo urce="Buil tIns" 
  3800                Name="[int ]" 
  3801               />
  3802                                                                                                      
  3803              </Entry>
  3804                                                                                             
  3805             </Relation ship>
  3806                                                                                   
  3807            </Element>
  3808                                                                         
  3809           </Entry>
  3810                                                               
  3811          </Relation ship>
  3812                                                     
  3813         </Element>
  3814                                            
  3815        </Entry>
  3816                                  
  3817       </Relation ship>
  3818                                 
  3819       <Relations hip 
  3820        Name="Data Compressio nOptions"
  3821       >
  3822                                           
  3823        <Entry>
  3824                                                    
  3825         <Element 
  3826          Type="SqlD ataCompres sionOption "
  3827         >
  3828                                                              
  3829          <Property 
  3830           Name="Comp ressionLev el" 
  3831           Value="2" 
  3832          />
  3833                                                              
  3834          <Property 
  3835           Name="Part itionNumbe r" 
  3836           Value="1" 
  3837          />
  3838                                                     
  3839         </Element>
  3840                                            
  3841        </Entry>
  3842                                  
  3843       </Relation ship>
  3844                                 
  3845       <Relations hip 
  3846        Name="Sche ma"
  3847       >
  3848                                           
  3849        <Entry>
  3850                                                    
  3851         <Reference
  3852          Name="[App ]" 
  3853         />
  3854                                            
  3855        </Entry>
  3856                                  
  3857       </Relation ship>
  3858                        
  3859      </Element>
  3860                       
  3861      <Element 
  3862       Type="SqlT able" 
  3863       Name="[App ].[NVCC_Se nsitiveDxC odes]"
  3864      >
  3865                                 
  3866       <Property 
  3867        Name="IsAn siNullsOn"  
  3868        Value="Tru e" 
  3869       />
  3870                                 
  3871       <Relations hip 
  3872        Name="Colu mns"
  3873       >
  3874                                           
  3875        <Entry>
  3876                                                    
  3877         <Element 
  3878          Type="SqlS impleColum n" 
  3879          Name="[App ].[NVCC_Se nsitiveDxC odes].[Cod ingSystem] "
  3880         >
  3881                                                              
  3882          <Property 
  3883           Name="IsNu llable" 
  3884           Value="Fal se" 
  3885          />
  3886                                                              
  3887          <Relations hip 
  3888           Name="Type Specifier"
  3889          >
  3890                                                                        
  3891           <Entry>
  3892                                                                                  
  3893            <Element 
  3894             Type="SqlT ypeSpecifi er"
  3895            >
  3896                                                                                            
  3897             <Property 
  3898              Name="Leng th" 
  3899              Value="12"  
  3900             />
  3901                                                                                            
  3902             <Relations hip 
  3903              Name="Type "
  3904             >
  3905                                                                                                     
  3906              <Entry>
  3907                                                                                                               
  3908               <Reference
  3909                ExternalSo urce="Buil tIns" 
  3910                Name="[var char]" 
  3911               />
  3912                                                                                                      
  3913              </Entry>
  3914                                                                                             
  3915             </Relation ship>
  3916                                                                                   
  3917            </Element>
  3918                                                                         
  3919           </Entry>
  3920                                                               
  3921          </Relation ship>
  3922                                                     
  3923         </Element>
  3924                                            
  3925        </Entry>
  3926                                           
  3927        <Entry>
  3928                                                    
  3929         <Element 
  3930          Type="SqlS impleColum n" 
  3931          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sta 3n]"
  3932         >
  3933                                                              
  3934          <Relations hip 
  3935           Name="Type Specifier"
  3936          >
  3937                                                                        
  3938           <Entry>
  3939                                                                                  
  3940            <Element 
  3941             Type="SqlT ypeSpecifi er"
  3942            >
  3943                                                                                            
  3944             <Relations hip 
  3945              Name="Type "
  3946             >
  3947                                                                                                     
  3948              <Entry>
  3949                                                                                                               
  3950               <Reference
  3951                ExternalSo urce="Buil tIns" 
  3952                Name="[sma llint]" 
  3953               />
  3954                                                                                                      
  3955              </Entry>
  3956                                                                                             
  3957             </Relation ship>
  3958                                                                                   
  3959            </Element>
  3960                                                                         
  3961           </Entry>
  3962                                                               
  3963          </Relation ship>
  3964                                                     
  3965         </Element>
  3966                                            
  3967        </Entry>
  3968                                           
  3969        <Entry>
  3970                                                    
  3971         <Element 
  3972          Type="SqlS impleColum n" 
  3973          Name="[App ].[NVCC_Se nsitiveDxC odes].[ICD SID]"
  3974         >
  3975                                                              
  3976          <Relations hip 
  3977           Name="Type Specifier"
  3978          >
  3979                                                                        
  3980           <Entry>
  3981                                                                                  
  3982            <Element 
  3983             Type="SqlT ypeSpecifi er"
  3984            >
  3985                                                                                            
  3986             <Relations hip 
  3987              Name="Type "
  3988             >
  3989                                                                                                     
  3990              <Entry>
  3991                                                                                                               
  3992               <Reference
  3993                ExternalSo urce="Buil tIns" 
  3994                Name="[int ]" 
  3995               />
  3996                                                                                                      
  3997              </Entry>
  3998                                                                                             
  3999             </Relation ship>
  4000                                                                                   
  4001            </Element>
  4002                                                                         
  4003           </Entry>
  4004                                                               
  4005          </Relation ship>
  4006                                                     
  4007         </Element>
  4008                                            
  4009        </Entry>
  4010                                           
  4011        <Entry>
  4012                                                    
  4013         <Element 
  4014          Type="SqlS impleColum n" 
  4015          Name="[App ].[NVCC_Se nsitiveDxC odes].[Cod e]"
  4016         >
  4017                                                              
  4018          <Property 
  4019           Name="IsNu llable" 
  4020           Value="Fal se" 
  4021          />
  4022                                                              
  4023          <Relations hip 
  4024           Name="Type Specifier"
  4025          >
  4026                                                                        
  4027           <Entry>
  4028                                                                                  
  4029            <Element 
  4030             Type="SqlT ypeSpecifi er"
  4031            >
  4032                                                                                            
  4033             <Property 
  4034              Name="Leng th" 
  4035              Value="12"  
  4036             />
  4037                                                                                            
  4038             <Relations hip 
  4039              Name="Type "
  4040             >
  4041                                                                                                     
  4042              <Entry>
  4043                                                                                                               
  4044               <Reference
  4045                ExternalSo urce="Buil tIns" 
  4046                Name="[var char]" 
  4047               />
  4048                                                                                                      
  4049              </Entry>
  4050                                                                                             
  4051             </Relation ship>
  4052                                                                                   
  4053            </Element>
  4054                                                                         
  4055           </Entry>
  4056                                                               
  4057          </Relation ship>
  4058                                                     
  4059         </Element>
  4060                                            
  4061        </Entry>
  4062                                           
  4063        <Entry>
  4064                                                    
  4065         <Element 
  4066          Type="SqlS impleColum n" 
  4067          Name="[App ].[NVCC_Se nsitiveDxC odes].[Dia gnosisText ]"
  4068         >
  4069                                                              
  4070          <Property 
  4071           Name="IsNu llable" 
  4072           Value="Fal se" 
  4073          />
  4074                                                              
  4075          <Relations hip 
  4076           Name="Type Specifier"
  4077          >
  4078                                                                        
  4079           <Entry>
  4080                                                                                  
  4081            <Element 
  4082             Type="SqlT ypeSpecifi er"
  4083            >
  4084                                                                                            
  4085             <Property 
  4086              Name="Leng th" 
  4087              Value="255
  4088             />
  4089                                                                                            
  4090             <Relations hip 
  4091              Name="Type "
  4092             >
  4093                                                                                                     
  4094              <Entry>
  4095                                                                                                               
  4096               <Reference
  4097                ExternalSo urce="Buil tIns" 
  4098                Name="[var char]" 
  4099               />
  4100                                                                                                      
  4101              </Entry>
  4102                                                                                             
  4103             </Relation ship>
  4104                                                                                   
  4105            </Element>
  4106                                                                         
  4107           </Entry>
  4108                                                               
  4109          </Relation ship>
  4110                                                     
  4111         </Element>
  4112                                            
  4113        </Entry>
  4114                                           
  4115        <Entry>
  4116                                                    
  4117         <Element 
  4118          Type="SqlS impleColum n" 
  4119          Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]"
  4120         >
  4121                                                              
  4122          <Relations hip 
  4123           Name="Type Specifier"
  4124          >
  4125                                                                        
  4126           <Entry>
  4127                                                                                  
  4128            <Element 
  4129             Type="SqlT ypeSpecifi er"
  4130            >
  4131                                                                                            
  4132             <Relations hip 
  4133              Name="Type "
  4134             >
  4135                                                                                                     
  4136              <Entry>
  4137                                                                                                               
  4138               <Reference
  4139                ExternalSo urce="Buil tIns" 
  4140                Name="[int ]" 
  4141               />
  4142                                                                                                      
  4143              </Entry>
  4144                                                                                             
  4145             </Relation ship>
  4146                                                                                   
  4147            </Element>
  4148                                                                         
  4149           </Entry>
  4150                                                               
  4151          </Relation ship>
  4152                                                     
  4153         </Element>
  4154                                            
  4155        </Entry>
  4156                                           
  4157        <Entry>
  4158                                                    
  4159         <Element 
  4160          Type="SqlS impleColum n" 
  4161          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]"
  4162         >
  4163                                                              
  4164          <Relations hip 
  4165           Name="Type Specifier"
  4166          >
  4167                                                                        
  4168           <Entry>
  4169                                                                                  
  4170            <Element 
  4171             Type="SqlT ypeSpecifi er"
  4172            >
  4173                                                                                            
  4174             <Relations hip 
  4175              Name="Type "
  4176             >
  4177                                                                                                     
  4178              <Entry>
  4179                                                                                                               
  4180               <Reference
  4181                ExternalSo urce="Buil tIns" 
  4182                Name="[int ]" 
  4183               />
  4184                                                                                                      
  4185              </Entry>
  4186                                                                                             
  4187             </Relation ship>
  4188                                                                                   
  4189            </Element>
  4190                                                                         
  4191           </Entry>
  4192                                                               
  4193          </Relation ship>
  4194                                                     
  4195         </Element>
  4196                                            
  4197        </Entry>
  4198                                           
  4199        <Entry>
  4200                                                    
  4201         <Element 
  4202          Type="SqlS impleColum n" 
  4203          Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]"
  4204         >
  4205                                                              
  4206          <Relations hip 
  4207           Name="Type Specifier"
  4208          >
  4209                                                                        
  4210           <Entry>
  4211                                                                                  
  4212            <Element 
  4213             Type="SqlT ypeSpecifi er"
  4214            >
  4215                                                                                            
  4216             <Relations hip 
  4217              Name="Type "
  4218             >
  4219                                                                                                     
  4220              <Entry>
  4221                                                                                                               
  4222               <Reference
  4223                ExternalSo urce="Buil tIns" 
  4224                Name="[int ]" 
  4225               />
  4226                                                                                                      
  4227              </Entry>
  4228                                                                                             
  4229             </Relation ship>
  4230                                                                                   
  4231            </Element>
  4232                                                                         
  4233           </Entry>
  4234                                                               
  4235          </Relation ship>
  4236                                                     
  4237         </Element>
  4238                                            
  4239        </Entry>
  4240                                  
  4241       </Relation ship>
  4242                                 
  4243       <Relations hip 
  4244        Name="Sche ma"
  4245       >
  4246                                           
  4247        <Entry>
  4248                                                    
  4249         <Reference
  4250          Name="[App ]" 
  4251         />
  4252                                            
  4253        </Entry>
  4254                                  
  4255       </Relation ship>
  4256                        
  4257      </Element>
  4258                       
  4259      <Element 
  4260       Type="SqlI ndex" 
  4261       Name="[App ].[NVCC_Se nsitiveDxC odes].[NVC C_Sensitiv eDxCodes_I CDSID]"
  4262      >
  4263                                 
  4264       <Property 
  4265        Name="IsUn ique" 
  4266        Value="Tru e" 
  4267       />
  4268                                 
  4269       <Property 
  4270        Name="Fill Factor" 
  4271        Value="95"  
  4272       />
  4273                                 
  4274       <Property 
  4275        Name="IsCl ustered" 
  4276        Value="Tru e" 
  4277       />
  4278                                 
  4279       <Relations hip 
  4280        Name="Colu mnSpecific ations"
  4281       >
  4282                                           
  4283        <Entry>
  4284                                                    
  4285         <Element 
  4286          Type="SqlI ndexedColu mnSpecific ation"
  4287         >
  4288                                                              
  4289          <Relations hip 
  4290           Name="Colu mn"
  4291          >
  4292                                                                        
  4293           <Entry>
  4294                                                                                  
  4295            <Reference
  4296             Name="[App ].[NVCC_Se nsitiveDxC odes].[ICD SID]" 
  4297            />
  4298                                                                         
  4299           </Entry>
  4300                                                               
  4301          </Relation ship>
  4302                                                     
  4303         </Element>
  4304                                            
  4305        </Entry>
  4306                                  
  4307       </Relation ship>
  4308                                 
  4309       <Relations hip 
  4310        Name="Data Compressio nOptions"
  4311       >
  4312                                           
  4313        <Entry>
  4314                                                    
  4315         <Element 
  4316          Type="SqlD ataCompres sionOption "
  4317         >
  4318                                                              
  4319          <Property 
  4320           Name="Comp ressionLev el" 
  4321           Value="2" 
  4322          />
  4323                                                              
  4324          <Property 
  4325           Name="Part itionNumbe r" 
  4326           Value="1" 
  4327          />
  4328                                                     
  4329         </Element>
  4330                                            
  4331        </Entry>
  4332                                  
  4333       </Relation ship>
  4334                                 
  4335       <Relations hip 
  4336        Name="Inde xedObject"
  4337       >
  4338                                           
  4339        <Entry>
  4340                                                    
  4341         <Reference
  4342          Name="[App ].[NVCC_Se nsitiveDxC odes]" 
  4343         />
  4344                                            
  4345        </Entry>
  4346                                  
  4347       </Relation ship>
  4348                        
  4349      </Element>
  4350                       
  4351      <Element 
  4352       Type="SqlI ndex" 
  4353       Name="[App ].[NVCC_Se nsitiveDxC odes].[NVC C_Sensitiv eDxCodes_S ta3n_ICDCo de]"
  4354      >
  4355                                 
  4356       <Property 
  4357        Name="IsUn ique" 
  4358        Value="Tru e" 
  4359       />
  4360                                 
  4361       <Property 
  4362        Name="Fill Factor" 
  4363        Value="95"  
  4364       />
  4365                                 
  4366       <Relations hip 
  4367        Name="Colu mnSpecific ations"
  4368       >
  4369                                           
  4370        <Entry>
  4371                                                    
  4372         <Element 
  4373          Type="SqlI ndexedColu mnSpecific ation"
  4374         >
  4375                                                              
  4376          <Relations hip 
  4377           Name="Colu mn"
  4378          >
  4379                                                                        
  4380           <Entry>
  4381                                                                                  
  4382            <Reference
  4383             Name="[App ].[NVCC_Se nsitiveDxC odes].[Sta 3n]" 
  4384            />
  4385                                                                         
  4386           </Entry>
  4387                                                               
  4388          </Relation ship>
  4389                                                     
  4390         </Element>
  4391                                            
  4392        </Entry>
  4393                                           
  4394        <Entry>
  4395                                                    
  4396         <Element 
  4397          Type="SqlI ndexedColu mnSpecific ation"
  4398         >
  4399                                                              
  4400          <Relations hip 
  4401           Name="Colu mn"
  4402          >
  4403                                                                        
  4404           <Entry>
  4405                                                                                  
  4406            <Reference
  4407             Name="[App ].[NVCC_Se nsitiveDxC odes].[Cod e]" 
  4408            />
  4409                                                                         
  4410           </Entry>
  4411                                                               
  4412          </Relation ship>
  4413                                                     
  4414         </Element>
  4415                                            
  4416        </Entry>
  4417                                  
  4418       </Relation ship>
  4419                                 
  4420       <Relations hip 
  4421        Name="Data Compressio nOptions"
  4422       >
  4423                                           
  4424        <Entry>
  4425                                                    
  4426         <Element 
  4427          Type="SqlD ataCompres sionOption "
  4428         >
  4429                                                              
  4430          <Property 
  4431           Name="Comp ressionLev el" 
  4432           Value="2" 
  4433          />
  4434                                                              
  4435          <Property 
  4436           Name="Part itionNumbe r" 
  4437           Value="1" 
  4438          />
  4439                                                     
  4440         </Element>
  4441                                            
  4442        </Entry>
  4443                                  
  4444       </Relation ship>
  4445                                 
  4446       <Relations hip 
  4447        Name="Incl udedColumn s"
  4448       >
  4449                                           
  4450        <Entry>
  4451                                                    
  4452         <Reference
  4453          Name="[App ].[NVCC_Se nsitiveDxC odes].[Dia gnosisText ]" 
  4454         />
  4455                                            
  4456        </Entry>
  4457                                           
  4458        <Entry>
  4459                                                    
  4460         <Reference
  4461          Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]" 
  4462         />
  4463                                            
  4464        </Entry>
  4465                                           
  4466        <Entry>
  4467                                                    
  4468         <Reference
  4469          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]" 
  4470         />
  4471                                            
  4472        </Entry>
  4473                                           
  4474        <Entry>
  4475                                                    
  4476         <Reference
  4477          Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]" 
  4478         />
  4479                                            
  4480        </Entry>
  4481                                  
  4482       </Relation ship>
  4483                                 
  4484       <Relations hip 
  4485        Name="Inde xedObject"
  4486       >
  4487                                           
  4488        <Entry>
  4489                                                    
  4490         <Reference
  4491          Name="[App ].[NVCC_Se nsitiveDxC odes]" 
  4492         />
  4493                                            
  4494        </Entry>
  4495                                  
  4496       </Relation ship>
  4497                        
  4498      </Element>
  4499                       
  4500      <Element 
  4501       Type="SqlT able" 
  4502       Name="[App ].[NVCC_St ations]"
  4503      >
  4504                                 
  4505       <Property 
  4506        Name="IsAn siNullsOn"  
  4507        Value="Tru e" 
  4508       />
  4509                                 
  4510       <Relations hip 
  4511        Name="Colu mns"
  4512       >
  4513                                           
  4514        <Entry>
  4515                                                    
  4516         <Element 
  4517          Type="SqlS impleColum n" 
  4518          Name="[App ].[NVCC_St ations].[S ta3n]"
  4519         >
  4520                                                              
  4521          <Property 
  4522           Name="IsNu llable" 
  4523           Value="Fal se" 
  4524          />
  4525                                                              
  4526          <Relations hip 
  4527           Name="Type Specifier"
  4528          >
  4529                                                                        
  4530           <Entry>
  4531                                                                                  
  4532            <Element 
  4533             Type="SqlT ypeSpecifi er"
  4534            >
  4535                                                                                            
  4536             <Relations hip 
  4537              Name="Type "
  4538             >
  4539                                                                                                     
  4540              <Entry>
  4541                                                                                                               
  4542               <Reference
  4543                ExternalSo urce="Buil tIns" 
  4544                Name="[sma llint]" 
  4545               />
  4546                                                                                                      
  4547              </Entry>
  4548                                                                                             
  4549             </Relation ship>
  4550                                                                                   
  4551            </Element>
  4552                                                                         
  4553           </Entry>
  4554                                                               
  4555          </Relation ship>
  4556                                                     
  4557         </Element>
  4558                                            
  4559        </Entry>
  4560                                           
  4561        <Entry>
  4562                                                    
  4563         <Element 
  4564          Type="SqlS impleColum n" 
  4565          Name="[App ].[NVCC_St ations].[M edCtr]"
  4566         >
  4567                                                              
  4568          <Property 
  4569           Name="IsNu llable" 
  4570           Value="Fal se" 
  4571          />
  4572                                                              
  4573          <Relations hip 
  4574           Name="Type Specifier"
  4575          >
  4576                                                                        
  4577           <Entry>
  4578                                                                                  
  4579            <Element 
  4580             Type="SqlT ypeSpecifi er"
  4581            >
  4582                                                                                            
  4583             <Property 
  4584              Name="Leng th" 
  4585              Value="60"  
  4586             />
  4587                                                                                            
  4588             <Relations hip 
  4589              Name="Type "
  4590             >
  4591                                                                                                     
  4592              <Entry>
  4593                                                                                                               
  4594               <Reference
  4595                ExternalSo urce="Buil tIns" 
  4596                Name="[var char]" 
  4597               />
  4598                                                                                                      
  4599              </Entry>
  4600                                                                                             
  4601             </Relation ship>
  4602                                                                                   
  4603            </Element>
  4604                                                                         
  4605           </Entry>
  4606                                                               
  4607          </Relation ship>
  4608                                                     
  4609         </Element>
  4610                                            
  4611        </Entry>
  4612                                           
  4613        <Entry>
  4614                                                    
  4615         <Element 
  4616          Type="SqlS impleColum n" 
  4617          Name="[App ].[NVCC_St ations].[F ullAddress ]"
  4618         >
  4619                                                              
  4620          <Relations hip 
  4621           Name="Type Specifier"
  4622          >
  4623                                                                        
  4624           <Entry>
  4625                                                                                  
  4626            <Element 
  4627             Type="SqlT ypeSpecifi er"
  4628            >
  4629                                                                                            
  4630             <Property 
  4631              Name="Leng th" 
  4632              Value="130
  4633             />
  4634                                                                                            
  4635             <Relations hip 
  4636              Name="Type "
  4637             >
  4638                                                                                                     
  4639              <Entry>
  4640                                                                                                               
  4641               <Reference
  4642                ExternalSo urce="Buil tIns" 
  4643                Name="[var char]" 
  4644               />
  4645                                                                                                      
  4646              </Entry>
  4647                                                                                             
  4648             </Relation ship>
  4649                                                                                   
  4650            </Element>
  4651                                                                         
  4652           </Entry>
  4653                                                               
  4654          </Relation ship>
  4655                                                     
  4656         </Element>
  4657                                            
  4658        </Entry>
  4659                                           
  4660        <Entry>
  4661                                                    
  4662         <Element 
  4663          Type="SqlS impleColum n" 
  4664          Name="[App ].[NVCC_St ations].[S treetAddre ss1]"
  4665         >
  4666                                                              
  4667          <Relations hip 
  4668           Name="Type Specifier"
  4669          >
  4670                                                                        
  4671           <Entry>
  4672                                                                                  
  4673            <Element 
  4674             Type="SqlT ypeSpecifi er"
  4675            >
  4676                                                                                            
  4677             <Property 
  4678              Name="Leng th" 
  4679              Value="130
  4680             />
  4681                                                                                            
  4682             <Relations hip 
  4683              Name="Type "
  4684             >
  4685                                                                                                     
  4686              <Entry>
  4687                                                                                                               
  4688               <Reference
  4689                ExternalSo urce="Buil tIns" 
  4690                Name="[var char]" 
  4691               />
  4692                                                                                                      
  4693              </Entry>
  4694                                                                                             
  4695             </Relation ship>
  4696                                                                                   
  4697            </Element>
  4698                                                                         
  4699           </Entry>
  4700                                                               
  4701          </Relation ship>
  4702                                                     
  4703         </Element>
  4704                                            
  4705        </Entry>
  4706                                           
  4707        <Entry>
  4708                                                    
  4709         <Element 
  4710          Type="SqlS impleColum n" 
  4711          Name="[App ].[NVCC_St ations].[S treetAddre ss2]"
  4712         >
  4713                                                              
  4714          <Relations hip 
  4715           Name="Type Specifier"
  4716          >
  4717                                                                        
  4718           <Entry>
  4719                                                                                  
  4720            <Element 
  4721             Type="SqlT ypeSpecifi er"
  4722            >
  4723                                                                                            
  4724             <Property 
  4725              Name="Leng th" 
  4726              Value="130
  4727             />
  4728                                                                                            
  4729             <Relations hip 
  4730              Name="Type "
  4731             >
  4732                                                                                                     
  4733              <Entry>
  4734                                                                                                               
  4735               <Reference
  4736                ExternalSo urce="Buil tIns" 
  4737                Name="[var char]" 
  4738               />
  4739                                                                                                      
  4740              </Entry>
  4741                                                                                             
  4742             </Relation ship>
  4743                                                                                   
  4744            </Element>
  4745                                                                         
  4746           </Entry>
  4747                                                               
  4748          </Relation ship>
  4749                                                     
  4750         </Element>
  4751                                            
  4752        </Entry>
  4753                                           
  4754        <Entry>
  4755                                                    
  4756         <Element 
  4757          Type="SqlS impleColum n" 
  4758          Name="[App ].[NVCC_St ations].[C ity]"
  4759         >
  4760                                                              
  4761          <Relations hip 
  4762           Name="Type Specifier"
  4763          >
  4764                                                                        
  4765           <Entry>
  4766                                                                                  
  4767            <Element 
  4768             Type="SqlT ypeSpecifi er"
  4769            >
  4770                                                                                            
  4771             <Property 
  4772              Name="Leng th" 
  4773              Value="50"  
  4774             />
  4775                                                                                            
  4776             <Relations hip 
  4777              Name="Type "
  4778             >
  4779                                                                                                     
  4780              <Entry>
  4781                                                                                                               
  4782               <Reference
  4783                ExternalSo urce="Buil tIns" 
  4784                Name="[var char]" 
  4785               />
  4786                                                                                                      
  4787              </Entry>
  4788                                                                                             
  4789             </Relation ship>
  4790                                                                                   
  4791            </Element>
  4792                                                                         
  4793           </Entry>
  4794                                                               
  4795          </Relation ship>
  4796                                                     
  4797         </Element>
  4798                                            
  4799        </Entry>
  4800                                           
  4801        <Entry>
  4802                                                    
  4803         <Element 
  4804          Type="SqlS impleColum n" 
  4805          Name="[App ].[NVCC_St ations].[S tate]"
  4806         >
  4807                                                              
  4808          <Relations hip 
  4809           Name="Type Specifier"
  4810          >
  4811                                                                        
  4812           <Entry>
  4813                                                                                  
  4814            <Element 
  4815             Type="SqlT ypeSpecifi er"
  4816            >
  4817                                                                                            
  4818             <Property 
  4819              Name="Leng th" 
  4820              Value="30"  
  4821             />
  4822                                                                                            
  4823             <Relations hip 
  4824              Name="Type "
  4825             >
  4826                                                                                                     
  4827              <Entry>
  4828                                                                                                               
  4829               <Reference
  4830                ExternalSo urce="Buil tIns" 
  4831                Name="[var char]" 
  4832               />
  4833                                                                                                      
  4834              </Entry>
  4835                                                                                             
  4836             </Relation ship>
  4837                                                                                   
  4838            </Element>
  4839                                                                         
  4840           </Entry>
  4841                                                               
  4842          </Relation ship>
  4843                                                     
  4844         </Element>
  4845                                            
  4846        </Entry>
  4847                                           
  4848        <Entry>
  4849                                                    
  4850         <Element 
  4851          Type="SqlS impleColum n" 
  4852          Name="[App ].[NVCC_St ations].[Z ip]"
  4853         >
  4854                                                              
  4855          <Relations hip 
  4856           Name="Type Specifier"
  4857          >
  4858                                                                        
  4859           <Entry>
  4860                                                                                  
  4861            <Element 
  4862             Type="SqlT ypeSpecifi er"
  4863            >
  4864                                                                                            
  4865             <Property 
  4866              Name="Leng th" 
  4867              Value="50"  
  4868             />
  4869                                                                                            
  4870             <Relations hip 
  4871              Name="Type "
  4872             >
  4873                                                                                                     
  4874              <Entry>
  4875                                                                                                               
  4876               <Reference
  4877                ExternalSo urce="Buil tIns" 
  4878                Name="[var char]" 
  4879               />
  4880                                                                                                      
  4881              </Entry>
  4882                                                                                             
  4883             </Relation ship>
  4884                                                                                   
  4885            </Element>
  4886                                                                         
  4887           </Entry>
  4888                                                               
  4889          </Relation ship>
  4890                                                     
  4891         </Element>
  4892                                            
  4893        </Entry>
  4894                                           
  4895        <Entry>
  4896                                                    
  4897         <Element 
  4898          Type="SqlS impleColum n" 
  4899          Name="[App ].[NVCC_St ations].[F acilityPho neNumber]"
  4900         >
  4901                                                              
  4902          <Relations hip 
  4903           Name="Type Specifier"
  4904          >
  4905                                                                        
  4906           <Entry>
  4907                                                                                  
  4908            <Element 
  4909             Type="SqlT ypeSpecifi er"
  4910            >
  4911                                                                                            
  4912             <Property 
  4913              Name="Leng th" 
  4914              Value="50"  
  4915             />
  4916                                                                                            
  4917             <Relations hip 
  4918              Name="Type "
  4919             >
  4920                                                                                                     
  4921              <Entry>
  4922                                                                                                               
  4923               <Reference
  4924                ExternalSo urce="Buil tIns" 
  4925                Name="[var char]" 
  4926               />
  4927                                                                                                      
  4928              </Entry>
  4929                                                                                             
  4930             </Relation ship>
  4931                                                                                   
  4932            </Element>
  4933                                                                         
  4934           </Entry>
  4935                                                               
  4936          </Relation ship>
  4937                                                     
  4938         </Element>
  4939                                            
  4940        </Entry>
  4941                                           
  4942        <Entry>
  4943                                                    
  4944         <Element 
  4945          Type="SqlS impleColum n" 
  4946          Name="[App ].[NVCC_St ations].[F acilityFax Number]"
  4947         >
  4948                                                              
  4949          <Relations hip 
  4950           Name="Type Specifier"
  4951          >
  4952                                                                        
  4953           <Entry>
  4954                                                                                  
  4955            <Element 
  4956             Type="SqlT ypeSpecifi er"
  4957            >
  4958                                                                                            
  4959             <Property 
  4960              Name="Leng th" 
  4961              Value="50"  
  4962             />
  4963                                                                                            
  4964             <Relations hip 
  4965              Name="Type "
  4966             >
  4967                                                                                                     
  4968              <Entry>
  4969                                                                                                               
  4970               <Reference
  4971                ExternalSo urce="Buil tIns" 
  4972                Name="[var char]" 
  4973               />
  4974                                                                                                      
  4975              </Entry>
  4976                                                                                             
  4977             </Relation ship>
  4978                                                                                   
  4979            </Element>
  4980                                                                         
  4981           </Entry>
  4982                                                               
  4983          </Relation ship>
  4984                                                     
  4985         </Element>
  4986                                            
  4987        </Entry>
  4988                                           
  4989        <Entry>
  4990                                                    
  4991         <Element 
  4992          Type="SqlS impleColum n" 
  4993          Name="[App ].[NVCC_St ations].[T PAOK]"
  4994         >
  4995                                                              
  4996          <Property 
  4997           Name="IsNu llable" 
  4998           Value="Fal se" 
  4999          />
  5000                                                              
  5001          <Relations hip 
  5002           Name="Type Specifier"
  5003          >
  5004                                                                        
  5005           <Entry>
  5006                                                                                  
  5007            <Element 
  5008             Type="SqlT ypeSpecifi er"
  5009            >
  5010                                                                                            
  5011             <Property 
  5012              Name="Leng th" 
  5013              Value="3" 
  5014             />
  5015                                                                                            
  5016             <Relations hip 
  5017              Name="Type "
  5018             >
  5019                                                                                                     
  5020              <Entry>
  5021                                                                                                               
  5022               <Reference
  5023                ExternalSo urce="Buil tIns" 
  5024                Name="[var char]" 
  5025               />
  5026                                                                                                      
  5027              </Entry>
  5028                                                                                             
  5029             </Relation ship>
  5030                                                                                   
  5031            </Element>
  5032                                                                         
  5033           </Entry>
  5034                                                               
  5035          </Relation ship>
  5036                                                     
  5037         </Element>
  5038                                            
  5039        </Entry>
  5040                                           
  5041        <Entry>
  5042                                                    
  5043         <Element 
  5044          Type="SqlS impleColum n" 
  5045          Name="[App ].[NVCC_St ations].[T PAName]"
  5046         >
  5047                                                              
  5048          <Relations hip 
  5049           Name="Type Specifier"
  5050          >
  5051                                                                        
  5052           <Entry>
  5053                                                                                  
  5054            <Element 
  5055             Type="SqlT ypeSpecifi er"
  5056            >
  5057                                                                                            
  5058             <Property 
  5059              Name="Leng th" 
  5060              Value="30"  
  5061             />
  5062                                                                                            
  5063             <Relations hip 
  5064              Name="Type "
  5065             >
  5066                                                                                                     
  5067              <Entry>
  5068                                                                                                               
  5069               <Reference
  5070                ExternalSo urce="Buil tIns" 
  5071                Name="[var char]" 
  5072               />
  5073                                                                                                      
  5074              </Entry>
  5075                                                                                             
  5076             </Relation ship>
  5077                                                                                   
  5078            </Element>
  5079                                                                         
  5080           </Entry>
  5081                                                               
  5082          </Relation ship>
  5083                                                     
  5084         </Element>
  5085                                            
  5086        </Entry>
  5087                                           
  5088        <Entry>
  5089                                                    
  5090         <Element 
  5091          Type="SqlS impleColum n" 
  5092          Name="[App ].[NVCC_St ations].[T PAPhone]"
  5093         >
  5094                                                              
  5095          <Relations hip 
  5096           Name="Type Specifier"
  5097          >
  5098                                                                        
  5099           <Entry>
  5100                                                                                  
  5101            <Element 
  5102             Type="SqlT ypeSpecifi er"
  5103            >
  5104                                                                                            
  5105             <Property 
  5106              Name="Leng th" 
  5107              Value="20"  
  5108             />
  5109                                                                                            
  5110             <Relations hip 
  5111              Name="Type "
  5112             >
  5113                                                                                                     
  5114              <Entry>
  5115                                                                                                               
  5116               <Reference
  5117                ExternalSo urce="Buil tIns" 
  5118                Name="[var char]" 
  5119               />
  5120                                                                                                      
  5121              </Entry>
  5122                                                                                             
  5123             </Relation ship>
  5124                                                                                   
  5125            </Element>
  5126                                                                         
  5127           </Entry>
  5128                                                               
  5129          </Relation ship>
  5130                                                     
  5131         </Element>
  5132                                            
  5133        </Entry>
  5134                                           
  5135        <Entry>
  5136                                                    
  5137         <Element 
  5138          Type="SqlS impleColum n" 
  5139          Name="[App ].[NVCC_St ations].[T PAFax]"
  5140         >
  5141                                                              
  5142          <Relations hip 
  5143           Name="Type Specifier"
  5144          >
  5145                                                                        
  5146           <Entry>
  5147                                                                                  
  5148            <Element 
  5149             Type="SqlT ypeSpecifi er"
  5150            >
  5151                                                                                            
  5152             <Property 
  5153              Name="Leng th" 
  5154              Value="20"  
  5155             />
  5156                                                                                            
  5157             <Relations hip 
  5158              Name="Type "
  5159             >
  5160                                                                                                     
  5161              <Entry>
  5162                                                                                                               
  5163               <Reference
  5164                ExternalSo urce="Buil tIns" 
  5165                Name="[var char]" 
  5166               />
  5167                                                                                                      
  5168              </Entry>
  5169                                                                                             
  5170             </Relation ship>
  5171                                                                                   
  5172            </Element>
  5173                                                                         
  5174           </Entry>
  5175                                                               
  5176          </Relation ship>
  5177                                                     
  5178         </Element>
  5179                                            
  5180        </Entry>
  5181                                  
  5182       </Relation ship>
  5183                                 
  5184       <Relations hip 
  5185        Name="Sche ma"
  5186       >
  5187                                           
  5188        <Entry>
  5189                                                    
  5190         <Reference
  5191          Name="[App ]" 
  5192         />
  5193                                            
  5194        </Entry>
  5195                                  
  5196       </Relation ship>
  5197                                 
  5198       <Annotatio
  5199        Type="SqlI nlineConst raintAnnot ation" 
  5200        Disambigua tor="15" 
  5201       />
  5202                        
  5203      </Element>
  5204                       
  5205      <Element 
  5206       Type="SqlM ultiStatem entTableVa luedFuncti on" 
  5207       Name="[App ].[NVCC_ud f_ActiveUs erCount]"
  5208      >
  5209                                 
  5210       <Property 
  5211        Name="Retu rnTableVar iable" 
  5212        Value="@Ac tiveUserCo unt" 
  5213       />
  5214                                 
  5215       <Property 
  5216        Name="IsAn siNullsOn"  
  5217        Value="Tru e" 
  5218       />
  5219                                 
  5220       <Relations hip 
  5221        Name="Body Dependenci es"
  5222       >
  5223                                           
  5224        <Entry>
  5225                                                    
  5226         <Reference
  5227          Name="[App ].[NVCC_Pr oductionLo g]" 
  5228         />
  5229                                            
  5230        </Entry>
  5231                                           
  5232        <Entry>
  5233                                                    
  5234         <Reference
  5235          Name="[App ].[NVCC_Pr oductionLo g].[UserID ]" 
  5236         />
  5237                                            
  5238        </Entry>
  5239                                           
  5240        <Entry>
  5241                                                    
  5242         <Reference
  5243          Name="[App ].[NVCC_Pr oductionLo g].[Sta3n]
  5244         />
  5245                                            
  5246        </Entry>
  5247                                           
  5248        <Entry>
  5249                                                    
  5250         <Reference
  5251          Name="[App ].[NVCC_Pr oductionLo g].[Access DateTime]"  
  5252         />
  5253                                            
  5254        </Entry>
  5255                                           
  5256        <Entry>
  5257                                                    
  5258         <Reference
  5259          ExternalSo urce="Buil tIns" 
  5260          Name="[dat e]" 
  5261         />
  5262                                            
  5263        </Entry>
  5264                                           
  5265        <Entry>
  5266                                                    
  5267         <Reference
  5268          ExternalSo urce="Buil tIns" 
  5269          Name="[var char]" 
  5270         />
  5271                                            
  5272        </Entry>
  5273                                           
  5274        <Entry>
  5275                                                    
  5276         <Reference
  5277          Name="[App ].[NVCC_Pr oductionLo g].[Sta3n]
  5278         />
  5279                                            
  5280        </Entry>
  5281                                           
  5282        <Entry>
  5283                                                    
  5284         <Reference
  5285          Name="[App ].[udf_Sta tionName]"  
  5286         />
  5287                                            
  5288        </Entry>
  5289                                  
  5290       </Relation ship>
  5291                                 
  5292       <Relations hip 
  5293        Name="Colu mns"
  5294       >
  5295                                           
  5296        <Entry>
  5297                                                    
  5298         <Element 
  5299          Type="SqlS impleColum n" 
  5300          Name="[App ].[NVCC_ud f_ActiveUs erCount].[ Station]"
  5301         >
  5302                                                              
  5303          <Property 
  5304           Name="IsNu llable" 
  5305           Value="Fal se" 
  5306          />
  5307                                                              
  5308          <Relations hip 
  5309           Name="Type Specifier"
  5310          >
  5311                                                                        
  5312           <Entry>
  5313                                                                                  
  5314            <Element 
  5315             Type="SqlT ypeSpecifi er"
  5316            >
  5317                                                                                            
  5318             <Property 
  5319              Name="Leng th" 
  5320              Value="56"  
  5321             />
  5322                                                                                            
  5323             <Relations hip 
  5324              Name="Type "
  5325             >
  5326                                                                                                     
  5327              <Entry>
  5328                                                                                                               
  5329               <Reference
  5330                ExternalSo urce="Buil tIns" 
  5331                Name="[var char]" 
  5332               />
  5333                                                                                                      
  5334              </Entry>
  5335                                                                                             
  5336             </Relation ship>
  5337                                                                                   
  5338            </Element>
  5339                                                                         
  5340           </Entry>
  5341                                                               
  5342          </Relation ship>
  5343                                                     
  5344         </Element>
  5345                                            
  5346        </Entry>
  5347                                           
  5348        <Entry>
  5349                                                    
  5350         <Element 
  5351          Type="SqlS impleColum n" 
  5352          Name="[App ].[NVCC_ud f_ActiveUs erCount].[ ActiveUser s]"
  5353         >
  5354                                                              
  5355          <Property 
  5356           Name="IsNu llable" 
  5357           Value="Fal se" 
  5358          />
  5359                                                              
  5360          <Relations hip 
  5361           Name="Type Specifier"
  5362          >
  5363                                                                        
  5364           <Entry>
  5365                                                                                  
  5366            <Element 
  5367             Type="SqlT ypeSpecifi er"
  5368            >
  5369                                                                                            
  5370             <Relations hip 
  5371              Name="Type "
  5372             >
  5373                                                                                                     
  5374              <Entry>
  5375                                                                                                               
  5376               <Reference
  5377                ExternalSo urce="Buil tIns" 
  5378                Name="[int ]" 
  5379               />
  5380                                                                                                      
  5381              </Entry>
  5382                                                                                             
  5383             </Relation ship>
  5384                                                                                   
  5385            </Element>
  5386                                                                         
  5387           </Entry>
  5388                                                               
  5389          </Relation ship>
  5390                                                     
  5391         </Element>
  5392                                            
  5393        </Entry>
  5394                                  
  5395       </Relation ship>
  5396                                 
  5397       <Relations hip 
  5398        Name="Func tionBody"
  5399       >
  5400                                           
  5401        <Entry>
  5402                                                    
  5403         <Element 
  5404          Type="SqlS criptFunct ionImpleme ntation"
  5405         >
  5406                                                              
  5407          <Property 
  5408           Name="Body Script"
  5409          >
  5410                                                                        
  5411           <Value>
  5412            <![CDATA[
  5413            --======== ========== ========== ========== ========== ========== ========== ========== ====
  5414            --Requesto r              : Non  Va Coordin ated Care  Project
  5415            --Author                  : Bria n Diggs
  5416            --Object/S P Name         : NVCC _udf_Activ eUserCount
  5417            --Server                  : 
  5418            --Data Bas e              : CC_R EFDOC
  5419            --Schema                  : App
  5420            --Report                  : N/A
  5421            --Folder                  : N/A
  5422            --Report L oc             : N/A
  5423            --Job                     : None
  5424            --Job Loc                 : None
  5425            --Note                    : 
  5426            --Date Cre ated           : 08-0 2-2016
  5427            --
  5428            --
  5429            --Last Cha nged           : 2017 -07-24
  5430            --Last Cha nged By                 : Brian  Diggs
  5431            --Reason F or Change               : Conver t from usi ng vNVCC_P roductionA ccessLog a nd
  5432            --                          Pati ent.Patien t to using  NVCC_Prod uctionLog.
  5433            --                          Also  embed sta 3n in stat ion name.
  5434            --
  5435            --Purpose                 : To c ount the n umber of " active" us ers.
  5436            --======== ========== ========== ========== ========== ========== ========== ========== ====
  5437            --Uses: Ap p.udf_Stat ionName
  5438            --Uses: Ap p.NVCC_Pro ductionLog
  5439           
  5440            BEGIN
  5441                    IN SERT @Acti veUserCoun t
  5442                    SE LECT
  5443                             '['  + convert( varchar(3) , sta3n) +  '] ' + Ap p.udf_Stat ionName(St a3n) AS St ation,
  5444                             COUN T(*) AS Ac tiveUsers
  5445                    FR OM (
  5446                             SELE CT UserID,  Sta3n
  5447                             FROM
  5448                                      App.NV CC_Product ionLog
  5449                             WHER E AccessDa teTime > d ateadd(day , -30, con vert(date,  getutcdat e()))
  5450                             GROU P BY UserI D, Sta3n
  5451                             HAVI NG COUNT(* ) >= 10
  5452                    )  AS U
  5453                    GR OUP BY U.S ta3n
  5454            --      OR DER BY Act iveUsers D ESC
  5455                    RE TURN
  5456            END;]]>
  5457           </Value>
  5458                                                               
  5459          </Property >
  5460                                                              
  5461          <Annotatio
  5462           Type="SysC ommentsObj ectAnnotat ion"
  5463          >
  5464                                                                        
  5465           <Property 
  5466            Name="Crea teOffset" 
  5467            Value="2" 
  5468           />
  5469                                                                        
  5470           <Property 
  5471            Name="Leng th" 
  5472            Value="185 0" 
  5473           />
  5474                                                                        
  5475           <Property 
  5476            Name="Star tLine" 
  5477            Value="1" 
  5478           />
  5479                                                                        
  5480           <Property 
  5481            Name="Star tColumn" 
  5482            Value="1" 
  5483           />
  5484                                                                        
  5485           <Property 
  5486            Name="Head erContents
  5487            Value="&#x D;&#xA;CRE ATE FUNCTI ON [App].[ NVCC_udf_A ctiveUserC ount] ()&# xD;&#xA;RE TURNS @Act iveUserCou nt TABLE&# xD;&#xA;(& #xD;&#xA;& #x9;Statio n varchar( 56) NOT NU LL,&#xD;&# xA;&#x9;Ac tiveUsers  int NOT NU LL&#xD;&#x A;)&#xD;&# xA;&#xD;&# xA;-- NOTI CE:&#xD;&# xA;-- Do n ot edit th e function  live on t he server.  Code to g enerate&#x D;&#xA;--  the functi on is stor ed in the  project re pository.  Any change s made&#xD ;&#xA;-- t hat are no t recorded  in the re pository w ill be ove rwritten.& #xD;&#xA;& #xD;&#xA;A S" 
  5488           />
  5489                                                               
  5490          </Annotati on>
  5491                                                     
  5492         </Element>
  5493                                            
  5494        </Entry>
  5495                                  
  5496       </Relation ship>
  5497                                 
  5498       <Relations hip 
  5499        Name="Sche ma"
  5500       >
  5501                                           
  5502        <Entry>
  5503                                                    
  5504         <Reference
  5505          Name="[App ]" 
  5506         />
  5507                                            
  5508        </Entry>
  5509                                  
  5510       </Relation ship>
  5511                        
  5512      </Element>
  5513                       
  5514      <Element 
  5515       Type="SqlT able" 
  5516       Name="[App ].[NVCC_Us erFaciliti es]"
  5517      >
  5518                                 
  5519       <Property 
  5520        Name="IsAn siNullsOn"  
  5521        Value="Tru e" 
  5522       />
  5523                                 
  5524       <Relations hip 
  5525        Name="Colu mns"
  5526       >
  5527                                           
  5528        <Entry>
  5529                                                    
  5530         <Element 
  5531          Type="SqlS impleColum n" 
  5532          Name="[App ].[NVCC_Us erFaciliti es].[UserF acilityId] "
  5533         >
  5534                                                              
  5535          <Property 
  5536           Name="IsNu llable" 
  5537           Value="Fal se" 
  5538          />
  5539                                                              
  5540          <Property 
  5541           Name="IsId entity" 
  5542           Value="Tru e" 
  5543          />
  5544                                                              
  5545          <Relations hip 
  5546           Name="Type Specifier"
  5547          >
  5548                                                                        
  5549           <Entry>
  5550                                                                                  
  5551            <Element 
  5552             Type="SqlT ypeSpecifi er"
  5553            >
  5554                                                                                            
  5555             <Relations hip 
  5556              Name="Type "
  5557             >
  5558                                                                                                     
  5559              <Entry>
  5560                                                                                                               
  5561               <Reference
  5562                ExternalSo urce="Buil tIns" 
  5563                Name="[int ]" 
  5564               />
  5565                                                                                                      
  5566              </Entry>
  5567                                                                                             
  5568             </Relation ship>
  5569                                                                                   
  5570            </Element>
  5571                                                                         
  5572           </Entry>
  5573                                                               
  5574          </Relation ship>
  5575                                                              
  5576          <AttachedA nnotation 
  5577           Disambigua tor="9" 
  5578          />
  5579                                                     
  5580         </Element>
  5581                                            
  5582        </Entry>
  5583                                           
  5584        <Entry>
  5585                                                    
  5586         <Element 
  5587          Type="SqlS impleColum n" 
  5588          Name="[App ].[NVCC_Us erFaciliti es].[UserI D]"
  5589         >
  5590                                                              
  5591          <Property 
  5592           Name="IsNu llable" 
  5593           Value="Fal se" 
  5594          />
  5595                                                              
  5596          <Relations hip 
  5597           Name="Type Specifier"
  5598          >
  5599                                                                        
  5600           <Entry>
  5601                                                                                  
  5602            <Element 
  5603             Type="SqlT ypeSpecifi er"
  5604            >
  5605                                                                                            
  5606             <Relations hip 
  5607              Name="Type "
  5608             >
  5609                                                                                                     
  5610              <Entry>
  5611                                                                                                               
  5612               <Reference
  5613                ExternalSo urce="Buil tIns" 
  5614                Name="[int ]" 
  5615               />
  5616                                                                                                      
  5617              </Entry>
  5618                                                                                             
  5619             </Relation ship>
  5620                                                                                   
  5621            </Element>
  5622                                                                         
  5623           </Entry>
  5624                                                               
  5625          </Relation ship>
  5626                                                     
  5627         </Element>
  5628                                            
  5629        </Entry>
  5630                                           
  5631        <Entry>
  5632                                                    
  5633         <Element 
  5634          Type="SqlS impleColum n" 
  5635          Name="[App ].[NVCC_Us erFaciliti es].[Sta3n ]"
  5636         >
  5637                                                              
  5638          <Property 
  5639           Name="IsNu llable" 
  5640           Value="Fal se" 
  5641          />
  5642                                                              
  5643          <Relations hip 
  5644           Name="Type Specifier"
  5645          >
  5646                                                                        
  5647           <Entry>
  5648                                                                                  
  5649            <Element 
  5650             Type="SqlT ypeSpecifi er"
  5651            >
  5652                                                                                            
  5653             <Relations hip 
  5654              Name="Type "
  5655             >
  5656                                                                                                     
  5657              <Entry>
  5658                                                                                                               
  5659               <Reference
  5660                ExternalSo urce="Buil tIns" 
  5661                Name="[sma llint]" 
  5662               />
  5663                                                                                                      
  5664              </Entry>
  5665                                                                                             
  5666             </Relation ship>
  5667                                                                                   
  5668            </Element>
  5669                                                                         
  5670           </Entry>
  5671                                                               
  5672          </Relation ship>
  5673                                                     
  5674         </Element>
  5675                                            
  5676        </Entry>
  5677                                           
  5678        <Entry>
  5679                                                    
  5680         <Element 
  5681          Type="SqlS impleColum n" 
  5682          Name="[App ].[NVCC_Us erFaciliti es].[Sta6a ]"
  5683         >
  5684                                                              
  5685          <Relations hip 
  5686           Name="Type Specifier"
  5687          >
  5688                                                                        
  5689           <Entry>
  5690                                                                                  
  5691            <Element 
  5692             Type="SqlT ypeSpecifi er"
  5693            >
  5694                                                                                            
  5695             <Property 
  5696              Name="Leng th" 
  5697              Value="50"  
  5698             />
  5699                                                                                            
  5700             <Relations hip 
  5701              Name="Type "
  5702             >
  5703                                                                                                     
  5704              <Entry>
  5705                                                                                                               
  5706               <Reference
  5707                ExternalSo urce="Buil tIns" 
  5708                Name="[var char]" 
  5709               />
  5710                                                                                                      
  5711              </Entry>
  5712                                                                                             
  5713             </Relation ship>
  5714                                                                                   
  5715            </Element>
  5716                                                                         
  5717           </Entry>
  5718                                                               
  5719          </Relation ship>
  5720                                                     
  5721         </Element>
  5722                                            
  5723        </Entry>
  5724                                           
  5725        <Entry>
  5726                                                    
  5727         <Element 
  5728          Type="SqlS impleColum n" 
  5729          Name="[App ].[NVCC_Us erFaciliti es].[LastA uthDateTim e]"
  5730         >
  5731                                                              
  5732          <Relations hip 
  5733           Name="Type Specifier"
  5734          >
  5735                                                                        
  5736           <Entry>
  5737                                                                                  
  5738            <Element 
  5739             Type="SqlT ypeSpecifi er"
  5740            >
  5741                                                                                            
  5742             <Relations hip 
  5743              Name="Type "
  5744             >
  5745                                                                                                     
  5746              <Entry>
  5747                                                                                                               
  5748               <Reference
  5749                ExternalSo urce="Buil tIns" 
  5750                Name="[dat etime2]" 
  5751               />
  5752                                                                                                      
  5753              </Entry>
  5754                                                                                             
  5755             </Relation ship>
  5756                                                                                   
  5757            </Element>
  5758                                                                         
  5759           </Entry>
  5760                                                               
  5761          </Relation ship>
  5762                                                     
  5763         </Element>
  5764                                            
  5765        </Entry>
  5766                                           
  5767        <Entry>
  5768                                                    
  5769         <Element 
  5770          Type="SqlS impleColum n" 
  5771          Name="[App ].[NVCC_Us erFaciliti es].[ViaB] "
  5772         >
  5773                                                              
  5774          <Relations hip 
  5775           Name="Type Specifier"
  5776          >
  5777                                                                        
  5778           <Entry>
  5779                                                                                  
  5780            <Element 
  5781             Type="SqlT ypeSpecifi er"
  5782            >
  5783                                                                                            
  5784             <Relations hip 
  5785              Name="Type "
  5786             >
  5787                                                                                                     
  5788              <Entry>
  5789                                                                                                               
  5790               <Reference
  5791                ExternalSo urce="Buil tIns" 
  5792                Name="[bit ]" 
  5793               />
  5794                                                                                                      
  5795              </Entry>
  5796                                                                                             
  5797             </Relation ship>
  5798                                                                                   
  5799            </Element>
  5800                                                                         
  5801           </Entry>
  5802                                                               
  5803          </Relation ship>
  5804                                                     
  5805         </Element>
  5806                                            
  5807        </Entry>
  5808                                           
  5809        <Entry>
  5810                                                    
  5811         <Element 
  5812          Type="SqlS impleColum n" 
  5813          Name="[App ].[NVCC_Us erFaciliti es].[admin ]"
  5814         >
  5815                                                              
  5816          <Property 
  5817           Name="IsNu llable" 
  5818           Value="Fal se" 
  5819          />
  5820                                                              
  5821          <Relations hip 
  5822           Name="Type Specifier"
  5823          >
  5824                                                                        
  5825           <Entry>
  5826                                                                                  
  5827            <Element 
  5828             Type="SqlT ypeSpecifi er"
  5829            >
  5830                                                                                            
  5831             <Relations hip 
  5832              Name="Type "
  5833             >
  5834                                                                                                     
  5835              <Entry>
  5836                                                                                                               
  5837               <Reference
  5838                ExternalSo urce="Buil tIns" 
  5839                Name="[bit ]" 
  5840               />
  5841                                                                                                      
  5842              </Entry>
  5843                                                                                             
  5844             </Relation ship>
  5845                                                                                   
  5846            </Element>
  5847                                                                         
  5848           </Entry>
  5849                                                               
  5850          </Relation ship>
  5851                                                              
  5852          <AttachedA nnotation 
  5853           Disambigua tor="6" 
  5854          />
  5855                                                     
  5856         </Element>
  5857                                            
  5858        </Entry>
  5859                                  
  5860       </Relation ship>
  5861                                 
  5862       <Relations hip 
  5863        Name="Data Compressio nOptions"
  5864       >
  5865                                           
  5866        <Entry>
  5867                                                    
  5868         <Element 
  5869          Type="SqlD ataCompres sionOption "
  5870         >
  5871                                                              
  5872          <Property 
  5873           Name="Comp ressionLev el" 
  5874           Value="2" 
  5875          />
  5876                                                              
  5877          <Property 
  5878           Name="Part itionNumbe r" 
  5879           Value="1" 
  5880          />
  5881                                                     
  5882         </Element>
  5883                                            
  5884        </Entry>
  5885                                  
  5886       </Relation ship>
  5887                                 
  5888       <Relations hip 
  5889        Name="Sche ma"
  5890       >
  5891                                           
  5892        <Entry>
  5893                                                    
  5894         <Reference
  5895          Name="[App ]" 
  5896         />
  5897                                            
  5898        </Entry>
  5899                                  
  5900       </Relation ship>
  5901                        
  5902      </Element>
  5903                       
  5904      <Element 
  5905       Type="SqlI ndex" 
  5906       Name="[App ].[NVCC_Us erFaciliti es].[NVCC_ UserFacili ties_UserF acilityId] "
  5907      >
  5908                                 
  5909       <Property 
  5910        Name="IsUn ique" 
  5911        Value="Tru e" 
  5912       />
  5913                                 
  5914       <Relations hip 
  5915        Name="Colu mnSpecific ations"
  5916       >
  5917                                           
  5918        <Entry>
  5919                                                    
  5920         <Element 
  5921          Type="SqlI ndexedColu mnSpecific ation"
  5922         >
  5923                                                              
  5924          <Relations hip 
  5925           Name="Colu mn"
  5926          >
  5927                                                                        
  5928           <Entry>
  5929                                                                                  
  5930            <Reference
  5931             Name="[App ].[NVCC_Us erFaciliti es].[UserF acilityId]
  5932            />
  5933                                                                         
  5934           </Entry>
  5935                                                               
  5936          </Relation ship>
  5937                                                     
  5938         </Element>
  5939                                            
  5940        </Entry>
  5941                                  
  5942       </Relation ship>
  5943                                 
  5944       <Relations hip 
  5945        Name="Data Compressio nOptions"
  5946       >
  5947                                           
  5948        <Entry>
  5949                                                    
  5950         <Element 
  5951          Type="SqlD ataCompres sionOption "
  5952         >
  5953                                                              
  5954          <Property 
  5955           Name="Comp ressionLev el" 
  5956           Value="2" 
  5957          />
  5958                                                              
  5959          <Property 
  5960           Name="Part itionNumbe r" 
  5961           Value="1" 
  5962          />
  5963                                                     
  5964         </Element>
  5965                                            
  5966        </Entry>
  5967                                  
  5968       </Relation ship>
  5969                                 
  5970       <Relations hip 
  5971        Name="Inde xedObject"
  5972       >
  5973                                           
  5974        <Entry>
  5975                                                    
  5976         <Reference
  5977          Name="[App ].[NVCC_Us erFaciliti es]" 
  5978         />
  5979                                            
  5980        </Entry>
  5981                                  
  5982       </Relation ship>
  5983                        
  5984      </Element>
  5985                       
  5986      <Element 
  5987       Type="SqlI ndex" 
  5988       Name="[App ].[NVCC_Us erFaciliti es].[NVCC_ UserFacili ties_UserI DSta3n]"
  5989      >
  5990                                 
  5991       <Property 
  5992        Name="IsUn ique" 
  5993        Value="Tru e" 
  5994       />
  5995                                 
  5996       <Property 
  5997        Name="IsCl ustered" 
  5998        Value="Tru e" 
  5999       />
  6000                                 
  6001       <Relations hip 
  6002        Name="Colu mnSpecific ations"
  6003       >
  6004                                           
  6005        <Entry>
  6006                                                    
  6007         <Element 
  6008          Type="SqlI ndexedColu mnSpecific ation"
  6009         >
  6010                                                              
  6011          <Relations hip 
  6012           Name="Colu mn"
  6013          >
  6014                                                                        
  6015           <Entry>
  6016                                                                                  
  6017            <Reference
  6018             Name="[App ].[NVCC_Us erFaciliti es].[UserI D]" 
  6019            />
  6020                                                                         
  6021           </Entry>
  6022                                                               
  6023          </Relation ship>
  6024                                                     
  6025         </Element>
  6026                                            
  6027        </Entry>
  6028                                           
  6029        <Entry>
  6030                                                    
  6031         <Element 
  6032          Type="SqlI ndexedColu mnSpecific ation"
  6033         >
  6034                                                              
  6035          <Relations hip 
  6036           Name="Colu mn"
  6037          >
  6038                                                                        
  6039           <Entry>
  6040                                                                                  
  6041            <Reference
  6042             Name="[App ].[NVCC_Us erFaciliti es].[Sta3n ]" 
  6043            />
  6044                                                                         
  6045           </Entry>
  6046                                                               
  6047          </Relation ship>
  6048                                                     
  6049         </Element>
  6050                                            
  6051        </Entry>
  6052                                  
  6053       </Relation ship>
  6054                                 
  6055       <Relations hip 
  6056        Name="Data Compressio nOptions"
  6057       >
  6058                                           
  6059        <Entry>
  6060                                                    
  6061         <Element 
  6062          Type="SqlD ataCompres sionOption "
  6063         >
  6064                                                              
  6065          <Property 
  6066           Name="Comp ressionLev el" 
  6067           Value="2" 
  6068          />
  6069                                                              
  6070          <Property 
  6071           Name="Part itionNumbe r" 
  6072           Value="1" 
  6073          />
  6074                                                     
  6075         </Element>
  6076                                            
  6077        </Entry>
  6078                                  
  6079       </Relation ship>
  6080                                 
  6081       <Relations hip 
  6082        Name="Inde xedObject"
  6083       >
  6084                                           
  6085        <Entry>
  6086                                                    
  6087         <Reference
  6088          Name="[App ].[NVCC_Us erFaciliti es]" 
  6089         />
  6090                                            
  6091        </Entry>
  6092                                  
  6093       </Relation ship>
  6094                        
  6095      </Element>
  6096                       
  6097      <Element 
  6098       Type="SqlT able" 
  6099       Name="[App ].[NVCC_Us ers]"
  6100      >
  6101                                 
  6102       <Property 
  6103        Name="IsAn siNullsOn"  
  6104        Value="Tru e" 
  6105       />
  6106                                 
  6107       <Relations hip 
  6108        Name="Colu mns"
  6109       >
  6110                                           
  6111        <Entry>
  6112                                                    
  6113         <Element 
  6114          Type="SqlS impleColum n" 
  6115          Name="[App ].[NVCC_Us ers].[ID]"
  6116         >
  6117                                                              
  6118          <Property 
  6119           Name="IsNu llable" 
  6120           Value="Fal se" 
  6121          />
  6122                                                              
  6123          <Property 
  6124           Name="IsId entity" 
  6125           Value="Tru e" 
  6126          />
  6127                                                              
  6128          <Relations hip 
  6129           Name="Type Specifier"
  6130          >
  6131                                                                        
  6132           <Entry>
  6133                                                                                  
  6134            <Element 
  6135             Type="SqlT ypeSpecifi er"
  6136            >
  6137                                                                                            
  6138             <Relations hip 
  6139              Name="Type "
  6140             >
  6141                                                                                                     
  6142              <Entry>
  6143                                                                                                               
  6144               <Reference
  6145                ExternalSo urce="Buil tIns" 
  6146                Name="[int ]" 
  6147               />
  6148                                                                                                      
  6149              </Entry>
  6150                                                                                             
  6151             </Relation ship>
  6152                                                                                   
  6153            </Element>
  6154                                                                         
  6155           </Entry>
  6156                                                               
  6157          </Relation ship>
  6158                                                     
  6159         </Element>
  6160                                            
  6161        </Entry>
  6162                                           
  6163        <Entry>
  6164                                                    
  6165         <Element 
  6166          Type="SqlS impleColum n" 
  6167          Name="[App ].[NVCC_Us ers].[Doma inPlusNetw orkUserNam e]"
  6168         >
  6169                                                              
  6170          <Property 
  6171           Name="IsNu llable" 
  6172           Value="Fal se" 
  6173          />
  6174                                                              
  6175          <Relations hip 
  6176           Name="Type Specifier"
  6177          >
  6178                                                                        
  6179           <Entry>
  6180                                                                                  
  6181            <Element 
  6182             Type="SqlT ypeSpecifi er"
  6183            >
  6184                                                                                            
  6185             <Property 
  6186              Name="Leng th" 
  6187              Value="50"  
  6188             />
  6189                                                                                            
  6190             <Relations hip 
  6191              Name="Type "
  6192             >
  6193                                                                                                     
  6194              <Entry>
  6195                                                                                                               
  6196               <Reference
  6197                ExternalSo urce="Buil tIns" 
  6198                Name="[var char]" 
  6199               />
  6200                                                                                                      
  6201              </Entry>
  6202                                                                                             
  6203             </Relation ship>
  6204                                                                                   
  6205            </Element>
  6206                                                                         
  6207           </Entry>
  6208                                                               
  6209          </Relation ship>
  6210                                                     
  6211         </Element>
  6212                                            
  6213        </Entry>
  6214                                           
  6215        <Entry>
  6216                                                    
  6217         <Element 
  6218          Type="SqlS impleColum n" 
  6219          Name="[App ].[NVCC_Us ers].[Save Date]"
  6220         >
  6221                                                              
  6222          <Relations hip 
  6223           Name="Type Specifier"
  6224          >
  6225                                                                        
  6226           <Entry>
  6227                                                                                  
  6228            <Element 
  6229             Type="SqlT ypeSpecifi er"
  6230            >
  6231                                                                                            
  6232             <Relations hip 
  6233              Name="Type "
  6234             >
  6235                                                                                                     
  6236              <Entry>
  6237                                                                                                               
  6238               <Reference
  6239                ExternalSo urce="Buil tIns" 
  6240                Name="[dat etime]" 
  6241               />
  6242                                                                                                      
  6243              </Entry>
  6244                                                                                             
  6245             </Relation ship>
  6246                                                                                   
  6247            </Element>
  6248                                                                         
  6249           </Entry>
  6250                                                               
  6251          </Relation ship>
  6252                                                     
  6253         </Element>
  6254                                            
  6255        </Entry>
  6256                                           
  6257        <Entry>
  6258                                                    
  6259         <Element 
  6260          Type="SqlS impleColum n" 
  6261          Name="[App ].[NVCC_Us ers].[Sta3 n]"
  6262         >
  6263                                                              
  6264          <Property 
  6265           Name="IsNu llable" 
  6266           Value="Fal se" 
  6267          />
  6268                                                              
  6269          <Relations hip 
  6270           Name="Type Specifier"
  6271          >
  6272                                                                        
  6273           <Entry>
  6274                                                                                  
  6275            <Element 
  6276             Type="SqlT ypeSpecifi er"
  6277            >
  6278                                                                                            
  6279             <Relations hip 
  6280              Name="Type "
  6281             >
  6282                                                                                                     
  6283              <Entry>
  6284                                                                                                               
  6285               <Reference
  6286                ExternalSo urce="Buil tIns" 
  6287                Name="[int ]" 
  6288               />
  6289                                                                                                      
  6290              </Entry>
  6291                                                                                             
  6292             </Relation ship>
  6293                                                                                   
  6294            </Element>
  6295                                                                         
  6296           </Entry>
  6297                                                               
  6298          </Relation ship>
  6299                                                     
  6300         </Element>
  6301                                            
  6302        </Entry>
  6303                                           
  6304        <Entry>
  6305                                                    
  6306         <Element 
  6307          Type="SqlS impleColum n" 
  6308          Name="[App ].[NVCC_Us ers].[User IEN]"
  6309         >
  6310                                                              
  6311          <Relations hip 
  6312           Name="Type Specifier"
  6313          >
  6314                                                                        
  6315           <Entry>
  6316                                                                                  
  6317            <Element 
  6318             Type="SqlT ypeSpecifi er"
  6319            >
  6320                                                                                            
  6321             <Property 
  6322              Name="Leng th" 
  6323              Value="50"  
  6324             />
  6325                                                                                            
  6326             <Relations hip 
  6327              Name="Type "
  6328             >
  6329                                                                                                     
  6330              <Entry>
  6331                                                                                                               
  6332               <Reference
  6333                ExternalSo urce="Buil tIns" 
  6334                Name="[var char]" 
  6335               />
  6336                                                                                                      
  6337              </Entry>
  6338                                                                                             
  6339             </Relation ship>
  6340                                                                                   
  6341            </Element>
  6342                                                                         
  6343           </Entry>
  6344                                                               
  6345          </Relation ship>
  6346                                                     
  6347         </Element>
  6348                                            
  6349        </Entry>
  6350                                           
  6351        <Entry>
  6352                                                    
  6353         <Element 
  6354          Type="SqlS impleColum n" 
  6355          Name="[App ].[NVCC_Us ers].[IsCo signerRequ ired]"
  6356         >
  6357                                                              
  6358          <Relations hip 
  6359           Name="Type Specifier"
  6360          >
  6361                                                                        
  6362           <Entry>
  6363                                                                                  
  6364            <Element 
  6365             Type="SqlT ypeSpecifi er"
  6366            >
  6367                                                                                            
  6368             <Property 
  6369              Name="Leng th" 
  6370              Value="5" 
  6371             />
  6372                                                                                            
  6373             <Relations hip 
  6374              Name="Type "
  6375             >
  6376                                                                                                     
  6377              <Entry>
  6378                                                                                                               
  6379               <Reference
  6380                ExternalSo urce="Buil tIns" 
  6381                Name="[var char]" 
  6382               />
  6383                                                                                                      
  6384              </Entry>
  6385                                                                                             
  6386             </Relation ship>
  6387                                                                                   
  6388            </Element>
  6389                                                                         
  6390           </Entry>
  6391                                                               
  6392          </Relation ship>
  6393                                                     
  6394         </Element>
  6395                                            
  6396        </Entry>
  6397                                           
  6398        <Entry>
  6399                                                    
  6400         <Element 
  6401          Type="SqlS impleColum n" 
  6402          Name="[App ].[NVCC_Us ers].[Admi n]"
  6403         >
  6404                                                              
  6405          <Relations hip 
  6406           Name="Type Specifier"
  6407          >
  6408                                                                        
  6409           <Entry>
  6410                                                                                  
  6411            <Element 
  6412             Type="SqlT ypeSpecifi er"
  6413            >
  6414                                                                                            
  6415             <Relations hip 
  6416              Name="Type "
  6417             >
  6418                                                                                                     
  6419              <Entry>
  6420                                                                                                               
  6421               <Reference
  6422                ExternalSo urce="Buil tIns" 
  6423                Name="[bit ]" 
  6424               />
  6425                                                                                                      
  6426              </Entry>
  6427                                                                                             
  6428             </Relation ship>
  6429                                                                                   
  6430            </Element>
  6431                                                                         
  6432           </Entry>
  6433                                                               
  6434          </Relation ship>
  6435                                                     
  6436         </Element>
  6437                                            
  6438        </Entry>
  6439                                           
  6440        <Entry>
  6441                                                    
  6442         <Element 
  6443          Type="SqlS impleColum n" 
  6444          Name="[App ].[NVCC_Us ers].[Acce ssCode]"
  6445         >
  6446                                                              
  6447          <Relations hip 
  6448           Name="Type Specifier"
  6449          >
  6450                                                                        
  6451           <Entry>
  6452                                                                                  
  6453            <Element 
  6454             Type="SqlT ypeSpecifi er"
  6455            >
  6456                                                                                            
  6457             <Property 
  6458              Name="Leng th" 
  6459              Value="100
  6460             />
  6461                                                                                            
  6462             <Relations hip 
  6463              Name="Type "
  6464             >
  6465                                                                                                     
  6466              <Entry>
  6467                                                                                                               
  6468               <Reference
  6469                ExternalSo urce="Buil tIns" 
  6470                Name="[var char]" 
  6471               />
  6472                                                                                                      
  6473              </Entry>
  6474                                                                                             
  6475             </Relation ship>
  6476                                                                                   
  6477            </Element>
  6478                                                                         
  6479           </Entry>
  6480                                                               
  6481          </Relation ship>
  6482                                                     
  6483         </Element>
  6484                                            
  6485        </Entry>
  6486                                           
  6487        <Entry>
  6488                                                    
  6489         <Element 
  6490          Type="SqlS impleColum n" 
  6491          Name="[App ].[NVCC_Us ers].[Veri fyCode]"
  6492         >
  6493                                                              
  6494          <Relations hip 
  6495           Name="Type Specifier"
  6496          >
  6497                                                                        
  6498           <Entry>
  6499                                                                                  
  6500            <Element 
  6501             Type="SqlT ypeSpecifi er"
  6502            >
  6503                                                                                            
  6504             <Property 
  6505              Name="Leng th" 
  6506              Value="100
  6507             />
  6508                                                                                            
  6509             <Relations hip 
  6510              Name="Type "
  6511             >
  6512                                                                                                     
  6513              <Entry>
  6514                                                                                                               
  6515               <Reference
  6516                ExternalSo urce="Buil tIns" 
  6517                Name="[var char]" 
  6518               />
  6519                                                                                                      
  6520              </Entry>
  6521                                                                                             
  6522             </Relation ship>
  6523                                                                                   
  6524            </Element>
  6525                                                                         
  6526           </Entry>
  6527                                                               
  6528          </Relation ship>
  6529                                                     
  6530         </Element>
  6531                                            
  6532        </Entry>
  6533                                           
  6534        <Entry>
  6535                                                    
  6536         <Element 
  6537          Type="SqlS impleColum n" 
  6538          Name="[App ].[NVCC_Us ers].[ViaB Approved]"
  6539         >
  6540                                                              
  6541          <Relations hip 
  6542           Name="Type Specifier"
  6543          >
  6544                                                                        
  6545           <Entry>
  6546                                                                                  
  6547            <Element 
  6548             Type="SqlT ypeSpecifi er"
  6549            >
  6550                                                                                            
  6551             <Relations hip 
  6552              Name="Type "
  6553             >
  6554                                                                                                     
  6555              <Entry>
  6556                                                                                                               
  6557               <Reference
  6558                ExternalSo urce="Buil tIns" 
  6559                Name="[bit ]" 
  6560               />
  6561                                                                                                      
  6562              </Entry>
  6563                                                                                             
  6564             </Relation ship>
  6565                                                                                   
  6566            </Element>
  6567                                                                         
  6568           </Entry>
  6569                                                               
  6570          </Relation ship>
  6571                                                     
  6572         </Element>
  6573                                            
  6574        </Entry>
  6575                                           
  6576        <Entry>
  6577                                                    
  6578         <Element 
  6579          Type="SqlS impleColum n" 
  6580          Name="[App ].[NVCC_Us ers].[Sta6 a]"
  6581         >
  6582                                                              
  6583          <Relations hip 
  6584           Name="Type Specifier"
  6585          >
  6586                                                                        
  6587           <Entry>
  6588                                                                                  
  6589            <Element 
  6590             Type="SqlT ypeSpecifi er"
  6591            >
  6592                                                                                            
  6593             <Property 
  6594              Name="Leng th" 
  6595              Value="10"  
  6596             />
  6597                                                                                            
  6598             <Relations hip 
  6599              Name="Type "
  6600             >
  6601                                                                                                     
  6602              <Entry>
  6603                                                                                                               
  6604               <Reference
  6605                ExternalSo urce="Buil tIns" 
  6606                Name="[var char]" 
  6607               />
  6608                                                                                                      
  6609              </Entry>
  6610                                                                                             
  6611             </Relation ship>
  6612                                                                                   
  6613            </Element>
  6614                                                                         
  6615           </Entry>
  6616                                                               
  6617          </Relation ship>
  6618                                                     
  6619         </Element>
  6620                                            
  6621        </Entry>
  6622                                           
  6623        <Entry>
  6624                                                    
  6625         <Element 
  6626          Type="SqlS impleColum n" 
  6627          Name="[App ].[NVCC_Us ers].[User SessionId] "
  6628         >
  6629                                                              
  6630          <Relations hip 
  6631           Name="Type Specifier"
  6632          >
  6633                                                                        
  6634           <Entry>
  6635                                                                                  
  6636            <Element 
  6637             Type="SqlT ypeSpecifi er"
  6638            >
  6639                                                                                            
  6640             <Property 
  6641              Name="Leng th" 
  6642              Value="100
  6643             />
  6644                                                                                            
  6645             <Relations hip 
  6646              Name="Type "
  6647             >
  6648                                                                                                     
  6649              <Entry>
  6650                                                                                                               
  6651               <Reference
  6652                ExternalSo urce="Buil tIns" 
  6653                Name="[var char]" 
  6654               />
  6655                                                                                                      
  6656              </Entry>
  6657                                                                                             
  6658             </Relation ship>
  6659                                                                                   
  6660            </Element>
  6661                                                                         
  6662           </Entry>
  6663                                                               
  6664          </Relation ship>
  6665                                                     
  6666         </Element>
  6667                                            
  6668        </Entry>
  6669                                           
  6670        <Entry>
  6671                                                    
  6672         <Element 
  6673          Type="SqlS impleColum n" 
  6674          Name="[App ].[NVCC_Us ers].[User SessionSav edDateTime ]"
  6675         >
  6676                                                              
  6677          <Relations hip 
  6678           Name="Type Specifier"
  6679          >
  6680                                                                        
  6681           <Entry>
  6682                                                                                  
  6683            <Element 
  6684             Type="SqlT ypeSpecifi er"
  6685            >
  6686                                                                                            
  6687             <Relations hip 
  6688              Name="Type "
  6689             >
  6690                                                                                                     
  6691              <Entry>
  6692                                                                                                               
  6693               <Reference
  6694                ExternalSo urce="Buil tIns" 
  6695                Name="[dat etime]" 
  6696               />
  6697                                                                                                      
  6698              </Entry>
  6699                                                                                             
  6700             </Relation ship>
  6701                                                                                   
  6702            </Element>
  6703                                                                         
  6704           </Entry>
  6705                                                               
  6706          </Relation ship>
  6707                                                     
  6708         </Element>
  6709                                            
  6710        </Entry>
  6711                                  
  6712       </Relation ship>
  6713                                 
  6714       <Relations hip 
  6715        Name="Sche ma"
  6716       >
  6717                                           
  6718        <Entry>
  6719                                                    
  6720         <Reference
  6721          Name="[App ]" 
  6722         />
  6723                                            
  6724        </Entry>
  6725                                  
  6726       </Relation ship>
  6727                                 
  6728       <Annotatio
  6729        Type="SqlI nlineConst raintAnnot ation" 
  6730        Disambigua tor="16" 
  6731       />
  6732                        
  6733      </Element>
  6734                       
  6735      <Element 
  6736       Type="SqlI ndex" 
  6737       Name="[App ].[NVCC_Us ers].[NVCC _Users_Dom ainPlusNet workUserNa me]"
  6738      >
  6739                                 
  6740       <Property 
  6741        Name="IsUn ique" 
  6742        Value="Tru e" 
  6743       />
  6744                                 
  6745       <Relations hip 
  6746        Name="Colu mnSpecific ations"
  6747       >
  6748                                           
  6749        <Entry>
  6750                                                    
  6751         <Element 
  6752          Type="SqlI ndexedColu mnSpecific ation"
  6753         >
  6754                                                              
  6755          <Relations hip 
  6756           Name="Colu mn"
  6757          >
  6758                                                                        
  6759           <Entry>
  6760                                                                                  
  6761            <Reference
  6762             Name="[App ].[NVCC_Us ers].[Doma inPlusNetw orkUserNam e]" 
  6763            />
  6764                                                                         
  6765           </Entry>
  6766                                                               
  6767          </Relation ship>
  6768                                                     
  6769         </Element>
  6770                                            
  6771        </Entry>
  6772                                  
  6773       </Relation ship>
  6774                                 
  6775       <Relations hip 
  6776        Name="Data Compressio nOptions"
  6777       >
  6778                                           
  6779        <Entry>
  6780                                                    
  6781         <Element 
  6782          Type="SqlD ataCompres sionOption "
  6783         >
  6784                                                              
  6785          <Property 
  6786           Name="Comp ressionLev el" 
  6787           Value="2" 
  6788          />
  6789                                                              
  6790          <Property 
  6791           Name="Part itionNumbe r" 
  6792           Value="1" 
  6793          />
  6794                                                     
  6795         </Element>
  6796                                            
  6797        </Entry>
  6798                                  
  6799       </Relation ship>
  6800                                 
  6801       <Relations hip 
  6802        Name="Inde xedObject"
  6803       >
  6804                                           
  6805        <Entry>
  6806                                                    
  6807         <Reference
  6808          Name="[App ].[NVCC_Us ers]" 
  6809         />
  6810                                            
  6811        </Entry>
  6812                                  
  6813       </Relation ship>
  6814                        
  6815      </Element>
  6816                       
  6817      <Element 
  6818       Type="SqlT able" 
  6819       Name="[App ].[NVCC_Us ersV2]"
  6820      >
  6821                                 
  6822       <Property 
  6823        Name="IsAn siNullsOn"  
  6824        Value="Tru e" 
  6825       />
  6826                                 
  6827       <Relations hip 
  6828        Name="Colu mns"
  6829       >
  6830                                           
  6831        <Entry>
  6832                                                    
  6833         <Element 
  6834          Type="SqlS impleColum n" 
  6835          Name="[App ].[NVCC_Us ersV2].[Us erId]"
  6836         >
  6837                                                              
  6838          <Property 
  6839           Name="IsNu llable" 
  6840           Value="Fal se" 
  6841          />
  6842                                                              
  6843          <Property 
  6844           Name="IsId entity" 
  6845           Value="Tru e" 
  6846          />
  6847                                                              
  6848          <Relations hip 
  6849           Name="Type Specifier"
  6850          >
  6851                                                                        
  6852           <Entry>
  6853                                                                                  
  6854            <Element 
  6855             Type="SqlT ypeSpecifi er"
  6856            >
  6857                                                                                            
  6858             <Relations hip 
  6859              Name="Type "
  6860             >
  6861                                                                                                     
  6862              <Entry>
  6863                                                                                                               
  6864               <Reference
  6865                ExternalSo urce="Buil tIns" 
  6866                Name="[int ]" 
  6867               />
  6868                                                                                                      
  6869              </Entry>
  6870                                                                                             
  6871             </Relation ship>
  6872                                                                                   
  6873            </Element>
  6874                                                                         
  6875           </Entry>
  6876                                                               
  6877          </Relation ship>
  6878                                                              
  6879          <AttachedA nnotation 
  6880           Disambigua tor="8" 
  6881          />
  6882                                                     
  6883         </Element>
  6884                                            
  6885        </Entry>
  6886                                           
  6887        <Entry>
  6888                                                    
  6889         <Element 
  6890          Type="SqlS impleColum n" 
  6891          Name="[App ].[NVCC_Us ersV2].[Us erName]"
  6892         >
  6893                                                              
  6894          <Property 
  6895           Name="IsNu llable" 
  6896           Value="Fal se" 
  6897          />
  6898                                                              
  6899          <Relations hip 
  6900           Name="Type Specifier"
  6901          >
  6902                                                                        
  6903           <Entry>
  6904                                                                                  
  6905            <Element 
  6906             Type="SqlT ypeSpecifi er"
  6907            >
  6908                                                                                            
  6909             <Property 
  6910              Name="Leng th" 
  6911              Value="50"  
  6912             />
  6913                                                                                            
  6914             <Relations hip 
  6915              Name="Type "
  6916             >
  6917                                                                                                     
  6918              <Entry>
  6919                                                                                                               
  6920               <Reference
  6921                ExternalSo urce="Buil tIns" 
  6922                Name="[var char]" 
  6923               />
  6924                                                                                                      
  6925              </Entry>
  6926                                                                                             
  6927             </Relation ship>
  6928                                                                                   
  6929            </Element>
  6930                                                                         
  6931           </Entry>
  6932                                                               
  6933          </Relation ship>
  6934                                                     
  6935         </Element>
  6936                                            
  6937        </Entry>
  6938                                           
  6939        <Entry>
  6940                                                    
  6941         <Element 
  6942          Type="SqlS impleColum n" 
  6943          Name="[App ].[NVCC_Us ersV2].[Ca nAnnounce] "
  6944         >
  6945                                                              
  6946          <Property 
  6947           Name="IsNu llable" 
  6948           Value="Fal se" 
  6949          />
  6950                                                              
  6951          <Relations hip 
  6952           Name="Type Specifier"
  6953          >
  6954                                                                        
  6955           <Entry>
  6956                                                                                  
  6957            <Element 
  6958             Type="SqlT ypeSpecifi er"
  6959            >
  6960                                                                                            
  6961             <Relations hip 
  6962              Name="Type "
  6963             >
  6964                                                                                                     
  6965              <Entry>
  6966                                                                                                               
  6967               <Reference
  6968                ExternalSo urce="Buil tIns" 
  6969                Name="[bit ]" 
  6970               />
  6971                                                                                                      
  6972              </Entry>
  6973                                                                                             
  6974             </Relation ship>
  6975                                                                                   
  6976            </Element>
  6977                                                                         
  6978           </Entry>
  6979                                                               
  6980          </Relation ship>
  6981                                                              
  6982          <AttachedA nnotation 
  6983           Disambigua tor="4" 
  6984          />
  6985                                                     
  6986         </Element>
  6987                                            
  6988        </Entry>
  6989                                           
  6990        <Entry>
  6991                                                    
  6992         <Element 
  6993          Type="SqlS impleColum n" 
  6994          Name="[App ].[NVCC_Us ersV2].[Ca nReport]"
  6995         >
  6996                                                              
  6997          <Property 
  6998           Name="IsNu llable" 
  6999           Value="Fal se" 
  7000          />
  7001                                                              
  7002          <Relations hip 
  7003           Name="Type Specifier"
  7004          >
  7005                                                                        
  7006           <Entry>
  7007                                                                                  
  7008            <Element 
  7009             Type="SqlT ypeSpecifi er"
  7010            >
  7011                                                                                            
  7012             <Relations hip 
  7013              Name="Type "
  7014             >
  7015                                                                                                     
  7016              <Entry>
  7017                                                                                                               
  7018               <Reference
  7019                ExternalSo urce="Buil tIns" 
  7020                Name="[bit ]" 
  7021               />
  7022                                                                                                      
  7023              </Entry>
  7024                                                                                             
  7025             </Relation ship>
  7026                                                                                   
  7027            </Element>
  7028                                                                         
  7029           </Entry>
  7030                                                               
  7031          </Relation ship>
  7032                                                              
  7033          <AttachedA nnotation 
  7034           Disambigua tor="5" 
  7035          />
  7036                                                     
  7037         </Element>
  7038                                            
  7039        </Entry>
  7040                                  
  7041       </Relation ship>
  7042                                 
  7043       <Relations hip 
  7044        Name="Data Compressio nOptions"
  7045       >
  7046                                           
  7047        <Entry>
  7048                                                    
  7049         <Element 
  7050          Type="SqlD ataCompres sionOption "
  7051         >
  7052                                                              
  7053          <Property 
  7054           Name="Comp ressionLev el" 
  7055           Value="2" 
  7056          />
  7057                                                              
  7058          <Property 
  7059           Name="Part itionNumbe r" 
  7060           Value="1" 
  7061          />
  7062                                                     
  7063         </Element>
  7064                                            
  7065        </Entry>
  7066                                  
  7067       </Relation ship>
  7068                                 
  7069       <Relations hip 
  7070        Name="Sche ma"
  7071       >
  7072                                           
  7073        <Entry>
  7074                                                    
  7075         <Reference
  7076          Name="[App ]" 
  7077         />
  7078                                            
  7079        </Entry>
  7080                                  
  7081       </Relation ship>
  7082                        
  7083      </Element>
  7084                       
  7085      <Element 
  7086       Type="SqlI ndex" 
  7087       Name="[App ].[NVCC_Us ersV2].[NV CC_UsersV2 _UserName] "
  7088      >
  7089                                 
  7090       <Property 
  7091        Name="IsUn ique" 
  7092        Value="Tru e" 
  7093       />
  7094                                 
  7095       <Relations hip 
  7096        Name="Colu mnSpecific ations"
  7097       >
  7098                                           
  7099        <Entry>
  7100                                                    
  7101         <Element 
  7102          Type="SqlI ndexedColu mnSpecific ation"
  7103         >
  7104                                                              
  7105          <Relations hip 
  7106           Name="Colu mn"
  7107          >
  7108                                                                        
  7109           <Entry>
  7110                                                                                  
  7111            <Reference
  7112             Name="[App ].[NVCC_Us ersV2].[Us erName]" 
  7113            />
  7114                                                                         
  7115           </Entry>
  7116                                                               
  7117          </Relation ship>
  7118                                                     
  7119         </Element>
  7120                                            
  7121        </Entry>
  7122                                  
  7123       </Relation ship>
  7124                                 
  7125       <Relations hip 
  7126        Name="Data Compressio nOptions"
  7127       >
  7128                                           
  7129        <Entry>
  7130                                                    
  7131         <Element 
  7132          Type="SqlD ataCompres sionOption "
  7133         >
  7134                                                              
  7135          <Property 
  7136           Name="Comp ressionLev el" 
  7137           Value="2" 
  7138          />
  7139                                                              
  7140          <Property 
  7141           Name="Part itionNumbe r" 
  7142           Value="1" 
  7143          />
  7144                                                     
  7145         </Element>
  7146                                            
  7147        </Entry>
  7148                                  
  7149       </Relation ship>
  7150                                 
  7151       <Relations hip 
  7152        Name="Inde xedObject"
  7153       >
  7154                                           
  7155        <Entry>
  7156                                                    
  7157         <Reference
  7158          Name="[App ].[NVCC_Us ersV2]" 
  7159         />
  7160                                            
  7161        </Entry>
  7162                                  
  7163       </Relation ship>
  7164                        
  7165      </Element>
  7166                       
  7167      <Element 
  7168       Type="SqlP rocedure" 
  7169       Name="[App ].[NVCC_us p_CurrentU sage]"
  7170      >
  7171                                 
  7172       <Property 
  7173        Name="Body Script"
  7174       >
  7175                                           
  7176        <Value>
  7177         <![CDATA[
  7178         --======== ========== ========== ========== ========== ========== ========== ========== ====
  7179         --Requesto r              : Non  Va Coordin ated Care  Project
  7180         --Author                  : Bria n Diggs
  7181         --Object/S P Name         : NVCC _usp_Curre ntUsage
  7182         --Server                  : 
  7183         --Data Bas e              : CC_R EFDOC
  7184         --Schema                  : App
  7185         --Report                  : N/A
  7186         --Folder                  : N/A
  7187         --Report L oc             : N/A
  7188         --Job                     : None
  7189         --Job Loc                 : None
  7190         --Note                    : 
  7191         --Date Cre ated           : 06-0 1-2016
  7192         --
  7193         --Last Cha nged           : 2017 -03-29
  7194         --Last Cha nged By                 : Brian  Diggs (Nor thwest Inn ovation Ce nter)
  7195         --Reason F or Change               : Tempor ary workar ound for d ifferent s ervers rec ording tim estamp
  7196         --                          in l ocal time
  7197         --
  7198         --Purpose                 : To g et most re cent users /usage
  7199         --======== ========== ========== ========== ========== ========== ========== ========== ====
  7200         --Uses: Ap p.NVCC_Acc essLog
  7201         BEGIN
  7202                 WI TH
  7203                          -- 2  hour shif t due to d ifferences  in timezo nes of SQL  server an d applicat ion server
  7204                          Last Time AS (S ELECT DATE ADD(hour,  -2, getdat e()) AS La stTimestam p),
  7205                          -- P ull the lo g entries  for this t ime frame  to use as  a source f or the oth er queries
  7206                          Rece ntLogs AS  (
  7207                                   SELECT  
  7208                                            HostName ,
  7209                                            UserID,
  7210                                            AccessDa teTime,
  7211                                            [Action] ,
  7212                                            ElapsedT ime
  7213                                   FROM A pp.NVCC_Ac cessLog
  7214                                   CROSS  JOIN LastT ime
  7215                                    WHERE ((Ho stName = ' SERVER . URL         ' AND Acce ssDateTime  > dateadd (minute, - (@timefram e), LastTi me.LastTim estamp))
  7216                                             OR (HostNa me = 'vaww .refdoc. DNS     ' AND Acce ssDateTime  > dateadd (hour, 3,  dateadd(mi nute, -(@t imeframe),  LastTime. LastTimest amp))))
  7217                                            AND Host Name IS NO T NULL
  7218                                            AND Acce ssDateTime  IS NOT NU LL
  7219                          )
  7220                          SELE CT
  7221                                   Users. HostName,
  7222                                   Users. UserID,
  7223                                   Users. LastLogged Event,
  7224                                   Time.M eanLookupT ime,
  7225                                   Users. NumberLook ups,
  7226                                   Users. NumberPack ages
  7227                          FROM  (
  7228                                   -- For  each comb ination of  host/user , compute  some stati stics
  7229                                   SELECT
  7230                                            HostName
  7231                                            UserID,
  7232                                            MAX(Acce ssDateTime ) AS LastL oggedEvent ,
  7233                                            SUM(CASE  WHEN Acti on = 'Pati entProfile ' THEN 1 E LSE 0 END)  AS Number Lookups, 
  7234                                            SUM(CASE  WHEN Acti on = 'PDF'  THEN 1 EL SE 0 END)  AS NumberP ackages
  7235                                   FROM R ecentLogs
  7236                                   GROUP  BY HostNam e, UserID
  7237                          ) AS  Users
  7238                          LEFT  JOIN (
  7239                                   -- Mea nLookupTim e is more  easily com puted sepa rately bec ause it
  7240                                   -- nee ds just a  subset of  the data
  7241                                   SELECT
  7242                                            HostName , UserID,  AVG(Elapse dTime) AS  MeanLookup Time
  7243                                   FROM R ecentLogs
  7244                                   WHERE  Action IS  NOT NULL A ND Action  = 'Patient Profile' 
  7245                                   GROUP  BY HostNam e, UserID
  7246                          ) AS  Time
  7247                                   ON Use rs.Hostnam e = Time.H ostName an d Users.Us erID = Tim e.UserID
  7248                          ORDE R BY
  7249                                   HostNa me,
  7250                                   LastLo ggedEvent  DESC
  7251         END]]>
  7252        </Value>
  7253                                  
  7254       </Property >
  7255                                 
  7256       <Property 
  7257        Name="IsAn siNullsOn"  
  7258        Value="Tru e" 
  7259       />
  7260                                 
  7261       <Relations hip 
  7262        Name="Body Dependenci es"
  7263       >
  7264                                           
  7265        <Entry>
  7266                                                    
  7267         <Reference
  7268          Name="[App ].[NVCC_Ac cessLog]" 
  7269         />
  7270                                            
  7271        </Entry>
  7272                                           
  7273        <Entry>
  7274                                                    
  7275         <Reference
  7276          Name="[App ].[NVCC_Ac cessLog].[ HostName]"  
  7277         />
  7278                                            
  7279        </Entry>
  7280                                           
  7281        <Entry>
  7282                                                    
  7283         <Reference
  7284          Name="[App ].[NVCC_Ac cessLog].[ UserID]" 
  7285         />
  7286                                            
  7287        </Entry>
  7288                                           
  7289        <Entry>
  7290                                                    
  7291         <Reference
  7292          Name="[App ].[NVCC_Ac cessLog].[ AccessDate Time]" 
  7293         />
  7294                                            
  7295        </Entry>
  7296                                           
  7297        <Entry>
  7298                                                    
  7299         <Reference
  7300          Name="[App ].[NVCC_Ac cessLog].[ Action]" 
  7301         />
  7302                                            
  7303        </Entry>
  7304                                           
  7305        <Entry>
  7306                                                    
  7307         <Reference
  7308          Name="[App ].[NVCC_Ac cessLog].[ ElapsedTim e]" 
  7309         />
  7310                                            
  7311        </Entry>
  7312                                           
  7313        <Entry>
  7314                                                    
  7315         <Reference
  7316          Name="[App ].[NVCC_us p_CurrentU sage].[@ti meframe]" 
  7317         />
  7318                                            
  7319        </Entry>
  7320                                           
  7321        <Entry>
  7322                                                    
  7323         <Reference
  7324          Name="[App ].[NVCC_Ac cessLog].[ HostName]"  
  7325         />
  7326                                            
  7327        </Entry>
  7328                                           
  7329        <Entry>
  7330                                                    
  7331         <Reference
  7332          Name="[App ].[NVCC_Ac cessLog].[ UserID]" 
  7333         />
  7334                                            
  7335        </Entry>
  7336                                           
  7337        <Entry>
  7338                                                    
  7339         <Reference
  7340          Name="[App ].[NVCC_Ac cessLog].[ AccessDate Time]" 
  7341         />
  7342                                            
  7343        </Entry>
  7344                                           
  7345        <Entry>
  7346                                                    
  7347         <Reference
  7348          Name="[App ].[NVCC_Ac cessLog].[ Action]" 
  7349         />
  7350                                            
  7351        </Entry>
  7352                                           
  7353        <Entry>
  7354                                                    
  7355         <Reference
  7356          Name="[App ].[NVCC_Ac cessLog].[ ElapsedTim e]" 
  7357         />
  7358                                            
  7359        </Entry>
  7360                                  
  7361       </Relation ship>
  7362                                 
  7363       <Relations hip 
  7364        Name="Dyna micObjects "
  7365       >
  7366                                           
  7367        <Entry>
  7368                                                    
  7369         <Element 
  7370          Type="SqlD ynamicColu mnSource" 
  7371          Name="[App ].[NVCC_us p_CurrentU sage].[CTE 1].[LastTi me]"
  7372         >
  7373                                                              
  7374          <Relations hip 
  7375           Name="Colu mns"
  7376          >
  7377                                                                        
  7378           <Entry>
  7379                                                                                  
  7380            <Element 
  7381             Type="SqlC omputedCol umn" 
  7382             Name="[App ].[NVCC_us p_CurrentU sage].[CTE 1].[LastTi me].[LastT imestamp]"  
  7383            />
  7384                                                                         
  7385           </Entry>
  7386                                                               
  7387          </Relation ship>
  7388                                                     
  7389         </Element>
  7390                                            
  7391        </Entry>
  7392                                           
  7393        <Entry>
  7394                                                    
  7395         <Element 
  7396          Type="SqlD ynamicColu mnSource" 
  7397          Name="[App ].[NVCC_us p_CurrentU sage].[CTE 1].[Recent Logs]"
  7398         >
  7399                                                              
  7400          <Relations hip 
  7401           Name="Colu mns"
  7402          >
  7403                                                                        
  7404           <Entry>
  7405                                                                                  
  7406            <Element 
  7407             Type="SqlC omputedCol umn" 
  7408             Name="[App ].[NVCC_us p_CurrentU sage].[CTE 1].[Recent Logs].[Hos tName]"
  7409            >
  7410                                                                                            
  7411             <Relations hip 
  7412              Name="Expr essionDepe ndencies"
  7413             >
  7414                                                                                                     
  7415              <Entry>
  7416                                                                                                               
  7417               <Reference
  7418                Name="[App ].[NVCC_Ac cessLog].[ HostName]"  
  7419               />
  7420                                                                                                      
  7421              </Entry>
  7422                                                                                             
  7423             </Relation ship>
  7424                                                                                   
  7425            </Element>
  7426                                                                         
  7427           </Entry>
  7428                                                                        
  7429           <Entry>
  7430                                                                                  
  7431            <Element 
  7432             Type="SqlC omputedCol umn" 
  7433             Name="[App ].[NVCC_us p_CurrentU sage].[CTE 1].[Recent Logs].[Use rID]"
  7434            >
  7435                                                                                            
  7436             <Relations hip 
  7437              Name="Expr essionDepe ndencies"
  7438             >
  7439                                                                                                     
  7440              <Entry>
  7441                                                                                                               
  7442               <Reference
  7443                Name="[App ].[NVCC_Ac cessLog].[ UserID]" 
  7444               />
  7445                                                                                                      
  7446              </Entry>
  7447                                                                                             
  7448             </Relation ship>
  7449                                                                                   
  7450            </Element>
  7451                                                                         
  7452           </Entry>
  7453                                                                        
  7454           <Entry>
  7455                                                                                  
  7456            <Element 
  7457             Type="SqlC omputedCol umn" 
  7458             Name="[App ].[NVCC_us p_CurrentU sage].[CTE 1].[Recent Logs].[Acc essDateTim e]"
  7459            >
  7460                                                                                            
  7461             <Relations hip 
  7462              Name="Expr essionDepe ndencies"
  7463             >
  7464                                                                                                     
  7465              <Entry>
  7466                                                                                                               
  7467               <Reference
  7468                Name="[App ].[NVCC_Ac cessLog].[ AccessDate Time]" 
  7469               />
  7470                                                                                                      
  7471              </Entry>
  7472                                                                                             
  7473             </Relation ship>
  7474                                                                                   
  7475            </Element>
  7476                                                                         
  7477           </Entry>
  7478                                                                        
  7479           <Entry>
  7480                                                                                  
  7481            <Element 
  7482             Type="SqlC omputedCol umn" 
  7483             Name="[App ].[NVCC_us p_CurrentU sage].[CTE 1].[Recent Logs].[Act ion]"
  7484            >
  7485                                                                                            
  7486             <Relations hip 
  7487              Name="Expr essionDepe ndencies"
  7488             >
  7489                                                                                                     
  7490              <Entry>
  7491                                                                                                               
  7492               <Reference
  7493                Name="[App ].[NVCC_Ac cessLog].[ Action]" 
  7494               />
  7495                                                                                                      
  7496              </Entry>
  7497                                                                                             
  7498             </Relation ship>
  7499                                                                                   
  7500            </Element>
  7501                                                                         
  7502           </Entry>
  7503                                                                        
  7504           <Entry>
  7505                                                                                  
  7506            <Element 
  7507             Type="SqlC omputedCol umn" 
  7508             Name="[App ].[NVCC_us p_CurrentU sage].[CTE 1].[Recent Logs].[Ela psedTime]"
  7509            >
  7510                                                                                            
  7511             <Relations hip 
  7512              Name="Expr essionDepe ndencies"
  7513             >
  7514                                                                                                     
  7515              <Entry>
  7516                                                                                                               
  7517               <Reference
  7518                Name="[App ].[NVCC_Ac cessLog].[ ElapsedTim e]" 
  7519               />
  7520                                                                                                      
  7521              </Entry>
  7522                                                                                             
  7523             </Relation ship>
  7524                                                                                   
  7525            </Element>
  7526                                                                         
  7527           </Entry>
  7528                                                               
  7529          </Relation ship>
  7530                                                     
  7531         </Element>
  7532                                            
  7533        </Entry>
  7534                                  
  7535       </Relation ship>
  7536                                 
  7537       <Relations hip 
  7538        Name="Para meters"
  7539       >
  7540                                           
  7541        <Entry>
  7542                                                    
  7543         <Element 
  7544          Type="SqlS ubroutineP arameter" 
  7545          Name="[App ].[NVCC_us p_CurrentU sage].[@ti meframe]"
  7546         >
  7547                                                              
  7548          <Relations hip 
  7549           Name="Type "
  7550          >
  7551                                                                        
  7552           <Entry>
  7553                                                                                  
  7554            <Element 
  7555             Type="SqlT ypeSpecifi er"
  7556            >
  7557                                                                                            
  7558             <Property 
  7559              Name="Prec ision" 
  7560              Value="18"  
  7561             />
  7562                                                                                            
  7563             <Relations hip 
  7564              Name="Type "
  7565             >
  7566                                                                                                     
  7567              <Entry>
  7568                                                                                                               
  7569               <Reference
  7570                ExternalSo urce="Buil tIns" 
  7571                Name="[num eric]" 
  7572               />
  7573                                                                                                      
  7574              </Entry>
  7575                                                                                             
  7576             </Relation ship>
  7577                                                                                   
  7578            </Element>
  7579                                                                         
  7580           </Entry>
  7581                                                               
  7582          </Relation ship>
  7583                                                     
  7584         </Element>
  7585                                            
  7586        </Entry>
  7587                                  
  7588       </Relation ship>
  7589                                 
  7590       <Relations hip 
  7591        Name="Sche ma"
  7592       >
  7593                                           
  7594        <Entry>
  7595                                                    
  7596         <Reference
  7597          Name="[App ]" 
  7598         />
  7599                                            
  7600        </Entry>
  7601                                  
  7602       </Relation ship>
  7603                                 
  7604       <Annotatio
  7605        Type="SysC ommentsObj ectAnnotat ion"
  7606       >
  7607                                           
  7608        <Property 
  7609         Name="Leng th" 
  7610         Value="284 0" 
  7611        />
  7612                                           
  7613        <Property 
  7614         Name="Star tLine" 
  7615         Value="1" 
  7616        />
  7617                                           
  7618        <Property 
  7619         Name="Star tColumn" 
  7620         Value="1" 
  7621        />
  7622                                           
  7623        <Property 
  7624         Name="Head erContents
  7625         Value="CRE ATE PROCED URE [App]. [NVCC_usp_ CurrentUsa ge]&#xD;&# xA;&#x9;--  @timefram e is the n umber of m inutes (po sitive) to  look back wards for  usage&#xD; &#xA;&#x9; @timeframe  numeric&# xD;&#xA;AS
  7626        />
  7627                                  
  7628       </Annotati on>
  7629                        
  7630      </Element>
  7631                       
  7632      <Element 
  7633       Type="SqlP rocedure" 
  7634       Name="[App ].[NVCC_us p_GetAller gies]"
  7635      >
  7636                                 
  7637       <Property 
  7638        Name="Body Script"
  7639       >
  7640                                           
  7641        <Value>
  7642         <![CDATA[
  7643         --======== ========== ========== ========== ========== ========== ========== ========== ===
  7644         --Requesto r                                : Non Va C oordinated  Care Proj ect
  7645         --Author                  : Jerr y Kohler ( Original s cript by D r. Charles  Demosthen es)
  7646         --Object/S P Name                  : NVCC_u sp_GetAlle rgies
  7647         --SERVER                                   
  7648         --Data Bas e                                : CC_REFDO C
  7649         --Schema                                    : nva
  7650         --Report                                    : N/A
  7651         --Folder                                    : N/A
  7652         --Report L oc             : N/A
  7653         --Job                     : None
  7654         --Job Loc                 : None
  7655         --Note                    : 
  7656         --Date Cre ated           : 01-1 2-2016
  7657         --
  7658         --Changed                 : 03-0 3-2016  
  7659         --Changed  By                 :  Jerry Kohl er - North west Innov ation Cent er (NWIC)
  7660         --Reason F or Change               : Elimin ate multip le records  with same  allergen,
  7661         --                          only  return th e one with  the lates t verified  date.
  7662         --
  7663         --Changed                 : 02-1 8-2016  
  7664         --Changed  By                 :  Jerry Kohl er - North west Innov ation Cent er (NWIC)
  7665         --Reason F or Change               : Reques t to also  provide th e name of  the statio n.
  7666         --
  7667         --Changed                 : 01-1 2-2016  
  7668         --Changed  By                 :  Jerry Kohl er - North west Innov ation Cent er (NWIC)
  7669         --Reason F or Change               : Remove d station  parameter  in order t o expand t he search
  7670         --                          for  a patient' s allergie s from a s ingle stat ion to any
  7671         --                          stat ion a pati ent is ass ociated wi th.
  7672         --
  7673         --Purpose                 : Retr ieve a pat ient's all ergies for  inclusion  into NVCC
  7674         --                          docu mentation
  7675         --======== ========== ========== ========== ========== ========== ========== ========== ===
  7676         BEGIN
  7677        
  7678            -- SET  NOCOUNT ON  added to  prevent ex tra result  sets from
  7679            -- inte rfering wi th SELECT  statements .
  7680            SET NOC OUNT ON;
  7681        
  7682        
  7683            WITH Al lergies AS
  7684                (
  7685                 SE LECT a.Sta 3n
  7686                        ,App.u df_Station Name (a.St a3n) AS St ationName
  7687                        ,a.All ergySID
  7688                        ,a.Pat ientSID
  7689                        ,a.Ori ginationDa teTime
  7690                        ,a.Ver ificationD ateTime
  7691                        ,a.All ergicReact ant as All ergy
  7692                        ,ROW_N UMBER() OV ER (PARTIT ION BY a.A llergicRea ctant ORDE R BY a.Ver ificationD ateTime DE SC) AS RN
  7693                 FR OM CDWWork .Allergy.A llergy a
  7694                 JO IN CDWWork .Dim.Sta3n  b ON b.St a3n = a.St a3n
  7695                 WH ERE a.Pati entSID in  (select Pt SID from [ App].[udf_ AllPatient sSIDs](@pi d))
  7696                    AND a.Ente redInError Flag IS NU LL
  7697                )
  7698        
  7699            SELECT  Sta3n
  7700                  , StationNam e
  7701                  , AllergySID
  7702                  , PatientSID
  7703                  , Originatio nDateTime
  7704                  , Verificati onDateTime
  7705                  , Allergy
  7706            FROM Al lergies
  7707            WHERE R N = 1
  7708            ORDER B Y Allergy
  7709            --exec  [app].[NVC C_usp_GetA llergies]  @pid=17174 44
  7710         END;]]>
  7711        </Value>
  7712                                  
  7713       </Property >
  7714                                 
  7715       <Property 
  7716        Name="IsAn siNullsOn"  
  7717        Value="Tru e" 
  7718       />
  7719                                 
  7720       <Relations hip 
  7721        Name="Body Dependenci es"
  7722       >
  7723                                           
  7724        <Entry>
  7725                                                    
  7726         <Reference
  7727          ExternalSo urce="CDWW ork.dacpac
  7728          Name="[CDW Work]|[All ergy].[All ergy]" 
  7729         />
  7730                                            
  7731        </Entry>
  7732                                           
  7733        <Entry>
  7734                                                    
  7735         <Reference
  7736          ExternalSo urce="CDWW ork.dacpac
  7737          Name="[CDW Work]|[Dim ].[Sta3n]"  
  7738         />
  7739                                            
  7740        </Entry>
  7741                                           
  7742        <Entry>
  7743                                                    
  7744         <Reference
  7745          ExternalSo urce="CDWW ork.dacpac
  7746          Name="[CDW Work]|[Dim ].[Sta3n]. [Sta3n]" 
  7747         />
  7748                                            
  7749        </Entry>
  7750                                           
  7751        <Entry>
  7752                                                    
  7753         <Reference
  7754          ExternalSo urce="CDWW ork.dacpac
  7755          Name="[CDW Work]|[All ergy].[All ergy].[Sta 3n]" 
  7756         />
  7757                                            
  7758        </Entry>
  7759                                           
  7760        <Entry>
  7761                                                    
  7762         <Reference
  7763          Name="[App ].[udf_Sta tionName]"  
  7764         />
  7765                                            
  7766        </Entry>
  7767                                           
  7768        <Entry>
  7769                                                    
  7770         <Reference
  7771          ExternalSo urce="CDWW ork.dacpac
  7772          Name="[CDW Work]|[All ergy].[All ergy].[All ergySID]" 
  7773         />
  7774                                            
  7775        </Entry>
  7776                                           
  7777        <Entry>
  7778                                                    
  7779         <Reference
  7780          ExternalSo urce="CDWW ork.dacpac
  7781          Name="[CDW Work]|[All ergy].[All ergy].[Pat ientSID]" 
  7782         />
  7783                                            
  7784        </Entry>
  7785                                           
  7786        <Entry>
  7787                                                    
  7788         <Reference
  7789          ExternalSo urce="CDWW ork.dacpac
  7790          Name="[CDW Work]|[All ergy].[All ergy].[Ori ginationDa teTime]" 
  7791         />
  7792                                            
  7793        </Entry>
  7794                                           
  7795        <Entry>
  7796                                                    
  7797         <Reference
  7798          ExternalSo urce="CDWW ork.dacpac
  7799          Name="[CDW Work]|[All ergy].[All ergy].[Ver ificationD ateTime]" 
  7800         />
  7801                                            
  7802        </Entry>
  7803                                           
  7804        <Entry>
  7805                                                    
  7806         <Reference
  7807          ExternalSo urce="CDWW ork.dacpac
  7808          Name="[CDW Work]|[All ergy].[All ergy].[All ergicReact ant]" 
  7809         />
  7810                                            
  7811        </Entry>
  7812                                           
  7813        <Entry>
  7814                                                    
  7815         <Reference
  7816          ExternalSo urce="CDWW ork.dacpac
  7817          Name="[CDW Work]|[All ergy].[All ergy].[All ergicReact ant]" 
  7818         />
  7819                                            
  7820        </Entry>
  7821                                           
  7822        <Entry>
  7823                                                    
  7824         <Reference
  7825          Name="[App ].[NVCC_us p_GetAller gies].[@pi d]" 
  7826         />
  7827                                            
  7828        </Entry>
  7829                                           
  7830        <Entry>
  7831                                                    
  7832         <Reference
  7833          Name="[App ].[udf_All PatientsSI Ds]" 
  7834         />
  7835                                            
  7836        </Entry>
  7837                                           
  7838        <Entry>
  7839                                                    
  7840         <Reference
  7841          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  7842         />
  7843                                            
  7844        </Entry>
  7845                                           
  7846        <Entry>
  7847                                                    
  7848         <Reference
  7849          ExternalSo urce="CDWW ork.dacpac
  7850          Name="[CDW Work]|[All ergy].[All ergy].[Ent eredInErro rFlag]" 
  7851         />
  7852                                            
  7853        </Entry>
  7854                                           
  7855        <Entry>
  7856                                                    
  7857         <Reference
  7858          ExternalSo urce="CDWW ork.dacpac
  7859          Name="[CDW Work]|[All ergy].[All ergy].[Sta 3n]" 
  7860         />
  7861                                            
  7862        </Entry>
  7863                                           
  7864        <Entry>
  7865                                                    
  7866         <Reference
  7867          Name="[App ].[udf_Sta tionName]"  
  7868         />
  7869                                            
  7870        </Entry>
  7871                                           
  7872        <Entry>
  7873                                                    
  7874         <Reference
  7875          ExternalSo urce="CDWW ork.dacpac
  7876          Name="[CDW Work]|[All ergy].[All ergy].[All ergySID]" 
  7877         />
  7878                                            
  7879        </Entry>
  7880                                           
  7881        <Entry>
  7882                                                    
  7883         <Reference
  7884          ExternalSo urce="CDWW ork.dacpac
  7885          Name="[CDW Work]|[All ergy].[All ergy].[Pat ientSID]" 
  7886         />
  7887                                            
  7888        </Entry>
  7889                                           
  7890        <Entry>
  7891                                                    
  7892         <Reference
  7893          ExternalSo urce="CDWW ork.dacpac
  7894          Name="[CDW Work]|[All ergy].[All ergy].[Ori ginationDa teTime]" 
  7895         />
  7896                                            
  7897        </Entry>
  7898                                           
  7899        <Entry>
  7900                                                    
  7901         <Reference
  7902          ExternalSo urce="CDWW ork.dacpac
  7903          Name="[CDW Work]|[All ergy].[All ergy].[Ver ificationD ateTime]" 
  7904         />
  7905                                            
  7906        </Entry>
  7907                                           
  7908        <Entry>
  7909                                                    
  7910         <Reference
  7911          ExternalSo urce="CDWW ork.dacpac
  7912          Name="[CDW Work]|[All ergy].[All ergy].[All ergicReact ant]" 
  7913         />
  7914                                            
  7915        </Entry>
  7916                                  
  7917       </Relation ship>
  7918                                 
  7919       <Relations hip 
  7920        Name="Dyna micObjects "
  7921       >
  7922                                           
  7923        <Entry>
  7924                                                    
  7925         <Element 
  7926          Type="SqlD ynamicColu mnSource" 
  7927          Name="[App ].[NVCC_us p_GetAller gies].[CTE 1].[Allerg ies]"
  7928         >
  7929                                                              
  7930          <Relations hip 
  7931           Name="Colu mns"
  7932          >
  7933                                                                        
  7934           <Entry>
  7935                                                                                  
  7936            <Element 
  7937             Type="SqlC omputedCol umn" 
  7938             Name="[App ].[NVCC_us p_GetAller gies].[CTE 1].[Allerg ies].[Sta3 n]"
  7939            >
  7940                                                                                            
  7941             <Relations hip 
  7942              Name="Expr essionDepe ndencies"
  7943             >
  7944                                                                                                     
  7945              <Entry>
  7946                                                                                                               
  7947               <Reference
  7948                ExternalSo urce="CDWW ork.dacpac
  7949                Name="[CDW Work]|[All ergy].[All ergy].[Sta 3n]" 
  7950               />
  7951                                                                                                      
  7952              </Entry>
  7953                                                                                             
  7954             </Relation ship>
  7955                                                                                   
  7956            </Element>
  7957                                                                         
  7958           </Entry>
  7959                                                                        
  7960           <Entry>
  7961                                                                                  
  7962            <Element 
  7963             Type="SqlC omputedCol umn" 
  7964             Name="[App ].[NVCC_us p_GetAller gies].[CTE 1].[Allerg ies].[Stat ionName]"
  7965            >
  7966                                                                                            
  7967             <Relations hip 
  7968              Name="Expr essionDepe ndencies"
  7969             >
  7970                                                                                                     
  7971              <Entry>
  7972                                                                                                               
  7973               <Reference
  7974                Name="[App ].[udf_Sta tionName]"  
  7975               />
  7976                                                                                                      
  7977              </Entry>
  7978                                                                                             
  7979             </Relation ship>
  7980                                                                                   
  7981            </Element>
  7982                                                                         
  7983           </Entry>
  7984                                                                        
  7985           <Entry>
  7986                                                                                  
  7987            <Element 
  7988             Type="SqlC omputedCol umn" 
  7989             Name="[App ].[NVCC_us p_GetAller gies].[CTE 1].[Allerg ies].[Alle rgySID]"
  7990            >
  7991                                                                                            
  7992             <Relations hip 
  7993              Name="Expr essionDepe ndencies"
  7994             >
  7995                                                                                                     
  7996              <Entry>
  7997                                                                                                               
  7998               <Reference
  7999                ExternalSo urce="CDWW ork.dacpac
  8000                Name="[CDW Work]|[All ergy].[All ergy].[All ergySID]" 
  8001               />
  8002                                                                                                      
  8003              </Entry>
  8004                                                                                             
  8005             </Relation ship>
  8006                                                                                   
  8007            </Element>
  8008                                                                         
  8009           </Entry>
  8010                                                                        
  8011           <Entry>
  8012                                                                                  
  8013            <Element 
  8014             Type="SqlC omputedCol umn" 
  8015             Name="[App ].[NVCC_us p_GetAller gies].[CTE 1].[Allerg ies].[Pati entSID]"
  8016            >
  8017                                                                                            
  8018             <Relations hip 
  8019              Name="Expr essionDepe ndencies"
  8020             >
  8021                                                                                                     
  8022              <Entry>
  8023                                                                                                               
  8024               <Reference
  8025                ExternalSo urce="CDWW ork.dacpac
  8026                Name="[CDW Work]|[All ergy].[All ergy].[Pat ientSID]" 
  8027               />
  8028                                                                                                      
  8029              </Entry>
  8030                                                                                             
  8031             </Relation ship>
  8032                                                                                   
  8033            </Element>
  8034                                                                         
  8035           </Entry>
  8036                                                                        
  8037           <Entry>
  8038                                                                                  
  8039            <Element 
  8040             Type="SqlC omputedCol umn" 
  8041             Name="[App ].[NVCC_us p_GetAller gies].[CTE 1].[Allerg ies].[Orig inationDat eTime]"
  8042            >
  8043                                                                                            
  8044             <Relations hip 
  8045              Name="Expr essionDepe ndencies"
  8046             >
  8047                                                                                                     
  8048              <Entry>
  8049                                                                                                               
  8050               <Reference
  8051                ExternalSo urce="CDWW ork.dacpac
  8052                Name="[CDW Work]|[All ergy].[All ergy].[Ori ginationDa teTime]" 
  8053               />
  8054                                                                                                      
  8055              </Entry>
  8056                                                                                             
  8057             </Relation ship>
  8058                                                                                   
  8059            </Element>
  8060                                                                         
  8061           </Entry>
  8062                                                                        
  8063           <Entry>
  8064                                                                                  
  8065            <Element 
  8066             Type="SqlC omputedCol umn" 
  8067             Name="[App ].[NVCC_us p_GetAller gies].[CTE 1].[Allerg ies].[Veri ficationDa teTime]"
  8068            >
  8069                                                                                            
  8070             <Relations hip 
  8071              Name="Expr essionDepe ndencies"
  8072             >
  8073                                                                                                     
  8074              <Entry>
  8075                                                                                                               
  8076               <Reference
  8077                ExternalSo urce="CDWW ork.dacpac
  8078                Name="[CDW Work]|[All ergy].[All ergy].[Ver ificationD ateTime]" 
  8079               />
  8080                                                                                                      
  8081              </Entry>
  8082                                                                                             
  8083             </Relation ship>
  8084                                                                                   
  8085            </Element>
  8086                                                                         
  8087           </Entry>
  8088                                                                        
  8089           <Entry>
  8090                                                                                  
  8091            <Element 
  8092             Type="SqlC omputedCol umn" 
  8093             Name="[App ].[NVCC_us p_GetAller gies].[CTE 1].[Allerg ies].[Alle rgy]"
  8094            >
  8095                                                                                            
  8096             <Relations hip 
  8097              Name="Expr essionDepe ndencies"
  8098             >
  8099                                                                                                     
  8100              <Entry>
  8101                                                                                                               
  8102               <Reference
  8103                ExternalSo urce="CDWW ork.dacpac
  8104                Name="[CDW Work]|[All ergy].[All ergy].[All ergicReact ant]" 
  8105               />
  8106                                                                                                      
  8107              </Entry>
  8108                                                                                             
  8109             </Relation ship>
  8110                                                                                   
  8111            </Element>
  8112                                                                         
  8113           </Entry>
  8114                                                                        
  8115           <Entry>
  8116                                                                                  
  8117            <Element 
  8118             Type="SqlC omputedCol umn" 
  8119             Name="[App ].[NVCC_us p_GetAller gies].[CTE 1].[Allerg ies].[RN]"  
  8120            />
  8121                                                                         
  8122           </Entry>
  8123                                                               
  8124          </Relation ship>
  8125                                                     
  8126         </Element>
  8127                                            
  8128        </Entry>
  8129                                  
  8130       </Relation ship>
  8131                                 
  8132       <Relations hip 
  8133        Name="Para meters"
  8134       >
  8135                                           
  8136        <Entry>
  8137                                                    
  8138         <Element 
  8139          Type="SqlS ubroutineP arameter" 
  8140          Name="[App ].[NVCC_us p_GetAller gies].[@pi d]"
  8141         >
  8142                                                              
  8143          <Relations hip 
  8144           Name="Type "
  8145          >
  8146                                                                        
  8147           <Entry>
  8148                                                                                  
  8149            <Element 
  8150             Type="SqlT ypeSpecifi er"
  8151            >
  8152                                                                                            
  8153             <Relations hip 
  8154              Name="Type "
  8155             >
  8156                                                                                                     
  8157              <Entry>
  8158                                                                                                               
  8159               <Reference
  8160                ExternalSo urce="Buil tIns" 
  8161                Name="[big int]" 
  8162               />
  8163                                                                                                      
  8164              </Entry>
  8165                                                                                             
  8166             </Relation ship>
  8167                                                                                   
  8168            </Element>
  8169                                                                         
  8170           </Entry>
  8171                                                               
  8172          </Relation ship>
  8173                                                     
  8174         </Element>
  8175                                            
  8176        </Entry>
  8177                                  
  8178       </Relation ship>
  8179                                 
  8180       <Relations hip 
  8181        Name="Sche ma"
  8182       >
  8183                                           
  8184        <Entry>
  8185                                                    
  8186         <Reference
  8187          Name="[App ]" 
  8188         />
  8189                                            
  8190        </Entry>
  8191                                  
  8192       </Relation ship>
  8193                                 
  8194       <Annotatio
  8195        Type="SysC ommentsObj ectAnnotat ion"
  8196       >
  8197                                           
  8198        <Property 
  8199         Name="Crea teOffset" 
  8200         Value="2" 
  8201        />
  8202                                           
  8203        <Property 
  8204         Name="Leng th" 
  8205         Value="270 9" 
  8206        />
  8207                                           
  8208        <Property 
  8209         Name="Star tLine" 
  8210         Value="1" 
  8211        />
  8212                                           
  8213        <Property 
  8214         Name="Star tColumn" 
  8215         Value="1" 
  8216        />
  8217                                           
  8218        <Property 
  8219         Name="Head erContents
  8220         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetAllergi es]&#xD;&# xA;        @pid bigin t -- this  is the pat ient's dat abase sid& #xD;&#xA;& #xD;&#xA;A S" 
  8221        />
  8222                                  
  8223       </Annotati on>
  8224                        
  8225      </Element>
  8226                       
  8227      <Element 
  8228       Type="SqlP rocedure" 
  8229       Name="[App ].[NVCC_us p_GetAnnou ncement]"
  8230      >
  8231                                 
  8232       <Property 
  8233        Name="Body Script"
  8234       >
  8235                                           
  8236        <Value>
  8237         <![CDATA[
  8238         --======== ========== ========== ========== ========== ========== ========== ========== ====
  8239         --Requesto r              : Non  Va Coordin ated Care  Project
  8240         --Author                  : Bria n Diggs
  8241         --Object/S P Name         : NVCC _usp_GetLo gs
  8242         --Server                  : 
  8243         --Data Bas e              : CC_R EFDOC
  8244         --Schema                  : app
  8245         --Report                  : N/A
  8246         --Folder                  : N/A
  8247         --Report L oc             : N/A
  8248         --Job                     : None
  8249         --Job Loc                 : None
  8250         --Note                    : 
  8251         --Date Cre ated           : 06-0 6-2016
  8252         --
  8253         --
  8254         --Last Cha nged           : 
  8255         --Last Cha nged By                 : 
  8256         --Reason F or Change               : 
  8257         --
  8258         --Purpose                 : To g et selecte d announce ments
  8259         --======== ========== ========== ========== ========== ========== ========== ========== ====
  8260         --Uses: Ap p.NVCC_Ann ouncement
  8261         --Uses: Ap p.NVCC_Dim Announceme nt
  8262        
  8263         BEGIN
  8264                 IF  (@active  = 0) 
  8265                          BEGI N
  8266                                   SELECT
  8267                                            A.Announ cementID,
  8268                                            DA.Annou ncementTyp e,
  8269                                            lc.LastN ame + ', '  + lc.Firs tName AS C reator,
  8270                                            A.Creati onDT,
  8271                                            A.Expira tionDT,
  8272                                            A.Text
  8273                                   FROM A pp.NVCC_An nouncement  AS A
  8274                                            INNER JO IN App.NVC C_DimAnnou ncement AS  DA
  8275                                                     ON A.Annou ncementTyp eID = DA.A nnouncemen tTypeID
  8276                                            LEFT JOI N CDWWork. LCustomer. LCustomer  lc
  8277                                                     ON A.Creat or = lc.AD Domain + ' \' + lc.AD Login
  8278                          END
  8279                 EL SE IF (@ac tive = 1)
  8280                          BEGI N
  8281                                   SELECT
  8282                                            A.Announ cementID,
  8283                                            DA.Annou ncementTyp e,
  8284                                            lc.LastN ame + ', '  + lc.Firs tName AS C reator,
  8285                                            A.Creati onDT,
  8286                                            A.Expira tionDT,
  8287                                            A.Text
  8288                                   FROM A pp.NVCC_An nouncement  AS A
  8289                                            INNER JO IN App.NVC C_DimAnnou ncement AS  DA
  8290                                                     ON A.Annou ncementTyp eID = DA.A nnouncemen tTypeID
  8291                                            LEFT JOI N CDWWork. LCustomer. LCustomer  lc
  8292                                                     ON A.Creat or = lc.AD Domain + ' \' + lc.AD Login
  8293                                   WHERE
  8294                                            A.Expira tionDT >=  GETUTCDATE () AND A.C reationDT  <= GETUTCD ATE()
  8295                          END
  8296         END]]>
  8297        </Value>
  8298                                  
  8299       </Property >
  8300                                 
  8301       <Property 
  8302        Name="IsAn siNullsOn"  
  8303        Value="Tru e" 
  8304       />
  8305                                 
  8306       <Relations hip 
  8307        Name="Body Dependenci es"
  8308       >
  8309                                           
  8310        <Entry>
  8311                                                    
  8312         <Reference
  8313          Name="[App ].[NVCC_us p_GetAnnou ncement].[ @active]" 
  8314         />
  8315                                            
  8316        </Entry>
  8317                                           
  8318        <Entry>
  8319                                                    
  8320         <Reference
  8321          Name="[App ].[NVCC_An nouncement ]" 
  8322         />
  8323                                            
  8324        </Entry>
  8325                                           
  8326        <Entry>
  8327                                                    
  8328         <Reference
  8329          Name="[App ].[NVCC_Di mAnnouncem ent]" 
  8330         />
  8331                                            
  8332        </Entry>
  8333                                           
  8334        <Entry>
  8335                                                    
  8336         <Reference
  8337          Name="[App ].[NVCC_An nouncement ].[Announc ementTypeI D]" 
  8338         />
  8339                                            
  8340        </Entry>
  8341                                           
  8342        <Entry>
  8343                                                    
  8344         <Reference
  8345          Name="[App ].[NVCC_Di mAnnouncem ent].[Anno uncementTy peID]" 
  8346         />
  8347                                            
  8348        </Entry>
  8349                                           
  8350        <Entry>
  8351                                                    
  8352         <Reference
  8353          ExternalSo urce="CDWW ork.dacpac
  8354          Name="[CDW Work]|[LCu stomer].[L Customer]"  
  8355         />
  8356                                            
  8357        </Entry>
  8358                                           
  8359        <Entry>
  8360                                                    
  8361         <Reference
  8362          Name="[App ].[NVCC_An nouncement ].[Creator ]" 
  8363         />
  8364                                            
  8365        </Entry>
  8366                                           
  8367        <Entry>
  8368                                                    
  8369         <Reference
  8370          ExternalSo urce="CDWW ork.dacpac
  8371          Name="[CDW Work]|[LCu stomer].[L Customer]. [ADDomain]
  8372         />
  8373                                            
  8374        </Entry>
  8375                                           
  8376        <Entry>
  8377                                                    
  8378         <Reference
  8379          ExternalSo urce="CDWW ork.dacpac
  8380          Name="[CDW Work]|[LCu stomer].[L Customer]. [ADLogin]"  
  8381         />
  8382                                            
  8383        </Entry>
  8384                                           
  8385        <Entry>
  8386                                                    
  8387         <Reference
  8388          Name="[App ].[NVCC_An nouncement ].[Announc ementID]" 
  8389         />
  8390                                            
  8391        </Entry>
  8392                                           
  8393        <Entry>
  8394                                                    
  8395         <Reference
  8396          Name="[App ].[NVCC_Di mAnnouncem ent].[Anno uncementTy pe]" 
  8397         />
  8398                                            
  8399        </Entry>
  8400                                           
  8401        <Entry>
  8402                                                    
  8403         <Reference
  8404          ExternalSo urce="CDWW ork.dacpac
  8405          Name="[CDW Work]|[LCu stomer].[L Customer]. [LastName]
  8406         />
  8407                                            
  8408        </Entry>
  8409                                           
  8410        <Entry>
  8411                                                    
  8412         <Reference
  8413          ExternalSo urce="CDWW ork.dacpac
  8414          Name="[CDW Work]|[LCu stomer].[L Customer]. [FirstName ]" 
  8415         />
  8416                                            
  8417        </Entry>
  8418                                           
  8419        <Entry>
  8420                                                    
  8421         <Reference
  8422          Name="[App ].[NVCC_An nouncement ].[Creatio nDT]" 
  8423         />
  8424                                            
  8425        </Entry>
  8426                                           
  8427        <Entry>
  8428                                                    
  8429         <Reference
  8430          Name="[App ].[NVCC_An nouncement ].[Expirat ionDT]" 
  8431         />
  8432                                            
  8433        </Entry>
  8434                                           
  8435        <Entry>
  8436                                                    
  8437         <Reference
  8438          Name="[App ].[NVCC_An nouncement ].[Text]" 
  8439         />
  8440                                            
  8441        </Entry>
  8442                                  
  8443       </Relation ship>
  8444                                 
  8445       <Relations hip 
  8446        Name="Para meters"
  8447       >
  8448                                           
  8449        <Entry>
  8450                                                    
  8451         <Element 
  8452          Type="SqlS ubroutineP arameter" 
  8453          Name="[App ].[NVCC_us p_GetAnnou ncement].[ @active]"
  8454         >
  8455                                                              
  8456          <Relations hip 
  8457           Name="Type "
  8458          >
  8459                                                                        
  8460           <Entry>
  8461                                                                                  
  8462            <Element 
  8463             Type="SqlT ypeSpecifi er"
  8464            >
  8465                                                                                            
  8466             <Relations hip 
  8467              Name="Type "
  8468             >
  8469                                                                                                     
  8470              <Entry>
  8471                                                                                                               
  8472               <Reference
  8473                ExternalSo urce="Buil tIns" 
  8474                Name="[int ]" 
  8475               />
  8476                                                                                                      
  8477              </Entry>
  8478                                                                                             
  8479             </Relation ship>
  8480                                                                                   
  8481            </Element>
  8482                                                                         
  8483           </Entry>
  8484                                                               
  8485          </Relation ship>
  8486                                                     
  8487         </Element>
  8488                                            
  8489        </Entry>
  8490                                  
  8491       </Relation ship>
  8492                                 
  8493       <Relations hip 
  8494        Name="Sche ma"
  8495       >
  8496                                           
  8497        <Entry>
  8498                                                    
  8499         <Reference
  8500          Name="[App ]" 
  8501         />
  8502                                            
  8503        </Entry>
  8504                                  
  8505       </Relation ship>
  8506                                 
  8507       <Annotatio
  8508        Type="SysC ommentsObj ectAnnotat ion"
  8509       >
  8510                                           
  8511        <Property 
  8512         Name="Crea teOffset" 
  8513         Value="2" 
  8514        />
  8515                                           
  8516        <Property 
  8517         Name="Leng th" 
  8518         Value="199 5" 
  8519        />
  8520                                           
  8521        <Property 
  8522         Name="Star tLine" 
  8523         Value="1" 
  8524        />
  8525                                           
  8526        <Property 
  8527         Name="Star tColumn" 
  8528         Value="1" 
  8529        />
  8530                                           
  8531        <Property 
  8532         Name="Head erContents
  8533         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetAnnounc ement]&#xD ;&#xA;&#x9 ;-- @activ e is a num eric param eter. If 1 , only ret urn the ac tive annou ncements;& #xD;&#xA;& #x9;-- if  0, return  all announ cements.&# xD;&#xA;&# x9;@active  int&#xD;& #xA;AS" 
  8534        />
  8535                                  
  8536       </Annotati on>
  8537                        
  8538      </Element>
  8539                       
  8540      <Element 
  8541       Type="SqlP rocedure" 
  8542       Name="[App ].[NVCC_us p_GetAppts ]"
  8543      >
  8544                                 
  8545       <Property 
  8546        Name="Body Script"
  8547       >
  8548                                           
  8549        <Value>
  8550         <![CDATA[
  8551         --======== ========== ========== ========== ========== ========== ========== ========== ===
  8552         --Requesto r                                : Non Va C oordinated  Care Proj ect
  8553         --Author                  : Jerr y Kohler ( Original s cript by D r. Charles  Demosthen es)
  8554         --Object/S P Name                  : NVCC_u sp_GetAppt s
  8555         --SERVER                                   
  8556         --Data Bas e                                : CC_REFDO C
  8557         --Schema                                    : nva
  8558         --Report                                    : N/A
  8559         --Folder                                    : N/A
  8560         --Report L oc             : N/A
  8561         --Job                     : None
  8562         --Job Loc                 : None
  8563         --Note                    : 
  8564         --Date Cre ated           : 01-1 2-2016
  8565         --
  8566         --Last Cha nged           : 03-1 5-2017  
  8567         --Last Cha nged By                 : Brian  Diggs - No rthwest In novation C enter (NWI C)
  8568         --Reason F or Change               : Change  Appointme ntMadeDate Time to Ap pointmendM adeDate
  8569         --                          due  to schema  changes.
  8570         --
  8571         --Last Cha nged           : 02-1 8-2016  
  8572         --Last Cha nged By                 : Jerry  Kohler - N orthwest I nnovation  Center (NW IC)
  8573         --Reason F or Change               : Reques t to also  provide th e name of  the statio n.
  8574         --
  8575         --Last Cha nged           : 01-1 2-2016  
  8576         --Last Cha nged By                 : Jerry  Kohler - N orthwest I nnovation  Center (NW IC)
  8577         --Reason F or Change               : Remove d station  parameter  in order t o expand t he search
  8578         --                          for  a patient' s appointm ents from  a single s tation to  any
  8579         --                          stat ion a pati ent is ass ociated wi th.
  8580         --
  8581         --Purpose                 : Retr ieve a pat ient's app ointments  for inclus ion into N VCC
  8582         --                          docu mentation
  8583         --======== ========== ========== ========== ========== ========== ========== ========== ===
  8584         --Uses: Ap p.udf_Stat ionName
  8585         --Uses: CD WWork.Appt .Appointme nt
  8586         --Uses: CD WWork.Dim. Location
  8587         --Uses: Ap p.udf_AllP atientsSID s
  8588         BEGIN
  8589            -- SET  NOCOUNT ON  added to  prevent ex tra result  sets from
  8590            -- inte rfering wi th SELECT  statements .
  8591            SET NOC OUNT ON;
  8592        
  8593            SELECT  --TOP (100 )
  8594               ap.S ta3n
  8595              ,App. udf_Statio nName (ap. Sta3n) AS  StationNam e
  8596              ,loc. LocationNa me
  8597              ,conv ert(varcha r, Appoint mentDateTi me, 101) +  ' ' + con vert(varch ar, Appoin tmentDateT ime, 8) AS  Appointme ntDateTime
  8598              ,ap.A ppointment SID
  8599              ,ap.P atientSID
  8600              ,ap.A ppointment TypeSID
  8601              ,desi reddate =
  8602               CASE
  8603                  W hen Desire dAppointme ntDate is  null
  8604                  T hen conver t(varchar( 12), cast( dateadd(da y, 1, Appo intmentDat eTime) as  date), 101 )
  8605                  E lse conver t(varchar( 12), cast( Appointmen tDateTime  as date),  101)
  8606               END
  8607              ,ap.C ancelNoSho wCode
  8608              ,ap.L ocationSID , ap.Purpo seOfVisit
  8609              ,ap.S chedulingR equestType
  8610              ,ap.C ancelDateT ime
  8611              ,ap.A ppointment CancelledF lag
  8612        
  8613            FROM CD WWork.Appt .Appointme nt AS ap
  8614            JOIN CD WWork.Dim. Location A S loc ON a p.Location SID = loc. LocationSI D
  8615            WHERE a p.Appointm entDateTim e >= getda te() and a p.Appointm entDateTim e < conver t(DATE, da teadd(mm,  6, getdate ()))
  8616              AND a p.PatientS ID  in (se lect PtSID  from [App ].[udf_All PatientsSI Ds](@pid)) ;
  8617        
  8618         END;]]>
  8619        </Value>
  8620                                  
  8621       </Property >
  8622                                 
  8623       <Property 
  8624        Name="IsAn siNullsOn"  
  8625        Value="Tru e" 
  8626       />
  8627                                 
  8628       <Relations hip 
  8629        Name="Body Dependenci es"
  8630       >
  8631                                           
  8632        <Entry>
  8633                                                    
  8634         <Reference
  8635          ExternalSo urce="CDWW ork.dacpac
  8636          Name="[CDW Work]|[App t].[Appoin tment]" 
  8637         />
  8638                                            
  8639        </Entry>
  8640                                           
  8641        <Entry>
  8642                                                    
  8643         <Reference
  8644          ExternalSo urce="CDWW ork.dacpac
  8645          Name="[CDW Work]|[Dim ].[Locatio n]" 
  8646         />
  8647                                            
  8648        </Entry>
  8649                                           
  8650        <Entry>
  8651                                                    
  8652         <Reference
  8653          ExternalSo urce="CDWW ork.dacpac
  8654          Name="[CDW Work]|[App t].[Appoin tment].[Lo cationSID]
  8655         />
  8656                                            
  8657        </Entry>
  8658                                           
  8659        <Entry>
  8660                                                    
  8661         <Reference
  8662          ExternalSo urce="CDWW ork.dacpac
  8663          Name="[CDW Work]|[Dim ].[Locatio n].[Locati onSID]" 
  8664         />
  8665                                            
  8666        </Entry>
  8667                                           
  8668        <Entry>
  8669                                                    
  8670         <Reference
  8671          ExternalSo urce="CDWW ork.dacpac
  8672          Name="[CDW Work]|[App t].[Appoin tment].[St a3n]" 
  8673         />
  8674                                            
  8675        </Entry>
  8676                                           
  8677        <Entry>
  8678                                                    
  8679         <Reference
  8680          Name="[App ].[udf_Sta tionName]"  
  8681         />
  8682                                            
  8683        </Entry>
  8684                                           
  8685        <Entry>
  8686                                                    
  8687         <Reference
  8688          ExternalSo urce="CDWW ork.dacpac
  8689          Name="[CDW Work]|[Dim ].[Locatio n].[Locati onName]" 
  8690         />
  8691                                            
  8692        </Entry>
  8693                                           
  8694        <Entry>
  8695                                                    
  8696         <Reference
  8697          ExternalSo urce="Buil tIns" 
  8698          Name="[var char]" 
  8699         />
  8700                                            
  8701        </Entry>
  8702                                           
  8703        <Entry>
  8704                                                    
  8705         <Reference
  8706          ExternalSo urce="CDWW ork.dacpac
  8707          Name="[CDW Work]|[App t].[Appoin tment].[Ap pointmentD ateTime]" 
  8708         />
  8709                                            
  8710        </Entry>
  8711                                           
  8712        <Entry>
  8713                                                    
  8714         <Reference
  8715          ExternalSo urce="Buil tIns" 
  8716          Name="[var char]" 
  8717         />
  8718                                            
  8719        </Entry>
  8720                                           
  8721        <Entry>
  8722                                                    
  8723         <Reference
  8724          ExternalSo urce="CDWW ork.dacpac
  8725          Name="[CDW Work]|[App t].[Appoin tment].[Ap pointmentS ID]" 
  8726         />
  8727                                            
  8728        </Entry>
  8729                                           
  8730        <Entry>
  8731                                                    
  8732         <Reference
  8733          ExternalSo urce="CDWW ork.dacpac
  8734          Name="[CDW Work]|[App t].[Appoin tment].[Pa tientSID]"  
  8735         />
  8736                                            
  8737        </Entry>
  8738                                           
  8739        <Entry>
  8740                                                    
  8741         <Reference
  8742          ExternalSo urce="CDWW ork.dacpac
  8743          Name="[CDW Work]|[App t].[Appoin tment].[Ap pointmentT ypeSID]" 
  8744         />
  8745                                            
  8746        </Entry>
  8747                                           
  8748        <Entry>
  8749                                                    
  8750         <Reference
  8751          ExternalSo urce="CDWW ork.dacpac
  8752          Name="[CDW Work]|[App t].[Appoin tment].[De siredAppoi ntmentDate ]" 
  8753         />
  8754                                            
  8755        </Entry>
  8756                                           
  8757        <Entry>
  8758                                                    
  8759         <Reference
  8760          ExternalSo urce="Buil tIns" 
  8761          Name="[var char]" 
  8762         />
  8763                                            
  8764        </Entry>
  8765                                           
  8766        <Entry>
  8767                                                    
  8768         <Reference
  8769          ExternalSo urce="Buil tIns" 
  8770          Name="[dat e]" 
  8771         />
  8772                                            
  8773        </Entry>
  8774                                           
  8775        <Entry>
  8776                                                    
  8777         <Reference
  8778          ExternalSo urce="Buil tIns" 
  8779          Name="[var char]" 
  8780         />
  8781                                            
  8782        </Entry>
  8783                                           
  8784        <Entry>
  8785                                                    
  8786         <Reference
  8787          ExternalSo urce="Buil tIns" 
  8788          Name="[dat e]" 
  8789         />
  8790                                            
  8791        </Entry>
  8792                                           
  8793        <Entry>
  8794                                                    
  8795         <Reference
  8796          ExternalSo urce="CDWW ork.dacpac
  8797          Name="[CDW Work]|[App t].[Appoin tment].[Ca ncelNoShow Code]" 
  8798         />
  8799                                            
  8800        </Entry>
  8801                                           
  8802        <Entry>
  8803                                                    
  8804         <Reference
  8805          ExternalSo urce="CDWW ork.dacpac
  8806          Name="[CDW Work]|[App t].[Appoin tment].[Pu rposeOfVis it]" 
  8807         />
  8808                                            
  8809        </Entry>
  8810                                           
  8811        <Entry>
  8812                                                    
  8813         <Reference
  8814          ExternalSo urce="CDWW ork.dacpac
  8815          Name="[CDW Work]|[App t].[Appoin tment].[Sc hedulingRe questType]
  8816         />
  8817                                            
  8818        </Entry>
  8819                                           
  8820        <Entry>
  8821                                                    
  8822         <Reference
  8823          ExternalSo urce="CDWW ork.dacpac
  8824          Name="[CDW Work]|[App t].[Appoin tment].[Ca ncelDateTi me]" 
  8825         />
  8826                                            
  8827        </Entry>
  8828                                           
  8829        <Entry>
  8830                                                    
  8831         <Reference
  8832          ExternalSo urce="CDWW ork.dacpac
  8833          Name="[CDW Work]|[App t].[Appoin tment].[Ap pointmentC ancelledFl ag]" 
  8834         />
  8835                                            
  8836        </Entry>
  8837                                           
  8838        <Entry>
  8839                                                    
  8840         <Reference
  8841          ExternalSo urce="CDWW ork.dacpac
  8842          Name="[CDW Work]|[App t].[Appoin tment].[Ap pointmentD ateTime]" 
  8843         />
  8844                                            
  8845        </Entry>
  8846                                           
  8847        <Entry>
  8848                                                    
  8849         <Reference
  8850          ExternalSo urce="Buil tIns" 
  8851          Name="[dat e]" 
  8852         />
  8853                                            
  8854        </Entry>
  8855                                           
  8856        <Entry>
  8857                                                    
  8858         <Reference
  8859          Name="[App ].[NVCC_us p_GetAppts ].[@pid]" 
  8860         />
  8861                                            
  8862        </Entry>
  8863                                           
  8864        <Entry>
  8865                                                    
  8866         <Reference
  8867          Name="[App ].[udf_All PatientsSI Ds]" 
  8868         />
  8869                                            
  8870        </Entry>
  8871                                           
  8872        <Entry>
  8873                                                    
  8874         <Reference
  8875          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  8876         />
  8877                                            
  8878        </Entry>
  8879                                  
  8880       </Relation ship>
  8881                                 
  8882       <Relations hip 
  8883        Name="Para meters"
  8884       >
  8885                                           
  8886        <Entry>
  8887                                                    
  8888         <Element 
  8889          Type="SqlS ubroutineP arameter" 
  8890          Name="[App ].[NVCC_us p_GetAppts ].[@pid]"
  8891         >
  8892                                                              
  8893          <Relations hip 
  8894           Name="Type "
  8895          >
  8896                                                                        
  8897           <Entry>
  8898                                                                                  
  8899            <Element 
  8900             Type="SqlT ypeSpecifi er"
  8901            >
  8902                                                                                            
  8903             <Relations hip 
  8904              Name="Type "
  8905             >
  8906                                                                                                     
  8907              <Entry>
  8908                                                                                                               
  8909               <Reference
  8910                ExternalSo urce="Buil tIns" 
  8911                Name="[big int]" 
  8912               />
  8913                                                                                                      
  8914              </Entry>
  8915                                                                                             
  8916             </Relation ship>
  8917                                                                                   
  8918            </Element>
  8919                                                                         
  8920           </Entry>
  8921                                                               
  8922          </Relation ship>
  8923                                                     
  8924         </Element>
  8925                                            
  8926        </Entry>
  8927                                  
  8928       </Relation ship>
  8929                                 
  8930       <Relations hip 
  8931        Name="Sche ma"
  8932       >
  8933                                           
  8934        <Entry>
  8935                                                    
  8936         <Reference
  8937          Name="[App ]" 
  8938         />
  8939                                            
  8940        </Entry>
  8941                                  
  8942       </Relation ship>
  8943                                 
  8944       <Annotatio
  8945        Type="SysC ommentsObj ectAnnotat ion"
  8946       >
  8947                                           
  8948        <Property 
  8949         Name="Crea teOffset" 
  8950         Value="2" 
  8951        />
  8952                                           
  8953        <Property 
  8954         Name="Leng th" 
  8955         Value="319 8" 
  8956        />
  8957                                           
  8958        <Property 
  8959         Name="Star tLine" 
  8960         Value="1" 
  8961        />
  8962                                           
  8963        <Property 
  8964         Name="Star tColumn" 
  8965         Value="1" 
  8966        />
  8967                                           
  8968        <Property 
  8969         Name="Head erContents
  8970         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetAppts]& #xD;&#xA;& #x9;-- Add  the param eters for  the stored  procedure  here&#xD; &#xA;&#x9; @pid bigin t -- this  is the pat ientsid&#x D;&#xA;&#x D;&#xA;--  NOTICE:&#x D;&#xA;--  Do not edi t the stor ed procedu re live on  the serve r. Code to  generate& #xD;&#xA;- - the proc edures is  stored in  the projec t reposito ry. Any ch anges made &#xD;&#xA; -- that ar e not reco rded in th e reposito ry will be  overwritt en.&#xD;&# xA;&#xD;&# xA;AS" 
  8971        />
  8972                                  
  8973       </Annotati on>
  8974                        
  8975      </Element>
  8976                       
  8977      <Element 
  8978       Type="SqlP rocedure" 
  8979       Name="[App ].[NVCC_us p_GetConsu lts]"
  8980      >
  8981                                 
  8982       <Property 
  8983        Name="Body Script"
  8984       >
  8985                                           
  8986        <Value>
  8987         <![CDATA[
  8988         --======== ========== ========== ========== ========== ========== ========== ========== ===
  8989         --Requesto r                                : Non Va C oordinated  Care Proj ect
  8990         --Author                  : Jerr y Kohler ( Original s cript by D r. Charles  Demosthen es)
  8991         --Object/S P Name                  : NVCC_u sp_GetCons ults
  8992         --SERVER                                   
  8993         --Data Bas e                                : CC_REFDO C
  8994         --Schema                                    : app
  8995         --Report                                    : N/A
  8996         --Folder                                    : N/A
  8997         --Report L oc             : N/A
  8998         --Job                     : None
  8999         --Job Loc                 : None
  9000         --Note                    : 
  9001         --Date Cre ated           : 01-1 2-2016
  9002         --Last Cha nged           : 12-0 1-2016
  9003         --Last Cha nged By                 : Brian  Diggs - No rthwest In novation C enter (NWI C)
  9004         --Reason F or Change               : Conver t from usi ng [App].[ vPCMMPatie ntProvider s] to
  9005         --                                                  :  [App].[PCM MCurrentPa tientProvi derRelatio nship]
  9006         --
  9007         --Last Cha nged           : 06-2 2-2016
  9008         --Last Cha nged By                 : Brian  Diggs - No rthwest In novation C enter (NWI C)
  9009         --Reason F or Change               : Bringi ng in prim ary provid er and oth er fields  to
  9010         --                                                     be able to  recreate  bottom blo ck of cons ult.
  9011         --                          Chan ge likely  done by Jo nathan Duc kart but w as
  9012         --                          neve r synced w ith the so urce repos itory.
  9013         --
  9014         --Last Cha nged           : 01-1 2-2016  
  9015         --Last Cha nged By                 : Jerry  Kohler - N orthwest I nnovation  Center (NW IC)
  9016         --Reason F or Change               : Remove d station  parameter  in order t o expand t he search
  9017         --                          for  a patient' s consults  from a si ngle stati on to any
  9018         --                          stat ion a pati ent is ass ociated wi th.
  9019         --
  9020         --Purpose                 : Retr ieve a pat ient's con sults from  within th e last 180
  9021         --                          days  for inclu sion into  NVCC docum entation.
  9022         --======== ========== ========== ========== ========== ========== ========== ========== ===
  9023        
  9024         BEGIN
  9025            -- SET  NOCOUNT ON  added to  prevent ex tra result  sets from
  9026            -- inte rfering wi th SELECT  statements .
  9027            SET NOC OUNT ON;
  9028        
  9029                 WI TH
  9030                          PTSI D AS (
  9031                                   SELECT  PtSID 
  9032                                   FROM [ App].[udf_ AllPatient sSIDs](@pi d)
  9033                          )
  9034            SELECT
  9035               c.St a3n
  9036              ,App. udf_Statio nName (c.S ta3n) AS S tationName
  9037              ,c.To RequestSer viceName
  9038              ,cast (c.Request DateTime a s date) AS  RequestDa te
  9039              ,c.CP RSStatus
  9040              ,c.CP RSOrderSID
  9041              ,c.Co nsultSID
  9042                  , c.ConsultI EN
  9043              ,c.Pa tientSID
  9044              ,c.To RequestSer viceSID
  9045              ,c.Re questType
  9046                  , c.OrderSta tusSID
  9047              ,c.Re centActivi tyTypeSID
  9048              ,c.Re centActivi tyType
  9049                  , c.SendingS taffSID
  9050              ,c.Ur gency
  9051              ,c.In patOutpat
  9052                  , ISNULL(c.P rovisional Diagnosis,  ' ') AS P rovDx
  9053                  , ISNULL(c.P rovisional DiagnosisC ode, ' ')  AS ProvDxC ode
  9054                  , c.TIUDocum entSID
  9055              ,c.Ea rliestDate
  9056              ,r.Co nsultReaso n
  9057                  , l.Location Name as Fr omService
  9058                  ,  st.StaffN ame as Req uestingPro vider
  9059                  ,  pcmm.Prim aryProvide r
  9060                  ,  pcmm.Team
  9061                  ,  sp.Eligib ility + '  ' + sp.Eli gibilitySt atus as Pr imaryEligi bility
  9062            FROM CD WWork.Con. Consult c
  9063            JOIN CD WWork.SPat ient.SCons ultReason  r
  9064                          ON r .ConsultSI D = c.Cons ultSID
  9065                 JO IN CDWWork .Dim.Locat ion l
  9066                          ON l .LocationS ID=c.FromL ocationSID
  9067                 JO IN CDWWork .SStaff.SS taff st
  9068                          ON s t.StaffSID =c.Sending StaffSID
  9069                 LE FT JOIN (
  9070                          SELE CT TOP 1 P atientSID,  PrimaryPr ovider, Te am 
  9071                          FROM  
  9072                                   App.PC MMCurrentP atientProv iderRelati onship pp
  9073                                   INNER  JOIN PTSID
  9074                                            ON pp.Pa tientSID =  PTSID.PtS ID
  9075                          ORDE R BY Relat ionshipSta rtDate DES C) pcmm
  9076                          ON p cmm.Patien tSID=c.Pat ientSID
  9077                 JO IN CDWWork .SPatient. SPatient s p
  9078                          ON s p.PatientS ID=c.Patie ntSID
  9079                 IN NER JOIN P TSid ptsid
  9080                          ON p tsid.PtSID  = c.Patie ntSID
  9081            WHERE c .ToRequest ServiceNam e not like  'NON-FORM %' 
  9082                  A ND c.CPRSS tatus not  in ('DISCO NTINUED',' CANCELLED' ,'COMPLETE ') 
  9083              AND c .RequestDa teTime >=  CAST(datea dd(dd, -36 5, getdate ()) AS DAT E)
  9084            ORDER B Y c.Reques tDateTime;
  9085         END]]>
  9086        </Value>
  9087                                  
  9088       </Property >
  9089                                 
  9090       <Property 
  9091        Name="IsAn siNullsOn"  
  9092        Value="Tru e" 
  9093       />
  9094                                 
  9095       <Relations hip 
  9096        Name="Body Dependenci es"
  9097       >
  9098                                           
  9099        <Entry>
  9100                                                    
  9101         <Reference
  9102          Name="[App ].[NVCC_us p_GetConsu lts].[@pid ]" 
  9103         />
  9104                                            
  9105        </Entry>
  9106                                           
  9107        <Entry>
  9108                                                    
  9109         <Reference
  9110          Name="[App ].[udf_All PatientsSI Ds]" 
  9111         />
  9112                                            
  9113        </Entry>
  9114                                           
  9115        <Entry>
  9116                                                    
  9117         <Reference
  9118          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  9119         />
  9120                                            
  9121        </Entry>
  9122                                           
  9123        <Entry>
  9124                                                    
  9125         <Reference
  9126          ExternalSo urce="CDWW ork.dacpac
  9127          Name="[CDW Work]|[Con ].[Consult ]" 
  9128         />
  9129                                            
  9130        </Entry>
  9131                                           
  9132        <Entry>
  9133                                                    
  9134         <Reference
  9135          ExternalSo urce="CDWW ork.dacpac
  9136          Name="[CDW Work]|[SPa tient].[SC onsultReas on]" 
  9137         />
  9138                                            
  9139        </Entry>
  9140                                           
  9141        <Entry>
  9142                                                    
  9143         <Reference
  9144          ExternalSo urce="CDWW ork.dacpac
  9145          Name="[CDW Work]|[SPa tient].[SC onsultReas on].[Consu ltSID]" 
  9146         />
  9147                                            
  9148        </Entry>
  9149                                           
  9150        <Entry>
  9151                                                    
  9152         <Reference
  9153          ExternalSo urce="CDWW ork.dacpac
  9154          Name="[CDW Work]|[Con ].[Consult ].[Consult SID]" 
  9155         />
  9156                                            
  9157        </Entry>
  9158                                           
  9159        <Entry>
  9160                                                    
  9161         <Reference
  9162          ExternalSo urce="CDWW ork.dacpac
  9163          Name="[CDW Work]|[Dim ].[Locatio n]" 
  9164         />
  9165                                            
  9166        </Entry>
  9167                                           
  9168        <Entry>
  9169                                                    
  9170         <Reference
  9171          ExternalSo urce="CDWW ork.dacpac
  9172          Name="[CDW Work]|[Dim ].[Locatio n].[Locati onSID]" 
  9173         />
  9174                                            
  9175        </Entry>
  9176                                           
  9177        <Entry>
  9178                                                    
  9179         <Reference
  9180          ExternalSo urce="CDWW ork.dacpac
  9181          Name="[CDW Work]|[Con ].[Consult ].[FromLoc ationSID]"  
  9182         />
  9183                                            
  9184        </Entry>
  9185                                           
  9186        <Entry>
  9187                                                    
  9188         <Reference
  9189          ExternalSo urce="CDWW ork.dacpac
  9190          Name="[CDW Work]|[SSt aff].[SSta ff]" 
  9191         />
  9192                                            
  9193        </Entry>
  9194                                           
  9195        <Entry>
  9196                                                    
  9197         <Reference
  9198          ExternalSo urce="CDWW ork.dacpac
  9199          Name="[CDW Work]|[SSt aff].[SSta ff].[Staff SID]" 
  9200         />
  9201                                            
  9202        </Entry>
  9203                                           
  9204        <Entry>
  9205                                                    
  9206         <Reference
  9207          ExternalSo urce="CDWW ork.dacpac
  9208          Name="[CDW Work]|[Con ].[Consult ].[Sending StaffSID]"  
  9209         />
  9210                                            
  9211        </Entry>
  9212                                           
  9213        <Entry>
  9214                                                    
  9215         <Reference
  9216          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p]" 
  9217         />
  9218                                            
  9219        </Entry>
  9220                                           
  9221        <Entry>
  9222                                                    
  9223         <Reference
  9224          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Patien tSID]" 
  9225         />
  9226                                            
  9227        </Entry>
  9228                                           
  9229        <Entry>
  9230                                                    
  9231         <Reference
  9232          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  9233         />
  9234                                            
  9235        </Entry>
  9236                                           
  9237        <Entry>
  9238                                                    
  9239         <Reference
  9240          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Patien tSID]" 
  9241         />
  9242                                            
  9243        </Entry>
  9244                                           
  9245        <Entry>
  9246                                                    
  9247         <Reference
  9248          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Primar yProvider]
  9249         />
  9250                                            
  9251        </Entry>
  9252                                           
  9253        <Entry>
  9254                                                    
  9255         <Reference
  9256          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Team]"  
  9257         />
  9258                                            
  9259        </Entry>
  9260                                           
  9261        <Entry>
  9262                                                    
  9263         <Reference
  9264          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Relati onshipStar tDate]" 
  9265         />
  9266                                            
  9267        </Entry>
  9268                                           
  9269        <Entry>
  9270                                                    
  9271         <Reference
  9272          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Patien tSID]" 
  9273         />
  9274                                            
  9275        </Entry>
  9276                                           
  9277        <Entry>
  9278                                                    
  9279         <Reference
  9280          ExternalSo urce="CDWW ork.dacpac
  9281          Name="[CDW Work]|[Con ].[Consult ].[Patient SID]" 
  9282         />
  9283                                            
  9284        </Entry>
  9285                                           
  9286        <Entry>
  9287                                                    
  9288         <Reference
  9289          ExternalSo urce="CDWW ork.dacpac
  9290          Name="[CDW Work]|[SPa tient].[SP atient]" 
  9291         />
  9292                                            
  9293        </Entry>
  9294                                           
  9295        <Entry>
  9296                                                    
  9297         <Reference
  9298          ExternalSo urce="CDWW ork.dacpac
  9299          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  9300         />
  9301                                            
  9302        </Entry>
  9303                                           
  9304        <Entry>
  9305                                                    
  9306         <Reference
  9307          ExternalSo urce="CDWW ork.dacpac
  9308          Name="[CDW Work]|[Con ].[Consult ].[Patient SID]" 
  9309         />
  9310                                            
  9311        </Entry>
  9312                                           
  9313        <Entry>
  9314                                                    
  9315         <Reference
  9316          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  9317         />
  9318                                            
  9319        </Entry>
  9320                                           
  9321        <Entry>
  9322                                                    
  9323         <Reference
  9324          ExternalSo urce="CDWW ork.dacpac
  9325          Name="[CDW Work]|[Con ].[Consult ].[Sta3n]"  
  9326         />
  9327                                            
  9328        </Entry>
  9329                                           
  9330        <Entry>
  9331                                                    
  9332         <Reference
  9333          Name="[App ].[udf_Sta tionName]"  
  9334         />
  9335                                            
  9336        </Entry>
  9337                                           
  9338        <Entry>
  9339                                                    
  9340         <Reference
  9341          ExternalSo urce="CDWW ork.dacpac
  9342          Name="[CDW Work]|[Con ].[Consult ].[ToReque stServiceN ame]" 
  9343         />
  9344                                            
  9345        </Entry>
  9346                                           
  9347        <Entry>
  9348                                                    
  9349         <Reference
  9350          ExternalSo urce="Buil tIns" 
  9351          Name="[dat e]" 
  9352         />
  9353                                            
  9354        </Entry>
  9355                                           
  9356        <Entry>
  9357                                                    
  9358         <Reference
  9359          ExternalSo urce="CDWW ork.dacpac
  9360          Name="[CDW Work]|[Con ].[Consult ].[Request DateTime]"  
  9361         />
  9362                                            
  9363        </Entry>
  9364                                           
  9365        <Entry>
  9366                                                    
  9367         <Reference
  9368          ExternalSo urce="CDWW ork.dacpac
  9369          Name="[CDW Work]|[Con ].[Consult ].[CPRSSta tus]" 
  9370         />
  9371                                            
  9372        </Entry>
  9373                                           
  9374        <Entry>
  9375                                                    
  9376         <Reference
  9377          ExternalSo urce="CDWW ork.dacpac
  9378          Name="[CDW Work]|[Con ].[Consult ].[CPRSOrd erSID]" 
  9379         />
  9380                                            
  9381        </Entry>
  9382                                           
  9383        <Entry>
  9384                                                    
  9385         <Reference
  9386          ExternalSo urce="CDWW ork.dacpac
  9387          Name="[CDW Work]|[Con ].[Consult ].[Consult SID]" 
  9388         />
  9389                                            
  9390        </Entry>
  9391                                           
  9392        <Entry>
  9393                                                    
  9394         <Reference
  9395          ExternalSo urce="CDWW ork.dacpac
  9396          Name="[CDW Work]|[Con ].[Consult ].[Consult IEN]" 
  9397         />
  9398                                            
  9399        </Entry>
  9400                                           
  9401        <Entry>
  9402                                                    
  9403         <Reference
  9404          ExternalSo urce="CDWW ork.dacpac
  9405          Name="[CDW Work]|[Con ].[Consult ].[ToReque stServiceS ID]" 
  9406         />
  9407                                            
  9408        </Entry>
  9409                                           
  9410        <Entry>
  9411                                                    
  9412         <Reference
  9413          ExternalSo urce="CDWW ork.dacpac
  9414          Name="[CDW Work]|[Con ].[Consult ].[Request Type]" 
  9415         />
  9416                                            
  9417        </Entry>
  9418                                           
  9419        <Entry>
  9420                                                    
  9421         <Reference
  9422          ExternalSo urce="CDWW ork.dacpac
  9423          Name="[CDW Work]|[Con ].[Consult ].[OrderSt atusSID]" 
  9424         />
  9425                                            
  9426        </Entry>
  9427                                           
  9428        <Entry>
  9429                                                    
  9430         <Reference
  9431          ExternalSo urce="CDWW ork.dacpac
  9432          Name="[CDW Work]|[Con ].[Consult ].[RecentA ctivityTyp eSID]" 
  9433         />
  9434                                            
  9435        </Entry>
  9436                                           
  9437        <Entry>
  9438                                                    
  9439         <Reference
  9440          ExternalSo urce="CDWW ork.dacpac
  9441          Name="[CDW Work]|[Con ].[Consult ].[RecentA ctivityTyp e]" 
  9442         />
  9443                                            
  9444        </Entry>
  9445                                           
  9446        <Entry>
  9447                                                    
  9448         <Reference
  9449          ExternalSo urce="CDWW ork.dacpac
  9450          Name="[CDW Work]|[Con ].[Consult ].[Sending StaffSID]"  
  9451         />
  9452                                            
  9453        </Entry>
  9454                                           
  9455        <Entry>
  9456                                                    
  9457         <Reference
  9458          ExternalSo urce="CDWW ork.dacpac
  9459          Name="[CDW Work]|[Con ].[Consult ].[Urgency ]" 
  9460         />
  9461                                            
  9462        </Entry>
  9463                                           
  9464        <Entry>
  9465                                                    
  9466         <Reference
  9467          ExternalSo urce="CDWW ork.dacpac
  9468          Name="[CDW Work]|[Con ].[Consult ].[InpatOu tpat]" 
  9469         />
  9470                                            
  9471        </Entry>
  9472                                           
  9473        <Entry>
  9474                                                    
  9475         <Reference
  9476          ExternalSo urce="CDWW ork.dacpac
  9477          Name="[CDW Work]|[Con ].[Consult ].[Provisi onalDiagno sis]" 
  9478         />
  9479                                            
  9480        </Entry>
  9481                                           
  9482        <Entry>
  9483                                                    
  9484         <Reference
  9485          ExternalSo urce="CDWW ork.dacpac
  9486          Name="[CDW Work]|[Con ].[Consult ].[Provisi onalDiagno sisCode]" 
  9487         />
  9488                                            
  9489        </Entry>
  9490                                           
  9491        <Entry>
  9492                                                    
  9493         <Reference
  9494          ExternalSo urce="CDWW ork.dacpac
  9495          Name="[CDW Work]|[Con ].[Consult ].[TIUDocu mentSID]" 
  9496         />
  9497                                            
  9498        </Entry>
  9499                                           
  9500        <Entry>
  9501                                                    
  9502         <Reference
  9503          ExternalSo urce="CDWW ork.dacpac
  9504          Name="[CDW Work]|[Con ].[Consult ].[Earlies tDate]" 
  9505         />
  9506                                            
  9507        </Entry>
  9508                                           
  9509        <Entry>
  9510                                                    
  9511         <Reference
  9512          ExternalSo urce="CDWW ork.dacpac
  9513          Name="[CDW Work]|[SPa tient].[SC onsultReas on].[Consu ltReason]"  
  9514         />
  9515                                            
  9516        </Entry>
  9517                                           
  9518        <Entry>
  9519                                                    
  9520         <Reference
  9521          ExternalSo urce="CDWW ork.dacpac
  9522          Name="[CDW Work]|[Dim ].[Locatio n].[Locati onName]" 
  9523         />
  9524                                            
  9525        </Entry>
  9526                                           
  9527        <Entry>
  9528                                                    
  9529         <Reference
  9530          ExternalSo urce="CDWW ork.dacpac
  9531          Name="[CDW Work]|[SSt aff].[SSta ff].[Staff Name]" 
  9532         />
  9533                                            
  9534        </Entry>
  9535                                           
  9536        <Entry>
  9537                                                    
  9538         <Reference
  9539          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Primar yProvider]
  9540         />
  9541                                            
  9542        </Entry>
  9543                                           
  9544        <Entry>
  9545                                                    
  9546         <Reference
  9547          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Team]"  
  9548         />
  9549                                            
  9550        </Entry>
  9551                                           
  9552        <Entry>
  9553                                                    
  9554         <Reference
  9555          ExternalSo urce="CDWW ork.dacpac
  9556          Name="[CDW Work]|[SPa tient].[SP atient].[E ligibility ]" 
  9557         />
  9558                                            
  9559        </Entry>
  9560                                           
  9561        <Entry>
  9562                                                    
  9563         <Reference
  9564          ExternalSo urce="CDWW ork.dacpac
  9565          Name="[CDW Work]|[SPa tient].[SP atient].[E ligibility Status]" 
  9566         />
  9567                                            
  9568        </Entry>
  9569                                           
  9570        <Entry>
  9571                                                    
  9572         <Reference
  9573          ExternalSo urce="Buil tIns" 
  9574          Name="[dat e]" 
  9575         />
  9576                                            
  9577        </Entry>
  9578                                  
  9579       </Relation ship>
  9580                                 
  9581       <Relations hip 
  9582        Name="Dyna micObjects "
  9583       >
  9584                                           
  9585        <Entry>
  9586                                                    
  9587         <Element 
  9588          Type="SqlD ynamicColu mnSource" 
  9589          Name="[App ].[NVCC_us p_GetConsu lts].[CTE1 ].[PTSID]"
  9590         >
  9591                                                              
  9592          <Relations hip 
  9593           Name="Colu mns"
  9594          >
  9595                                                                        
  9596           <Entry>
  9597                                                                                  
  9598            <Element 
  9599             Type="SqlC omputedCol umn" 
  9600             Name="[App ].[NVCC_us p_GetConsu lts].[CTE1 ].[PTSID]. [PtSID]"
  9601            >
  9602                                                                                            
  9603             <Relations hip 
  9604              Name="Expr essionDepe ndencies"
  9605             >
  9606                                                                                                     
  9607              <Entry>
  9608                                                                                                               
  9609               <Reference
  9610                Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  9611               />
  9612                                                                                                      
  9613              </Entry>
  9614                                                                                             
  9615             </Relation ship>
  9616                                                                                   
  9617            </Element>
  9618                                                                         
  9619           </Entry>
  9620                                                               
  9621          </Relation ship>
  9622                                                     
  9623         </Element>
  9624                                            
  9625        </Entry>
  9626                                  
  9627       </Relation ship>
  9628                                 
  9629       <Relations hip 
  9630        Name="Para meters"
  9631       >
  9632                                           
  9633        <Entry>
  9634                                                    
  9635         <Element 
  9636          Type="SqlS ubroutineP arameter" 
  9637          Name="[App ].[NVCC_us p_GetConsu lts].[@pid ]"
  9638         >
  9639                                                              
  9640          <Relations hip 
  9641           Name="Type "
  9642          >
  9643                                                                        
  9644           <Entry>
  9645                                                                                  
  9646            <Element 
  9647             Type="SqlT ypeSpecifi er"
  9648            >
  9649                                                                                            
  9650             <Relations hip 
  9651              Name="Type "
  9652             >
  9653                                                                                                     
  9654              <Entry>
  9655                                                                                                               
  9656               <Reference
  9657                ExternalSo urce="Buil tIns" 
  9658                Name="[big int]" 
  9659               />
  9660                                                                                                      
  9661              </Entry>
  9662                                                                                             
  9663             </Relation ship>
  9664                                                                                   
  9665            </Element>
  9666                                                                         
  9667           </Entry>
  9668                                                               
  9669          </Relation ship>
  9670                                                     
  9671         </Element>
  9672                                            
  9673        </Entry>
  9674                                  
  9675       </Relation ship>
  9676                                 
  9677       <Relations hip 
  9678        Name="Sche ma"
  9679       >
  9680                                           
  9681        <Entry>
  9682                                                    
  9683         <Reference
  9684          Name="[App ]" 
  9685         />
  9686                                            
  9687        </Entry>
  9688                                  
  9689       </Relation ship>
  9690                                 
  9691       <Annotatio
  9692        Type="SysC ommentsObj ectAnnotat ion"
  9693       >
  9694                                           
  9695        <Property 
  9696         Name="Crea teOffset" 
  9697         Value="2" 
  9698        />
  9699                                           
  9700        <Property 
  9701         Name="Leng th" 
  9702         Value="402 9" 
  9703        />
  9704                                           
  9705        <Property 
  9706         Name="Star tLine" 
  9707         Value="1" 
  9708        />
  9709                                           
  9710        <Property 
  9711         Name="Star tColumn" 
  9712         Value="1" 
  9713        />
  9714                                           
  9715        <Property 
  9716         Name="Head erContents
  9717         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetConsult s]&#xD;&#x A;&#x9;--  Add the pa rameters f or the sto red proced ure here&# xD;&#xA;&# x9;@pid bi gint -- th is is the  patientsid &#xD;&#xA; &#xD;&#xA; -- NOTICE: &#xD;&#xA; -- Do not  edit the s tored proc edure live  on the se rver. Code  to genera te&#xD;&#x A;-- the p rocedures  is stored  in the pro ject repos itory. Any  changes m ade&#xD;&# xA;-- that  are not r ecorded in  the repos itory will  be overwr itten.&#xD ;&#xA;&#xD ;&#xA;AS" 
  9718        />
  9719                                  
  9720       </Annotati on>
  9721                        
  9722      </Element>
  9723                       
  9724      <Element 
  9725       Type="SqlP rocedure" 
  9726       Name="[App ].[NVCC_us p_GetDivis ion]"
  9727      >
  9728                                 
  9729       <Property 
  9730        Name="Body Script"
  9731       >
  9732                                           
  9733        <Value>
  9734         <![CDATA[
  9735         --======== ========== ========== ========== ========== ========== ========== ========== ===
  9736         --Requesto r                                : REFDOC
  9737         --Author                  : Jon  Duckart 
  9738         --Object/S P Name                  : NVCC_u sp_GetDivi sion
  9739         --SERVER                                   
  9740         --Data Bas e                                : CC_REFDO C
  9741         --Schema                                    : app
  9742         --Report                                    : N/A
  9743         --Folder                                    : N/A
  9744         --Report L oc             : N/A
  9745         --Job                     : None
  9746         --Job Loc                 : None
  9747         --Note                    : 
  9748         --Date Cre ated           : 08-2 5-2016
  9749         --Last Cha nged           : 05-2 5-2017
  9750         --Last Cha nged By                 : Brian  Diggs - No rthwest In novation C enter (NWI C)
  9751         --Reason F or Change               : Change d to use v iew with o nly one en try per St a6a.
  9752         --
  9753         --Last Cha nged           : 03-1 5-2017
  9754         --Last Cha nged By                 : Brian  Diggs - No rthwest In novation C enter (NWI C)
  9755         --Reason F or Change               : Change d paramete r type to  varchar(50 ) to match  the
  9756         --                          type  of sta6a  in the vie w.
  9757         --
  9758         --Last Cha nged           : 08-2 5-2016
  9759         --Last Cha nged By                 : Jon Du ckart - No rthwest In novation C enter (NWI C)
  9760         --Reason F or Change               : 
  9761         --
  9762         --Purpose                 : Retr ieve a use r's Sta6a  for VIA ca lls
  9763         --======== ========== ========== ========== ========== ========== ========== ========== ===
  9764         --Uses: CD WWork.Dim. Division
  9765        
  9766         BEGIN
  9767                 --  SET NOCOU NT ON adde d to preve nt extra r esult sets  from
  9768                 --  interferi ng with SE LECT state ments.
  9769                 SE T NOCOUNT  ON;
  9770                 SE LECT 
  9771                          [Div isionSID]
  9772                          ,[St a3n]
  9773                          ,[Di visionName ]  
  9774                          ,[St a6a]
  9775                 FR OM App.vNV CC_Divisio n
  9776                 WH ERE Sta6a= @sta6a
  9777               
  9778         END;]]>
  9779        </Value>
  9780                                  
  9781       </Property >
  9782                                 
  9783       <Property 
  9784        Name="IsAn siNullsOn"  
  9785        Value="Tru e" 
  9786       />
  9787                                 
  9788       <Relations hip 
  9789        Name="Body Dependenci es"
  9790       >
  9791                                           
  9792        <Entry>
  9793                                                    
  9794         <Reference
  9795          Name="[App ].[vNVCC_D ivision]" 
  9796         />
  9797                                            
  9798        </Entry>
  9799                                           
  9800        <Entry>
  9801                                                    
  9802         <Reference
  9803          Name="[App ].[vNVCC_D ivision].[ DivisionSI D]" 
  9804         />
  9805                                            
  9806        </Entry>
  9807                                           
  9808        <Entry>
  9809                                                    
  9810         <Reference
  9811          Name="[App ].[vNVCC_D ivision].[ Sta3n]" 
  9812         />
  9813                                            
  9814        </Entry>
  9815                                           
  9816        <Entry>
  9817                                                    
  9818         <Reference
  9819          Name="[App ].[vNVCC_D ivision].[ DivisionNa me]" 
  9820         />
  9821                                            
  9822        </Entry>
  9823                                           
  9824        <Entry>
  9825                                                    
  9826         <Reference
  9827          Name="[App ].[vNVCC_D ivision].[ Sta6a]" 
  9828         />
  9829                                            
  9830        </Entry>
  9831                                           
  9832        <Entry>
  9833                                                    
  9834         <Reference
  9835          Name="[App ].[NVCC_us p_GetDivis ion].[@sta 6a]" 
  9836         />
  9837                                            
  9838        </Entry>
  9839                                  
  9840       </Relation ship>
  9841                                 
  9842       <Relations hip 
  9843        Name="Para meters"
  9844       >
  9845                                           
  9846        <Entry>
  9847                                                    
  9848         <Element 
  9849          Type="SqlS ubroutineP arameter" 
  9850          Name="[App ].[NVCC_us p_GetDivis ion].[@sta 6a]"
  9851         >
  9852                                                              
  9853          <Relations hip 
  9854           Name="Type "
  9855          >
  9856                                                                        
  9857           <Entry>
  9858                                                                                  
  9859            <Element 
  9860             Type="SqlT ypeSpecifi er"
  9861            >
  9862                                                                                            
  9863             <Property 
  9864              Name="Leng th" 
  9865              Value="50"  
  9866             />
  9867                                                                                            
  9868             <Relations hip 
  9869              Name="Type "
  9870             >
  9871                                                                                                     
  9872              <Entry>
  9873                                                                                                               
  9874               <Reference
  9875                ExternalSo urce="Buil tIns" 
  9876                Name="[var char]" 
  9877               />
  9878                                                                                                      
  9879              </Entry>
  9880                                                                                             
  9881             </Relation ship>
  9882                                                                                   
  9883            </Element>
  9884                                                                         
  9885           </Entry>
  9886                                                               
  9887          </Relation ship>
  9888                                                     
  9889         </Element>
  9890                                            
  9891        </Entry>
  9892                                  
  9893       </Relation ship>
  9894                                 
  9895       <Relations hip 
  9896        Name="Sche ma"
  9897       >
  9898                                           
  9899        <Entry>
  9900                                                    
  9901         <Reference
  9902          Name="[App ]" 
  9903         />
  9904                                            
  9905        </Entry>
  9906                                  
  9907       </Relation ship>
  9908                                 
  9909       <Annotatio
  9910        Type="SysC ommentsObj ectAnnotat ion"
  9911       >
  9912                                           
  9913        <Property 
  9914         Name="Crea teOffset" 
  9915         Value="2" 
  9916        />
  9917                                           
  9918        <Property 
  9919         Name="Leng th" 
  9920         Value="176 3" 
  9921        />
  9922                                           
  9923        <Property 
  9924         Name="Star tLine" 
  9925         Value="1" 
  9926        />
  9927                                           
  9928        <Property 
  9929         Name="Star tColumn" 
  9930         Value="1" 
  9931        />
  9932                                           
  9933        <Property 
  9934         Name="Head erContents
  9935         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetDivisio n]&#xD;&#x A;&#x9;@st a6a varcha r(50)&#xD; &#xA;&#xD; &#xA;-- NO TICE:&#xD; &#xA;-- Do  not edit  the stored  procedure  live on t he server.  Code to g enerate&#x D;&#xA;--  the proced ures is st ored in th e project  repository . Any chan ges made&# xD;&#xA;--  that are  not record ed in the  repository  will be o verwritten .&#xD;&#xA ;&#xD;&#xA ;AS" 
  9936        />
  9937                                  
  9938       </Annotati on>
  9939                        
  9940      </Element>
  9941                       
  9942      <Element 
  9943       Type="SqlP rocedure" 
  9944       Name="[App ].[NVCC_us p_GetDivis ions]"
  9945      >
  9946                                 
  9947       <Property 
  9948        Name="Body Script"
  9949       >
  9950                                           
  9951        <Value>
  9952         <![CDATA[
  9953         --======== ========== ========== ========== ========== ========== ========== ========== ===
  9954         --Requesto r                                : Non Va C oordinated  Care Proj ect
  9955         --Author                  : Jon  Duckart 
  9956         --Object/S P Name                  : NVCC_u sp_GetVAMe ds
  9957         --SERVER                                   
  9958         --Data Bas e                                : CC_REFDO C
  9959         --Schema                                    : app
  9960         --Report                                    : N/A
  9961         --Folder                                    : N/A
  9962         --Report L oc             : N/A
  9963         --Job                     : None
  9964         --Job Loc                 : None
  9965         --Note                    : 
  9966         --Date Cre ated           : 08-2 3-2016
  9967         --Last Cha nged           : 05-2 5-2017
  9968         --Last Cha nged By                 : Brian  Diggs - No rthwest In novation C enter (NWI C)
  9969         --Reason F or Change               : Change d to use v iew with o nly one en try per St a6a.
  9970         --
  9971         --Last Cha nged           : 08-2 3-2016
  9972         --Last Cha nged By                 : Jon Du ckart - No rthwest In novation C enter (NWI C)
  9973         --Reason F or Change               : 
  9974         --
  9975         --Purpose                 : Retr ieve a use r's Sta6a  for VIA ca lls
  9976         --======== ========== ========== ========== ========== ========== ========== ========== ===
  9977         --Uses: CD WWork.Dim. Division
  9978        
  9979         BEGIN
  9980             -- SET  NOCOUNT O N added to  prevent e xtra resul t sets fro m
  9981             -- int erfering w ith SELECT  statement s.
  9982             SET NO COUNT ON;
  9983                 SE LECT 
  9984                          [Div isionSID]
  9985                          ,[St a3n]
  9986                          ,[Di visionName ]  
  9987                          ,[St a6a]
  9988                 FR OM App.vNV CC_Divisio n
  9989                 WH ERE Sta3n= @sta3n
  9990                 OR DER BY Sta 6a
  9991         END;]]>
  9992        </Value>
  9993                                  
  9994       </Property >
  9995                                 
  9996       <Property 
  9997        Name="IsAn siNullsOn"  
  9998        Value="Tru e" 
  9999       />
  10000                                 
  10001       <Relations hip 
  10002        Name="Body Dependenci es"
  10003       >
  10004                                           
  10005        <Entry>
  10006                                                    
  10007         <Reference
  10008          Name="[App ].[vNVCC_D ivision]" 
  10009         />
  10010                                            
  10011        </Entry>
  10012                                           
  10013        <Entry>
  10014                                                    
  10015         <Reference
  10016          Name="[App ].[vNVCC_D ivision].[ DivisionSI D]" 
  10017         />
  10018                                            
  10019        </Entry>
  10020                                           
  10021        <Entry>
  10022                                                    
  10023         <Reference
  10024          Name="[App ].[vNVCC_D ivision].[ Sta3n]" 
  10025         />
  10026                                            
  10027        </Entry>
  10028                                           
  10029        <Entry>
  10030                                                    
  10031         <Reference
  10032          Name="[App ].[vNVCC_D ivision].[ DivisionNa me]" 
  10033         />
  10034                                            
  10035        </Entry>
  10036                                           
  10037        <Entry>
  10038                                                    
  10039         <Reference
  10040          Name="[App ].[vNVCC_D ivision].[ Sta6a]" 
  10041         />
  10042                                            
  10043        </Entry>
  10044                                           
  10045        <Entry>
  10046                                                    
  10047         <Reference
  10048          Name="[App ].[NVCC_us p_GetDivis ions].[@st a3n]" 
  10049         />
  10050                                            
  10051        </Entry>
  10052                                  
  10053       </Relation ship>
  10054                                 
  10055       <Relations hip 
  10056        Name="Para meters"
  10057       >
  10058                                           
  10059        <Entry>
  10060                                                    
  10061         <Element 
  10062          Type="SqlS ubroutineP arameter" 
  10063          Name="[App ].[NVCC_us p_GetDivis ions].[@st a3n]"
  10064         >
  10065                                                              
  10066          <Relations hip 
  10067           Name="Type "
  10068          >
  10069                                                                        
  10070           <Entry>
  10071                                                                                  
  10072            <Element 
  10073             Type="SqlT ypeSpecifi er"
  10074            >
  10075                                                                                            
  10076             <Relations hip 
  10077              Name="Type "
  10078             >
  10079                                                                                                     
  10080              <Entry>
  10081                                                                                                               
  10082               <Reference
  10083                ExternalSo urce="Buil tIns" 
  10084                Name="[sma llint]" 
  10085               />
  10086                                                                                                      
  10087              </Entry>
  10088                                                                                             
  10089             </Relation ship>
  10090                                                                                   
  10091            </Element>
  10092                                                                         
  10093           </Entry>
  10094                                                               
  10095          </Relation ship>
  10096                                                     
  10097         </Element>
  10098                                            
  10099        </Entry>
  10100                                  
  10101       </Relation ship>
  10102                                 
  10103       <Relations hip 
  10104        Name="Sche ma"
  10105       >
  10106                                           
  10107        <Entry>
  10108                                                    
  10109         <Reference
  10110          Name="[App ]" 
  10111         />
  10112                                            
  10113        </Entry>
  10114                                  
  10115       </Relation ship>
  10116                                 
  10117       <Annotatio
  10118        Type="SysC ommentsObj ectAnnotat ion"
  10119       >
  10120                                           
  10121        <Property 
  10122         Name="Crea teOffset" 
  10123         Value="8" 
  10124        />
  10125                                           
  10126        <Property 
  10127         Name="Leng th" 
  10128         Value="158 7" 
  10129        />
  10130                                           
  10131        <Property 
  10132         Name="Star tLine" 
  10133         Value="1" 
  10134        />
  10135                                           
  10136        <Property 
  10137         Name="Star tColumn" 
  10138         Value="1" 
  10139        />
  10140                                           
  10141        <Property 
  10142         Name="Head erContents
  10143         Value="&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetDivisio ns]&#xD;&# xA;&#x9;@s ta3n small int -- thi s is the s ta3n&#xD;& #xA;&#xD;& #xA;-- NOT ICE:&#xD;& #xA;-- Do  not edit t he stored  procedure  live on th e server.  Code to ge nerate&#xD ;&#xA;-- t he procedu res is sto red in the  project r epository.  Any chang es made&#x D;&#xA;--  that are n ot recorde d in the r epository  will be ov erwritten. &#xD;&#xA; &#xD;&#xA; AS" 
  10144        />
  10145                                  
  10146       </Annotati on>
  10147                        
  10148      </Element>
  10149                       
  10150      <Element 
  10151       Type="SqlP rocedure" 
  10152       Name="[App ].[NVCC_us p_GetFacil ityByVisnI d]"
  10153      >
  10154                                 
  10155       <Property 
  10156        Name="Body Script"
  10157       >
  10158                                           
  10159        <Value>
  10160         <![CDATA[
  10161         --======== ========== ========== ========== ========== ========== ========== ========== ===
  10162         --Requesto r                                : REFDOC
  10163         --Author                  : Lava nya Epuri
  10164         --Object/S P Name                  : NVCC_u sp_GetFaci lityByVisn Id
  10165         --SERVER                                   
  10166         --Data Bas e                                : CC_REFDO C
  10167         --Schema                                    : app
  10168         --Report                                    : N/A
  10169         --Folder                                    : N/A
  10170         --Report L oc             : N/A
  10171         --Job                     : None
  10172         --Job Loc                 : None
  10173         --Note                    : 
  10174         --Date Cre ated           : 12-1 2-2017
  10175        
  10176         --
  10177         --Purpose                 : Retr ieve list  of facilit es for sel ected Visn
  10178         --======== ========== ========== ========== ========== ========== ========== ========== ===
  10179         --Uses: CD WWork.Dim. Sta3n
  10180         --Uses: Ap p.udf_Stat ionName(St a3n) funct ion
  10181        
  10182         BEGIN
  10183                 --  SET NOCOU NT ON adde d to preve nt extra r esult sets  from
  10184                 --  interferi ng with SE LECT state ments.
  10185                 SE T NOCOUNT  ON;
  10186                 SE LECT 
  10187                          Sta3 n AS Facil ityID
  10188                          ,(Ap p.udf_Stat ionName(St a3n)) AS F acilityNam
  10189                          ,VIS NFY17 AS V ISN                
  10190                 FR OM CDWWork .Dim.Sta3n  
  10191                 wh ere Sta3n  > 0
  10192                 an d (App.udf _StationNa me(Sta3n))  IS NOT NU LL
  10193                 or der by VIS N
  10194               
  10195         END;]]>
  10196        </Value>
  10197                                  
  10198       </Property >
  10199                                 
  10200       <Property 
  10201        Name="IsAn siNullsOn"  
  10202        Value="Tru e" 
  10203       />
  10204                                 
  10205       <Relations hip 
  10206        Name="Body Dependenci es"
  10207       >
  10208                                           
  10209        <Entry>
  10210                                                    
  10211         <Reference
  10212          ExternalSo urce="CDWW ork.dacpac
  10213          Name="[CDW Work]|[Dim ].[Sta3n]"  
  10214         />
  10215                                            
  10216        </Entry>
  10217                                           
  10218        <Entry>
  10219                                                    
  10220         <Reference
  10221          ExternalSo urce="CDWW ork.dacpac
  10222          Name="[CDW Work]|[Dim ].[Sta3n]. [Sta3n]" 
  10223         />
  10224                                            
  10225        </Entry>
  10226                                           
  10227        <Entry>
  10228                                                    
  10229         <Reference
  10230          Name="[App ].[udf_Sta tionName]"  
  10231         />
  10232                                            
  10233        </Entry>
  10234                                           
  10235        <Entry>
  10236                                                    
  10237         <Reference
  10238          ExternalSo urce="CDWW ork.dacpac
  10239          Name="[CDW Work]|[Dim ].[Sta3n]. [VISNFY17]
  10240         />
  10241                                            
  10242        </Entry>
  10243                                           
  10244        <Entry>
  10245                                                    
  10246         <Reference
  10247          Name="[App ].[udf_Sta tionName]"  
  10248         />
  10249                                            
  10250        </Entry>
  10251                                  
  10252       </Relation ship>
  10253                                 
  10254       <Relations hip 
  10255        Name="Sche ma"
  10256       >
  10257                                           
  10258        <Entry>
  10259                                                    
  10260         <Reference
  10261          Name="[App ]" 
  10262         />
  10263                                            
  10264        </Entry>
  10265                                  
  10266       </Relation ship>
  10267                                 
  10268       <Annotatio
  10269        Type="SysC ommentsObj ectAnnotat ion"
  10270       >
  10271                                           
  10272        <Property 
  10273         Name="Leng th" 
  10274         Value="134 1" 
  10275        />
  10276                                           
  10277        <Property 
  10278         Name="Star tLine" 
  10279         Value="1" 
  10280        />
  10281                                           
  10282        <Property 
  10283         Name="Star tColumn" 
  10284         Value="1" 
  10285        />
  10286                                           
  10287        <Property 
  10288         Name="Head erContents
  10289         Value="CRE ATE PROCED URE [App]. [NVCC_usp_ GetFacilit yByVisnId] &#xD;&#xA; &#x9;&#xD; &#xA;&#xD; &#xA;-- NO TICE:&#xD; &#xA;-- Do  not edit  the stored  procedure  live on t he server.  Code to g enerate&#x D;&#xA;--  the proced ures is st ored in th e project  repository . Any chan ges made&# xD;&#xA;--  that are  not record ed in the  repository  will be o verwritten .&#xD;&#xA ;&#xD;&#xA ;AS" 
  10290        />
  10291                                  
  10292       </Annotati on>
  10293                        
  10294      </Element>
  10295                       
  10296      <Element 
  10297       Type="SqlP rocedure" 
  10298       Name="[App ].[NVCC_us p_GetLabs] "
  10299      >
  10300                                 
  10301       <Property 
  10302        Name="Body Script"
  10303       >
  10304                                           
  10305        <Value>
  10306         <![CDATA[
  10307         --======== ========== ========== ========== ========== ========== ========== ========== ===
  10308         --Requesto r                                : Non Va C oordinated  Care Proj ect
  10309         --Author                  : Jerr y Kohler ( Original s cript by D r. Charles  Demosthen es)
  10310         --Object/S P Name                  : NVCC_u sp_GetLabs
  10311         --Server                                   
  10312         --Data Bas e                                : CC_REFDO C
  10313         --Schema                                    : app
  10314         --Report                                    : N/A
  10315         --Folder                                    : N/A
  10316         --Report L oc             : N/A
  10317         --Job                     : None
  10318         --Job Loc                 : None
  10319         --Note                    : 
  10320         --Date Cre ated           : 01-0 6-2016
  10321         --
  10322         --Last Cha nged           : 02-1 8-2016  
  10323         --Last Cha nged By                 : Jerry  Kohler - N orthwest I nnovation  Center (NW IC)
  10324         --Reason F or Change               : Reques t to also  provide th e name of  the statio n.
  10325         --
  10326         --Changed                 : 02-1 6-2016  
  10327         --Changed  By                 :  Jerry Kohl er - North west Innov ation Cent er (NWIC)
  10328         --Reason F or Change               : We onl y want the  most rece nt value f or any of  the
  10329         --                          labs .
  10330         --
  10331         --Changed                 : 01-1 2-2016  
  10332         --Changed  By                 :  Jerry Kohl er - North west Innov ation Cent er (NWIC)
  10333         --Reason F or Change               : Remove d station  parameter  in order t o expand t he search
  10334         --                          for  a patient' s labs fro m a single  station t o any
  10335         --                          stat ion a pati ent is ass ociated wi th by acqu iring all
  10336         --                          Pati entSIDs fr om the pas sed SIDs I CN.
  10337         --
  10338         --Changed                 : 01-1 1-2016  
  10339         --Changed  By                 :  Jerry Kohl er - North west Innov ation Cent er (NWIC)
  10340         --Reason F or Change               : Integr ated into  the NWIC l ab process  whereby l ab test
  10341         --                          name s are dete rmined by  combinatio ns of LOIN C or workl oad
  10342         --                          code s, and not  relying o n the faci lities to  normalize  or
  10343         --                          stan dardize th eir lab te st names.
  10344         --
  10345         --Purpose                 : Retr ieve resul ts for cer tain lab t ests withi n the last  15
  10346         --                          mont hs and pas s that dat a back to  the NVCC a pplication .
  10347         --======== ========== ========== ========== ========== ========== ========== ========== ===
  10348         BEGIN
  10349            -- SET  NOCOUNT ON  added to  prevent ex tra result  sets from
  10350            -- inte rfering wi th SELECT  statements .
  10351            SET NOC OUNT ON;
  10352        
  10353            WITH La bsLast15Mo nths AS
  10354            (
  10355            SELECT  lab.Sta3n
  10356                  , lab.LabChe mSID
  10357                  , tst.LabChe mTestName
  10358                  , tst.LabChe mPrintTest Name
  10359                  , lab.LabChe mSpecimenD ateTime
  10360                  , lab.LabChe mResultVal ue
  10361                  , ISNULL(lab .Units, '  ') as unit s
  10362                  , ISNULL(lab .Abnormal,  ' ') as a bnormal
  10363                  , ISNULL(lab .RefHigh,  ' ') as Re fHigh
  10364                  , ISNULL(lab .RefLow, '  ') as Ref Low
  10365                  , lab.LabChe mResultNum ericValue
  10366                  , lab.LabChe mTestSID
  10367                  , lab.Patien tSID
  10368                  , ROW_NUMBER () over (p artition b y tst.LabC hemTestNam e order by  lab.LabCh emSpecimen DateTime D ESC) AS Ro wNum
  10369            FROM  C DWWork.Che m.LabChem  AS lab
  10370            INNER J OIN CDWWor k.Dim.LabC hemTest AS  tst ON la b.LabChemT estSID = t st.LabChem TestSID
  10371            --INNER  JOIN CDWW ork.SPatie nt.SPatien t s on s.P atientSID= lab.Patien tSID
  10372            WHERE l ab.Patient SID IN (Se lect PtSID  from App. udf_AllPat ientsSIDs( @pid)) AND
  10373               lab. LabChemTes tSID IN (S elect r.La bChemTestS ID
  10374                                              From [ PanelMgmt] .[PMMaster LabIndex]  r
  10375                                             Where r .TestGroup  IN (Selec t Distinct  s.TestGro up
  10376                                                                       Fro m [PanelMg mt].[PMMas terCohortL abTestGrou ps] s
  10377                                                                       Joi n [PanelMg mt].[PMMas terLabTest GroupsCoho rt] t
  10378                                                                         O n t.TestGr oup = s.Te stGroup
  10379                                                                      Wher e t.Cohort  = 'NVCC')
  10380                                           ) --Patie nt SID 244 0025 is a  good test  case
  10381              AND l ab.LabChem CompleteDa teTime >=  DATEADD(mo nth, -15,  GETDATE())
  10382                  - -AND s.Dat eOfDeath i s NULL
  10383            )
  10384        
  10385            SELECT  Sta3n
  10386                  , App.udf_St ationName  (Sta3n) AS  StationNa me
  10387                  , LabChemSID
  10388                  , LabChemTes tName
  10389                  , LabChemPri ntTestName
  10390                  , LabChemSpe cimenDateT ime
  10391                  , LabChemRes ultValue
  10392                  , units
  10393                  , abnormal
  10394                  , RefHigh
  10395                  , RefLow
  10396                  , LabChemRes ultNumeric Value
  10397                  , LabChemTes tSID
  10398                  , PatientSID
  10399                          -- i nto App.La bsLast15Mo nths
  10400            FROM  L absLast15M onths
  10401            WHERE R owNum = 1
  10402        
  10403         END]]>
  10404        </Value>
  10405                                  
  10406       </Property >
  10407                                 
  10408       <Property 
  10409        Name="IsAn siNullsOn"  
  10410        Value="Tru e" 
  10411       />
  10412                                 
  10413       <Relations hip 
  10414        Name="Body Dependenci es"
  10415       >
  10416                                           
  10417        <Entry>
  10418                                                    
  10419         <Reference
  10420          ExternalSo urce="CDWW ork.dacpac
  10421          Name="[CDW Work]|[Che m].[LabChe m]" 
  10422         />
  10423                                            
  10424        </Entry>
  10425                                           
  10426        <Entry>
  10427                                                    
  10428         <Reference
  10429          ExternalSo urce="CDWW ork.dacpac
  10430          Name="[CDW Work]|[Dim ].[LabChem Test]" 
  10431         />
  10432                                            
  10433        </Entry>
  10434                                           
  10435        <Entry>
  10436                                                    
  10437         <Reference
  10438          ExternalSo urce="CDWW ork.dacpac
  10439          Name="[CDW Work]|[Che m].[LabChe m].[LabChe mTestSID]"  
  10440         />
  10441                                            
  10442        </Entry>
  10443                                           
  10444        <Entry>
  10445                                                    
  10446         <Reference
  10447          ExternalSo urce="CDWW ork.dacpac
  10448          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestSI D]" 
  10449         />
  10450                                            
  10451        </Entry>
  10452                                           
  10453        <Entry>
  10454                                                    
  10455         <Reference
  10456          ExternalSo urce="CDWW ork.dacpac
  10457          Name="[CDW Work]|[Che m].[LabChe m].[Sta3n]
  10458         />
  10459                                            
  10460        </Entry>
  10461                                           
  10462        <Entry>
  10463                                                    
  10464         <Reference
  10465          ExternalSo urce="CDWW ork.dacpac
  10466          Name="[CDW Work]|[Che m].[LabChe m].[LabChe mSID]" 
  10467         />
  10468                                            
  10469        </Entry>
  10470                                           
  10471        <Entry>
  10472                                                    
  10473         <Reference
  10474          ExternalSo urce="CDWW ork.dacpac
  10475          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestNa me]" 
  10476         />
  10477                                            
  10478        </Entry>
  10479                                           
  10480        <Entry>
  10481                                                    
  10482         <Reference
  10483          ExternalSo urce="CDWW ork.dacpac
  10484          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemPrintT estName]" 
  10485         />
  10486                                            
  10487        </Entry>
  10488                                           
  10489        <Entry>
  10490                                                    
  10491         <Reference
  10492          ExternalSo urce="CDWW ork.dacpac
  10493          Name="[CDW Work]|[Che m].[LabChe m].[LabChe mSpecimenD ateTime]" 
  10494         />
  10495                                            
  10496        </Entry>
  10497                                           
  10498        <Entry>
  10499                                                    
  10500         <Reference
  10501          ExternalSo urce="CDWW ork.dacpac
  10502          Name="[CDW Work]|[Che m].[LabChe m].[LabChe mResultVal ue]" 
  10503         />
  10504                                            
  10505        </Entry>
  10506                                           
  10507        <Entry>
  10508                                                    
  10509         <Reference
  10510          ExternalSo urce="CDWW ork.dacpac
  10511          Name="[CDW Work]|[Che m].[LabChe m].[Units]
  10512         />
  10513                                            
  10514        </Entry>
  10515                                           
  10516        <Entry>
  10517                                                    
  10518         <Reference
  10519          ExternalSo urce="CDWW ork.dacpac
  10520          Name="[CDW Work]|[Che m].[LabChe m].[Abnorm al]" 
  10521         />
  10522                                            
  10523        </Entry>
  10524                                           
  10525        <Entry>
  10526                                                    
  10527         <Reference
  10528          ExternalSo urce="CDWW ork.dacpac
  10529          Name="[CDW Work]|[Che m].[LabChe m].[RefHig h]" 
  10530         />
  10531                                            
  10532        </Entry>
  10533                                           
  10534        <Entry>
  10535                                                    
  10536         <Reference
  10537          ExternalSo urce="CDWW ork.dacpac
  10538          Name="[CDW Work]|[Che m].[LabChe m].[RefLow ]" 
  10539         />
  10540                                            
  10541        </Entry>
  10542                                           
  10543        <Entry>
  10544                                                    
  10545         <Reference
  10546          ExternalSo urce="CDWW ork.dacpac
  10547          Name="[CDW Work]|[Che m].[LabChe m].[LabChe mResultNum ericValue]
  10548         />
  10549                                            
  10550        </Entry>
  10551                                           
  10552        <Entry>
  10553                                                    
  10554         <Reference
  10555          ExternalSo urce="CDWW ork.dacpac
  10556          Name="[CDW Work]|[Che m].[LabChe m].[Patien tSID]" 
  10557         />
  10558                                            
  10559        </Entry>
  10560                                           
  10561        <Entry>
  10562                                                    
  10563         <Reference
  10564          Name="[App ].[NVCC_us p_GetLabs] .[@pid]" 
  10565         />
  10566                                            
  10567        </Entry>
  10568                                           
  10569        <Entry>
  10570                                                    
  10571         <Reference
  10572          Name="[App ].[udf_All PatientsSI Ds]" 
  10573         />
  10574                                            
  10575        </Entry>
  10576                                           
  10577        <Entry>
  10578                                                    
  10579         <Reference
  10580          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  10581         />
  10582                                            
  10583        </Entry>
  10584                                           
  10585        <Entry>
  10586                                                    
  10587         <Reference
  10588          Name="[Pan elMgmt].[P MMasterLab Index]" 
  10589         />
  10590                                            
  10591        </Entry>
  10592                                           
  10593        <Entry>
  10594                                                    
  10595         <Reference
  10596          Name="[Pan elMgmt].[P MMasterLab Index].[La bChemTestS ID]" 
  10597         />
  10598                                            
  10599        </Entry>
  10600                                           
  10601        <Entry>
  10602                                                    
  10603         <Reference
  10604          Name="[Pan elMgmt].[P MMasterLab Index].[Te stGroup]" 
  10605         />
  10606                                            
  10607        </Entry>
  10608                                           
  10609        <Entry>
  10610                                                    
  10611         <Reference
  10612          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups]" 
  10613         />
  10614                                            
  10615        </Entry>
  10616                                           
  10617        <Entry>
  10618                                                    
  10619         <Reference
  10620          Name="[Pan elMgmt].[P MMasterLab TestGroups Cohort]" 
  10621         />
  10622                                            
  10623        </Entry>
  10624                                           
  10625        <Entry>
  10626                                                    
  10627         <Reference
  10628          Name="[Pan elMgmt].[P MMasterLab TestGroups Cohort].[T estGroup]"  
  10629         />
  10630                                            
  10631        </Entry>
  10632                                           
  10633        <Entry>
  10634                                                    
  10635         <Reference
  10636          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[T estGroup]"  
  10637         />
  10638                                            
  10639        </Entry>
  10640                                           
  10641        <Entry>
  10642                                                    
  10643         <Reference
  10644          Name="[Pan elMgmt].[P MMasterLab TestGroups Cohort].[C ohort]" 
  10645         />
  10646                                            
  10647        </Entry>
  10648                                           
  10649        <Entry>
  10650                                                    
  10651         <Reference
  10652          ExternalSo urce="CDWW ork.dacpac
  10653          Name="[CDW Work]|[Che m].[LabChe m].[LabChe mCompleteD ateTime]" 
  10654         />
  10655                                            
  10656        </Entry>
  10657                                           
  10658        <Entry>
  10659                                                    
  10660         <Reference
  10661          ExternalSo urce="CDWW ork.dacpac
  10662          Name="[CDW Work]|[Che m].[LabChe m].[Sta3n]
  10663         />
  10664                                            
  10665        </Entry>
  10666                                           
  10667        <Entry>
  10668                                                    
  10669         <Reference
  10670          Name="[App ].[udf_Sta tionName]"  
  10671         />
  10672                                            
  10673        </Entry>
  10674                                           
  10675        <Entry>
  10676                                                    
  10677         <Reference
  10678          ExternalSo urce="CDWW ork.dacpac
  10679          Name="[CDW Work]|[Che m].[LabChe m].[LabChe mSID]" 
  10680         />
  10681                                            
  10682        </Entry>
  10683                                           
  10684        <Entry>
  10685                                                    
  10686         <Reference
  10687          ExternalSo urce="CDWW ork.dacpac
  10688          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestNa me]" 
  10689         />
  10690                                            
  10691        </Entry>
  10692                                           
  10693        <Entry>
  10694                                                    
  10695         <Reference
  10696          ExternalSo urce="CDWW ork.dacpac
  10697          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemPrintT estName]" 
  10698         />
  10699                                            
  10700        </Entry>
  10701                                           
  10702        <Entry>
  10703                                                    
  10704         <Reference
  10705          ExternalSo urce="CDWW ork.dacpac
  10706          Name="[CDW Work]|[Che m].[LabChe m].[LabChe mSpecimenD ateTime]" 
  10707         />
  10708                                            
  10709        </Entry>
  10710                                           
  10711        <Entry>
  10712                                                    
  10713         <Reference
  10714          ExternalSo urce="CDWW ork.dacpac
  10715          Name="[CDW Work]|[Che m].[LabChe m].[LabChe mResultVal ue]" 
  10716         />
  10717                                            
  10718        </Entry>
  10719                                           
  10720        <Entry>
  10721                                                    
  10722         <Reference
  10723          ExternalSo urce="CDWW ork.dacpac
  10724          Name="[CDW Work]|[Che m].[LabChe m].[LabChe mResultNum ericValue]
  10725         />
  10726                                            
  10727        </Entry>
  10728                                           
  10729        <Entry>
  10730                                                    
  10731         <Reference
  10732          ExternalSo urce="CDWW ork.dacpac
  10733          Name="[CDW Work]|[Che m].[LabChe m].[LabChe mTestSID]"  
  10734         />
  10735                                            
  10736        </Entry>
  10737                                           
  10738        <Entry>
  10739                                                    
  10740         <Reference
  10741          ExternalSo urce="CDWW ork.dacpac
  10742          Name="[CDW Work]|[Che m].[LabChe m].[Patien tSID]" 
  10743         />
  10744                                            
  10745        </Entry>
  10746                                  
  10747       </Relation ship>
  10748                                 
  10749       <Relations hip 
  10750        Name="Dyna micObjects "
  10751       >
  10752                                           
  10753        <Entry>
  10754                                                    
  10755         <Element 
  10756          Type="SqlD ynamicColu mnSource" 
  10757          Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths]"
  10758         >
  10759                                                              
  10760          <Relations hip 
  10761           Name="Colu mns"
  10762          >
  10763                                                                        
  10764           <Entry>
  10765                                                                                  
  10766            <Element 
  10767             Type="SqlC omputedCol umn" 
  10768             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[St a3n]"
  10769            >
  10770                                                                                            
  10771             <Relations hip 
  10772              Name="Expr essionDepe ndencies"
  10773             >
  10774                                                                                                     
  10775              <Entry>
  10776                                                                                                               
  10777               <Reference
  10778                ExternalSo urce="CDWW ork.dacpac
  10779                Name="[CDW Work]|[Che m].[LabChe m].[Sta3n]
  10780               />
  10781                                                                                                      
  10782              </Entry>
  10783                                                                                             
  10784             </Relation ship>
  10785                                                                                   
  10786            </Element>
  10787                                                                         
  10788           </Entry>
  10789                                                                        
  10790           <Entry>
  10791                                                                                  
  10792            <Element 
  10793             Type="SqlC omputedCol umn" 
  10794             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[La bChemSID]"
  10795            >
  10796                                                                                            
  10797             <Relations hip 
  10798              Name="Expr essionDepe ndencies"
  10799             >
  10800                                                                                                     
  10801              <Entry>
  10802                                                                                                               
  10803               <Reference
  10804                ExternalSo urce="CDWW ork.dacpac
  10805                Name="[CDW Work]|[Che m].[LabChe m].[LabChe mSID]" 
  10806               />
  10807                                                                                                      
  10808              </Entry>
  10809                                                                                             
  10810             </Relation ship>
  10811                                                                                   
  10812            </Element>
  10813                                                                         
  10814           </Entry>
  10815                                                                        
  10816           <Entry>
  10817                                                                                  
  10818            <Element 
  10819             Type="SqlC omputedCol umn" 
  10820             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[La bChemTestN ame]"
  10821            >
  10822                                                                                            
  10823             <Relations hip 
  10824              Name="Expr essionDepe ndencies"
  10825             >
  10826                                                                                                     
  10827              <Entry>
  10828                                                                                                               
  10829               <Reference
  10830                ExternalSo urce="CDWW ork.dacpac
  10831                Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestNa me]" 
  10832               />
  10833                                                                                                      
  10834              </Entry>
  10835                                                                                             
  10836             </Relation ship>
  10837                                                                                   
  10838            </Element>
  10839                                                                         
  10840           </Entry>
  10841                                                                        
  10842           <Entry>
  10843                                                                                  
  10844            <Element 
  10845             Type="SqlC omputedCol umn" 
  10846             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[La bChemPrint TestName]"
  10847            >
  10848                                                                                            
  10849             <Relations hip 
  10850              Name="Expr essionDepe ndencies"
  10851             >
  10852                                                                                                     
  10853              <Entry>
  10854                                                                                                               
  10855               <Reference
  10856                ExternalSo urce="CDWW ork.dacpac
  10857                Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemPrintT estName]" 
  10858               />
  10859                                                                                                      
  10860              </Entry>
  10861                                                                                             
  10862             </Relation ship>
  10863                                                                                   
  10864            </Element>
  10865                                                                         
  10866           </Entry>
  10867                                                                        
  10868           <Entry>
  10869                                                                                  
  10870            <Element 
  10871             Type="SqlC omputedCol umn" 
  10872             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[La bChemSpeci menDateTim e]"
  10873            >
  10874                                                                                            
  10875             <Relations hip 
  10876              Name="Expr essionDepe ndencies"
  10877             >
  10878                                                                                                     
  10879              <Entry>
  10880                                                                                                               
  10881               <Reference
  10882                ExternalSo urce="CDWW ork.dacpac
  10883                Name="[CDW Work]|[Che m].[LabChe m].[LabChe mSpecimenD ateTime]" 
  10884               />
  10885                                                                                                      
  10886              </Entry>
  10887                                                                                             
  10888             </Relation ship>
  10889                                                                                   
  10890            </Element>
  10891                                                                         
  10892           </Entry>
  10893                                                                        
  10894           <Entry>
  10895                                                                                  
  10896            <Element 
  10897             Type="SqlC omputedCol umn" 
  10898             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[La bChemResul tValue]"
  10899            >
  10900                                                                                            
  10901             <Relations hip 
  10902              Name="Expr essionDepe ndencies"
  10903             >
  10904                                                                                                     
  10905              <Entry>
  10906                                                                                                               
  10907               <Reference
  10908                ExternalSo urce="CDWW ork.dacpac
  10909                Name="[CDW Work]|[Che m].[LabChe m].[LabChe mResultVal ue]" 
  10910               />
  10911                                                                                                      
  10912              </Entry>
  10913                                                                                             
  10914             </Relation ship>
  10915                                                                                   
  10916            </Element>
  10917                                                                         
  10918           </Entry>
  10919                                                                        
  10920           <Entry>
  10921                                                                                  
  10922            <Element 
  10923             Type="SqlC omputedCol umn" 
  10924             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[un its]" 
  10925            />
  10926                                                                         
  10927           </Entry>
  10928                                                                        
  10929           <Entry>
  10930                                                                                  
  10931            <Element 
  10932             Type="SqlC omputedCol umn" 
  10933             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[ab normal]" 
  10934            />
  10935                                                                         
  10936           </Entry>
  10937                                                                        
  10938           <Entry>
  10939                                                                                  
  10940            <Element 
  10941             Type="SqlC omputedCol umn" 
  10942             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[Re fHigh]" 
  10943            />
  10944                                                                         
  10945           </Entry>
  10946                                                                        
  10947           <Entry>
  10948                                                                                  
  10949            <Element 
  10950             Type="SqlC omputedCol umn" 
  10951             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[Re fLow]" 
  10952            />
  10953                                                                         
  10954           </Entry>
  10955                                                                        
  10956           <Entry>
  10957                                                                                  
  10958            <Element 
  10959             Type="SqlC omputedCol umn" 
  10960             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[La bChemResul tNumericVa lue]"
  10961            >
  10962                                                                                            
  10963             <Relations hip 
  10964              Name="Expr essionDepe ndencies"
  10965             >
  10966                                                                                                     
  10967              <Entry>
  10968                                                                                                               
  10969               <Reference
  10970                ExternalSo urce="CDWW ork.dacpac
  10971                Name="[CDW Work]|[Che m].[LabChe m].[LabChe mResultNum ericValue]
  10972               />
  10973                                                                                                      
  10974              </Entry>
  10975                                                                                             
  10976             </Relation ship>
  10977                                                                                   
  10978            </Element>
  10979                                                                         
  10980           </Entry>
  10981                                                                        
  10982           <Entry>
  10983                                                                                  
  10984            <Element 
  10985             Type="SqlC omputedCol umn" 
  10986             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[La bChemTestS ID]"
  10987            >
  10988                                                                                            
  10989             <Relations hip 
  10990              Name="Expr essionDepe ndencies"
  10991             >
  10992                                                                                                     
  10993              <Entry>
  10994                                                                                                               
  10995               <Reference
  10996                ExternalSo urce="CDWW ork.dacpac
  10997                Name="[CDW Work]|[Che m].[LabChe m].[LabChe mTestSID]"  
  10998               />
  10999                                                                                                      
  11000              </Entry>
  11001                                                                                             
  11002             </Relation ship>
  11003                                                                                   
  11004            </Element>
  11005                                                                         
  11006           </Entry>
  11007                                                                        
  11008           <Entry>
  11009                                                                                  
  11010            <Element 
  11011             Type="SqlC omputedCol umn" 
  11012             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[Pa tientSID]"
  11013            >
  11014                                                                                            
  11015             <Relations hip 
  11016              Name="Expr essionDepe ndencies"
  11017             >
  11018                                                                                                     
  11019              <Entry>
  11020                                                                                                               
  11021               <Reference
  11022                ExternalSo urce="CDWW ork.dacpac
  11023                Name="[CDW Work]|[Che m].[LabChe m].[Patien tSID]" 
  11024               />
  11025                                                                                                      
  11026              </Entry>
  11027                                                                                             
  11028             </Relation ship>
  11029                                                                                   
  11030            </Element>
  11031                                                                         
  11032           </Entry>
  11033                                                                        
  11034           <Entry>
  11035                                                                                  
  11036            <Element 
  11037             Type="SqlC omputedCol umn" 
  11038             Name="[App ].[NVCC_us p_GetLabs] .[CTE1].[L absLast15M onths].[Ro wNum]" 
  11039            />
  11040                                                                         
  11041           </Entry>
  11042                                                               
  11043          </Relation ship>
  11044                                                     
  11045         </Element>
  11046                                            
  11047        </Entry>
  11048                                  
  11049       </Relation ship>
  11050                                 
  11051       <Relations hip 
  11052        Name="Para meters"
  11053       >
  11054                                           
  11055        <Entry>
  11056                                                    
  11057         <Element 
  11058          Type="SqlS ubroutineP arameter" 
  11059          Name="[App ].[NVCC_us p_GetLabs] .[@pid]"
  11060         >
  11061                                                              
  11062          <Relations hip 
  11063           Name="Type "
  11064          >
  11065                                                                        
  11066           <Entry>
  11067                                                                                  
  11068            <Element 
  11069             Type="SqlT ypeSpecifi er"
  11070            >
  11071                                                                                            
  11072             <Relations hip 
  11073              Name="Type "
  11074             >
  11075                                                                                                     
  11076              <Entry>
  11077                                                                                                               
  11078               <Reference
  11079                ExternalSo urce="Buil tIns" 
  11080                Name="[big int]" 
  11081               />
  11082                                                                                                      
  11083              </Entry>
  11084                                                                                             
  11085             </Relation ship>
  11086                                                                                   
  11087            </Element>
  11088                                                                         
  11089           </Entry>
  11090                                                               
  11091          </Relation ship>
  11092                                                     
  11093         </Element>
  11094                                            
  11095        </Entry>
  11096                                  
  11097       </Relation ship>
  11098                                 
  11099       <Relations hip 
  11100        Name="Sche ma"
  11101       >
  11102                                           
  11103        <Entry>
  11104                                                    
  11105         <Reference
  11106          Name="[App ]" 
  11107         />
  11108                                            
  11109        </Entry>
  11110                                  
  11111       </Relation ship>
  11112                                 
  11113       <Annotatio
  11114        Type="SysC ommentsObj ectAnnotat ion"
  11115       >
  11116                                           
  11117        <Property 
  11118         Name="Crea teOffset" 
  11119         Value="6" 
  11120        />
  11121                                           
  11122        <Property 
  11123         Name="Leng th" 
  11124         Value="445 9" 
  11125        />
  11126                                           
  11127        <Property 
  11128         Name="Star tLine" 
  11129         Value="1" 
  11130        />
  11131                                           
  11132        <Property 
  11133         Name="Star tColumn" 
  11134         Value="1" 
  11135        />
  11136                                           
  11137        <Property 
  11138         Name="Head erContents
  11139         Value="&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetLabs]&# xD;&#xA;&# x9;-- Add  the parame ters for t he stored  procedure  here&#xD;& #xA;&#x9;@ pid bigint    --this  is the pat ientSID&#x D;&#xA;AS"  
  11140        />
  11141                                  
  11142       </Annotati on>
  11143                        
  11144      </Element>
  11145                       
  11146      <Element 
  11147       Type="SqlP rocedure" 
  11148       Name="[App ].[NVCC_us p_GetNextO fKin]"
  11149      >
  11150                                 
  11151       <Property 
  11152        Name="Body Script"
  11153       >
  11154                                           
  11155        <Value>
  11156         <![CDATA[
  11157         --======== ========== ========== ========== ========== ========== ========== ========== ====
  11158         --Requesto r              : Non  Va Coordin ated Care  Project
  11159         --Author                  : Jon  Duckart
  11160         --Object/S P Name         : [NVC C_usp_GetN extOfKin]
  11161         --Server                  : 
  11162         --Data Bas e              : CC_R EFDOC
  11163         --Schema                  : app
  11164         --Report                  : N/A
  11165         --Folder                  : N/A
  11166         --Report L oc             : N/A
  11167         --Job                     : None
  11168         --Job Loc                 : None
  11169         --Note                    : 
  11170         --Date Cre ated           : 06-0 7-2016
  11171         --
  11172         --Purpose                 : To r etrieve a  single pat ient NOK r ecord for  the NVCC a pp by SID.
  11173         --======== ========== ========== ========== ========== ========== ========== ========== ====
  11174         BEGIN
  11175                 --  SET NOCOU NT ON adde d to preve nt extra r esult sets  from
  11176                 --  interferi ng with SE LECT state ments.
  11177            SET NOC OUNT ON;
  11178        
  11179            /*
  11180            SELECT   SPatientA ddressSID  as NextOfK indId
  11181            , Patie ntSID
  11182            , Sta3n  as Statio n
  11183            , Addre ssType
  11184            , NameO fContact
  11185            , Stree tAddress1
  11186            , Stree tAddress2
  11187            , City
  11188            , State
  11189            , Zip
  11190            , Phone
  11191            , Phone Work
  11192            FROM  C DWWork.SPa tient.SPat ientAddres s
  11193            WHERE P atientSID=  @sid and  OrdinalNum ber=2;  -- OrdinalNum ber=2, Nex t Of Kin
  11194            */
  11195        
  11196         /* Revised  on 10/26/ 2017 by Tr inity Hall  CDW Archi tect */
  11197        
  11198         SELECT  SP atientAddr essSID as  NextOfKind Id
  11199            , a.Pat ientSID
  11200            , a.Sta 3n as Stat ion
  11201            , a.Add ressType
  11202            , a.Nam eOfContact
  11203            , a.Str eetAddress 1
  11204            , a.Str eetAddress 2
  11205            , a.Cit y
  11206            , a.Sta te
  11207            , a.Zip
  11208            , b.Pho neNumber a s Phone
  11209            , b.[Wo rkPhoneNum ber] as  P honeWork
  11210            FROM  C DWWork.SPa tient.SPat ientAddres s a 
  11211            Left Jo in CDWWork .SPatient. SPatientPh one b on a .PatientSI D = b.Pati entSID and  b.Ordinal Number = 2
  11212            WHERE a .PatientSI D= @sid an d a.Ordina lNumber=2;   --Ordina lNumber=2,  Next Of K in
  11213         END]]>
  11214        </Value>
  11215                                  
  11216       </Property >
  11217                                 
  11218       <Property 
  11219        Name="IsAn siNullsOn"  
  11220        Value="Tru e" 
  11221       />
  11222                                 
  11223       <Relations hip 
  11224        Name="Body Dependenci es"
  11225       >
  11226                                           
  11227        <Entry>
  11228                                                    
  11229         <Reference
  11230          ExternalSo urce="CDWW ork.dacpac
  11231          Name="[CDW Work]|[SPa tient].[SP atientAddr ess]" 
  11232         />
  11233                                            
  11234        </Entry>
  11235                                           
  11236        <Entry>
  11237                                                    
  11238         <Reference
  11239          ExternalSo urce="CDWW ork.dacpac
  11240          Name="[CDW Work]|[SPa tient].[SP atientPhon e]" 
  11241         />
  11242                                            
  11243        </Entry>
  11244                                           
  11245        <Entry>
  11246                                                    
  11247         <Reference
  11248          ExternalSo urce="CDWW ork.dacpac
  11249          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Pati entSID]" 
  11250         />
  11251                                            
  11252        </Entry>
  11253                                           
  11254        <Entry>
  11255                                                    
  11256         <Reference
  11257          ExternalSo urce="CDWW ork.dacpac
  11258          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Patien tSID]" 
  11259         />
  11260                                            
  11261        </Entry>
  11262                                           
  11263        <Entry>
  11264                                                    
  11265         <Reference
  11266          ExternalSo urce="CDWW ork.dacpac
  11267          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Ordina lNumber]" 
  11268         />
  11269                                            
  11270        </Entry>
  11271                                           
  11272        <Entry>
  11273                                                    
  11274         <Reference
  11275          ExternalSo urce="CDWW ork.dacpac
  11276          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[SPat ientAddres sSID]" 
  11277         />
  11278                                            
  11279        </Entry>
  11280                                           
  11281        <Entry>
  11282                                                    
  11283         <Reference
  11284          ExternalSo urce="CDWW ork.dacpac
  11285          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Sta3 n]" 
  11286         />
  11287                                            
  11288        </Entry>
  11289                                           
  11290        <Entry>
  11291                                                    
  11292         <Reference
  11293          ExternalSo urce="CDWW ork.dacpac
  11294          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essType]" 
  11295         />
  11296                                            
  11297        </Entry>
  11298                                           
  11299        <Entry>
  11300                                                    
  11301         <Reference
  11302          ExternalSo urce="CDWW ork.dacpac
  11303          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Name OfContact]
  11304         />
  11305                                            
  11306        </Entry>
  11307                                           
  11308        <Entry>
  11309                                                    
  11310         <Reference
  11311          ExternalSo urce="CDWW ork.dacpac
  11312          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stre etAddress1 ]" 
  11313         />
  11314                                            
  11315        </Entry>
  11316                                           
  11317        <Entry>
  11318                                                    
  11319         <Reference
  11320          ExternalSo urce="CDWW ork.dacpac
  11321          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stre etAddress2 ]" 
  11322         />
  11323                                            
  11324        </Entry>
  11325                                           
  11326        <Entry>
  11327                                                    
  11328         <Reference
  11329          ExternalSo urce="CDWW ork.dacpac
  11330          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[City ]" 
  11331         />
  11332                                            
  11333        </Entry>
  11334                                           
  11335        <Entry>
  11336                                                    
  11337         <Reference
  11338          ExternalSo urce="CDWW ork.dacpac
  11339          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stat e]" 
  11340         />
  11341                                            
  11342        </Entry>
  11343                                           
  11344        <Entry>
  11345                                                    
  11346         <Reference
  11347          ExternalSo urce="CDWW ork.dacpac
  11348          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Zip]
  11349         />
  11350                                            
  11351        </Entry>
  11352                                           
  11353        <Entry>
  11354                                                    
  11355         <Reference
  11356          ExternalSo urce="CDWW ork.dacpac
  11357          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[PhoneN umber]" 
  11358         />
  11359                                            
  11360        </Entry>
  11361                                           
  11362        <Entry>
  11363                                                    
  11364         <Reference
  11365          ExternalSo urce="CDWW ork.dacpac
  11366          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[WorkPh oneNumber]
  11367         />
  11368                                            
  11369        </Entry>
  11370                                           
  11371        <Entry>
  11372                                                    
  11373         <Reference
  11374          Name="[App ].[NVCC_us p_GetNextO fKin].[@si d]" 
  11375         />
  11376                                            
  11377        </Entry>
  11378                                           
  11379        <Entry>
  11380                                                    
  11381         <Reference
  11382          ExternalSo urce="CDWW ork.dacpac
  11383          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Ordi nalNumber]
  11384         />
  11385                                            
  11386        </Entry>
  11387                                  
  11388       </Relation ship>
  11389                                 
  11390       <Relations hip 
  11391        Name="Para meters"
  11392       >
  11393                                           
  11394        <Entry>
  11395                                                    
  11396         <Element 
  11397          Type="SqlS ubroutineP arameter" 
  11398          Name="[App ].[NVCC_us p_GetNextO fKin].[@si d]"
  11399         >
  11400                                                              
  11401          <Relations hip 
  11402           Name="Type "
  11403          >
  11404                                                                        
  11405           <Entry>
  11406                                                                                  
  11407            <Element 
  11408             Type="SqlT ypeSpecifi er"
  11409            >
  11410                                                                                            
  11411             <Relations hip 
  11412              Name="Type "
  11413             >
  11414                                                                                                     
  11415              <Entry>
  11416                                                                                                               
  11417               <Reference
  11418                ExternalSo urce="Buil tIns" 
  11419                Name="[int ]" 
  11420               />
  11421                                                                                                      
  11422              </Entry>
  11423                                                                                             
  11424             </Relation ship>
  11425                                                                                   
  11426            </Element>
  11427                                                                         
  11428           </Entry>
  11429                                                               
  11430          </Relation ship>
  11431                                                     
  11432         </Element>
  11433                                            
  11434        </Entry>
  11435                                  
  11436       </Relation ship>
  11437                                 
  11438       <Relations hip 
  11439        Name="Sche ma"
  11440       >
  11441                                           
  11442        <Entry>
  11443                                                    
  11444         <Reference
  11445          Name="[App ]" 
  11446         />
  11447                                            
  11448        </Entry>
  11449                                  
  11450       </Relation ship>
  11451                                 
  11452       <Annotatio
  11453        Type="SysC ommentsObj ectAnnotat ion"
  11454       >
  11455                                           
  11456        <Property 
  11457         Name="Crea teOffset" 
  11458         Value="2" 
  11459        />
  11460                                           
  11461        <Property 
  11462         Name="Leng th" 
  11463         Value="212 1" 
  11464        />
  11465                                           
  11466        <Property 
  11467         Name="Star tLine" 
  11468         Value="1" 
  11469        />
  11470                                           
  11471        <Property 
  11472         Name="Star tColumn" 
  11473         Value="1" 
  11474        />
  11475                                           
  11476        <Property 
  11477         Name="Head erContents
  11478         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetNextOfK in]&#xD;&# xA;&#x9;@s id int   - -PatientSi d&#xD;&#xA ;&#xD;&#xA ;-- NOTICE :&#xD;&#xA ;-- Do not  edit the  stored pro cedure liv e on the s erver. Cod e to gener ate&#xD;&# xA;-- the  procedures  is stored  in the pr oject repo sitory. An y changes  made&#xD;& #xA;-- tha t are not  recorded i n the repo sitory wil l be overw ritten.&#x D;&#xA;&#x D;&#xA;AS"  
  11479        />
  11480                                  
  11481       </Annotati on>
  11482                        
  11483      </Element>
  11484                       
  11485      <Element 
  11486       Type="SqlP rocedure" 
  11487       Name="[App ].[NVCC_us p_GetNVAMe ds]"
  11488      >
  11489                                 
  11490       <Property 
  11491        Name="Body Script"
  11492       >
  11493                                           
  11494        <Value>
  11495         <![CDATA[
  11496         --======== ========== ========== ========== ========== ========== ========== ========== ===
  11497         --Requesto r                                : Non Va C oordinated  Care Proj ect
  11498         --Author                  : Jerr y Kohler ( Original s cript by D r. Charles  Demosthen es)
  11499         --Object/S P Name                  : NVCC_u sp_GetNVAM eds
  11500         --SERVER                                   
  11501         --Data Bas e                                : CC_REFDO C
  11502         --Schema                                    : App
  11503         --Report                                    : N/A
  11504         --Folder                                    : N/A
  11505         --Report L oc             : N/A
  11506         --Job                     : None
  11507         --Job Loc                 : None
  11508         --Note                    : 
  11509         --Date Cre ated           : 02-0 5-2016
  11510         --
  11511         --Changed                 : 03-0 3-2016  
  11512         --Changed  By                 :  Jerry Kohl er - North west Innov ation Cent er (NWIC)
  11513         --Reason F or Change               : Added  NonVAMedCo mments per  TFS NVCC  project ta sk 1329.
  11514         --                          Also  added Non VAMedDiscl amer, and  a conditio n that
  11515         --                          the  Discontinu edDateTime  is NULL.
  11516         --
  11517         --Changed                 : 02-0 5-2016  
  11518         --Changed  By             : Jerr y Kohler -  Northwest  Innovatio n Center ( NWIC)
  11519         --Reason F or Change               : Remove d station  parameter  in order t o expand t he search
  11520         --                          for  a patient' s VA meds  from a sin gle statio n to any
  11521         --                          stat ion a pati ent is ass ociated wi th.
  11522         --
  11523         --Purpose                 : Retr ieve a pat ient's med ications n ot issued  by VA for
  11524         --                          incl usion into  NVCC docu mentation
  11525         --======== ========== ========== ========== ========== ========== ========== ========== ===
  11526         BEGIN
  11527        
  11528                 --  SET NOCOU NT ON adde d to preve nt extra r esult sets  from
  11529                 --  interferi ng with SE LECT state ments.
  11530                 SE T NOCOUNT  ON;
  11531        
  11532                 SE LECT DISTI NCT n.Sta3 n
  11533                    ,App.udf_S tationName  (n.Sta3n)  AS Statio nName
  11534                    ,n.NonVAMe dSID
  11535                            ,d .LocalDrug NameWithDo se
  11536                    ,n.Dosage
  11537                    ,n.Medicat ionRoute
  11538                        ,n.Sch edule
  11539                    ,n.NonVAMe dComments
  11540                    ,n.NonVAMe dDisclaime r
  11541                 FR OM CDWWork .NonVAMed. NonVAMed n
  11542             INNER  JOIN CDWWo rk.Dim.Loc alDrug d O N n.LocalD rugSID = d .LocalDrug SID
  11543                 WH ERE n.Pati entSID in  (select Pt SID from [ App].[udf_ AllPatient sSIDs](@pi d))
  11544               AND  n.Disconti nuedDateTi me is NULL ;
  11545                 
  11546         END;]]>
  11547        </Value>
  11548                                  
  11549       </Property >
  11550                                 
  11551       <Property 
  11552        Name="IsAn siNullsOn"  
  11553        Value="Tru e" 
  11554       />
  11555                                 
  11556       <Relations hip 
  11557        Name="Body Dependenci es"
  11558       >
  11559                                           
  11560        <Entry>
  11561                                                    
  11562         <Reference
  11563          ExternalSo urce="CDWW ork.dacpac
  11564          Name="[CDW Work]|[Non VAMed].[No nVAMed]" 
  11565         />
  11566                                            
  11567        </Entry>
  11568                                           
  11569        <Entry>
  11570                                                    
  11571         <Reference
  11572          ExternalSo urce="CDWW ork.dacpac
  11573          Name="[CDW Work]|[Dim ].[LocalDr ug]" 
  11574         />
  11575                                            
  11576        </Entry>
  11577                                           
  11578        <Entry>
  11579                                                    
  11580         <Reference
  11581          ExternalSo urce="CDWW ork.dacpac
  11582          Name="[CDW Work]|[Non VAMed].[No nVAMed].[L ocalDrugSI D]" 
  11583         />
  11584                                            
  11585        </Entry>
  11586                                           
  11587        <Entry>
  11588                                                    
  11589         <Reference
  11590          ExternalSo urce="CDWW ork.dacpac
  11591          Name="[CDW Work]|[Dim ].[LocalDr ug].[Local DrugSID]" 
  11592         />
  11593                                            
  11594        </Entry>
  11595                                           
  11596        <Entry>
  11597                                                    
  11598         <Reference
  11599          ExternalSo urce="CDWW ork.dacpac
  11600          Name="[CDW Work]|[Non VAMed].[No nVAMed].[S ta3n]" 
  11601         />
  11602                                            
  11603        </Entry>
  11604                                           
  11605        <Entry>
  11606                                                    
  11607         <Reference
  11608          Name="[App ].[udf_Sta tionName]"  
  11609         />
  11610                                            
  11611        </Entry>
  11612                                           
  11613        <Entry>
  11614                                                    
  11615         <Reference
  11616          ExternalSo urce="CDWW ork.dacpac
  11617          Name="[CDW Work]|[Non VAMed].[No nVAMed].[N onVAMedSID ]" 
  11618         />
  11619                                            
  11620        </Entry>
  11621                                           
  11622        <Entry>
  11623                                                    
  11624         <Reference
  11625          ExternalSo urce="CDWW ork.dacpac
  11626          Name="[CDW Work]|[Dim ].[LocalDr ug].[Local DrugNameWi thDose]" 
  11627         />
  11628                                            
  11629        </Entry>
  11630                                           
  11631        <Entry>
  11632                                                    
  11633         <Reference
  11634          ExternalSo urce="CDWW ork.dacpac
  11635          Name="[CDW Work]|[Non VAMed].[No nVAMed].[D osage]" 
  11636         />
  11637                                            
  11638        </Entry>
  11639                                           
  11640        <Entry>
  11641                                                    
  11642         <Reference
  11643          ExternalSo urce="CDWW ork.dacpac
  11644          Name="[CDW Work]|[Non VAMed].[No nVAMed].[M edicationR oute]" 
  11645         />
  11646                                            
  11647        </Entry>
  11648                                           
  11649        <Entry>
  11650                                                    
  11651         <Reference
  11652          ExternalSo urce="CDWW ork.dacpac
  11653          Name="[CDW Work]|[Non VAMed].[No nVAMed].[S chedule]" 
  11654         />
  11655                                            
  11656        </Entry>
  11657                                           
  11658        <Entry>
  11659                                                    
  11660         <Reference
  11661          ExternalSo urce="CDWW ork.dacpac
  11662          Name="[CDW Work]|[Non VAMed].[No nVAMed].[N onVAMedCom ments]" 
  11663         />
  11664                                            
  11665        </Entry>
  11666                                           
  11667        <Entry>
  11668                                                    
  11669         <Reference
  11670          ExternalSo urce="CDWW ork.dacpac
  11671          Name="[CDW Work]|[Non VAMed].[No nVAMed].[N onVAMedDis claimer]" 
  11672         />
  11673                                            
  11674        </Entry>
  11675                                           
  11676        <Entry>
  11677                                                    
  11678         <Reference
  11679          ExternalSo urce="CDWW ork.dacpac
  11680          Name="[CDW Work]|[Non VAMed].[No nVAMed].[P atientSID]
  11681         />
  11682                                            
  11683        </Entry>
  11684                                           
  11685        <Entry>
  11686                                                    
  11687         <Reference
  11688          Name="[App ].[NVCC_us p_GetNVAMe ds].[@pid]
  11689         />
  11690                                            
  11691        </Entry>
  11692                                           
  11693        <Entry>
  11694                                                    
  11695         <Reference
  11696          Name="[App ].[udf_All PatientsSI Ds]" 
  11697         />
  11698                                            
  11699        </Entry>
  11700                                           
  11701        <Entry>
  11702                                                    
  11703         <Reference
  11704          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  11705         />
  11706                                            
  11707        </Entry>
  11708                                           
  11709        <Entry>
  11710                                                    
  11711         <Reference
  11712          ExternalSo urce="CDWW ork.dacpac
  11713          Name="[CDW Work]|[Non VAMed].[No nVAMed].[D iscontinue dDateTime]
  11714         />
  11715                                            
  11716        </Entry>
  11717                                  
  11718       </Relation ship>
  11719                                 
  11720       <Relations hip 
  11721        Name="Para meters"
  11722       >
  11723                                           
  11724        <Entry>
  11725                                                    
  11726         <Element 
  11727          Type="SqlS ubroutineP arameter" 
  11728          Name="[App ].[NVCC_us p_GetNVAMe ds].[@pid] "
  11729         >
  11730                                                              
  11731          <Relations hip 
  11732           Name="Type "
  11733          >
  11734                                                                        
  11735           <Entry>
  11736                                                                                  
  11737            <Element 
  11738             Type="SqlT ypeSpecifi er"
  11739            >
  11740                                                                                            
  11741             <Relations hip 
  11742              Name="Type "
  11743             >
  11744                                                                                                     
  11745              <Entry>
  11746                                                                                                               
  11747               <Reference
  11748                ExternalSo urce="Buil tIns" 
  11749                Name="[big int]" 
  11750               />
  11751                                                                                                      
  11752              </Entry>
  11753                                                                                             
  11754             </Relation ship>
  11755                                                                                   
  11756            </Element>
  11757                                                                         
  11758           </Entry>
  11759                                                               
  11760          </Relation ship>
  11761                                                     
  11762         </Element>
  11763                                            
  11764        </Entry>
  11765                                  
  11766       </Relation ship>
  11767                                 
  11768       <Relations hip 
  11769        Name="Sche ma"
  11770       >
  11771                                           
  11772        <Entry>
  11773                                                    
  11774         <Reference
  11775          Name="[App ]" 
  11776         />
  11777                                            
  11778        </Entry>
  11779                                  
  11780       </Relation ship>
  11781                                 
  11782       <Annotatio
  11783        Type="SysC ommentsObj ectAnnotat ion"
  11784       >
  11785                                           
  11786        <Property 
  11787         Name="Crea teOffset" 
  11788         Value="4" 
  11789        />
  11790                                           
  11791        <Property 
  11792         Name="Leng th" 
  11793         Value="223 2" 
  11794        />
  11795                                           
  11796        <Property 
  11797         Name="Star tLine" 
  11798         Value="1" 
  11799        />
  11800                                           
  11801        <Property 
  11802         Name="Star tColumn" 
  11803         Value="1" 
  11804        />
  11805                                           
  11806        <Property 
  11807         Name="Head erContents
  11808         Value="&#x D;&#xA;&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetNVAMeds ]&#xD;&#xA ;&#x9;-- A dd the par ameters fo r the stor ed procedu re here&#x D;&#xA;&#x 9;@pid big int -- thi s is the p atientsid& #xD;&#xA;A S" 
  11809        />
  11810                                  
  11811       </Annotati on>
  11812                        
  11813      </Element>
  11814                       
  11815      <Element 
  11816       Type="SqlP rocedure" 
  11817       Name="[App ].[NVCC_us p_GetOrCre ateUser]"
  11818      >
  11819                                 
  11820       <Property 
  11821        Name="Body Script"
  11822       >
  11823                                           
  11824        <Value>
  11825         <![CDATA[
  11826        
  11827         --======== ========== ========== ========== ========== ========== ========== ========== ====
  11828         --Requesto r              : Non  Va Coordin ated Care  Project
  11829         --Author                  : Bria n Diggs
  11830         --Object/S P Name         : NVCC _usp_GetOr CreateUser
  11831         --Server                  : 
  11832         --Data Bas e              : CC_R EFDOC
  11833         --Schema                  : App
  11834         --Report                  : N/A
  11835         --Folder                  : N/A
  11836         --Report L oc             : N/A
  11837         --Job                     : None
  11838         --Job Loc                 : None
  11839         --Note                    : 
  11840         --Date Cre ated           : 06-2 9-2017
  11841         --
  11842         --Last Cha nged           : 
  11843         --Last Cha nged By                 : 
  11844         --Reason F or Change               : 
  11845         --
  11846         --Purpose                 : To r etrieve a  correspond ing record  from App. NVCC_Users V2
  11847         --                          or t o create a nd return  one if non e exists.  For this t o
  11848         --                          work , all colu mns other  that UserN ame must h ave defaul t
  11849         --                          valu es.
  11850         --======== ========== ========== ========== ========== ========== ========== ========== ====
  11851        
  11852         BEGIN
  11853                 --  Derived f rom https: //stackove rflow.com/ a/1488387/ 892313
  11854                 SE T TRANSACT ION ISOLAT ION LEVEL  SERIALIZAB LE
  11855                 BE GIN TRANSA CTION
  11856                          DECL ARE @UserI D int
  11857                          SELE CT @UserID  = UserId  FROM App.N VCC_UsersV 2 WHERE Us erName = @ UserName
  11858                          IF @ UserID IS  NULL
  11859                          BEGI N
  11860                                   INSERT  INTO App. NVCC_Users V2 (UserNa me) VALUES  (@UserNam e)
  11861                                   SELECT  @UserID =  SCOPE_IDE NTITY()
  11862                          END
  11863                          SELE CT * FROM  App.NVCC_U sersV2 WHE RE UserId  = @UserID
  11864                 CO MMIT TRANS ACTION
  11865         END]]>
  11866        </Value>
  11867                                  
  11868       </Property >
  11869                                 
  11870       <Property 
  11871        Name="IsAn siNullsOn"  
  11872        Value="Tru e" 
  11873       />
  11874                                 
  11875       <Relations hip 
  11876        Name="Body Dependenci es"
  11877       >
  11878                                           
  11879        <Entry>
  11880                                                    
  11881         <Reference
  11882          ExternalSo urce="Buil tIns" 
  11883          Name="[int ]" 
  11884         />
  11885                                            
  11886        </Entry>
  11887                                           
  11888        <Entry>
  11889                                                    
  11890         <Reference
  11891          Name="[App ].[NVCC_Us ersV2]" 
  11892         />
  11893                                            
  11894        </Entry>
  11895                                           
  11896        <Entry>
  11897                                                    
  11898         <Reference
  11899          Name="[App ].[NVCC_Us ersV2].[Us erId]" 
  11900         />
  11901                                            
  11902        </Entry>
  11903                                           
  11904        <Entry>
  11905                                                    
  11906         <Reference
  11907          Name="[App ].[NVCC_Us ersV2].[Us erName]" 
  11908         />
  11909                                            
  11910        </Entry>
  11911                                           
  11912        <Entry>
  11913                                                    
  11914         <Reference
  11915          Name="[App ].[NVCC_us p_GetOrCre ateUser].[ @UserName]
  11916         />
  11917                                            
  11918        </Entry>
  11919                                  
  11920       </Relation ship>
  11921                                 
  11922       <Relations hip 
  11923        Name="Para meters"
  11924       >
  11925                                           
  11926        <Entry>
  11927                                                    
  11928         <Element 
  11929          Type="SqlS ubroutineP arameter" 
  11930          Name="[App ].[NVCC_us p_GetOrCre ateUser].[ @UserName] "
  11931         >
  11932                                                              
  11933          <Relations hip 
  11934           Name="Type "
  11935          >
  11936                                                                        
  11937           <Entry>
  11938                                                                                  
  11939            <Element 
  11940             Type="SqlT ypeSpecifi er"
  11941            >
  11942                                                                                            
  11943             <Property 
  11944              Name="Leng th" 
  11945              Value="50"  
  11946             />
  11947                                                                                            
  11948             <Relations hip 
  11949              Name="Type "
  11950             >
  11951                                                                                                     
  11952              <Entry>
  11953                                                                                                               
  11954               <Reference
  11955                ExternalSo urce="Buil tIns" 
  11956                Name="[var char]" 
  11957               />
  11958                                                                                                      
  11959              </Entry>
  11960                                                                                             
  11961             </Relation ship>
  11962                                                                                   
  11963            </Element>
  11964                                                                         
  11965           </Entry>
  11966                                                               
  11967          </Relation ship>
  11968                                                     
  11969         </Element>
  11970                                            
  11971        </Entry>
  11972                                  
  11973       </Relation ship>
  11974                                 
  11975       <Relations hip 
  11976        Name="Sche ma"
  11977       >
  11978                                           
  11979        <Entry>
  11980                                                    
  11981         <Reference
  11982          Name="[App ]" 
  11983         />
  11984                                            
  11985        </Entry>
  11986                                  
  11987       </Relation ship>
  11988                                 
  11989       <Annotatio
  11990        Type="SysC ommentsObj ectAnnotat ion"
  11991       >
  11992                                           
  11993        <Property 
  11994         Name="Leng th" 
  11995         Value="177 1" 
  11996        />
  11997                                           
  11998        <Property 
  11999         Name="Star tLine" 
  12000         Value="1" 
  12001        />
  12002                                           
  12003        <Property 
  12004         Name="Star tColumn" 
  12005         Value="1" 
  12006        />
  12007                                           
  12008        <Property 
  12009         Name="Head erContents
  12010         Value="CRE ATE PROCED URE App.NV CC_usp_Get OrCreateUs er&#xD;&#x A;&#x9;@Us erName var char(50)&# xD;&#xA;&# xD;&#xA;--  NOTICE:&# xD;&#xA;--  Do not ed it the sto red proced ure live o n the serv er. Code t o generate &#xD;&#xA; -- the pro cedures is  stored in  the proje ct reposit ory. Any c hanges mad e&#xD;&#xA ;-- that a re not rec orded in t he reposit ory will b e overwrit ten.&#xD;& #xA;&#xD;& #xA;AS" 
  12011        />
  12012                                  
  12013       </Annotati on>
  12014                        
  12015      </Element>
  12016                       
  12017      <Element 
  12018       Type="SqlP rocedure" 
  12019       Name="[App ].[NVCC_us p_GetPatie nt]"
  12020      >
  12021                                 
  12022       <Property 
  12023        Name="Body Script"
  12024       >
  12025                                           
  12026        <Value>
  12027         <![CDATA[
  12028         --======== ========== ========== ========== ========== ========== ========== ========== ====
  12029         --Requesto r              : Non  Va Coordin ated Care  Project
  12030         --Author                  : Jerr y Kohler ( Original s cript by D r. Charles  Demosthen es)
  12031         --Object/S P Name         : NVCC _usp_GetPa tient
  12032         --Server                  : 
  12033         --Data Bas e              : CC_R EFDOC
  12034         --Schema                  : app
  12035         --Report                  : N/A
  12036         --Folder                  : N/A
  12037         --Report L oc             : N/A
  12038         --Job                     : None
  12039         --Job Loc                 : None
  12040         --Note                    : 
  12041         --Date Cre ated           : 01-2 0-2016
  12042         --
  12043         --
  12044         --Last Cha nged           : 02-1 8-2016  
  12045         --Last Cha nged By                 : Jerry  Kohler - N orthwest I nnovation  Center (NW IC)
  12046         --Reason F or Change               : Reques t to also  provide th e name of  the statio n.
  12047         --
  12048         --Purpose                 : To r etrieve a  single pat ient recor d for the  NVCC app.
  12049         --======== ========== ========== ========== ========== ========== ========== ========== ====
  12050         BEGIN
  12051                 --  SET NOCOU NT ON adde d to preve nt extra r esult sets  from
  12052                 --  interferi ng with SE LECT state ments.
  12053            SET NOC OUNT ON;
  12054        
  12055              /*
  12056               SELE CT Cast(pa tientsid a s varchar)  as strPat ientSID
  12057                  , Sta3n
  12058                  , App.udf_St ationName  (Sta3n) AS  StationNa me
  12059                  , PatientNam e
  12060                  , PatientLas tName
  12061                  , PatientFir stName
  12062                  , PatientSSN
  12063                  , StreetAddr ess1
  12064                  , StreetAddr ess2
  12065                  , StreetAddr ess3
  12066                  , City
  12067                  , Zip
  12068                  , Zip4
  12069                  , PostalCode
  12070                  , Province
  12071                  , Country
  12072                  , PhoneResid ence
  12073                  , PhoneWork
  12074                  , PhoneCellu lar
  12075                  , DateOfDeat h
  12076                  , BadAddress Indicator
  12077                  , TemporaryA ddressActi veFlag
  12078                  , Gender
  12079                  , Age
  12080                  , [State]
  12081                  , Deceased
  12082                  , Eligibilit y
  12083                  , DateOfBirt h
  12084                  , Ineligible Date
  12085                  , Eligibilit yStatus
  12086                  , Eligibilit yVerificat ionSource
  12087            FROM  C DWWork.SPa tient.SPat ient
  12088            WHERE P atientSSN  like @ssn  and sta3n= @station;
  12089            */
  12090        
  12091            /* Revi sed on 10/ 26/2017 by  Trinity H all CDW Ar chitect */
  12092        
  12093            SELECT  Cast(a.pat ientsid as  varchar)  as strPati entSID
  12094                  , a.Sta3n
  12095                  , App.udf_St ationName  (a.Sta3n)  AS Station Name
  12096                  , a.PatientN ame
  12097                  , a.PatientL astName
  12098                  , a.PatientF irstName
  12099                  , a.PatientS SN
  12100                  , b.StreetAd dress1
  12101                  , b.StreetAd dress2
  12102                  , b.StreetAd dress3
  12103                  , b.City
  12104                  , b.Zip
  12105                  , b.Zip4
  12106                  , b.PostalCo de
  12107                  , b.Province
  12108                  , b.Country
  12109                  , c.PhoneNum ber as Pho neResidenc e
  12110                  , d.WorkPhon eNumber as  PhoneWork
  12111                  , e.[PhoneNu mber] as P honeCellul ar
  12112                  , a.DeathDat eTime as D ateOfDeath
  12113                  , b.BadAddre ssIndicato r
  12114                  , null as Te mporaryAdd ressActive Flag
  12115                  , a.Gender
  12116                  , a.Age
  12117                  , b.[State]
  12118                  , a.Deceased Flag as De ceased
  12119                  , a.Eligibil ity
  12120                  , a.BirthDat eTime as D ateOfBirth
  12121                  , a.Ineligib leDateTime  as Inelig ibleDate
  12122                  , a.Eligibil ityStatus
  12123                  , a.Eligibil ityVerific ationSourc e
  12124            FROM           CDW Work.SPati ent.SPatie nt a
  12125            Left jo in CDWWork .Spatient. SPatientAd dress b on  a.Patient SID = b.Pa tientSID a nd b.Ordin alNumber =  13
  12126            left jo in CDWWork .Spatient. SpatientPh one c on a .PatientSI D = c.Pati entSID and  c.Ordinal Number = 1 3
  12127            left jo in CDWWork .Spatient. SpatientPh one d on a .PatientSI D = d.Pati entSID and  d.Ordinal Number = 9
  12128            left jo in CDWWork .Spatient. SpatientPh one e on a .PatientSI D = e.Pati entSID and  e.Ordinal Number = 1 4
  12129        
  12130        
  12131            WHERE P atientSSN  like @ssn  and a.sta3 n=@station ;
  12132         END;]]>
  12133        </Value>
  12134                                  
  12135       </Property >
  12136                                 
  12137       <Property 
  12138        Name="IsAn siNullsOn"  
  12139        Value="Tru e" 
  12140       />
  12141                                 
  12142       <Relations hip 
  12143        Name="Body Dependenci es"
  12144       >
  12145                                           
  12146        <Entry>
  12147                                                    
  12148         <Reference
  12149          ExternalSo urce="CDWW ork.dacpac
  12150          Name="[CDW Work]|[SPa tient].[SP atient]" 
  12151         />
  12152                                            
  12153        </Entry>
  12154                                           
  12155        <Entry>
  12156                                                    
  12157         <Reference
  12158          ExternalSo urce="CDWW ork.dacpac
  12159          Name="[CDW Work]|[SPa tient].[SP atientAddr ess]" 
  12160         />
  12161                                            
  12162        </Entry>
  12163                                           
  12164        <Entry>
  12165                                                    
  12166         <Reference
  12167          ExternalSo urce="CDWW ork.dacpac
  12168          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  12169         />
  12170                                            
  12171        </Entry>
  12172                                           
  12173        <Entry>
  12174                                                    
  12175         <Reference
  12176          ExternalSo urce="CDWW ork.dacpac
  12177          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Pati entSID]" 
  12178         />
  12179                                            
  12180        </Entry>
  12181                                           
  12182        <Entry>
  12183                                                    
  12184         <Reference
  12185          ExternalSo urce="CDWW ork.dacpac
  12186          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Ordi nalNumber]
  12187         />
  12188                                            
  12189        </Entry>
  12190                                           
  12191        <Entry>
  12192                                                    
  12193         <Reference
  12194          ExternalSo urce="CDWW ork.dacpac
  12195          Name="[CDW Work]|[SPa tient].[SP atientPhon e]" 
  12196         />
  12197                                            
  12198        </Entry>
  12199                                           
  12200        <Entry>
  12201                                                    
  12202         <Reference
  12203          ExternalSo urce="CDWW ork.dacpac
  12204          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  12205         />
  12206                                            
  12207        </Entry>
  12208                                           
  12209        <Entry>
  12210                                                    
  12211         <Reference
  12212          ExternalSo urce="CDWW ork.dacpac
  12213          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Patien tSID]" 
  12214         />
  12215                                            
  12216        </Entry>
  12217                                           
  12218        <Entry>
  12219                                                    
  12220         <Reference
  12221          ExternalSo urce="CDWW ork.dacpac
  12222          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Ordina lNumber]" 
  12223         />
  12224                                            
  12225        </Entry>
  12226                                           
  12227        <Entry>
  12228                                                    
  12229         <Reference
  12230          ExternalSo urce="CDWW ork.dacpac
  12231          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Patien tSID]" 
  12232         />
  12233                                            
  12234        </Entry>
  12235                                           
  12236        <Entry>
  12237                                                    
  12238         <Reference
  12239          ExternalSo urce="CDWW ork.dacpac
  12240          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Ordina lNumber]" 
  12241         />
  12242                                            
  12243        </Entry>
  12244                                           
  12245        <Entry>
  12246                                                    
  12247         <Reference
  12248          ExternalSo urce="CDWW ork.dacpac
  12249          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Patien tSID]" 
  12250         />
  12251                                            
  12252        </Entry>
  12253                                           
  12254        <Entry>
  12255                                                    
  12256         <Reference
  12257          ExternalSo urce="CDWW ork.dacpac
  12258          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Ordina lNumber]" 
  12259         />
  12260                                            
  12261        </Entry>
  12262                                           
  12263        <Entry>
  12264                                                    
  12265         <Reference
  12266          ExternalSo urce="Buil tIns" 
  12267          Name="[var char]" 
  12268         />
  12269                                            
  12270        </Entry>
  12271                                           
  12272        <Entry>
  12273                                                    
  12274         <Reference
  12275          ExternalSo urce="CDWW ork.dacpac
  12276          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  12277         />
  12278                                            
  12279        </Entry>
  12280                                           
  12281        <Entry>
  12282                                                    
  12283         <Reference
  12284          ExternalSo urce="CDWW ork.dacpac
  12285          Name="[CDW Work]|[SPa tient].[SP atient].[S ta3n]" 
  12286         />
  12287                                            
  12288        </Entry>
  12289                                           
  12290        <Entry>
  12291                                                    
  12292         <Reference
  12293          Name="[App ].[udf_Sta tionName]"  
  12294         />
  12295                                            
  12296        </Entry>
  12297                                           
  12298        <Entry>
  12299                                                    
  12300         <Reference
  12301          ExternalSo urce="CDWW ork.dacpac
  12302          Name="[CDW Work]|[SPa tient].[SP atient].[P atientName ]" 
  12303         />
  12304                                            
  12305        </Entry>
  12306                                           
  12307        <Entry>
  12308                                                    
  12309         <Reference
  12310          ExternalSo urce="CDWW ork.dacpac
  12311          Name="[CDW Work]|[SPa tient].[SP atient].[P atientLast Name]" 
  12312         />
  12313                                            
  12314        </Entry>
  12315                                           
  12316        <Entry>
  12317                                                    
  12318         <Reference
  12319          ExternalSo urce="CDWW ork.dacpac
  12320          Name="[CDW Work]|[SPa tient].[SP atient].[P atientFirs tName]" 
  12321         />
  12322                                            
  12323        </Entry>
  12324                                           
  12325        <Entry>
  12326                                                    
  12327         <Reference
  12328          ExternalSo urce="CDWW ork.dacpac
  12329          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSSN]
  12330         />
  12331                                            
  12332        </Entry>
  12333                                           
  12334        <Entry>
  12335                                                    
  12336         <Reference
  12337          ExternalSo urce="CDWW ork.dacpac
  12338          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stre etAddress1 ]" 
  12339         />
  12340                                            
  12341        </Entry>
  12342                                           
  12343        <Entry>
  12344                                                    
  12345         <Reference
  12346          ExternalSo urce="CDWW ork.dacpac
  12347          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stre etAddress2 ]" 
  12348         />
  12349                                            
  12350        </Entry>
  12351                                           
  12352        <Entry>
  12353                                                    
  12354         <Reference
  12355          ExternalSo urce="CDWW ork.dacpac
  12356          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stre etAddress3 ]" 
  12357         />
  12358                                            
  12359        </Entry>
  12360                                           
  12361        <Entry>
  12362                                                    
  12363         <Reference
  12364          ExternalSo urce="CDWW ork.dacpac
  12365          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[City ]" 
  12366         />
  12367                                            
  12368        </Entry>
  12369                                           
  12370        <Entry>
  12371                                                    
  12372         <Reference
  12373          ExternalSo urce="CDWW ork.dacpac
  12374          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Zip]
  12375         />
  12376                                            
  12377        </Entry>
  12378                                           
  12379        <Entry>
  12380                                                    
  12381         <Reference
  12382          ExternalSo urce="CDWW ork.dacpac
  12383          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Zip4 ]" 
  12384         />
  12385                                            
  12386        </Entry>
  12387                                           
  12388        <Entry>
  12389                                                    
  12390         <Reference
  12391          ExternalSo urce="CDWW ork.dacpac
  12392          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Post alCode]" 
  12393         />
  12394                                            
  12395        </Entry>
  12396                                           
  12397        <Entry>
  12398                                                    
  12399         <Reference
  12400          ExternalSo urce="CDWW ork.dacpac
  12401          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Prov ince]" 
  12402         />
  12403                                            
  12404        </Entry>
  12405                                           
  12406        <Entry>
  12407                                                    
  12408         <Reference
  12409          ExternalSo urce="CDWW ork.dacpac
  12410          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Coun try]" 
  12411         />
  12412                                            
  12413        </Entry>
  12414                                           
  12415        <Entry>
  12416                                                    
  12417         <Reference
  12418          ExternalSo urce="CDWW ork.dacpac
  12419          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[PhoneN umber]" 
  12420         />
  12421                                            
  12422        </Entry>
  12423                                           
  12424        <Entry>
  12425                                                    
  12426         <Reference
  12427          ExternalSo urce="CDWW ork.dacpac
  12428          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[WorkPh oneNumber]
  12429         />
  12430                                            
  12431        </Entry>
  12432                                           
  12433        <Entry>
  12434                                                    
  12435         <Reference
  12436          ExternalSo urce="CDWW ork.dacpac
  12437          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[PhoneN umber]" 
  12438         />
  12439                                            
  12440        </Entry>
  12441                                           
  12442        <Entry>
  12443                                                    
  12444         <Reference
  12445          ExternalSo urce="CDWW ork.dacpac
  12446          Name="[CDW Work]|[SPa tient].[SP atient].[D eathDateTi me]" 
  12447         />
  12448                                            
  12449        </Entry>
  12450                                           
  12451        <Entry>
  12452                                                    
  12453         <Reference
  12454          ExternalSo urce="CDWW ork.dacpac
  12455          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[BadA ddressIndi cator]" 
  12456         />
  12457                                            
  12458        </Entry>
  12459                                           
  12460        <Entry>
  12461                                                    
  12462         <Reference
  12463          ExternalSo urce="CDWW ork.dacpac
  12464          Name="[CDW Work]|[SPa tient].[SP atient].[G ender]" 
  12465         />
  12466                                            
  12467        </Entry>
  12468                                           
  12469        <Entry>
  12470                                                    
  12471         <Reference
  12472          ExternalSo urce="CDWW ork.dacpac
  12473          Name="[CDW Work]|[SPa tient].[SP atient].[A ge]" 
  12474         />
  12475                                            
  12476        </Entry>
  12477                                           
  12478        <Entry>
  12479                                                    
  12480         <Reference
  12481          ExternalSo urce="CDWW ork.dacpac
  12482          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stat e]" 
  12483         />
  12484                                            
  12485        </Entry>
  12486                                           
  12487        <Entry>
  12488                                                    
  12489         <Reference
  12490          ExternalSo urce="CDWW ork.dacpac
  12491          Name="[CDW Work]|[SPa tient].[SP atient].[D eceasedFla g]" 
  12492         />
  12493                                            
  12494        </Entry>
  12495                                           
  12496        <Entry>
  12497                                                    
  12498         <Reference
  12499          ExternalSo urce="CDWW ork.dacpac
  12500          Name="[CDW Work]|[SPa tient].[SP atient].[E ligibility ]" 
  12501         />
  12502                                            
  12503        </Entry>
  12504                                           
  12505        <Entry>
  12506                                                    
  12507         <Reference
  12508          ExternalSo urce="CDWW ork.dacpac
  12509          Name="[CDW Work]|[SPa tient].[SP atient].[B irthDateTi me]" 
  12510         />
  12511                                            
  12512        </Entry>
  12513                                           
  12514        <Entry>
  12515                                                    
  12516         <Reference
  12517          ExternalSo urce="CDWW ork.dacpac
  12518          Name="[CDW Work]|[SPa tient].[SP atient].[I neligibleD ateTime]" 
  12519         />
  12520                                            
  12521        </Entry>
  12522                                           
  12523        <Entry>
  12524                                                    
  12525         <Reference
  12526          ExternalSo urce="CDWW ork.dacpac
  12527          Name="[CDW Work]|[SPa tient].[SP atient].[E ligibility Status]" 
  12528         />
  12529                                            
  12530        </Entry>
  12531                                           
  12532        <Entry>
  12533                                                    
  12534         <Reference
  12535          ExternalSo urce="CDWW ork.dacpac
  12536          Name="[CDW Work]|[SPa tient].[SP atient].[E ligibility Verificati onSource]"  
  12537         />
  12538                                            
  12539        </Entry>
  12540                                           
  12541        <Entry>
  12542                                                    
  12543         <Reference
  12544          ExternalSo urce="CDWW ork.dacpac
  12545          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSSN]
  12546         />
  12547                                            
  12548        </Entry>
  12549                                           
  12550        <Entry>
  12551                                                    
  12552         <Reference
  12553          Name="[App ].[NVCC_us p_GetPatie nt].[@ssn]
  12554         />
  12555                                            
  12556        </Entry>
  12557                                           
  12558        <Entry>
  12559                                                    
  12560         <Reference
  12561          ExternalSo urce="CDWW ork.dacpac
  12562          Name="[CDW Work]|[SPa tient].[SP atient].[S ta3n]" 
  12563         />
  12564                                            
  12565        </Entry>
  12566                                           
  12567        <Entry>
  12568                                                    
  12569         <Reference
  12570          Name="[App ].[NVCC_us p_GetPatie nt].[@stat ion]" 
  12571         />
  12572                                            
  12573        </Entry>
  12574                                  
  12575       </Relation ship>
  12576                                 
  12577       <Relations hip 
  12578        Name="Para meters"
  12579       >
  12580                                           
  12581        <Entry>
  12582                                                    
  12583         <Element 
  12584          Type="SqlS ubroutineP arameter" 
  12585          Name="[App ].[NVCC_us p_GetPatie nt].[@stat ion]"
  12586         >
  12587                                                              
  12588          <Relations hip 
  12589           Name="Type "
  12590          >
  12591                                                                        
  12592           <Entry>
  12593                                                                                  
  12594            <Element 
  12595             Type="SqlT ypeSpecifi er"
  12596            >
  12597                                                                                            
  12598             <Relations hip 
  12599              Name="Type "
  12600             >
  12601                                                                                                     
  12602              <Entry>
  12603                                                                                                               
  12604               <Reference
  12605                ExternalSo urce="Buil tIns" 
  12606                Name="[int ]" 
  12607               />
  12608                                                                                                      
  12609              </Entry>
  12610                                                                                             
  12611             </Relation ship>
  12612                                                                                   
  12613            </Element>
  12614                                                                         
  12615           </Entry>
  12616                                                               
  12617          </Relation ship>
  12618                                                     
  12619         </Element>
  12620                                            
  12621        </Entry>
  12622                                           
  12623        <Entry>
  12624                                                    
  12625         <Element 
  12626          Type="SqlS ubroutineP arameter" 
  12627          Name="[App ].[NVCC_us p_GetPatie nt].[@ssn] "
  12628         >
  12629                                                              
  12630          <Relations hip 
  12631           Name="Type "
  12632          >
  12633                                                                        
  12634           <Entry>
  12635                                                                                  
  12636            <Element 
  12637             Type="SqlT ypeSpecifi er"
  12638            >
  12639                                                                                            
  12640             <Property 
  12641              Name="Leng th" 
  12642              Value="9" 
  12643             />
  12644                                                                                            
  12645             <Relations hip 
  12646              Name="Type "
  12647             >
  12648                                                                                                     
  12649              <Entry>
  12650                                                                                                               
  12651               <Reference
  12652                ExternalSo urce="Buil tIns" 
  12653                Name="[var char]" 
  12654               />
  12655                                                                                                      
  12656              </Entry>
  12657                                                                                             
  12658             </Relation ship>
  12659                                                                                   
  12660            </Element>
  12661                                                                         
  12662           </Entry>
  12663                                                               
  12664          </Relation ship>
  12665                                                     
  12666         </Element>
  12667                                            
  12668        </Entry>
  12669                                  
  12670       </Relation ship>
  12671                                 
  12672       <Relations hip 
  12673        Name="Sche ma"
  12674       >
  12675                                           
  12676        <Entry>
  12677                                                    
  12678         <Reference
  12679          Name="[App ]" 
  12680         />
  12681                                            
  12682        </Entry>
  12683                                  
  12684       </Relation ship>
  12685                                 
  12686       <Annotatio
  12687        Type="SysC ommentsObj ectAnnotat ion"
  12688       >
  12689                                           
  12690        <Property 
  12691         Name="Crea teOffset" 
  12692         Value="4" 
  12693        />
  12694                                           
  12695        <Property 
  12696         Name="Leng th" 
  12697         Value="372 2" 
  12698        />
  12699                                           
  12700        <Property 
  12701         Name="Star tLine" 
  12702         Value="1" 
  12703        />
  12704                                           
  12705        <Property 
  12706         Name="Star tColumn" 
  12707         Value="1" 
  12708        />
  12709                                           
  12710        <Property 
  12711         Name="Head erContents
  12712         Value="&#x D;&#xA;&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetPatient ]&#xD;&#xA ;&#x9;@sta tion int,    --statio n for pt,  restricts  queries lo cal VA sta tion&#xD;& #xA;&#x9;@ ssn varcha r(9) -- th is is the  patient's  SSN&#xD;&# xA;&#xD;&# xA;AS" 
  12713        />
  12714                                  
  12715       </Annotati on>
  12716                        
  12717      </Element>
  12718                       
  12719      <Element 
  12720       Type="SqlP rocedure" 
  12721       Name="[App ].[NVCC_us p_GetPatie ntBySid]"
  12722      >
  12723                                 
  12724       <Property 
  12725        Name="Body Script"
  12726       >
  12727                                           
  12728        <Value>
  12729         <![CDATA[
  12730         --======== ========== ========== ========== ========== ========== ========== ========== ====
  12731         --Requesto r              : Non  Va Coordin ated Care  Project
  12732         --Author                  : Jon  Duckart (O riginal sc ript by Dr . Charles  Demosthene s)
  12733         --Object/S P Name         : NVCC _usp_GetPa tientBySid
  12734         --Server                  : 
  12735         --Data Bas e              : CC_R EFDOC
  12736         --Schema                  : app
  12737         --Report                  : N/A
  12738         --Folder                  : N/A
  12739         --Report L oc             : N/A
  12740         --Job                     : None
  12741         --Job Loc                 : None
  12742         --Note                    : 
  12743         --Date Cre ated           : 04-1 4-2016
  12744         --
  12745         --Last Cha nged           : 06-2 2-2016
  12746         --Last Cha nged By                 : Brian  Diggs - No rthwest In novation C enter (NWI C)
  12747         --Reason F or Change               : Format ting and i dempotence  and signi ng
  12748         --
  12749         --Purpose                 : To r etrieve a  single pat ient recor d for the  NVCC app b y SID.
  12750         --======== ========== ========== ========== ========== ========== ========== ========== ====
  12751         BEGIN
  12752                 --  SET NOCOU NT ON adde d to preve nt extra r esult sets  from
  12753                 --  interferi ng with SE LECT state ments.
  12754            SET NOC OUNT ON;
  12755        
  12756            --  SEL ECT  [Pati entSID]
  12757          --     ,[ PatientIEN ]
  12758          --     ,[ Sta3n] as  Station
  12759          --     ,[ PatientNam e]
  12760          --     ,[ PatientLas tName]
  12761          --     ,[ PatientFir stName]
  12762          --     ,[ PatientSSN ]
  12763          --     ,[ ScrSSN]
  12764          --     ,[ StreetAddr ess1]
  12765          --     ,[ StreetAddr ess2]
  12766          --     ,[ StreetAddr ess3]
  12767          --     ,[ City]
  12768          --     ,[ Zip]
  12769          --     ,[ Zip4]
  12770          --     ,[ PostalCode ]
  12771          --     ,[ Province]
  12772          --     ,[ CountrySID ]
  12773          --     ,[ Country]
  12774          --     ,[ PhoneResid ence]
  12775          --     ,[ PhoneWork]
  12776          --     ,[ PhoneCellu lar]
  12777          --     ,[ MothersMai denName]
  12778          --     ,[ DateOfDeat h]
  12779          --     ,[ DateOfDeat hText]
  12780          --     ,[ EmailAddre ss]
  12781          --     ,[ BadAddress Indicator]
  12782          --     ,[ ExcludeFro mFacilityD irectoryFl ag]
  12783          --     ,[ AddressCha ngeInstitu tionSID]
  12784          --     ,[ AddressCha ngeStaffSI D]
  12785          --     ,[ NOKPrimary ChangeDate Time]
  12786          --     ,[ NOKPrimary ChangeVist aErrorDate ]
  12787          --     ,[ NOKPrimary ChangeDate TimeTransf ormSID]
  12788          --     ,[ NOKSeconda ryChangeDa teTime]
  12789          --     ,[ NOKSeconda ryChangeVi staErrorDa te]
  12790          --     ,[ NOKSeconda ryChangeDa teTimeTran sformSID]
  12791          --     ,[ NOKRelatio nshipToPat ient]
  12792          --     ,[ NOKDesigne eSameAsFla g]
  12793          --     ,[ NOKEmergen cyContactS ameAsFlag]
  12794          --     ,[ TemporaryA ddressActi veFlag]
  12795          --     ,[ TemporaryA ddressLast EditedDate Time]
  12796          --     ,[ TemporaryA ddressLast EditedVist aErrorDate ]
  12797          --     ,[ TemporaryA ddressLast EditedDate TimeTransf ormSID]
  12798          --     ,[ TemporaryA ddressChan geInstitut ionSID]
  12799          --     ,[ TemporaryA ddressStar tDate]
  12800          --     ,[ TemporaryA ddressStar tVistaErro rDate]
  12801          --     ,[ TemporaryA ddressStar tDateTrans formSID]
  12802          --     ,[ TemporaryA ddressEndD ate]
  12803          --     ,[ TemporaryA ddressEndV istaErrorD ate]
  12804          --     ,[ TemporaryA ddressEndD ateTransfo rmSID]
  12805          --     ,[ Confidenti alAddressA ctiveFlag]
  12806          --     ,[ CDFlag]
  12807          --     ,[ CDDecidedB yName]
  12808          --     ,[ CDDecision Date]
  12809          --     ,[ CDDecision VistaError Date]
  12810          --     ,[ CDDecision DateTransf ormSID]
  12811          --     ,[ CDReviewed Date]
  12812          --     ,[ CDReviewed VistaError Date]
  12813          --     ,[ CDReviewed DateTransf ormSID]
  12814          --     ,[ CDDetermin ingInstitu tionSID]
  12815          --     ,[ CDDetermin ationType]
  12816          --     ,[ CurrentPur pleHeartDe cisionType ]
  12817          --     ,[ CurrentPur pleHeartSt atus]
  12818          --     ,[ PurpleHear tInstituti onSID]
  12819          --     ,[ MedicaidNu mber]
  12820          --     ,[ RaceSID]
  12821          --     ,[ Gender]
  12822          --     ,[ Age]
  12823          --     ,[ StateSID]
  12824          --     ,[ State]
  12825          --     ,[ County]
  12826          --     ,[ Deceased]
  12827          --     ,[ PatientICN ]
  12828          --     ,[ PatientICN Checksum]
  12829          --     ,[ PseudoSSNF lag]
  12830          --     ,[ PeriodOfSe rviceSID]
  12831          --     ,[ PeriodOfSe rvice]
  12832          --     ,[ CurrentMea nsTestStat usSID]
  12833          --     ,[ MaritalSta tusSID]
  12834          --     ,[ MaritalSta tus]
  12835          --     ,[ PercentSer viceConnec t]
  12836          --     ,[ InsuranceC overageFla g]
  12837          --     ,[ ReligionSI D]
  12838          --     ,[ Religion]
  12839          --     ,[ AgentOrang eExposureF lag]
  12840          --     ,[ AgentOrang eLocationC ode]
  12841          --     ,[ RadiationE xposureCod e]
  12842          --     ,[ IonizingRa diationExp osureFlag]
  12843          --     ,[ SHADFlag]
  12844          --     ,[ VeteranFla g]
  12845          --     ,[ CombatFlag ]
  12846          --     ,[ CombatElig ibilityEnd Date]
  12847          --     ,[ CombatElig ibilityEnd VistaError Date]
  12848          --     ,[ CombatElig ibilityEnd DateTransf ormSID]
  12849          --     ,[ TestPatien tFlag]
  12850          --     ,[ CDWPossibl eTestPatie ntFlag]
  12851          --     ,[ SpinalCord InjuryType ]
  12852          --     ,[ EnteredInt oFileDate]
  12853          --     ,[ EnteredInt oFileVista ErrorDate]
  12854          --     ,[ EnteredInt oFileDateT ransformSI D]
  12855          --     ,[ EmergencyR esponseInd icator]
  12856          --     ,[ Eligibilit ySID]
  12857          --     ,[ Eligibilit y]
  12858          --     ,[ Eligibilit yVACode]
  12859          --     ,[ DateOfBirt h]
  12860          --     ,[ DateOfBirt hText]
  12861          --     ,[ SensitiveF lag]
  12862          --     ,[ LastServic eEntryDate ]
  12863          --     ,[ LastServic eEntryVist aErrorDate ]
  12864          --     ,[ LastServic eEntryDate TransformS ID]
  12865          --     ,[ LastServic eSeparatio nDate]
  12866          --     ,[ LastServic eSeparatio nVistaErro rDate]
  12867          --     ,[ LastServic eSeparatio nDateTrans formSID]
  12868          --     ,[ PreferredI nstitution SID]
  12869          --     ,[ POWFlag]
  12870          --     ,[ POWLocatio nSID]
  12871          --     ,[ POWFromVis taDate]
  12872          --     ,[ POWToVista Date]
  12873          --     ,[ CombatFrom VistaDate]
  12874          --     ,[ CombatToVi staDate]
  12875          --     ,[ ClaimNumbe r]
  12876          --     ,[ RoomBedSID ]
  12877          --     ,[ Ineligible Date]
  12878          --     ,[ Ineligible VistaError Date]
  12879          --     ,[ Ineligible DateTransf ormSID]
  12880          --     ,[ Ineligible Reason]
  12881          --     ,[ Eligibilit yStatus]
  12882          --     ,[ Eligibilit yVerificat ionSource]
  12883          --     ,[ GISLocator Name]
  12884          --     ,[ GISMatchSt atusCode]
  12885          --     ,[ GISMatchSc ore]
  12886          --     ,[ GISMatchMe thodCode]
  12887          --     ,[ GISMatched Address]
  12888          --     ,[ GISAddress Type]
  12889          --     ,[ GISStreetS ide]
  12890          --     ,[ GISPatient AddressLon gitude]
  12891          --     ,[ GISPatient AddressLat itude]
  12892          --     ,[ GISAddress UpdatedDat e]
  12893          --     ,[ GISFIPSCod e]
  12894          --     ,[ GISMarket]
  12895          --     ,[ GISSubmark et]
  12896          --     ,[ GISSector]
  12897          --     ,[ GISURH]
  12898          --     ,[ GISCongres sDistrict]
  12899          --  FROM   CDWWork.S Patient.SP atient
  12900                 -- WHERE
  12901                 --       Pati entSid= @p id
  12902                 --       AND  patientnam e <>'*Unkn own at thi s time*'
  12903                 --       AND  patientnam e is not n ull;
  12904        
  12905        
  12906                    SELECT
  12907                     a.[Patien tSID]
  12908               ,a.[ PatientIEN ]
  12909               ,a.[ Sta3n] as  Station
  12910               ,a.[ PatientNam e]
  12911               ,a.[ PatientLas tName]
  12912               ,a.[ PatientFir stName]
  12913               ,a.[ PatientSSN ]
  12914               ,a.[ ScrSSN]
  12915               ,b.[ StreetAddr ess1]
  12916               ,b.[ StreetAddr ess2]
  12917               ,b.[ StreetAddr ess3]
  12918               ,b.[ City]
  12919               ,b.[ Zip]
  12920               ,b.[ Zip4]
  12921               ,b.[ PostalCode ]
  12922               ,b.[ Province]
  12923               ,nul l as [Coun trySID]
  12924               ,b.[ Country]
  12925               ,c.[ PhoneNumbe r] as [Pho neResidenc e]
  12926               ,d.[ WorkPhoneN umber] as  [PhoneWork ]
  12927               ,e.[ PhoneNumbe r] as [Pho neCellular ]
  12928               ,f.M otherMaide nName as [ MothersMai denName]
  12929               ,a.D eathDateTi me as [Dat eOfDeath]
  12930               ,nul l as [Date OfDeathTex t]
  12931               ,h.[ EmailAddre ss]
  12932               ,b.[ BadAddress Indicator]
  12933               ,nul l as [Excl udeFromFac ilityDirec toryFlag]
  12934               ,b.[ AddressCha ngeInstitu tionSID]
  12935               ,b.[ AddressCha ngeStaffSI D]
  12936               ,i.A ddressChan geDateTime  as [NOKPr imaryChang eDateTime]
  12937               ,i.A ddressChan geVistaErr orDate as  [NOKPrimar yChangeVis taErrorDat e]
  12938               ,i.A ddressChan geDateTime TransformS ID as [NOK PrimaryCha ngeDateTim eTransform SID]
  12939               ,j.A ddressChan geDateTime  as [NOKSe condaryCha ngeDateTim e]
  12940               ,j.A ddressChan geVistaErr orDate as  [NOKSecond aryChangeV istaErrorD ate]
  12941               ,j.A ddressChan geDateTime TransformS ID as [NOK SecondaryC hangeDateT imeTransfo rmSID]
  12942               ,i.N ameOfConta ct as [NOK Relationsh ipToPatien t]
  12943               ,nul l as [NOKD esigneeSam eAsFlag]
  12944               ,nul l as [NOKE mergencyCo ntactSameA sFlag]
  12945               ,nul l as [Temp oraryAddre ssActiveFl ag]
  12946               ,k.A ddressChan geDateTime  as [Tempo raryAddres sLastEdite dDateTime]
  12947               ,k.A ddressChan geVistaErr orDate as  [Temporary AddressLas tEditedVis taErrorDat e]
  12948               ,k.A ddressChan geDateTime TransformS ID as [Tem poraryAddr essLastEdi tedDateTim eTransform SID]
  12949               ,k.A ddressChan geInstitut ionSID as  [Temporary AddressCha ngeInstitu tionSID]
  12950               ,k.A ddressStar tDateTime  as [Tempor aryAddress StartDate]
  12951               ,k.A ddressStar tVistaErro rDate as [ TemporaryA ddressStar tVistaErro rDate]
  12952               ,k.A ddressStar tDateTimeT ransformSI D as [Temp oraryAddre ssStartDat eTransform SID]
  12953               ,k.A ddressEndD ateTime as  [Temporar yAddressEn dDate]
  12954               ,k.A ddressEndV istaErrorD ate as [Te mporaryAdd ressEndVis taErrorDat e]
  12955               ,k.A ddressEndD ateTimeTra nsformSID  as [Tempor aryAddress EndDateTra nsformSID]
  12956               ,nul l as [Conf identialAd dressActiv eFlag]
  12957               ,nul l as [CDFl ag]
  12958               ,nul l as [CDDe cidedByNam e]
  12959               ,l.D ecisionDat eTime as [ CDDecision Date]
  12960               ,l.D ecisionVis taErrorDat e as [CDDe cisionVist aErrorDate ]
  12961               ,l.D ecisionDat eTimeTrans formSID as  [CDDecisi onDateTran sformSID]
  12962               ,l.R eviewDateT ime as [CD ReviewedDa te]
  12963               ,l.R eviewVista ErrorDate  as [CDRevi ewedVistaE rrorDate]
  12964               ,l.R eviewDateT imeTransfo rmSID as [ CDReviewed DateTransf ormSID]
  12965               ,l.D etermining Institutio nSID as [C DDetermini ngInstitut ionSID]
  12966               ,l.M ethodOfDet ermination  as [CDDet ermination Type]
  12967               ,nul l as [Curr entPurpleH eartDecisi onType]
  12968               ,m.P urpleHeart Status as  [CurrentPu rpleHeartS tatus]
  12969               ,nul l as [Purp leHeartIns titutionSI D]
  12970               ,a.[ MedicaidNu mber]
  12971               ,n.L egacyRaceS ID as [Rac eSID]
  12972               ,a.[ Gender]
  12973               ,a.[ Age]
  12974               ,b.[ StateSID]
  12975               ,b.[ State]
  12976               ,b.[ County]
  12977               ,a.D eceasedFla g as [Dece ased]
  12978               ,a.[ PatientICN ]
  12979               ,nul l as [Pati entICNChec ksum]
  12980               ,a.P seudoSSNRe ason as [P seudoSSNFl ag]
  12981               ,a.P seudoSSNRe ason as [P eriodOfSer viceSID]
  12982               ,a.[ PeriodOfSe rvice]
  12983               ,a.[ CurrentMea nsTestStat usSID]
  12984               ,a.[ MaritalSta tusSID]
  12985               ,a.[ MaritalSta tus]
  12986               ,o.S erviceConn ectedPerce nt as [Per centServic eConnect]
  12987               ,a.[ InsuranceC overageFla g]
  12988               ,a.[ ReligionSI D]
  12989               ,a.[ Religion]
  12990               ,o.A gentOrange ExposureCo de as [Age ntOrangeEx posureFlag ]
  12991               ,o.A gentOrange Location a s [AgentOr angeLocati onCode]
  12992               ,o.I onizingRad iationCode  as [Radia tionExposu reCode]
  12993               ,o.I onizingRad iationExpo sureCode a s [Ionizin gRadiation ExposureFl ag]
  12994               ,o.[ SHADFlag]
  12995               ,a.[ VeteranFla g]
  12996               ,o.C ombatServi ceFlag as  [CombatFla g]
  12997               ,o.C ombatEligi bilityEndD ateTime as  [CombatEl igibilityE ndDate]
  12998               ,o.[ CombatElig ibilityEnd VistaError Date]
  12999               ,o.C ombatEligi bilityEndD ateTimeTra nsformSID  as [Combat Eligibilit yEndDateTr ansformSID ]
  13000               ,a.[ TestPatien tFlag]
  13001               ,a.[ CDWPossibl eTestPatie ntFlag]
  13002               ,o.S pinalCordI njuryCode  as [Spinal CordInjury Type]
  13003               ,a.P atientEnte redDateTim e as [Ente redIntoFil eDate]
  13004               ,a.P atientEnte redVistaEr rorDate as  [EnteredI ntoFileVis taErrorDat e]
  13005               ,a.P atientEnte redDateTim eTransform SID as [En teredIntoF ileDateTra nsformSID]
  13006               ,a.[ EmergencyR esponseInd icator]
  13007               ,a.[ Eligibilit ySID]
  13008               ,a.[ Eligibilit y]
  13009               ,a.[ Eligibilit yVACode]
  13010               ,a.B irthDateTi me as [Dat eOfBirth]
  13011               ,nul l as [Date OfBirthTex t]
  13012               ,a.[ SensitiveF lag]
  13013               ,p.S erviceEntr yDateTime  as [LastSe rviceEntry Date]
  13014               ,p.S erviceEntr yVistaErro rDate as [ LastServic eEntryVist aErrorDate ]
  13015               ,p.S erviceEntr yDateTimeT ransformSI D as [Last ServiceEnt ryDateTran sformSID]
  13016               ,p.S erviceSepa rationDate Time as [L astService Separation Date]
  13017               ,p.S erviceSepa rationDate TimeVistaE rrorDate a s [LastSer viceSepara tionVistaE rrorDate]
  13018               ,p.S erviceSepa rationDate TimeTransf ormSID as  [LastServi ceSeparati onDateTran sformSID]
  13019               ,a.[ PreferredI nstitution SID]
  13020               ,o.P OWStatusCo de as [POW Flag]
  13021               ,o.[ POWLocatio nSID]
  13022               ,o.P OWStartDat eTime as [ POWFromVis taDate]
  13023               ,o.P OWEndDateT ime as [PO WToVistaDa te]
  13024               ,o.C ombatServi ceStartDat eTime as [ CombatFrom VistaDate]
  13025               ,o.C ombatServi ceEndDateT ime as [Co mbatToVist aDate]
  13026               ,o.[ ClaimNumbe r]
  13027               ,nul l as [Room BedSID]
  13028               ,a.I neligibleD ateTime as  [Ineligib leDate]
  13029               ,a.[ Ineligible VistaError Date]
  13030               ,a.I neligibleD ateTimeTra nsformSID  as [Inelig ibleDateTr ansformSID ]
  13031               ,a.[ Ineligible Reason]
  13032               ,a.[ Eligibilit yStatus]
  13033               ,a.[ Eligibilit yVerificat ionSource]
  13034               ,b.[ GISLocator Name]
  13035               ,b.[ GISMatchSt atusCode]
  13036               ,b.[ GISMatchSc ore]
  13037               ,b.[ GISMatchMe thodCode]
  13038               ,b.[ GISMatched Address]
  13039               ,b.[ GISAddress Type]
  13040               ,b.[ GISStreetS ide]
  13041               ,b.[ GISPatient AddressLon gitude]
  13042               ,b.[ GISPatient AddressLat itude]
  13043               ,b.[ GISAddress UpdatedDat e]
  13044               ,b.[ GISFIPSCod e]
  13045               ,b.[ GISMarket]
  13046               ,b.[ GISSubmark et]
  13047               ,b.[ GISSector]
  13048               ,b.[ GISURH]
  13049               ,b.[ GISCongres sDistrict]
  13050            FROM  C DWWork.SPa tient.SPat ient a 
  13051            Left jo in CDWWork .SPatient. SPatientAd dress b on  a.Patient SID = b.Pa tientSID a nd b.Ordin alNumber =  13
  13052            left jo in CDWWork .Spatient. SpatientPh one c on a .PatientSI D = c.Pati entSID and  c.Ordinal Number = 1 3
  13053            left jo in CDWWork .Spatient. SpatientPh one d on a .PatientSI D = d.Pati entSID and  d.Ordinal Number = 9
  13054            left jo in CDWWork .Spatient. SpatientPh one e on a .PatientSI D = e.Pati entSID and  e.Ordinal Number = 1 4
  13055            left jo in CDWWork .Spatient. PlaceOfBir th f on a. PatientSID  = f.Patie ntSID
  13056            left jo in CDWWork .Spatient. SpatientPh one h on a .PatientSI D = h.Pati entSID and  h.Ordinal Number = 1 6
  13057            left jo in CDWWork .Spatient. SpatientAd dress i on  a.Patient SID = i.Pa tientSID a nd i.Ordin alNumber =  2
  13058            left jo in CDWWork .Spatient. SpatientAd dress j on  a.Patient SID = j.Pa tientSID a nd j.Ordin alNumber =  3
  13059            left jo in CDWWork .Spatient. SpatientAd dress k on  a.Patient SID = k.Pa tientSID a nd k.Ordin alNumber =  4
  13060            Left jo in CDWWork .Patient.C atastrophi cDisabilit yHistory l  on a.Pati entSID = l .PatientSI D
  13061            Left jo in CDWWork .Patient.P urpleHeart  m on a.Pa tientSID =  m.Patient SID
  13062            left jo in CDWWork .Patsub.Pa tientRace  n on a.Pat ientSID =  n.PatientS ID
  13063            Left jo in CDWWork .Spatient. SPatientDi sability o  on a.Pati entSID = o .PatientSI D
  13064            Left jo in CDWWork .Spatient. MilitarySe rviceEpiso deLegacy p  on a.Pati entSID = p .PatientSI D and p.Or dinalNumbe r = 1
  13065                 WH ERE
  13066                          a.Pa tientSid=  @pid
  13067                          AND  patientnam e <>'*Unkn own at thi s time*'
  13068                          AND  patientnam e is not n ull;
  13069        
  13070         END;]]>
  13071        </Value>
  13072                                  
  13073       </Property >
  13074                                 
  13075       <Property 
  13076        Name="IsAn siNullsOn"  
  13077        Value="Tru e" 
  13078       />
  13079                                 
  13080       <Relations hip 
  13081        Name="Body Dependenci es"
  13082       >
  13083                                           
  13084        <Entry>
  13085                                                    
  13086         <Reference
  13087          ExternalSo urce="CDWW ork.dacpac
  13088          Name="[CDW Work]|[SPa tient].[SP atient]" 
  13089         />
  13090                                            
  13091        </Entry>
  13092                                           
  13093        <Entry>
  13094                                                    
  13095         <Reference
  13096          ExternalSo urce="CDWW ork.dacpac
  13097          Name="[CDW Work]|[SPa tient].[SP atientAddr ess]" 
  13098         />
  13099                                            
  13100        </Entry>
  13101                                           
  13102        <Entry>
  13103                                                    
  13104         <Reference
  13105          ExternalSo urce="CDWW ork.dacpac
  13106          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  13107         />
  13108                                            
  13109        </Entry>
  13110                                           
  13111        <Entry>
  13112                                                    
  13113         <Reference
  13114          ExternalSo urce="CDWW ork.dacpac
  13115          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Pati entSID]" 
  13116         />
  13117                                            
  13118        </Entry>
  13119                                           
  13120        <Entry>
  13121                                                    
  13122         <Reference
  13123          ExternalSo urce="CDWW ork.dacpac
  13124          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Ordi nalNumber]
  13125         />
  13126                                            
  13127        </Entry>
  13128                                           
  13129        <Entry>
  13130                                                    
  13131         <Reference
  13132          ExternalSo urce="CDWW ork.dacpac
  13133          Name="[CDW Work]|[SPa tient].[SP atientPhon e]" 
  13134         />
  13135                                            
  13136        </Entry>
  13137                                           
  13138        <Entry>
  13139                                                    
  13140         <Reference
  13141          ExternalSo urce="CDWW ork.dacpac
  13142          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  13143         />
  13144                                            
  13145        </Entry>
  13146                                           
  13147        <Entry>
  13148                                                    
  13149         <Reference
  13150          ExternalSo urce="CDWW ork.dacpac
  13151          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Patien tSID]" 
  13152         />
  13153                                            
  13154        </Entry>
  13155                                           
  13156        <Entry>
  13157                                                    
  13158         <Reference
  13159          ExternalSo urce="CDWW ork.dacpac
  13160          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Ordina lNumber]" 
  13161         />
  13162                                            
  13163        </Entry>
  13164                                           
  13165        <Entry>
  13166                                                    
  13167         <Reference
  13168          ExternalSo urce="CDWW ork.dacpac
  13169          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Patien tSID]" 
  13170         />
  13171                                            
  13172        </Entry>
  13173                                           
  13174        <Entry>
  13175                                                    
  13176         <Reference
  13177          ExternalSo urce="CDWW ork.dacpac
  13178          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Ordina lNumber]" 
  13179         />
  13180                                            
  13181        </Entry>
  13182                                           
  13183        <Entry>
  13184                                                    
  13185         <Reference
  13186          ExternalSo urce="CDWW ork.dacpac
  13187          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Patien tSID]" 
  13188         />
  13189                                            
  13190        </Entry>
  13191                                           
  13192        <Entry>
  13193                                                    
  13194         <Reference
  13195          ExternalSo urce="CDWW ork.dacpac
  13196          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Ordina lNumber]" 
  13197         />
  13198                                            
  13199        </Entry>
  13200                                           
  13201        <Entry>
  13202                                                    
  13203         <Reference
  13204          ExternalSo urce="CDWW ork.dacpac
  13205          Name="[CDW Work]|[SPa tient].[Pl aceOfBirth ]" 
  13206         />
  13207                                            
  13208        </Entry>
  13209                                           
  13210        <Entry>
  13211                                                    
  13212         <Reference
  13213          ExternalSo urce="CDWW ork.dacpac
  13214          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  13215         />
  13216                                            
  13217        </Entry>
  13218                                           
  13219        <Entry>
  13220                                                    
  13221         <Reference
  13222          ExternalSo urce="CDWW ork.dacpac
  13223          Name="[CDW Work]|[SPa tient].[Pl aceOfBirth ].[Patient SID]" 
  13224         />
  13225                                            
  13226        </Entry>
  13227                                           
  13228        <Entry>
  13229                                                    
  13230         <Reference
  13231          ExternalSo urce="CDWW ork.dacpac
  13232          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Patien tSID]" 
  13233         />
  13234                                            
  13235        </Entry>
  13236                                           
  13237        <Entry>
  13238                                                    
  13239         <Reference
  13240          ExternalSo urce="CDWW ork.dacpac
  13241          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[Ordina lNumber]" 
  13242         />
  13243                                            
  13244        </Entry>
  13245                                           
  13246        <Entry>
  13247                                                    
  13248         <Reference
  13249          ExternalSo urce="CDWW ork.dacpac
  13250          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Pati entSID]" 
  13251         />
  13252                                            
  13253        </Entry>
  13254                                           
  13255        <Entry>
  13256                                                    
  13257         <Reference
  13258          ExternalSo urce="CDWW ork.dacpac
  13259          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Ordi nalNumber]
  13260         />
  13261                                            
  13262        </Entry>
  13263                                           
  13264        <Entry>
  13265                                                    
  13266         <Reference
  13267          ExternalSo urce="CDWW ork.dacpac
  13268          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Pati entSID]" 
  13269         />
  13270                                            
  13271        </Entry>
  13272                                           
  13273        <Entry>
  13274                                                    
  13275         <Reference
  13276          ExternalSo urce="CDWW ork.dacpac
  13277          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Ordi nalNumber]
  13278         />
  13279                                            
  13280        </Entry>
  13281                                           
  13282        <Entry>
  13283                                                    
  13284         <Reference
  13285          ExternalSo urce="CDWW ork.dacpac
  13286          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Pati entSID]" 
  13287         />
  13288                                            
  13289        </Entry>
  13290                                           
  13291        <Entry>
  13292                                                    
  13293         <Reference
  13294          ExternalSo urce="CDWW ork.dacpac
  13295          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Ordi nalNumber]
  13296         />
  13297                                            
  13298        </Entry>
  13299                                           
  13300        <Entry>
  13301                                                    
  13302         <Reference
  13303          ExternalSo urce="CDWW ork.dacpac
  13304          Name="[CDW Work]|[Pat ient].[Cat astrophicD isabilityH istory]" 
  13305         />
  13306                                            
  13307        </Entry>
  13308                                           
  13309        <Entry>
  13310                                                    
  13311         <Reference
  13312          ExternalSo urce="CDWW ork.dacpac
  13313          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  13314         />
  13315                                            
  13316        </Entry>
  13317                                           
  13318        <Entry>
  13319                                                    
  13320         <Reference
  13321          ExternalSo urce="CDWW ork.dacpac
  13322          Name="[CDW Work]|[Pat ient].[Cat astrophicD isabilityH istory].[P atientSID]
  13323         />
  13324                                            
  13325        </Entry>
  13326                                           
  13327        <Entry>
  13328                                                    
  13329         <Reference
  13330          ExternalSo urce="CDWW ork.dacpac
  13331          Name="[CDW Work]|[Pat ient].[Pur pleHeart]"  
  13332         />
  13333                                            
  13334        </Entry>
  13335                                           
  13336        <Entry>
  13337                                                    
  13338         <Reference
  13339          ExternalSo urce="CDWW ork.dacpac
  13340          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  13341         />
  13342                                            
  13343        </Entry>
  13344                                           
  13345        <Entry>
  13346                                                    
  13347         <Reference
  13348          ExternalSo urce="CDWW ork.dacpac
  13349          Name="[CDW Work]|[Pat ient].[Pur pleHeart]. [PatientSI D]" 
  13350         />
  13351                                            
  13352        </Entry>
  13353                                           
  13354        <Entry>
  13355                                                    
  13356         <Reference
  13357          ExternalSo urce="CDWW ork.dacpac
  13358          Name="[CDW Work]|[Pat Sub].[Pati entRace]" 
  13359         />
  13360                                            
  13361        </Entry>
  13362                                           
  13363        <Entry>
  13364                                                    
  13365         <Reference
  13366          ExternalSo urce="CDWW ork.dacpac
  13367          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  13368         />
  13369                                            
  13370        </Entry>
  13371                                           
  13372        <Entry>
  13373                                                    
  13374         <Reference
  13375          ExternalSo urce="CDWW ork.dacpac
  13376          Name="[CDW Work]|[Pat Sub].[Pati entRace].[ PatientSID ]" 
  13377         />
  13378                                            
  13379        </Entry>
  13380                                           
  13381        <Entry>
  13382                                                    
  13383         <Reference
  13384          ExternalSo urce="CDWW ork.dacpac
  13385          Name="[CDW Work]|[SPa tient].[SP atientDisa bility]" 
  13386         />
  13387                                            
  13388        </Entry>
  13389                                           
  13390        <Entry>
  13391                                                    
  13392         <Reference
  13393          ExternalSo urce="CDWW ork.dacpac
  13394          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  13395         />
  13396                                            
  13397        </Entry>
  13398                                           
  13399        <Entry>
  13400                                                    
  13401         <Reference
  13402          ExternalSo urce="CDWW ork.dacpac
  13403          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[P atientSID]
  13404         />
  13405                                            
  13406        </Entry>
  13407                                           
  13408        <Entry>
  13409                                                    
  13410         <Reference
  13411          ExternalSo urce="CDWW ork.dacpac
  13412          Name="[CDW Work]|[SPa tient].[Mi litaryServ iceEpisode Legacy]" 
  13413         />
  13414                                            
  13415        </Entry>
  13416                                           
  13417        <Entry>
  13418                                                    
  13419         <Reference
  13420          ExternalSo urce="CDWW ork.dacpac
  13421          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  13422         />
  13423                                            
  13424        </Entry>
  13425                                           
  13426        <Entry>
  13427                                                    
  13428         <Reference
  13429          ExternalSo urce="CDWW ork.dacpac
  13430          Name="[CDW Work]|[SPa tient].[Mi litaryServ iceEpisode Legacy].[P atientSID]
  13431         />
  13432                                            
  13433        </Entry>
  13434                                           
  13435        <Entry>
  13436                                                    
  13437         <Reference
  13438          ExternalSo urce="CDWW ork.dacpac
  13439          Name="[CDW Work]|[SPa tient].[Mi litaryServ iceEpisode Legacy].[O rdinalNumb er]" 
  13440         />
  13441                                            
  13442        </Entry>
  13443                                           
  13444        <Entry>
  13445                                                    
  13446         <Reference
  13447          ExternalSo urce="CDWW ork.dacpac
  13448          Name="[CDW Work]|[SPa tient].[SP atient].[P atientIEN]
  13449         />
  13450                                            
  13451        </Entry>
  13452                                           
  13453        <Entry>
  13454                                                    
  13455         <Reference
  13456          ExternalSo urce="CDWW ork.dacpac
  13457          Name="[CDW Work]|[SPa tient].[SP atient].[S ta3n]" 
  13458         />
  13459                                            
  13460        </Entry>
  13461                                           
  13462        <Entry>
  13463                                                    
  13464         <Reference
  13465          ExternalSo urce="CDWW ork.dacpac
  13466          Name="[CDW Work]|[SPa tient].[SP atient].[P atientName ]" 
  13467         />
  13468                                            
  13469        </Entry>
  13470                                           
  13471        <Entry>
  13472                                                    
  13473         <Reference
  13474          ExternalSo urce="CDWW ork.dacpac
  13475          Name="[CDW Work]|[SPa tient].[SP atient].[P atientLast Name]" 
  13476         />
  13477                                            
  13478        </Entry>
  13479                                           
  13480        <Entry>
  13481                                                    
  13482         <Reference
  13483          ExternalSo urce="CDWW ork.dacpac
  13484          Name="[CDW Work]|[SPa tient].[SP atient].[P atientFirs tName]" 
  13485         />
  13486                                            
  13487        </Entry>
  13488                                           
  13489        <Entry>
  13490                                                    
  13491         <Reference
  13492          ExternalSo urce="CDWW ork.dacpac
  13493          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSSN]
  13494         />
  13495                                            
  13496        </Entry>
  13497                                           
  13498        <Entry>
  13499                                                    
  13500         <Reference
  13501          ExternalSo urce="CDWW ork.dacpac
  13502          Name="[CDW Work]|[SPa tient].[SP atient].[S crSSN]" 
  13503         />
  13504                                            
  13505        </Entry>
  13506                                           
  13507        <Entry>
  13508                                                    
  13509         <Reference
  13510          ExternalSo urce="CDWW ork.dacpac
  13511          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stre etAddress1 ]" 
  13512         />
  13513                                            
  13514        </Entry>
  13515                                           
  13516        <Entry>
  13517                                                    
  13518         <Reference
  13519          ExternalSo urce="CDWW ork.dacpac
  13520          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stre etAddress2 ]" 
  13521         />
  13522                                            
  13523        </Entry>
  13524                                           
  13525        <Entry>
  13526                                                    
  13527         <Reference
  13528          ExternalSo urce="CDWW ork.dacpac
  13529          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stre etAddress3 ]" 
  13530         />
  13531                                            
  13532        </Entry>
  13533                                           
  13534        <Entry>
  13535                                                    
  13536         <Reference
  13537          ExternalSo urce="CDWW ork.dacpac
  13538          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[City ]" 
  13539         />
  13540                                            
  13541        </Entry>
  13542                                           
  13543        <Entry>
  13544                                                    
  13545         <Reference
  13546          ExternalSo urce="CDWW ork.dacpac
  13547          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Zip]
  13548         />
  13549                                            
  13550        </Entry>
  13551                                           
  13552        <Entry>
  13553                                                    
  13554         <Reference
  13555          ExternalSo urce="CDWW ork.dacpac
  13556          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Zip4 ]" 
  13557         />
  13558                                            
  13559        </Entry>
  13560                                           
  13561        <Entry>
  13562                                                    
  13563         <Reference
  13564          ExternalSo urce="CDWW ork.dacpac
  13565          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Post alCode]" 
  13566         />
  13567                                            
  13568        </Entry>
  13569                                           
  13570        <Entry>
  13571                                                    
  13572         <Reference
  13573          ExternalSo urce="CDWW ork.dacpac
  13574          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Prov ince]" 
  13575         />
  13576                                            
  13577        </Entry>
  13578                                           
  13579        <Entry>
  13580                                                    
  13581         <Reference
  13582          ExternalSo urce="CDWW ork.dacpac
  13583          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Coun try]" 
  13584         />
  13585                                            
  13586        </Entry>
  13587                                           
  13588        <Entry>
  13589                                                    
  13590         <Reference
  13591          ExternalSo urce="CDWW ork.dacpac
  13592          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[PhoneN umber]" 
  13593         />
  13594                                            
  13595        </Entry>
  13596                                           
  13597        <Entry>
  13598                                                    
  13599         <Reference
  13600          ExternalSo urce="CDWW ork.dacpac
  13601          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[WorkPh oneNumber]
  13602         />
  13603                                            
  13604        </Entry>
  13605                                           
  13606        <Entry>
  13607                                                    
  13608         <Reference
  13609          ExternalSo urce="CDWW ork.dacpac
  13610          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[PhoneN umber]" 
  13611         />
  13612                                            
  13613        </Entry>
  13614                                           
  13615        <Entry>
  13616                                                    
  13617         <Reference
  13618          ExternalSo urce="CDWW ork.dacpac
  13619          Name="[CDW Work]|[SPa tient].[Pl aceOfBirth ].[MotherM aidenName]
  13620         />
  13621                                            
  13622        </Entry>
  13623                                           
  13624        <Entry>
  13625                                                    
  13626         <Reference
  13627          ExternalSo urce="CDWW ork.dacpac
  13628          Name="[CDW Work]|[SPa tient].[SP atient].[D eathDateTi me]" 
  13629         />
  13630                                            
  13631        </Entry>
  13632                                           
  13633        <Entry>
  13634                                                    
  13635         <Reference
  13636          ExternalSo urce="CDWW ork.dacpac
  13637          Name="[CDW Work]|[SPa tient].[SP atientPhon e].[EmailA ddress]" 
  13638         />
  13639                                            
  13640        </Entry>
  13641                                           
  13642        <Entry>
  13643                                                    
  13644         <Reference
  13645          ExternalSo urce="CDWW ork.dacpac
  13646          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[BadA ddressIndi cator]" 
  13647         />
  13648                                            
  13649        </Entry>
  13650                                           
  13651        <Entry>
  13652                                                    
  13653         <Reference
  13654          ExternalSo urce="CDWW ork.dacpac
  13655          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeI nstitution SID]" 
  13656         />
  13657                                            
  13658        </Entry>
  13659                                           
  13660        <Entry>
  13661                                                    
  13662         <Reference
  13663          ExternalSo urce="CDWW ork.dacpac
  13664          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeS taffSID]" 
  13665         />
  13666                                            
  13667        </Entry>
  13668                                           
  13669        <Entry>
  13670                                                    
  13671         <Reference
  13672          ExternalSo urce="CDWW ork.dacpac
  13673          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeD ateTime]" 
  13674         />
  13675                                            
  13676        </Entry>
  13677                                           
  13678        <Entry>
  13679                                                    
  13680         <Reference
  13681          ExternalSo urce="CDWW ork.dacpac
  13682          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeV istaErrorD ate]" 
  13683         />
  13684                                            
  13685        </Entry>
  13686                                           
  13687        <Entry>
  13688                                                    
  13689         <Reference
  13690          ExternalSo urce="CDWW ork.dacpac
  13691          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeD ateTimeTra nsformSID]
  13692         />
  13693                                            
  13694        </Entry>
  13695                                           
  13696        <Entry>
  13697                                                    
  13698         <Reference
  13699          ExternalSo urce="CDWW ork.dacpac
  13700          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeD ateTime]" 
  13701         />
  13702                                            
  13703        </Entry>
  13704                                           
  13705        <Entry>
  13706                                                    
  13707         <Reference
  13708          ExternalSo urce="CDWW ork.dacpac
  13709          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeV istaErrorD ate]" 
  13710         />
  13711                                            
  13712        </Entry>
  13713                                           
  13714        <Entry>
  13715                                                    
  13716         <Reference
  13717          ExternalSo urce="CDWW ork.dacpac
  13718          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeD ateTimeTra nsformSID]
  13719         />
  13720                                            
  13721        </Entry>
  13722                                           
  13723        <Entry>
  13724                                                    
  13725         <Reference
  13726          ExternalSo urce="CDWW ork.dacpac
  13727          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Name OfContact]
  13728         />
  13729                                            
  13730        </Entry>
  13731                                           
  13732        <Entry>
  13733                                                    
  13734         <Reference
  13735          ExternalSo urce="CDWW ork.dacpac
  13736          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeD ateTime]" 
  13737         />
  13738                                            
  13739        </Entry>
  13740                                           
  13741        <Entry>
  13742                                                    
  13743         <Reference
  13744          ExternalSo urce="CDWW ork.dacpac
  13745          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeV istaErrorD ate]" 
  13746         />
  13747                                            
  13748        </Entry>
  13749                                           
  13750        <Entry>
  13751                                                    
  13752         <Reference
  13753          ExternalSo urce="CDWW ork.dacpac
  13754          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeD ateTimeTra nsformSID]
  13755         />
  13756                                            
  13757        </Entry>
  13758                                           
  13759        <Entry>
  13760                                                    
  13761         <Reference
  13762          ExternalSo urce="CDWW ork.dacpac
  13763          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essChangeI nstitution SID]" 
  13764         />
  13765                                            
  13766        </Entry>
  13767                                           
  13768        <Entry>
  13769                                                    
  13770         <Reference
  13771          ExternalSo urce="CDWW ork.dacpac
  13772          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essStartDa teTime]" 
  13773         />
  13774                                            
  13775        </Entry>
  13776                                           
  13777        <Entry>
  13778                                                    
  13779         <Reference
  13780          ExternalSo urce="CDWW ork.dacpac
  13781          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essStartVi staErrorDa te]" 
  13782         />
  13783                                            
  13784        </Entry>
  13785                                           
  13786        <Entry>
  13787                                                    
  13788         <Reference
  13789          ExternalSo urce="CDWW ork.dacpac
  13790          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essStartDa teTimeTran sformSID]"  
  13791         />
  13792                                            
  13793        </Entry>
  13794                                           
  13795        <Entry>
  13796                                                    
  13797         <Reference
  13798          ExternalSo urce="CDWW ork.dacpac
  13799          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essEndDate Time]" 
  13800         />
  13801                                            
  13802        </Entry>
  13803                                           
  13804        <Entry>
  13805                                                    
  13806         <Reference
  13807          ExternalSo urce="CDWW ork.dacpac
  13808          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essEndVist aErrorDate ]" 
  13809         />
  13810                                            
  13811        </Entry>
  13812                                           
  13813        <Entry>
  13814                                                    
  13815         <Reference
  13816          ExternalSo urce="CDWW ork.dacpac
  13817          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Addr essEndDate TimeTransf ormSID]" 
  13818         />
  13819                                            
  13820        </Entry>
  13821                                           
  13822        <Entry>
  13823                                                    
  13824         <Reference
  13825          ExternalSo urce="CDWW ork.dacpac
  13826          Name="[CDW Work]|[Pat ient].[Cat astrophicD isabilityH istory].[D ecisionDat eTime]" 
  13827         />
  13828                                            
  13829        </Entry>
  13830                                           
  13831        <Entry>
  13832                                                    
  13833         <Reference
  13834          ExternalSo urce="CDWW ork.dacpac
  13835          Name="[CDW Work]|[Pat ient].[Cat astrophicD isabilityH istory].[D ecisionVis taErrorDat e]" 
  13836         />
  13837                                            
  13838        </Entry>
  13839                                           
  13840        <Entry>
  13841                                                    
  13842         <Reference
  13843          ExternalSo urce="CDWW ork.dacpac
  13844          Name="[CDW Work]|[Pat ient].[Cat astrophicD isabilityH istory].[D ecisionDat eTimeTrans formSID]" 
  13845         />
  13846                                            
  13847        </Entry>
  13848                                           
  13849        <Entry>
  13850                                                    
  13851         <Reference
  13852          ExternalSo urce="CDWW ork.dacpac
  13853          Name="[CDW Work]|[Pat ient].[Cat astrophicD isabilityH istory].[R eviewDateT ime]" 
  13854         />
  13855                                            
  13856        </Entry>
  13857                                           
  13858        <Entry>
  13859                                                    
  13860         <Reference
  13861          ExternalSo urce="CDWW ork.dacpac
  13862          Name="[CDW Work]|[Pat ient].[Cat astrophicD isabilityH istory].[R eviewVista ErrorDate]
  13863         />
  13864                                            
  13865        </Entry>
  13866                                           
  13867        <Entry>
  13868                                                    
  13869         <Reference
  13870          ExternalSo urce="CDWW ork.dacpac
  13871          Name="[CDW Work]|[Pat ient].[Cat astrophicD isabilityH istory].[R eviewDateT imeTransfo rmSID]" 
  13872         />
  13873                                            
  13874        </Entry>
  13875                                           
  13876        <Entry>
  13877                                                    
  13878         <Reference
  13879          ExternalSo urce="CDWW ork.dacpac
  13880          Name="[CDW Work]|[Pat ient].[Cat astrophicD isabilityH istory].[D etermining Institutio nSID]" 
  13881         />
  13882                                            
  13883        </Entry>
  13884                                           
  13885        <Entry>
  13886                                                    
  13887         <Reference
  13888          ExternalSo urce="CDWW ork.dacpac
  13889          Name="[CDW Work]|[Pat ient].[Cat astrophicD isabilityH istory].[M ethodOfDet ermination ]" 
  13890         />
  13891                                            
  13892        </Entry>
  13893                                           
  13894        <Entry>
  13895                                                    
  13896         <Reference
  13897          ExternalSo urce="CDWW ork.dacpac
  13898          Name="[CDW Work]|[Pat ient].[Pur pleHeart]. [PurpleHea rtStatus]"  
  13899         />
  13900                                            
  13901        </Entry>
  13902                                           
  13903        <Entry>
  13904                                                    
  13905         <Reference
  13906          ExternalSo urce="CDWW ork.dacpac
  13907          Name="[CDW Work]|[SPa tient].[SP atient].[M edicaidNum ber]" 
  13908         />
  13909                                            
  13910        </Entry>
  13911                                           
  13912        <Entry>
  13913                                                    
  13914         <Reference
  13915          ExternalSo urce="CDWW ork.dacpac
  13916          Name="[CDW Work]|[Pat Sub].[Pati entRace].[ LegacyRace SID]" 
  13917         />
  13918                                            
  13919        </Entry>
  13920                                           
  13921        <Entry>
  13922                                                    
  13923         <Reference
  13924          ExternalSo urce="CDWW ork.dacpac
  13925          Name="[CDW Work]|[SPa tient].[SP atient].[G ender]" 
  13926         />
  13927                                            
  13928        </Entry>
  13929                                           
  13930        <Entry>
  13931                                                    
  13932         <Reference
  13933          ExternalSo urce="CDWW ork.dacpac
  13934          Name="[CDW Work]|[SPa tient].[SP atient].[A ge]" 
  13935         />
  13936                                            
  13937        </Entry>
  13938                                           
  13939        <Entry>
  13940                                                    
  13941         <Reference
  13942          ExternalSo urce="CDWW ork.dacpac
  13943          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stat eSID]" 
  13944         />
  13945                                            
  13946        </Entry>
  13947                                           
  13948        <Entry>
  13949                                                    
  13950         <Reference
  13951          ExternalSo urce="CDWW ork.dacpac
  13952          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Stat e]" 
  13953         />
  13954                                            
  13955        </Entry>
  13956                                           
  13957        <Entry>
  13958                                                    
  13959         <Reference
  13960          ExternalSo urce="CDWW ork.dacpac
  13961          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[Coun ty]" 
  13962         />
  13963                                            
  13964        </Entry>
  13965                                           
  13966        <Entry>
  13967                                                    
  13968         <Reference
  13969          ExternalSo urce="CDWW ork.dacpac
  13970          Name="[CDW Work]|[SPa tient].[SP atient].[D eceasedFla g]" 
  13971         />
  13972                                            
  13973        </Entry>
  13974                                           
  13975        <Entry>
  13976                                                    
  13977         <Reference
  13978          ExternalSo urce="CDWW ork.dacpac
  13979          Name="[CDW Work]|[SPa tient].[SP atient].[P atientICN]
  13980         />
  13981                                            
  13982        </Entry>
  13983                                           
  13984        <Entry>
  13985                                                    
  13986         <Reference
  13987          ExternalSo urce="CDWW ork.dacpac
  13988          Name="[CDW Work]|[SPa tient].[SP atient].[P seudoSSNRe ason]" 
  13989         />
  13990                                            
  13991        </Entry>
  13992                                           
  13993        <Entry>
  13994                                                    
  13995         <Reference
  13996          ExternalSo urce="CDWW ork.dacpac
  13997          Name="[CDW Work]|[SPa tient].[SP atient].[P seudoSSNRe ason]" 
  13998         />
  13999                                            
  14000        </Entry>
  14001                                           
  14002        <Entry>
  14003                                                    
  14004         <Reference
  14005          ExternalSo urce="CDWW ork.dacpac
  14006          Name="[CDW Work]|[SPa tient].[SP atient].[P eriodOfSer vice]" 
  14007         />
  14008                                            
  14009        </Entry>
  14010                                           
  14011        <Entry>
  14012                                                    
  14013         <Reference
  14014          ExternalSo urce="CDWW ork.dacpac
  14015          Name="[CDW Work]|[SPa tient].[SP atient].[C urrentMean sTestStatu sSID]" 
  14016         />
  14017                                            
  14018        </Entry>
  14019                                           
  14020        <Entry>
  14021                                                    
  14022         <Reference
  14023          ExternalSo urce="CDWW ork.dacpac
  14024          Name="[CDW Work]|[SPa tient].[SP atient].[M aritalStat usSID]" 
  14025         />
  14026                                            
  14027        </Entry>
  14028                                           
  14029        <Entry>
  14030                                                    
  14031         <Reference
  14032          ExternalSo urce="CDWW ork.dacpac
  14033          Name="[CDW Work]|[SPa tient].[SP atient].[M aritalStat us]" 
  14034         />
  14035                                            
  14036        </Entry>
  14037                                           
  14038        <Entry>
  14039                                                    
  14040         <Reference
  14041          ExternalSo urce="CDWW ork.dacpac
  14042          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[S erviceConn ectedPerce nt]" 
  14043         />
  14044                                            
  14045        </Entry>
  14046                                           
  14047        <Entry>
  14048                                                    
  14049         <Reference
  14050          ExternalSo urce="CDWW ork.dacpac
  14051          Name="[CDW Work]|[SPa tient].[SP atient].[I nsuranceCo verageFlag ]" 
  14052         />
  14053                                            
  14054        </Entry>
  14055                                           
  14056        <Entry>
  14057                                                    
  14058         <Reference
  14059          ExternalSo urce="CDWW ork.dacpac
  14060          Name="[CDW Work]|[SPa tient].[SP atient].[R eligionSID ]" 
  14061         />
  14062                                            
  14063        </Entry>
  14064                                           
  14065        <Entry>
  14066                                                    
  14067         <Reference
  14068          ExternalSo urce="CDWW ork.dacpac
  14069          Name="[CDW Work]|[SPa tient].[SP atient].[R eligion]" 
  14070         />
  14071                                            
  14072        </Entry>
  14073                                           
  14074        <Entry>
  14075                                                    
  14076         <Reference
  14077          ExternalSo urce="CDWW ork.dacpac
  14078          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[A gentOrange ExposureCo de]" 
  14079         />
  14080                                            
  14081        </Entry>
  14082                                           
  14083        <Entry>
  14084                                                    
  14085         <Reference
  14086          ExternalSo urce="CDWW ork.dacpac
  14087          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[A gentOrange Location]"  
  14088         />
  14089                                            
  14090        </Entry>
  14091                                           
  14092        <Entry>
  14093                                                    
  14094         <Reference
  14095          ExternalSo urce="CDWW ork.dacpac
  14096          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[I onizingRad iationCode ]" 
  14097         />
  14098                                            
  14099        </Entry>
  14100                                           
  14101        <Entry>
  14102                                                    
  14103         <Reference
  14104          ExternalSo urce="CDWW ork.dacpac
  14105          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[I onizingRad iationExpo sureCode]"  
  14106         />
  14107                                            
  14108        </Entry>
  14109                                           
  14110        <Entry>
  14111                                                    
  14112         <Reference
  14113          ExternalSo urce="CDWW ork.dacpac
  14114          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[S HADFlag]" 
  14115         />
  14116                                            
  14117        </Entry>
  14118                                           
  14119        <Entry>
  14120                                                    
  14121         <Reference
  14122          ExternalSo urce="CDWW ork.dacpac
  14123          Name="[CDW Work]|[SPa tient].[SP atient].[V eteranFlag ]" 
  14124         />
  14125                                            
  14126        </Entry>
  14127                                           
  14128        <Entry>
  14129                                                    
  14130         <Reference
  14131          ExternalSo urce="CDWW ork.dacpac
  14132          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[C ombatServi ceFlag]" 
  14133         />
  14134                                            
  14135        </Entry>
  14136                                           
  14137        <Entry>
  14138                                                    
  14139         <Reference
  14140          ExternalSo urce="CDWW ork.dacpac
  14141          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[C ombatEligi bilityEndD ateTime]" 
  14142         />
  14143                                            
  14144        </Entry>
  14145                                           
  14146        <Entry>
  14147                                                    
  14148         <Reference
  14149          ExternalSo urce="CDWW ork.dacpac
  14150          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[C ombatEligi bilityEndV istaErrorD ate]" 
  14151         />
  14152                                            
  14153        </Entry>
  14154                                           
  14155        <Entry>
  14156                                                    
  14157         <Reference
  14158          ExternalSo urce="CDWW ork.dacpac
  14159          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[C ombatEligi bilityEndD ateTimeTra nsformSID]
  14160         />
  14161                                            
  14162        </Entry>
  14163                                           
  14164        <Entry>
  14165                                                    
  14166         <Reference
  14167          ExternalSo urce="CDWW ork.dacpac
  14168          Name="[CDW Work]|[SPa tient].[SP atient].[T estPatient Flag]" 
  14169         />
  14170                                            
  14171        </Entry>
  14172                                           
  14173        <Entry>
  14174                                                    
  14175         <Reference
  14176          ExternalSo urce="CDWW ork.dacpac
  14177          Name="[CDW Work]|[SPa tient].[SP atient].[C DWPossible TestPatien tFlag]" 
  14178         />
  14179                                            
  14180        </Entry>
  14181                                           
  14182        <Entry>
  14183                                                    
  14184         <Reference
  14185          ExternalSo urce="CDWW ork.dacpac
  14186          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[S pinalCordI njuryCode]
  14187         />
  14188                                            
  14189        </Entry>
  14190                                           
  14191        <Entry>
  14192                                                    
  14193         <Reference
  14194          ExternalSo urce="CDWW ork.dacpac
  14195          Name="[CDW Work]|[SPa tient].[SP atient].[P atientEnte redDateTim e]" 
  14196         />
  14197                                            
  14198        </Entry>
  14199                                           
  14200        <Entry>
  14201                                                    
  14202         <Reference
  14203          ExternalSo urce="CDWW ork.dacpac
  14204          Name="[CDW Work]|[SPa tient].[SP atient].[P atientEnte redVistaEr rorDate]" 
  14205         />
  14206                                            
  14207        </Entry>
  14208                                           
  14209        <Entry>
  14210                                                    
  14211         <Reference
  14212          ExternalSo urce="CDWW ork.dacpac
  14213          Name="[CDW Work]|[SPa tient].[SP atient].[P atientEnte redDateTim eTransform SID]" 
  14214         />
  14215                                            
  14216        </Entry>
  14217                                           
  14218        <Entry>
  14219                                                    
  14220         <Reference
  14221          ExternalSo urce="CDWW ork.dacpac
  14222          Name="[CDW Work]|[SPa tient].[SP atient].[E mergencyRe sponseIndi cator]" 
  14223         />
  14224                                            
  14225        </Entry>
  14226                                           
  14227        <Entry>
  14228                                                    
  14229         <Reference
  14230          ExternalSo urce="CDWW ork.dacpac
  14231          Name="[CDW Work]|[SPa tient].[SP atient].[E ligibility SID]" 
  14232         />
  14233                                            
  14234        </Entry>
  14235                                           
  14236        <Entry>
  14237                                                    
  14238         <Reference
  14239          ExternalSo urce="CDWW ork.dacpac
  14240          Name="[CDW Work]|[SPa tient].[SP atient].[E ligibility ]" 
  14241         />
  14242                                            
  14243        </Entry>
  14244                                           
  14245        <Entry>
  14246                                                    
  14247         <Reference
  14248          ExternalSo urce="CDWW ork.dacpac
  14249          Name="[CDW Work]|[SPa tient].[SP atient].[E ligibility VACode]" 
  14250         />
  14251                                            
  14252        </Entry>
  14253                                           
  14254        <Entry>
  14255                                                    
  14256         <Reference
  14257          ExternalSo urce="CDWW ork.dacpac
  14258          Name="[CDW Work]|[SPa tient].[SP atient].[B irthDateTi me]" 
  14259         />
  14260                                            
  14261        </Entry>
  14262                                           
  14263        <Entry>
  14264                                                    
  14265         <Reference
  14266          ExternalSo urce="CDWW ork.dacpac
  14267          Name="[CDW Work]|[SPa tient].[SP atient].[S ensitiveFl ag]" 
  14268         />
  14269                                            
  14270        </Entry>
  14271                                           
  14272        <Entry>
  14273                                                    
  14274         <Reference
  14275          ExternalSo urce="CDWW ork.dacpac
  14276          Name="[CDW Work]|[SPa tient].[Mi litaryServ iceEpisode Legacy].[S erviceEntr yDateTime]
  14277         />
  14278                                            
  14279        </Entry>
  14280                                           
  14281        <Entry>
  14282                                                    
  14283         <Reference
  14284          ExternalSo urce="CDWW ork.dacpac
  14285          Name="[CDW Work]|[SPa tient].[Mi litaryServ iceEpisode Legacy].[S erviceEntr yVistaErro rDate]" 
  14286         />
  14287                                            
  14288        </Entry>
  14289                                           
  14290        <Entry>
  14291                                                    
  14292         <Reference
  14293          ExternalSo urce="CDWW ork.dacpac
  14294          Name="[CDW Work]|[SPa tient].[Mi litaryServ iceEpisode Legacy].[S erviceEntr yDateTimeT ransformSI D]" 
  14295         />
  14296                                            
  14297        </Entry>
  14298                                           
  14299        <Entry>
  14300                                                    
  14301         <Reference
  14302          ExternalSo urce="CDWW ork.dacpac
  14303          Name="[CDW Work]|[SPa tient].[Mi litaryServ iceEpisode Legacy].[S erviceSepa rationDate Time]" 
  14304         />
  14305                                            
  14306        </Entry>
  14307                                           
  14308        <Entry>
  14309                                                    
  14310         <Reference
  14311          ExternalSo urce="CDWW ork.dacpac
  14312          Name="[CDW Work]|[SPa tient].[Mi litaryServ iceEpisode Legacy].[S erviceSepa rationDate TimeVistaE rrorDate]"  
  14313         />
  14314                                            
  14315        </Entry>
  14316                                           
  14317        <Entry>
  14318                                                    
  14319         <Reference
  14320          ExternalSo urce="CDWW ork.dacpac
  14321          Name="[CDW Work]|[SPa tient].[Mi litaryServ iceEpisode Legacy].[S erviceSepa rationDate TimeTransf ormSID]" 
  14322         />
  14323                                            
  14324        </Entry>
  14325                                           
  14326        <Entry>
  14327                                                    
  14328         <Reference
  14329          ExternalSo urce="CDWW ork.dacpac
  14330          Name="[CDW Work]|[SPa tient].[SP atient].[P referredIn stitutionS ID]" 
  14331         />
  14332                                            
  14333        </Entry>
  14334                                           
  14335        <Entry>
  14336                                                    
  14337         <Reference
  14338          ExternalSo urce="CDWW ork.dacpac
  14339          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[P OWStatusCo de]" 
  14340         />
  14341                                            
  14342        </Entry>
  14343                                           
  14344        <Entry>
  14345                                                    
  14346         <Reference
  14347          ExternalSo urce="CDWW ork.dacpac
  14348          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[P OWLocation SID]" 
  14349         />
  14350                                            
  14351        </Entry>
  14352                                           
  14353        <Entry>
  14354                                                    
  14355         <Reference
  14356          ExternalSo urce="CDWW ork.dacpac
  14357          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[P OWStartDat eTime]" 
  14358         />
  14359                                            
  14360        </Entry>
  14361                                           
  14362        <Entry>
  14363                                                    
  14364         <Reference
  14365          ExternalSo urce="CDWW ork.dacpac
  14366          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[P OWEndDateT ime]" 
  14367         />
  14368                                            
  14369        </Entry>
  14370                                           
  14371        <Entry>
  14372                                                    
  14373         <Reference
  14374          ExternalSo urce="CDWW ork.dacpac
  14375          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[C ombatServi ceStartDat eTime]" 
  14376         />
  14377                                            
  14378        </Entry>
  14379                                           
  14380        <Entry>
  14381                                                    
  14382         <Reference
  14383          ExternalSo urce="CDWW ork.dacpac
  14384          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[C ombatServi ceEndDateT ime]" 
  14385         />
  14386                                            
  14387        </Entry>
  14388                                           
  14389        <Entry>
  14390                                                    
  14391         <Reference
  14392          ExternalSo urce="CDWW ork.dacpac
  14393          Name="[CDW Work]|[SPa tient].[SP atientDisa bility].[C laimNumber ]" 
  14394         />
  14395                                            
  14396        </Entry>
  14397                                           
  14398        <Entry>
  14399                                                    
  14400         <Reference
  14401          ExternalSo urce="CDWW ork.dacpac
  14402          Name="[CDW Work]|[SPa tient].[SP atient].[I neligibleD ateTime]" 
  14403         />
  14404                                            
  14405        </Entry>
  14406                                           
  14407        <Entry>
  14408                                                    
  14409         <Reference
  14410          ExternalSo urce="CDWW ork.dacpac
  14411          Name="[CDW Work]|[SPa tient].[SP atient].[I neligibleV istaErrorD ate]" 
  14412         />
  14413                                            
  14414        </Entry>
  14415                                           
  14416        <Entry>
  14417                                                    
  14418         <Reference
  14419          ExternalSo urce="CDWW ork.dacpac
  14420          Name="[CDW Work]|[SPa tient].[SP atient].[I neligibleD ateTimeTra nsformSID]
  14421         />
  14422                                            
  14423        </Entry>
  14424                                           
  14425        <Entry>
  14426                                                    
  14427         <Reference
  14428          ExternalSo urce="CDWW ork.dacpac
  14429          Name="[CDW Work]|[SPa tient].[SP atient].[I neligibleR eason]" 
  14430         />
  14431                                            
  14432        </Entry>
  14433                                           
  14434        <Entry>
  14435                                                    
  14436         <Reference
  14437          ExternalSo urce="CDWW ork.dacpac
  14438          Name="[CDW Work]|[SPa tient].[SP atient].[E ligibility Status]" 
  14439         />
  14440                                            
  14441        </Entry>
  14442                                           
  14443        <Entry>
  14444                                                    
  14445         <Reference
  14446          ExternalSo urce="CDWW ork.dacpac
  14447          Name="[CDW Work]|[SPa tient].[SP atient].[E ligibility Verificati onSource]"  
  14448         />
  14449                                            
  14450        </Entry>
  14451                                           
  14452        <Entry>
  14453                                                    
  14454         <Reference
  14455          ExternalSo urce="CDWW ork.dacpac
  14456          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISL ocatorName ]" 
  14457         />
  14458                                            
  14459        </Entry>
  14460                                           
  14461        <Entry>
  14462                                                    
  14463         <Reference
  14464          ExternalSo urce="CDWW ork.dacpac
  14465          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISM atchStatus Code]" 
  14466         />
  14467                                            
  14468        </Entry>
  14469                                           
  14470        <Entry>
  14471                                                    
  14472         <Reference
  14473          ExternalSo urce="CDWW ork.dacpac
  14474          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISM atchScore]
  14475         />
  14476                                            
  14477        </Entry>
  14478                                           
  14479        <Entry>
  14480                                                    
  14481         <Reference
  14482          ExternalSo urce="CDWW ork.dacpac
  14483          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISM atchMethod Code]" 
  14484         />
  14485                                            
  14486        </Entry>
  14487                                           
  14488        <Entry>
  14489                                                    
  14490         <Reference
  14491          ExternalSo urce="CDWW ork.dacpac
  14492          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISM atchedAddr ess]" 
  14493         />
  14494                                            
  14495        </Entry>
  14496                                           
  14497        <Entry>
  14498                                                    
  14499         <Reference
  14500          ExternalSo urce="CDWW ork.dacpac
  14501          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISA ddressType ]" 
  14502         />
  14503                                            
  14504        </Entry>
  14505                                           
  14506        <Entry>
  14507                                                    
  14508         <Reference
  14509          ExternalSo urce="CDWW ork.dacpac
  14510          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISS treetSide]
  14511         />
  14512                                            
  14513        </Entry>
  14514                                           
  14515        <Entry>
  14516                                                    
  14517         <Reference
  14518          ExternalSo urce="CDWW ork.dacpac
  14519          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISP atientAddr essLongitu de]" 
  14520         />
  14521                                            
  14522        </Entry>
  14523                                           
  14524        <Entry>
  14525                                                    
  14526         <Reference
  14527          ExternalSo urce="CDWW ork.dacpac
  14528          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISP atientAddr essLatitud e]" 
  14529         />
  14530                                            
  14531        </Entry>
  14532                                           
  14533        <Entry>
  14534                                                    
  14535         <Reference
  14536          ExternalSo urce="CDWW ork.dacpac
  14537          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISA ddressUpda tedDate]" 
  14538         />
  14539                                            
  14540        </Entry>
  14541                                           
  14542        <Entry>
  14543                                                    
  14544         <Reference
  14545          ExternalSo urce="CDWW ork.dacpac
  14546          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISF IPSCode]" 
  14547         />
  14548                                            
  14549        </Entry>
  14550                                           
  14551        <Entry>
  14552                                                    
  14553         <Reference
  14554          ExternalSo urce="CDWW ork.dacpac
  14555          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISM arket]" 
  14556         />
  14557                                            
  14558        </Entry>
  14559                                           
  14560        <Entry>
  14561                                                    
  14562         <Reference
  14563          ExternalSo urce="CDWW ork.dacpac
  14564          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISS ubmarket]"  
  14565         />
  14566                                            
  14567        </Entry>
  14568                                           
  14569        <Entry>
  14570                                                    
  14571         <Reference
  14572          ExternalSo urce="CDWW ork.dacpac
  14573          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISS ector]" 
  14574         />
  14575                                            
  14576        </Entry>
  14577                                           
  14578        <Entry>
  14579                                                    
  14580         <Reference
  14581          ExternalSo urce="CDWW ork.dacpac
  14582          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISU RH]" 
  14583         />
  14584                                            
  14585        </Entry>
  14586                                           
  14587        <Entry>
  14588                                                    
  14589         <Reference
  14590          ExternalSo urce="CDWW ork.dacpac
  14591          Name="[CDW Work]|[SPa tient].[SP atientAddr ess].[GISC ongressDis trict]" 
  14592         />
  14593                                            
  14594        </Entry>
  14595                                           
  14596        <Entry>
  14597                                                    
  14598         <Reference
  14599          ExternalSo urce="CDWW ork.dacpac
  14600          Name="[CDW Work]|[SPa tient].[SP atient].[P atientSID]
  14601         />
  14602                                            
  14603        </Entry>
  14604                                           
  14605        <Entry>
  14606                                                    
  14607         <Reference
  14608          Name="[App ].[NVCC_us p_GetPatie ntBySid].[ @pid]" 
  14609         />
  14610                                            
  14611        </Entry>
  14612                                           
  14613        <Entry>
  14614                                                    
  14615         <Reference
  14616          ExternalSo urce="CDWW ork.dacpac
  14617          Name="[CDW Work]|[SPa tient].[SP atient].[P atientName ]" 
  14618         />
  14619                                            
  14620        </Entry>
  14621                                  
  14622       </Relation ship>
  14623                                 
  14624       <Relations hip 
  14625        Name="Para meters"
  14626       >
  14627                                           
  14628        <Entry>
  14629                                                    
  14630         <Element 
  14631          Type="SqlS ubroutineP arameter" 
  14632          Name="[App ].[NVCC_us p_GetPatie ntBySid].[ @pid]"
  14633         >
  14634                                                              
  14635          <Relations hip 
  14636           Name="Type "
  14637          >
  14638                                                                        
  14639           <Entry>
  14640                                                                                  
  14641            <Element 
  14642             Type="SqlT ypeSpecifi er"
  14643            >
  14644                                                                                            
  14645             <Relations hip 
  14646              Name="Type "
  14647             >
  14648                                                                                                     
  14649              <Entry>
  14650                                                                                                               
  14651               <Reference
  14652                ExternalSo urce="Buil tIns" 
  14653                Name="[int ]" 
  14654               />
  14655                                                                                                      
  14656              </Entry>
  14657                                                                                             
  14658             </Relation ship>
  14659                                                                                   
  14660            </Element>
  14661                                                                         
  14662           </Entry>
  14663                                                               
  14664          </Relation ship>
  14665                                                     
  14666         </Element>
  14667                                            
  14668        </Entry>
  14669                                  
  14670       </Relation ship>
  14671                                 
  14672       <Relations hip 
  14673        Name="Sche ma"
  14674       >
  14675                                           
  14676        <Entry>
  14677                                                    
  14678         <Reference
  14679          Name="[App ]" 
  14680         />
  14681                                            
  14682        </Entry>
  14683                                  
  14684       </Relation ship>
  14685                                 
  14686       <Annotatio
  14687        Type="SysC ommentsObj ectAnnotat ion"
  14688       >
  14689                                           
  14690        <Property 
  14691         Name="Crea teOffset" 
  14692         Value="2" 
  14693        />
  14694                                           
  14695        <Property 
  14696         Name="Leng th" 
  14697         Value="138 93" 
  14698        />
  14699                                           
  14700        <Property 
  14701         Name="Star tLine" 
  14702         Value="1" 
  14703        />
  14704                                           
  14705        <Property 
  14706         Name="Star tColumn" 
  14707         Value="1" 
  14708        />
  14709                                           
  14710        <Property 
  14711         Name="Head erContents
  14712         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetPatient BySid]&#xD ;&#xA;&#x9 ;@pid int    --Patien tSID&#xD;& #xA;&#xD;& #xA;-- NOT ICE:&#xD;& #xA;-- Do  not edit t he stored  procedure  live on th e server.  Code to ge nerate&#xD ;&#xA;-- t he procedu res is sto red in the  project r epository.  Any chang es made&#x D;&#xA;--  that are n ot recorde d in the r epository  will be ov erwritten. &#xD;&#xA; &#xD;&#xA; AS" 
  14713        />
  14714                                  
  14715       </Annotati on>
  14716                        
  14717      </Element>
  14718                       
  14719      <Element 
  14720       Type="SqlP rocedure" 
  14721       Name="[App ].[NVCC_us p_GetPatie ntBySSN]"
  14722      >
  14723                                 
  14724       <Property 
  14725        Name="Body Script"
  14726       >
  14727                                           
  14728        <Value>
  14729         <![CDATA[
  14730         --======== ========== ========== ========== ========== ========== ========== ========== ===
  14731         --Requesto r                                : Non Va C oordinated  Care Proj ect
  14732         --Author                  : Bria n Diggs
  14733         --Object/S P Name                  : usp_Ge tPatientBy SSN
  14734         --SERVER                                   
  14735         --Data Bas e                                : CC_REFDO C
  14736         --Schema                                    : PanelMgm t
  14737         --Report                                    : N/A
  14738         --Folder                                    : N/A
  14739         --Report L oc             : N/A
  14740         --Job                     : None
  14741         --Job Loc                 : None
  14742         --Note                    : 
  14743         --Date Cre ated           : 07-1 4-2017
  14744         --
  14745         --Changed                 : 2017 -07-31
  14746         --Changed  By                 :  Brian Digg s
  14747         --Reason F or Change               : Added  (NOLOCK) q uery hint  so that se arcing for  a patient
  14748         --                          will  not block  during th e daily up date.
  14749         --
  14750         --Purpose                 : Retr ieve a pat ient's SID  from the  SSN and st a3n
  14751         --                        : usin g the heav ily indexe d App.AllC DWPatients
  14752         --======== ========== ========== ========== ========== ========== ========== ========== ===
  14753         BEGIN
  14754                 SE LECT
  14755                          Pati entSID,
  14756                          Pati entSSN,
  14757                          Sta3 n
  14758                 FR OM App.All CDWPatient s WITH (NO LOCK)
  14759                 WH ERE
  14760                          Pati entSSN = @ SSN AND st a3n = @sta 3n
  14761         END]]>
  14762        </Value>
  14763                                  
  14764       </Property >
  14765                                 
  14766       <Property 
  14767        Name="IsAn siNullsOn"  
  14768        Value="Tru e" 
  14769       />
  14770                                 
  14771       <Relations hip 
  14772        Name="Body Dependenci es"
  14773       >
  14774                                           
  14775        <Entry>
  14776                                                    
  14777         <Reference
  14778          Name="[App ].[AllCDWP atients]" 
  14779         />
  14780                                            
  14781        </Entry>
  14782                                           
  14783        <Entry>
  14784                                                    
  14785         <Reference
  14786          Name="[App ].[AllCDWP atients].[ PatientSID ]" 
  14787         />
  14788                                            
  14789        </Entry>
  14790                                           
  14791        <Entry>
  14792                                                    
  14793         <Reference
  14794          Name="[App ].[AllCDWP atients].[ PatientSSN ]" 
  14795         />
  14796                                            
  14797        </Entry>
  14798                                           
  14799        <Entry>
  14800                                                    
  14801         <Reference
  14802          Name="[App ].[AllCDWP atients].[ Sta3n]" 
  14803         />
  14804                                            
  14805        </Entry>
  14806                                           
  14807        <Entry>
  14808                                                    
  14809         <Reference
  14810          Name="[App ].[NVCC_us p_GetPatie ntBySSN].[ @SSN]" 
  14811         />
  14812                                            
  14813        </Entry>
  14814                                           
  14815        <Entry>
  14816                                                    
  14817         <Reference
  14818          Name="[App ].[NVCC_us p_GetPatie ntBySSN].[ @sta3n]" 
  14819         />
  14820                                            
  14821        </Entry>
  14822                                  
  14823       </Relation ship>
  14824                                 
  14825       <Relations hip 
  14826        Name="Para meters"
  14827       >
  14828                                           
  14829        <Entry>
  14830                                                    
  14831         <Element 
  14832          Type="SqlS ubroutineP arameter" 
  14833          Name="[App ].[NVCC_us p_GetPatie ntBySSN].[ @SSN]"
  14834         >
  14835                                                              
  14836          <Relations hip 
  14837           Name="Type "
  14838          >
  14839                                                                        
  14840           <Entry>
  14841                                                                                  
  14842            <Element 
  14843             Type="SqlT ypeSpecifi er"
  14844            >
  14845                                                                                            
  14846             <Property 
  14847              Name="Leng th" 
  14848              Value="50"  
  14849             />
  14850                                                                                            
  14851             <Relations hip 
  14852              Name="Type "
  14853             >
  14854                                                                                                     
  14855              <Entry>
  14856                                                                                                               
  14857               <Reference
  14858                ExternalSo urce="Buil tIns" 
  14859                Name="[var char]" 
  14860               />
  14861                                                                                                      
  14862              </Entry>
  14863                                                                                             
  14864             </Relation ship>
  14865                                                                                   
  14866            </Element>
  14867                                                                         
  14868           </Entry>
  14869                                                               
  14870          </Relation ship>
  14871                                                     
  14872         </Element>
  14873                                            
  14874        </Entry>
  14875                                           
  14876        <Entry>
  14877                                                    
  14878         <Element 
  14879          Type="SqlS ubroutineP arameter" 
  14880          Name="[App ].[NVCC_us p_GetPatie ntBySSN].[ @sta3n]"
  14881         >
  14882                                                              
  14883          <Relations hip 
  14884           Name="Type "
  14885          >
  14886                                                                        
  14887           <Entry>
  14888                                                                                  
  14889            <Element 
  14890             Type="SqlT ypeSpecifi er"
  14891            >
  14892                                                                                            
  14893             <Relations hip 
  14894              Name="Type "
  14895             >
  14896                                                                                                     
  14897              <Entry>
  14898                                                                                                               
  14899               <Reference
  14900                ExternalSo urce="Buil tIns" 
  14901                Name="[sma llint]" 
  14902               />
  14903                                                                                                      
  14904              </Entry>
  14905                                                                                             
  14906             </Relation ship>
  14907                                                                                   
  14908            </Element>
  14909                                                                         
  14910           </Entry>
  14911                                                               
  14912          </Relation ship>
  14913                                                     
  14914         </Element>
  14915                                            
  14916        </Entry>
  14917                                  
  14918       </Relation ship>
  14919                                 
  14920       <Relations hip 
  14921        Name="Sche ma"
  14922       >
  14923                                           
  14924        <Entry>
  14925                                                    
  14926         <Reference
  14927          Name="[App ]" 
  14928         />
  14929                                            
  14930        </Entry>
  14931                                  
  14932       </Relation ship>
  14933                                 
  14934       <Annotatio
  14935        Type="SysC ommentsObj ectAnnotat ion"
  14936       >
  14937                                           
  14938        <Property 
  14939         Name="Crea teOffset" 
  14940         Value="2" 
  14941        />
  14942                                           
  14943        <Property 
  14944         Name="Leng th" 
  14945         Value="117 9" 
  14946        />
  14947                                           
  14948        <Property 
  14949         Name="Star tLine" 
  14950         Value="1" 
  14951        />
  14952                                           
  14953        <Property 
  14954         Name="Star tColumn" 
  14955         Value="1" 
  14956        />
  14957                                           
  14958        <Property 
  14959         Name="Head erContents
  14960         Value="&#x D;&#xA;CRE ATE PROCED URE App.NV CC_usp_Get PatientByS SN&#xD;&#x A;&#x9;@SS N varchar( 50),&#xD;& #xA;&#x9;@ sta3n smal lint&#xD;& #xA;AS" 
  14961        />
  14962                                  
  14963       </Annotati on>
  14964                        
  14965      </Element>
  14966                       
  14967      <Element 
  14968       Type="SqlP rocedure" 
  14969       Name="[App ].[NVCC_us p_GetProbs ]"
  14970      >
  14971                                 
  14972       <Property 
  14973        Name="Body Script"
  14974       >
  14975                                           
  14976        <Value>
  14977         <![CDATA[
  14978         --======== ========== ========== ========== ========== ========== ========== ========== ===
  14979         --Requesto r                                : Non Va C oordinated  Care Proj ect
  14980         --Author                  : Jerr y Kohler -  Northwest  Innovatio n Center ( NWIC)
  14981         --Object/S P Name                  : NVCC_u sp_GetProb s
  14982         --SERVER                                   
  14983         --Data Bas e                                : CC_REFDO C
  14984         --Schema                                    : app
  14985         --Report                                    : N/A
  14986         --Folder                                    : N/A
  14987         --Report L oc             : N/A
  14988         --Job                     : None
  14989         --Job Loc                 : None
  14990         --Note                    : 
  14991         --Date Cre ated           : 01-1 4-2016
  14992         --
  14993         --Last Cha nged           : 03-1 6-2016  
  14994         --Last Cha nged By                 : Jerry  Kohler - N orthwest I nnovation  Center (NW IC)
  14995         --Reason F or Change               : TFS Pr oject NVCC , item num ber 1368 -  Eliminate  
  14996         --                          dupl icate prob lem codes  (Brian Dig gs).
  14997         --
  14998         --Last Cha nged           : 02-1 8-2016  
  14999         --Last Cha nged By                 : Jerry  Kohler - N orthwest I nnovation  Center (NW IC)
  15000         --Reason F or Change               : Reques t to also  provide th e station  and statio n
  15001         --                          name .
  15002         --
  15003         --Last Cha nged           : 01-1 9-2016  
  15004         --Last Cha nged By                 : Jerry  Kohler - N orthwest I nnovation  Center (NW IC)
  15005         --Reason F or Change               : Restru ctured the  procedure  into a CT E and sing le
  15006         --                          SELE CT stateme nt.  Added  DISTINCT  to elimina te
  15007         --                          dupl icate retu rned rows,  and tuned  for perfo rmance.
  15008         --
  15009         --Changed                 : 01-1 4-2016  
  15010         --Changed  By                 :  Jerry Kohl er - North west Innov ation Cent er (NWIC)
  15011         --Reason F or Change               : Remove d station  parameter  in order t o expand t he search
  15012         --                          for  a patient' s consults  from a si ngle stati on to any
  15013         --                          stat ion a pati ent is ass ociated wi th.
  15014         --
  15015         --Purpose                 : Retr ieve a pat ient's act ive proble m lists fo r provider
  15016         --                          revi ew while c ompiling N VCC docume ntation.
  15017         --======== ========== ========== ========== ========== ========== ========== ========== ===
  15018         BEGIN
  15019         --declare  @station i nt; set @s tation=508 ; declare  @pid bigin t; set @pi d=1717444;  declare @ sflag int;  set @sfla g=1;
  15020                 --  SET NOCOU NT ON adde d to preve nt extra r esult sets  from
  15021                 --  interferi ng with SE LECT state ments.
  15022            SET NOC OUNT ON;
  15023        
  15024         --DECLARE  @PID INT =  24257470   --zzteleh ealth pati ent with t ons of dat a
  15025        
  15026            ;
  15027            WITH PT Probs0 (St a3n, Stati onName, Pr oblemListS ID, Patien tSID, ICD9 SID, ICD10 SID, RN, L astModifie dDate) AS
  15028              (
  15029               SELE CT p.Sta3n
  15030                      ,App.udf _StationNa me (p.Sta3 n) AS Stat ionName
  15031                      ,p.Probl emListSID
  15032                      ,p.Patie ntSID
  15033                      ,p.ICD9S ID
  15034                      ,p.ICD10 SID
  15035                      ,RN = CA SE
  15036                          When  ICD9SID < > 0
  15037                             T hen ROW_NU MBER() OVE R (PARTITI ON BY p.IC D9SID  ORD ER BY p.La stModified Date DESC)
  15038                          When  ICD10SID  <> 0
  15039                             T hen ROW_NU MBER() OVE R (PARTITI ON BY p.IC D10SID ORD ER BY p.La stModified Date DESC)
  15040                          Else  -999
  15041                          End
  15042                      ,p.LastM odifiedDat e
  15043               FROM  CDWWork.O utpat.Prob lemList p 
  15044               WHER E p.Patien tSID IN (S elect PtSI D From App .udf_AllPa tientsSIDs  (@pid))
  15045                 AN D p.Active Flag = 'A'
  15046                 AN D ProblemL istConditi on <> 'H'
  15047              ),
  15048        
  15049              PTPro bs1 (Sta3n , StationN ame, ICDCo de, ICDVer sion, Prob lemListSID , Problem,  LastModif iedDate ,R N, Sensiti veDx, Abus eDx, Sickl eDx, HIVDx ) AS
  15050              (
  15051               SELE CT p.Sta3n
  15052                      ,p.Stati onName
  15053                      ,i.ICD9C ode AS ICD Code
  15054                      ,'ICD9'  AS ICDVers ion
  15055                      ,p.Probl emListSID
  15056                      ,left(i. ICD9Diagno sisText,50 ) AS Probl em
  15057                      ,p.LastM odifiedDat e
  15058                      ,ROW_NUM BER() OVER  (PARTITIO N BY left( i.ICD9Diag nosisText, 50) ORDER  BY p.LastM odifiedDat e DESC) AS  RN
  15059                                   , CASE  WHEN dx.I CDSID is N OT NULL TH EN 1 ELSE  0 END AS S ensitiveDx
  15060                                   , dx.A buseDx
  15061                                   , dx.S ickleDx
  15062                                   , dx.H IVDx
  15063               FROM  PTProbs0  p
  15064               left  outer joi n PanelMgm t.vICD9 i  on p.ICD9S ID = i.ICD 9SID
  15065                    LEFT OUTER  JOIN [App ].[NVCC_Se nsitiveDxC odes] dx
  15066                    on dx.ICDS ID = p.ICD 9SID
  15067               WHER E p.ICD9SI D <> 0
  15068                 AN D p.RN = 1
  15069        
  15070               UNIO N ALL
  15071            
  15072               SELE CT p.Sta3n
  15073                      ,p.Stati onName
  15074                      ,k.ICD10 Code AS IC DCode
  15075                      ,'ICD10'      AS IC DVersion
  15076                      ,p.Probl emListSID
  15077                      ,left(k. ICD10Diagn osisText,5 0) AS Prob lem
  15078                      ,p.LastM odifiedDat e
  15079                      ,ROW_NUM BER() OVER  (PARTITIO N BY left( k.ICD10Dia gnosisText ,50) ORDER  BY p.Last ModifiedDa te DESC) A S RN
  15080                                   , CASE  WHEN dx.I CDSID is N OT NULL TH EN 1 ELSE  0 END AS S ensitiveDx
  15081                                   , dx.A buseDx
  15082                                   , dx.S ickleDx
  15083                                   , dx.H IVDx
  15084               FROM  PTProbs0  p
  15085               left  outer joi n PanelMgm t.vICD10 k  on p.ICD1 0SID = k.I CD10SID
  15086                      LEFT OUT ER JOIN [A pp].[NVCC_ SensitiveD xCodes] dx
  15087                    on dx.ICDS ID = p.ICD 10SID
  15088               WHER E p.ICD10S ID <> 0
  15089                 AN D p.RN = 1
  15090             )
  15091        
  15092            SELECT  Sta3n
  15093                  , StationNam e
  15094                  , ICDCode
  15095                  , ICDVersion
  15096                  , ProblemLis tSID
  15097                  , Problem
  15098                  , LastModifi edDate
  15099                           ,Se nsitiveDx,  AbuseDx,  SickleDx,  HIVDx
  15100            FROM PT Probs1
  15101            WHERE R N = 1
  15102            ORDER B Y LastModi fiedDate D ESC;
  15103        
  15104         END;
  15105        
  15106         --exec nva .getProbs  @station=5 08, @pid=1 717444;
  15107         --exec nva .getSensDx Codes;]]>
  15108        </Value>
  15109                                  
  15110       </Property >
  15111                                 
  15112       <Property 
  15113        Name="IsAn siNullsOn"  
  15114        Value="Tru e" 
  15115       />
  15116                                 
  15117       <Relations hip 
  15118        Name="Body Dependenci es"
  15119       >
  15120                                           
  15121        <Entry>
  15122                                                    
  15123         <Reference
  15124          ExternalSo urce="CDWW ork.dacpac
  15125          Name="[CDW Work]|[Out pat].[Prob lemList]" 
  15126         />
  15127                                            
  15128        </Entry>
  15129                                           
  15130        <Entry>
  15131                                                    
  15132         <Reference
  15133          ExternalSo urce="CDWW ork.dacpac
  15134          Name="[CDW Work]|[Out pat].[Prob lemList].[ Sta3n]" 
  15135         />
  15136                                            
  15137        </Entry>
  15138                                           
  15139        <Entry>
  15140                                                    
  15141         <Reference
  15142          Name="[App ].[udf_Sta tionName]"  
  15143         />
  15144                                            
  15145        </Entry>
  15146                                           
  15147        <Entry>
  15148                                                    
  15149         <Reference
  15150          ExternalSo urce="CDWW ork.dacpac
  15151          Name="[CDW Work]|[Out pat].[Prob lemList].[ ProblemLis tSID]" 
  15152         />
  15153                                            
  15154        </Entry>
  15155                                           
  15156        <Entry>
  15157                                                    
  15158         <Reference
  15159          ExternalSo urce="CDWW ork.dacpac
  15160          Name="[CDW Work]|[Out pat].[Prob lemList].[ PatientSID ]" 
  15161         />
  15162                                            
  15163        </Entry>
  15164                                           
  15165        <Entry>
  15166                                                    
  15167         <Reference
  15168          ExternalSo urce="CDWW ork.dacpac
  15169          Name="[CDW Work]|[Out pat].[Prob lemList].[ ICD9SID]" 
  15170         />
  15171                                            
  15172        </Entry>
  15173                                           
  15174        <Entry>
  15175                                                    
  15176         <Reference
  15177          ExternalSo urce="CDWW ork.dacpac
  15178          Name="[CDW Work]|[Out pat].[Prob lemList].[ ICD10SID]"  
  15179         />
  15180                                            
  15181        </Entry>
  15182                                           
  15183        <Entry>
  15184                                                    
  15185         <Reference
  15186          ExternalSo urce="CDWW ork.dacpac
  15187          Name="[CDW Work]|[Out pat].[Prob lemList].[ ICD9SID]" 
  15188         />
  15189                                            
  15190        </Entry>
  15191                                           
  15192        <Entry>
  15193                                                    
  15194         <Reference
  15195          ExternalSo urce="CDWW ork.dacpac
  15196          Name="[CDW Work]|[Out pat].[Prob lemList].[ LastModifi edDate]" 
  15197         />
  15198                                            
  15199        </Entry>
  15200                                           
  15201        <Entry>
  15202                                                    
  15203         <Reference
  15204          ExternalSo urce="CDWW ork.dacpac
  15205          Name="[CDW Work]|[Out pat].[Prob lemList].[ ICD10SID]"  
  15206         />
  15207                                            
  15208        </Entry>
  15209                                           
  15210        <Entry>
  15211                                                    
  15212         <Reference
  15213          Name="[App ].[NVCC_us p_GetProbs ].[@pid]" 
  15214         />
  15215                                            
  15216        </Entry>
  15217                                           
  15218        <Entry>
  15219                                                    
  15220         <Reference
  15221          Name="[App ].[udf_All PatientsSI Ds]" 
  15222         />
  15223                                            
  15224        </Entry>
  15225                                           
  15226        <Entry>
  15227                                                    
  15228         <Reference
  15229          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  15230         />
  15231                                            
  15232        </Entry>
  15233                                           
  15234        <Entry>
  15235                                                    
  15236         <Reference
  15237          ExternalSo urce="CDWW ork.dacpac
  15238          Name="[CDW Work]|[Out pat].[Prob lemList].[ ActiveFlag ]" 
  15239         />
  15240                                            
  15241        </Entry>
  15242                                           
  15243        <Entry>
  15244                                                    
  15245         <Reference
  15246          ExternalSo urce="CDWW ork.dacpac
  15247          Name="[CDW Work]|[Out pat].[Prob lemList].[ ProblemLis tCondition ]" 
  15248         />
  15249                                            
  15250        </Entry>
  15251                                           
  15252        <Entry>
  15253                                                    
  15254         <Reference
  15255          Name="[Pan elMgmt].[v ICD9]" 
  15256         />
  15257                                            
  15258        </Entry>
  15259                                           
  15260        <Entry>
  15261                                                    
  15262         <Reference
  15263          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [ICD9SID]"  
  15264         />
  15265                                            
  15266        </Entry>
  15267                                           
  15268        <Entry>
  15269                                                    
  15270         <Reference
  15271          Name="[Pan elMgmt].[v ICD9].[ICD 9SID]" 
  15272         />
  15273                                            
  15274        </Entry>
  15275                                           
  15276        <Entry>
  15277                                                    
  15278         <Reference
  15279          Name="[App ].[NVCC_Se nsitiveDxC odes]" 
  15280         />
  15281                                            
  15282        </Entry>
  15283                                           
  15284        <Entry>
  15285                                                    
  15286         <Reference
  15287          Name="[App ].[NVCC_Se nsitiveDxC odes].[ICD SID]" 
  15288         />
  15289                                            
  15290        </Entry>
  15291                                           
  15292        <Entry>
  15293                                                    
  15294         <Reference
  15295          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [ICD9SID]"  
  15296         />
  15297                                            
  15298        </Entry>
  15299                                           
  15300        <Entry>
  15301                                                    
  15302         <Reference
  15303          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [Sta3n]" 
  15304         />
  15305                                            
  15306        </Entry>
  15307                                           
  15308        <Entry>
  15309                                                    
  15310         <Reference
  15311          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [StationNa me]" 
  15312         />
  15313                                            
  15314        </Entry>
  15315                                           
  15316        <Entry>
  15317                                                    
  15318         <Reference
  15319          Name="[Pan elMgmt].[v ICD9].[ICD 9Code]" 
  15320         />
  15321                                            
  15322        </Entry>
  15323                                           
  15324        <Entry>
  15325                                                    
  15326         <Reference
  15327          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [ProblemLi stSID]" 
  15328         />
  15329                                            
  15330        </Entry>
  15331                                           
  15332        <Entry>
  15333                                                    
  15334         <Reference
  15335          Name="[Pan elMgmt].[v ICD9].[ICD 9Diagnosis Text]" 
  15336         />
  15337                                            
  15338        </Entry>
  15339                                           
  15340        <Entry>
  15341                                                    
  15342         <Reference
  15343          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [LastModif iedDate]" 
  15344         />
  15345                                            
  15346        </Entry>
  15347                                           
  15348        <Entry>
  15349                                                    
  15350         <Reference
  15351          Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]" 
  15352         />
  15353                                            
  15354        </Entry>
  15355                                           
  15356        <Entry>
  15357                                                    
  15358         <Reference
  15359          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]" 
  15360         />
  15361                                            
  15362        </Entry>
  15363                                           
  15364        <Entry>
  15365                                                    
  15366         <Reference
  15367          Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]" 
  15368         />
  15369                                            
  15370        </Entry>
  15371                                           
  15372        <Entry>
  15373                                                    
  15374         <Reference
  15375          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [RN]" 
  15376         />
  15377                                            
  15378        </Entry>
  15379                                           
  15380        <Entry>
  15381                                                    
  15382         <Reference
  15383          Name="[Pan elMgmt].[v ICD10]" 
  15384         />
  15385                                            
  15386        </Entry>
  15387                                           
  15388        <Entry>
  15389                                                    
  15390         <Reference
  15391          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [ICD10SID]
  15392         />
  15393                                            
  15394        </Entry>
  15395                                           
  15396        <Entry>
  15397                                                    
  15398         <Reference
  15399          Name="[Pan elMgmt].[v ICD10].[IC D10SID]" 
  15400         />
  15401                                            
  15402        </Entry>
  15403                                           
  15404        <Entry>
  15405                                                    
  15406         <Reference
  15407          Name="[App ].[NVCC_Se nsitiveDxC odes].[ICD SID]" 
  15408         />
  15409                                            
  15410        </Entry>
  15411                                           
  15412        <Entry>
  15413                                                    
  15414         <Reference
  15415          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [ICD10SID]
  15416         />
  15417                                            
  15418        </Entry>
  15419                                           
  15420        <Entry>
  15421                                                    
  15422         <Reference
  15423          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [Sta3n]" 
  15424         />
  15425                                            
  15426        </Entry>
  15427                                           
  15428        <Entry>
  15429                                                    
  15430         <Reference
  15431          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [StationNa me]" 
  15432         />
  15433                                            
  15434        </Entry>
  15435                                           
  15436        <Entry>
  15437                                                    
  15438         <Reference
  15439          Name="[Pan elMgmt].[v ICD10].[IC D10Code]" 
  15440         />
  15441                                            
  15442        </Entry>
  15443                                           
  15444        <Entry>
  15445                                                    
  15446         <Reference
  15447          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [ProblemLi stSID]" 
  15448         />
  15449                                            
  15450        </Entry>
  15451                                           
  15452        <Entry>
  15453                                                    
  15454         <Reference
  15455          Name="[Pan elMgmt].[v ICD10].[IC D10Diagnos isText]" 
  15456         />
  15457                                            
  15458        </Entry>
  15459                                           
  15460        <Entry>
  15461                                                    
  15462         <Reference
  15463          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [LastModif iedDate]" 
  15464         />
  15465                                            
  15466        </Entry>
  15467                                           
  15468        <Entry>
  15469                                                    
  15470         <Reference
  15471          Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]" 
  15472         />
  15473                                            
  15474        </Entry>
  15475                                           
  15476        <Entry>
  15477                                                    
  15478         <Reference
  15479          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]" 
  15480         />
  15481                                            
  15482        </Entry>
  15483                                           
  15484        <Entry>
  15485                                                    
  15486         <Reference
  15487          Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]" 
  15488         />
  15489                                            
  15490        </Entry>
  15491                                           
  15492        <Entry>
  15493                                                    
  15494         <Reference
  15495          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [RN]" 
  15496         />
  15497                                            
  15498        </Entry>
  15499                                           
  15500        <Entry>
  15501                                                    
  15502         <Reference
  15503          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [Sta3n]" 
  15504         />
  15505                                            
  15506        </Entry>
  15507                                           
  15508        <Entry>
  15509                                                    
  15510         <Reference
  15511          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [StationNa me]" 
  15512         />
  15513                                            
  15514        </Entry>
  15515                                           
  15516        <Entry>
  15517                                                    
  15518         <Reference
  15519          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [ICDCode]"  
  15520         />
  15521                                            
  15522        </Entry>
  15523                                           
  15524        <Entry>
  15525                                                    
  15526         <Reference
  15527          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [ICDVersio n]" 
  15528         />
  15529                                            
  15530        </Entry>
  15531                                           
  15532        <Entry>
  15533                                                    
  15534         <Reference
  15535          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [ProblemLi stSID]" 
  15536         />
  15537                                            
  15538        </Entry>
  15539                                           
  15540        <Entry>
  15541                                                    
  15542         <Reference
  15543          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [Problem]"  
  15544         />
  15545                                            
  15546        </Entry>
  15547                                           
  15548        <Entry>
  15549                                                    
  15550         <Reference
  15551          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [LastModif iedDate]" 
  15552         />
  15553                                            
  15554        </Entry>
  15555                                           
  15556        <Entry>
  15557                                                    
  15558         <Reference
  15559          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [Sensitive Dx]" 
  15560         />
  15561                                            
  15562        </Entry>
  15563                                           
  15564        <Entry>
  15565                                                    
  15566         <Reference
  15567          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [AbuseDx]"  
  15568         />
  15569                                            
  15570        </Entry>
  15571                                           
  15572        <Entry>
  15573                                                    
  15574         <Reference
  15575          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [SickleDx]
  15576         />
  15577                                            
  15578        </Entry>
  15579                                           
  15580        <Entry>
  15581                                                    
  15582         <Reference
  15583          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [HIVDx]" 
  15584         />
  15585                                            
  15586        </Entry>
  15587                                           
  15588        <Entry>
  15589                                                    
  15590         <Reference
  15591          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [RN]" 
  15592         />
  15593                                            
  15594        </Entry>
  15595                                  
  15596       </Relation ship>
  15597                                 
  15598       <Relations hip 
  15599        Name="Dyna micObjects "
  15600       >
  15601                                           
  15602        <Entry>
  15603                                                    
  15604         <Element 
  15605          Type="SqlD ynamicColu mnSource" 
  15606          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]"
  15607         >
  15608                                                              
  15609          <Relations hip 
  15610           Name="Colu mns"
  15611          >
  15612                                                                        
  15613           <Entry>
  15614                                                                                  
  15615            <Element 
  15616             Type="SqlC omputedCol umn" 
  15617             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [Sta3n]"
  15618            >
  15619                                                                                            
  15620             <Relations hip 
  15621              Name="Expr essionDepe ndencies"
  15622             >
  15623                                                                                                     
  15624              <Entry>
  15625                                                                                                               
  15626               <Reference
  15627                ExternalSo urce="CDWW ork.dacpac
  15628                Name="[CDW Work]|[Out pat].[Prob lemList].[ Sta3n]" 
  15629               />
  15630                                                                                                      
  15631              </Entry>
  15632                                                                                             
  15633             </Relation ship>
  15634                                                                                   
  15635            </Element>
  15636                                                                         
  15637           </Entry>
  15638                                                                        
  15639           <Entry>
  15640                                                                                  
  15641            <Element 
  15642             Type="SqlC omputedCol umn" 
  15643             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [StationNa me]"
  15644            >
  15645                                                                                            
  15646             <Relations hip 
  15647              Name="Expr essionDepe ndencies"
  15648             >
  15649                                                                                                     
  15650              <Entry>
  15651                                                                                                               
  15652               <Reference
  15653                Name="[App ].[udf_Sta tionName]"  
  15654               />
  15655                                                                                                      
  15656              </Entry>
  15657                                                                                             
  15658             </Relation ship>
  15659                                                                                   
  15660            </Element>
  15661                                                                         
  15662           </Entry>
  15663                                                                        
  15664           <Entry>
  15665                                                                                  
  15666            <Element 
  15667             Type="SqlC omputedCol umn" 
  15668             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [ProblemLi stSID]"
  15669            >
  15670                                                                                            
  15671             <Relations hip 
  15672              Name="Expr essionDepe ndencies"
  15673             >
  15674                                                                                                     
  15675              <Entry>
  15676                                                                                                               
  15677               <Reference
  15678                ExternalSo urce="CDWW ork.dacpac
  15679                Name="[CDW Work]|[Out pat].[Prob lemList].[ ProblemLis tSID]" 
  15680               />
  15681                                                                                                      
  15682              </Entry>
  15683                                                                                             
  15684             </Relation ship>
  15685                                                                                   
  15686            </Element>
  15687                                                                         
  15688           </Entry>
  15689                                                                        
  15690           <Entry>
  15691                                                                                  
  15692            <Element 
  15693             Type="SqlC omputedCol umn" 
  15694             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [PatientSI D]"
  15695            >
  15696                                                                                            
  15697             <Relations hip 
  15698              Name="Expr essionDepe ndencies"
  15699             >
  15700                                                                                                     
  15701              <Entry>
  15702                                                                                                               
  15703               <Reference
  15704                ExternalSo urce="CDWW ork.dacpac
  15705                Name="[CDW Work]|[Out pat].[Prob lemList].[ PatientSID ]" 
  15706               />
  15707                                                                                                      
  15708              </Entry>
  15709                                                                                             
  15710             </Relation ship>
  15711                                                                                   
  15712            </Element>
  15713                                                                         
  15714           </Entry>
  15715                                                                        
  15716           <Entry>
  15717                                                                                  
  15718            <Element 
  15719             Type="SqlC omputedCol umn" 
  15720             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [ICD9SID]"
  15721            >
  15722                                                                                            
  15723             <Relations hip 
  15724              Name="Expr essionDepe ndencies"
  15725             >
  15726                                                                                                     
  15727              <Entry>
  15728                                                                                                               
  15729               <Reference
  15730                ExternalSo urce="CDWW ork.dacpac
  15731                Name="[CDW Work]|[Out pat].[Prob lemList].[ ICD9SID]" 
  15732               />
  15733                                                                                                      
  15734              </Entry>
  15735                                                                                             
  15736             </Relation ship>
  15737                                                                                   
  15738            </Element>
  15739                                                                         
  15740           </Entry>
  15741                                                                        
  15742           <Entry>
  15743                                                                                  
  15744            <Element 
  15745             Type="SqlC omputedCol umn" 
  15746             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [ICD10SID] "
  15747            >
  15748                                                                                            
  15749             <Relations hip 
  15750              Name="Expr essionDepe ndencies"
  15751             >
  15752                                                                                                     
  15753              <Entry>
  15754                                                                                                               
  15755               <Reference
  15756                ExternalSo urce="CDWW ork.dacpac
  15757                Name="[CDW Work]|[Out pat].[Prob lemList].[ ICD10SID]"  
  15758               />
  15759                                                                                                      
  15760              </Entry>
  15761                                                                                             
  15762             </Relation ship>
  15763                                                                                   
  15764            </Element>
  15765                                                                         
  15766           </Entry>
  15767                                                                        
  15768           <Entry>
  15769                                                                                  
  15770            <Element 
  15771             Type="SqlC omputedCol umn" 
  15772             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [RN]" 
  15773            />
  15774                                                                         
  15775           </Entry>
  15776                                                                        
  15777           <Entry>
  15778                                                                                  
  15779            <Element 
  15780             Type="SqlC omputedCol umn" 
  15781             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [LastModif iedDate]"
  15782            >
  15783                                                                                            
  15784             <Relations hip 
  15785              Name="Expr essionDepe ndencies"
  15786             >
  15787                                                                                                     
  15788              <Entry>
  15789                                                                                                               
  15790               <Reference
  15791                ExternalSo urce="CDWW ork.dacpac
  15792                Name="[CDW Work]|[Out pat].[Prob lemList].[ LastModifi edDate]" 
  15793               />
  15794                                                                                                      
  15795              </Entry>
  15796                                                                                             
  15797             </Relation ship>
  15798                                                                                   
  15799            </Element>
  15800                                                                         
  15801           </Entry>
  15802                                                               
  15803          </Relation ship>
  15804                                                     
  15805         </Element>
  15806                                            
  15807        </Entry>
  15808                                           
  15809        <Entry>
  15810                                                    
  15811         <Element 
  15812          Type="SqlD ynamicColu mnSource" 
  15813          Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]"
  15814         >
  15815                                                              
  15816          <Relations hip 
  15817           Name="Colu mns"
  15818          >
  15819                                                                        
  15820           <Entry>
  15821                                                                                  
  15822            <Element 
  15823             Type="SqlC omputedCol umn" 
  15824             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [Sta3n]"
  15825            >
  15826                                                                                            
  15827             <Relations hip 
  15828              Name="Expr essionDepe ndencies"
  15829             >
  15830                                                                                                     
  15831              <Entry>
  15832                                                                                                               
  15833               <Reference
  15834                Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [Sta3n]" 
  15835               />
  15836                                                                                                      
  15837              </Entry>
  15838                                                                                             
  15839             </Relation ship>
  15840                                                                                   
  15841            </Element>
  15842                                                                         
  15843           </Entry>
  15844                                                                        
  15845           <Entry>
  15846                                                                                  
  15847            <Element 
  15848             Type="SqlC omputedCol umn" 
  15849             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [StationNa me]"
  15850            >
  15851                                                                                            
  15852             <Relations hip 
  15853              Name="Expr essionDepe ndencies"
  15854             >
  15855                                                                                                     
  15856              <Entry>
  15857                                                                                                               
  15858               <Reference
  15859                Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [StationNa me]" 
  15860               />
  15861                                                                                                      
  15862              </Entry>
  15863                                                                                             
  15864             </Relation ship>
  15865                                                                                   
  15866            </Element>
  15867                                                                         
  15868           </Entry>
  15869                                                                        
  15870           <Entry>
  15871                                                                                  
  15872            <Element 
  15873             Type="SqlC omputedCol umn" 
  15874             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [ICDCode]"
  15875            >
  15876                                                                                            
  15877             <Relations hip 
  15878              Name="Expr essionDepe ndencies"
  15879             >
  15880                                                                                                     
  15881              <Entry>
  15882                                                                                                               
  15883               <Reference
  15884                Name="[Pan elMgmt].[v ICD9].[ICD 9Code]" 
  15885               />
  15886                                                                                                      
  15887              </Entry>
  15888                                                                                             
  15889             </Relation ship>
  15890                                                                                   
  15891            </Element>
  15892                                                                         
  15893           </Entry>
  15894                                                                        
  15895           <Entry>
  15896                                                                                  
  15897            <Element 
  15898             Type="SqlC omputedCol umn" 
  15899             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [ICDVersio n]" 
  15900            />
  15901                                                                         
  15902           </Entry>
  15903                                                                        
  15904           <Entry>
  15905                                                                                  
  15906            <Element 
  15907             Type="SqlC omputedCol umn" 
  15908             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [ProblemLi stSID]"
  15909            >
  15910                                                                                            
  15911             <Relations hip 
  15912              Name="Expr essionDepe ndencies"
  15913             >
  15914                                                                                                     
  15915              <Entry>
  15916                                                                                                               
  15917               <Reference
  15918                Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [ProblemLi stSID]" 
  15919               />
  15920                                                                                                      
  15921              </Entry>
  15922                                                                                             
  15923             </Relation ship>
  15924                                                                                   
  15925            </Element>
  15926                                                                         
  15927           </Entry>
  15928                                                                        
  15929           <Entry>
  15930                                                                                  
  15931            <Element 
  15932             Type="SqlC omputedCol umn" 
  15933             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [Problem]"  
  15934            />
  15935                                                                         
  15936           </Entry>
  15937                                                                        
  15938           <Entry>
  15939                                                                                  
  15940            <Element 
  15941             Type="SqlC omputedCol umn" 
  15942             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [LastModif iedDate]"
  15943            >
  15944                                                                                            
  15945             <Relations hip 
  15946              Name="Expr essionDepe ndencies"
  15947             >
  15948                                                                                                     
  15949              <Entry>
  15950                                                                                                               
  15951               <Reference
  15952                Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs0]. [LastModif iedDate]" 
  15953               />
  15954                                                                                                      
  15955              </Entry>
  15956                                                                                             
  15957             </Relation ship>
  15958                                                                                   
  15959            </Element>
  15960                                                                         
  15961           </Entry>
  15962                                                                        
  15963           <Entry>
  15964                                                                                  
  15965            <Element 
  15966             Type="SqlC omputedCol umn" 
  15967             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [RN]" 
  15968            />
  15969                                                                         
  15970           </Entry>
  15971                                                                        
  15972           <Entry>
  15973                                                                                  
  15974            <Element 
  15975             Type="SqlC omputedCol umn" 
  15976             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [Sensitive Dx]" 
  15977            />
  15978                                                                         
  15979           </Entry>
  15980                                                                        
  15981           <Entry>
  15982                                                                                  
  15983            <Element 
  15984             Type="SqlC omputedCol umn" 
  15985             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [AbuseDx]"
  15986            >
  15987                                                                                            
  15988             <Relations hip 
  15989              Name="Expr essionDepe ndencies"
  15990             >
  15991                                                                                                     
  15992              <Entry>
  15993                                                                                                               
  15994               <Reference
  15995                Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]" 
  15996               />
  15997                                                                                                      
  15998              </Entry>
  15999                                                                                             
  16000             </Relation ship>
  16001                                                                                   
  16002            </Element>
  16003                                                                         
  16004           </Entry>
  16005                                                                        
  16006           <Entry>
  16007                                                                                  
  16008            <Element 
  16009             Type="SqlC omputedCol umn" 
  16010             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [SickleDx] "
  16011            >
  16012                                                                                            
  16013             <Relations hip 
  16014              Name="Expr essionDepe ndencies"
  16015             >
  16016                                                                                                     
  16017              <Entry>
  16018                                                                                                               
  16019               <Reference
  16020                Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]" 
  16021               />
  16022                                                                                                      
  16023              </Entry>
  16024                                                                                             
  16025             </Relation ship>
  16026                                                                                   
  16027            </Element>
  16028                                                                         
  16029           </Entry>
  16030                                                                        
  16031           <Entry>
  16032                                                                                  
  16033            <Element 
  16034             Type="SqlC omputedCol umn" 
  16035             Name="[App ].[NVCC_us p_GetProbs ].[CTE1].[ PTProbs1]. [HIVDx]"
  16036            >
  16037                                                                                            
  16038             <Relations hip 
  16039              Name="Expr essionDepe ndencies"
  16040             >
  16041                                                                                                     
  16042              <Entry>
  16043                                                                                                               
  16044               <Reference
  16045                Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]" 
  16046               />
  16047                                                                                                      
  16048              </Entry>
  16049                                                                                             
  16050             </Relation ship>
  16051                                                                                   
  16052            </Element>
  16053                                                                         
  16054           </Entry>
  16055                                                               
  16056          </Relation ship>
  16057                                                     
  16058         </Element>
  16059                                            
  16060        </Entry>
  16061                                  
  16062       </Relation ship>
  16063                                 
  16064       <Relations hip 
  16065        Name="Para meters"
  16066       >
  16067                                           
  16068        <Entry>
  16069                                                    
  16070         <Element 
  16071          Type="SqlS ubroutineP arameter" 
  16072          Name="[App ].[NVCC_us p_GetProbs ].[@pid]"
  16073         >
  16074                                                              
  16075          <Relations hip 
  16076           Name="Type "
  16077          >
  16078                                                                        
  16079           <Entry>
  16080                                                                                  
  16081            <Element 
  16082             Type="SqlT ypeSpecifi er"
  16083            >
  16084                                                                                            
  16085             <Relations hip 
  16086              Name="Type "
  16087             >
  16088                                                                                                     
  16089              <Entry>
  16090                                                                                                               
  16091               <Reference
  16092                ExternalSo urce="Buil tIns" 
  16093                Name="[big int]" 
  16094               />
  16095                                                                                                      
  16096              </Entry>
  16097                                                                                             
  16098             </Relation ship>
  16099                                                                                   
  16100            </Element>
  16101                                                                         
  16102           </Entry>
  16103                                                               
  16104          </Relation ship>
  16105                                                     
  16106         </Element>
  16107                                            
  16108        </Entry>
  16109                                  
  16110       </Relation ship>
  16111                                 
  16112       <Relations hip 
  16113        Name="Sche ma"
  16114       >
  16115                                           
  16116        <Entry>
  16117                                                    
  16118         <Reference
  16119          Name="[App ]" 
  16120         />
  16121                                            
  16122        </Entry>
  16123                                  
  16124       </Relation ship>
  16125                                 
  16126       <Annotatio
  16127        Type="SysC ommentsObj ectAnnotat ion"
  16128       >
  16129                                           
  16130        <Property 
  16131         Name="Crea teOffset" 
  16132         Value="2" 
  16133        />
  16134                                           
  16135        <Property 
  16136         Name="Leng th" 
  16137         Value="522 3" 
  16138        />
  16139                                           
  16140        <Property 
  16141         Name="Star tLine" 
  16142         Value="1" 
  16143        />
  16144                                           
  16145        <Property 
  16146         Name="Star tColumn" 
  16147         Value="1" 
  16148        />
  16149                                           
  16150        <Property 
  16151         Name="Head erContents
  16152         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetProbs]& #xD;&#xA;& #x9;-- Add  the param eters for  the stored  procedure  here&#xD; &#xA;&#x9; @pid bigin t -- this  is the pat ientsid&#x D;&#xA;AS"  
  16153        />
  16154                                  
  16155       </Annotati on>
  16156                        
  16157      </Element>
  16158                       
  16159      <Element 
  16160       Type="SqlP rocedure" 
  16161       Name="[App ].[NVCC_us p_GetROIAd minSearch] "
  16162      >
  16163                                 
  16164       <Property 
  16165        Name="Body Script"
  16166       >
  16167                                           
  16168        <Value>
  16169         <![CDATA[
  16170        
  16171         --======== ========== ========== ========== ========== ========== ========== ========== ====
  16172         --Requesto r              : RefD oc Project
  16173         --Author                  : Lava nya Epuri
  16174         --Object/S P Name         : NVCC _usp_GetRO IAdminSear ch
  16175         --Server                  : 
  16176         --Data Bas e              : CC_R EFDOC
  16177         --Schema                  : App
  16178         --Report                  : N/A
  16179         --Folder                  : N/A
  16180         --Report L oc             : N/A
  16181         --Job                     : None
  16182         --Job Loc                 : None
  16183         --Note                    : 
  16184         --Date Cre ated           : 12-1 4-2017
  16185         --
  16186         --Last Cha nged           : 01-0 8-2018
  16187         --Last Cha nged By                 : Lavany a Epuri
  16188         --Reason F or Change               : Modifi ed the sto red proced ure to ret urn dsiclo sure 
  16189         --                                                     address de tails as p er new req uirement.
  16190        
  16191         --Last Cha nged           : 01-0 9-2018
  16192         --Last Cha nged By                 : Lavany a Epuri
  16193         --Reason F or Change               : Modifi ed the sto red proced ure to sho w a label  as incompl ete AOD wh en 
  16194         --                                                     disclosure  made to i nformation  is not av ailable.
  16195         --
  16196         --Purpose                 : To r etrieve AO D details  when an ad min search es
  16197         --======== ========== ========== ========== ========== ========== ========== ========== ====
  16198         IF (@userI d = '')
  16199         BEGIN
  16200         SET @userI d = null;
  16201         END
  16202        
  16203         IF CHARIND EX('\\', @ UserId) > 
  16204         BEGIN
  16205                 SE T @UserId=  REPLACE ( @UserId,'\ \','\')
  16206         END
  16207         --print @U serId
  16208        
  16209         DECLARE @S tatus varc har(20)
  16210         SET @Statu s = 'Incom plete AOD'
  16211         BEGIN
  16212        
  16213        
  16214         with CTE1  (Disclosur e_id, natu re)
  16215         as
  16216         (
  16217        
  16218         SELECT 
  16219            disclos ureid,
  16220            STUFF(( SELECT ',  ' + Nature Name
  16221                    FROM (
  16222           select D isclosureI d, NatureN ame
  16223         FROM  [App ].[NVCC_Di sclosureNa ture] DN J oin [App]. [NVCC_Natu re] as N o n  N.Natur eId = DN.[ NatureId]
  16224         GROUP BY d n.Disclosu reId,N.[Na tureName]  ) d
  16225                                   where  nd1.Disclo sureId= d. Disclosure Id
  16226                    FOR XML PA TH('')), 1 , 1, '') [ SECTORS/US ERS]
  16227         FROM [App] .[NVCC_Dis closureNat ure] nd1
  16228         group by D isclosureI d
  16229        
  16230         )
  16231           select   d.Disclosu reId,d.use rID, 
  16232           a.Patien tName,
  16233           VISN,
  16234           d.Sta3n,
  16235           StationN ame,
  16236           Convert( VARCHAR(10 ), DateTim eOfDisclos ure,101) a s DateOfDi sclosure,
  16237           'Referra l for Care ' as State mentOfPurp ose,
  16238           CASE WHE N (Provide rNameOrGro up IS  NUL L or  Prov iderStreet Address1 I S  NULL  o r Provider City IS  N ULL or  Pr oviderStat e IS  NULL  or Provid erZip IS   NULL)  
  16239           THEN @St atus + CHA R(13) ELSE  '' END  +
  16240           CASE WHE N Provider NameOrGrou p IS NOT N ULL THEN P roviderNam eOrGroup E LSE '' END  +  CHAR(1 3)  + 
  16241           CASE WHE N Provider StreetAddr ess1 IS NO T NULL THE N Provider StreetAddr ess1 + CHA R(13)  ELS E '' END  
  16242           CASE WHE N Provider StreetAddr ess2 IS NO T NULL THE N Provider StreetAddr ess2 + CHA R(13)ELSE  '' END   +
  16243           CASE WHE N Provider City IS NO T NULL THE N Provider City +  CH AR(13) ELS E '' END    +
  16244           CASE WHE N Provider State IS N OT NULL TH EN Provide rState +   CHAR(13) E LSE '' END   +
  16245           CASE WHE N Provider Zip IS NOT  NULL THEN  ProviderZ ip ELSE ''  END AS Di sclosureAd dress,
  16246           cte1.nat ure
  16247        
  16248           INTO #Te mp1
  16249        
  16250           FROM [CC _REFDOC].[ App].[NVCC _Disclosur e] as d  I NNER JOIN
  16251            CDWWork .SPatient. SPatient a  on a.Pati entICN = d .PatientIC N INNER JO IN
  16252           CTE1 on  CTE1.Discl osure_id =  d.Disclos ureId   
  16253           WHERE d. Sta3n = @s ta3n
  16254           AND d.VI SN = @visn
  16255           AND Conv ert(VARCHA R(10), Dat eTimeOfDis closure,10 1) BETWEEN  @startDat e AND @end Date
  16256           AND d.Us erId = ISN ULL(@userI d,d.UserID );
  16257        
  16258           select d isclosureI d,ada.Acco untName as  UserName,
  16259           PatientN ame,
  16260           VISN,
  16261           Sta3n,
  16262           StationN ame,
  16263           DateOfDi sclosure,
  16264           Statemen tOfPurpose ,
  16265           Disclosu reAddress,
  16266           nature
  16267           from #Te mp1  inner  join CDWW ork.NDim.A ctiveDirec toryAccoun t AS ada o n ada.Full SamAccount Name = use rID
  16268           order by  1
  16269                 
  16270           drop tab le #Temp1;
  16271                 
  16272         END]]>
  16273        </Value>
  16274                                  
  16275       </Property >
  16276                                 
  16277       <Property 
  16278        Name="IsAn siNullsOn"  
  16279        Value="Tru e" 
  16280       />
  16281                                 
  16282       <Relations hip 
  16283        Name="Body Dependenci es"
  16284       >
  16285                                           
  16286        <Entry>
  16287                                                    
  16288         <Reference
  16289          ExternalSo urce="Buil tIns" 
  16290          Name="[var char]" 
  16291         />
  16292                                            
  16293        </Entry>
  16294                                           
  16295        <Entry>
  16296                                                    
  16297         <Reference
  16298          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[@userId]
  16299         />
  16300                                            
  16301        </Entry>
  16302                                           
  16303        <Entry />
  16304                                           
  16305        <Entry />
  16306                                           
  16307        <Entry />
  16308                                           
  16309        <Entry />
  16310                                           
  16311        <Entry />
  16312                                           
  16313        <Entry />
  16314                                           
  16315        <Entry />
  16316                                           
  16317        <Entry />
  16318                                           
  16319        <Entry />
  16320                                           
  16321        <Entry />
  16322                                           
  16323        <Entry />
  16324                                           
  16325        <Entry />
  16326                                           
  16327        <Entry />
  16328                                           
  16329        <Entry>
  16330                                                    
  16331         <Reference
  16332          ExternalSo urce="CDWW ork.dacpac
  16333          Name="[CDW Work]|[SPa tient].[SP atient]" 
  16334         />
  16335                                            
  16336        </Entry>
  16337                                           
  16338        <Entry>
  16339                                                    
  16340         <Reference
  16341          ExternalSo urce="CDWW ork.dacpac
  16342          Name="[CDW Work]|[SPa tient].[SP atient].[P atientICN]
  16343         />
  16344                                            
  16345        </Entry>
  16346                                           
  16347        <Entry />
  16348                                           
  16349        <Entry>
  16350                                                    
  16351         <Reference
  16352          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[CTE1].[C TE1].[Disc losure_id]
  16353         />
  16354                                            
  16355        </Entry>
  16356                                           
  16357        <Entry />
  16358                                           
  16359        <Entry />
  16360                                           
  16361        <Entry>
  16362                                                    
  16363         <Reference
  16364          ExternalSo urce="CDWW ork.dacpac
  16365          Name="[CDW Work]|[SPa tient].[SP atient].[P atientName ]" 
  16366         />
  16367                                            
  16368        </Entry>
  16369                                           
  16370        <Entry />
  16371                                           
  16372        <Entry />
  16373                                           
  16374        <Entry />
  16375                                           
  16376        <Entry>
  16377                                                    
  16378         <Reference
  16379          ExternalSo urce="Buil tIns" 
  16380          Name="[var char]" 
  16381         />
  16382                                            
  16383        </Entry>
  16384                                           
  16385        <Entry />
  16386                                           
  16387        <Entry />
  16388                                           
  16389        <Entry />
  16390                                           
  16391        <Entry />
  16392                                           
  16393        <Entry />
  16394                                           
  16395        <Entry />
  16396                                           
  16397        <Entry />
  16398                                           
  16399        <Entry>
  16400                                                    
  16401         <Reference
  16402          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[CTE1].[C TE1].[natu re]" 
  16403         />
  16404                                            
  16405        </Entry>
  16406                                           
  16407        <Entry>
  16408                                                    
  16409         <Reference
  16410          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[@sta3n]"  
  16411         />
  16412                                            
  16413        </Entry>
  16414                                           
  16415        <Entry />
  16416                                           
  16417        <Entry>
  16418                                                    
  16419         <Reference
  16420          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[@visn]" 
  16421         />
  16422                                            
  16423        </Entry>
  16424                                           
  16425        <Entry>
  16426                                                    
  16427         <Reference
  16428          ExternalSo urce="Buil tIns" 
  16429          Name="[var char]" 
  16430         />
  16431                                            
  16432        </Entry>
  16433                                           
  16434        <Entry>
  16435                                                    
  16436         <Reference
  16437          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[@startDa te]" 
  16438         />
  16439                                            
  16440        </Entry>
  16441                                           
  16442        <Entry>
  16443                                                    
  16444         <Reference
  16445          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[@endDate ]" 
  16446         />
  16447                                            
  16448        </Entry>
  16449                                           
  16450        <Entry />
  16451                                           
  16452        <Entry />
  16453                                           
  16454        <Entry>
  16455                                                    
  16456         <Reference
  16457          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]"  
  16458         />
  16459                                            
  16460        </Entry>
  16461                                           
  16462        <Entry>
  16463                                                    
  16464         <Reference
  16465          ExternalSo urce="CDWW ork.dacpac
  16466          Name="[CDW Work]|[NDi m].[Active DirectoryA ccount]" 
  16467         />
  16468                                            
  16469        </Entry>
  16470                                           
  16471        <Entry>
  16472                                                    
  16473         <Reference
  16474          ExternalSo urce="CDWW ork.dacpac
  16475          Name="[CDW Work]|[NDi m].[Active DirectoryA ccount].[F ullSamAcco untName]" 
  16476         />
  16477                                            
  16478        </Entry>
  16479                                           
  16480        <Entry>
  16481                                                    
  16482         <Reference
  16483          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [userID]" 
  16484         />
  16485                                            
  16486        </Entry>
  16487                                           
  16488        <Entry>
  16489                                                    
  16490         <Reference
  16491          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [Disclosur eId]" 
  16492         />
  16493                                            
  16494        </Entry>
  16495                                           
  16496        <Entry>
  16497                                                    
  16498         <Reference
  16499          ExternalSo urce="CDWW ork.dacpac
  16500          Name="[CDW Work]|[NDi m].[Active DirectoryA ccount].[A ccountName ]" 
  16501         />
  16502                                            
  16503        </Entry>
  16504                                           
  16505        <Entry>
  16506                                                    
  16507         <Reference
  16508          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [PatientNa me]" 
  16509         />
  16510                                            
  16511        </Entry>
  16512                                           
  16513        <Entry>
  16514                                                    
  16515         <Reference
  16516          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [VISN]" 
  16517         />
  16518                                            
  16519        </Entry>
  16520                                           
  16521        <Entry>
  16522                                                    
  16523         <Reference
  16524          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [Sta3n]" 
  16525         />
  16526                                            
  16527        </Entry>
  16528                                           
  16529        <Entry>
  16530                                                    
  16531         <Reference
  16532          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [StationNa me]" 
  16533         />
  16534                                            
  16535        </Entry>
  16536                                           
  16537        <Entry>
  16538                                                    
  16539         <Reference
  16540          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [DateOfDis closure]" 
  16541         />
  16542                                            
  16543        </Entry>
  16544                                           
  16545        <Entry>
  16546                                                    
  16547         <Reference
  16548          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [Statement OfPurpose]
  16549         />
  16550                                            
  16551        </Entry>
  16552                                           
  16553        <Entry>
  16554                                                    
  16555         <Reference
  16556          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [Disclosur eAddress]"  
  16557         />
  16558                                            
  16559        </Entry>
  16560                                           
  16561        <Entry>
  16562                                                    
  16563         <Reference
  16564          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [nature]" 
  16565         />
  16566                                            
  16567        </Entry>
  16568                                  
  16569       </Relation ship>
  16570                                 
  16571       <Relations hip 
  16572        Name="Dyna micObjects "
  16573       >
  16574                                           
  16575        <Entry>
  16576                                                    
  16577         <Element 
  16578          Type="SqlD ynamicColu mnSource" 
  16579          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[CTE1].[C TE1]"
  16580         >
  16581                                                              
  16582          <Relations hip 
  16583           Name="Colu mns"
  16584          >
  16585                                                                        
  16586           <Entry>
  16587                                                                                  
  16588            <Element 
  16589             Type="SqlC omputedCol umn" 
  16590             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[CTE1].[C TE1].[Disc losure_id] "
  16591            >
  16592                                                                                            
  16593             <Relations hip 
  16594              Name="Expr essionDepe ndencies"
  16595             >
  16596                                                                                                     
  16597              <Entry />
  16598                                                                                             
  16599             </Relation ship>
  16600                                                                                   
  16601            </Element>
  16602                                                                         
  16603           </Entry>
  16604                                                                        
  16605           <Entry>
  16606                                                                                  
  16607            <Element 
  16608             Type="SqlC omputedCol umn" 
  16609             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[CTE1].[C TE1].[natu re]" 
  16610            />
  16611                                                                         
  16612           </Entry>
  16613                                                               
  16614          </Relation ship>
  16615                                                     
  16616         </Element>
  16617                                            
  16618        </Entry>
  16619                                           
  16620        <Entry>
  16621                                                    
  16622         <Element 
  16623          Type="SqlD ynamicColu mnSource" 
  16624          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]"
  16625         >
  16626                                                              
  16627          <Relations hip 
  16628           Name="Colu mns"
  16629          >
  16630                                                                        
  16631           <Entry>
  16632                                                                                  
  16633            <Element 
  16634             Type="SqlC omputedCol umn" 
  16635             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [Disclosur eId]"
  16636            >
  16637                                                                                            
  16638             <Relations hip 
  16639              Name="Expr essionDepe ndencies"
  16640             >
  16641                                                                                                     
  16642              <Entry />
  16643                                                                                             
  16644             </Relation ship>
  16645                                                                                   
  16646            </Element>
  16647                                                                         
  16648           </Entry>
  16649                                                                        
  16650           <Entry>
  16651                                                                                  
  16652            <Element 
  16653             Type="SqlC omputedCol umn" 
  16654             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [userID]"
  16655            >
  16656                                                                                            
  16657             <Relations hip 
  16658              Name="Expr essionDepe ndencies"
  16659             >
  16660                                                                                                     
  16661              <Entry />
  16662                                                                                             
  16663             </Relation ship>
  16664                                                                                   
  16665            </Element>
  16666                                                                         
  16667           </Entry>
  16668                                                                        
  16669           <Entry>
  16670                                                                                  
  16671            <Element 
  16672             Type="SqlC omputedCol umn" 
  16673             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [PatientNa me]"
  16674            >
  16675                                                                                            
  16676             <Relations hip 
  16677              Name="Expr essionDepe ndencies"
  16678             >
  16679                                                                                                     
  16680              <Entry>
  16681                                                                                                               
  16682               <Reference
  16683                ExternalSo urce="CDWW ork.dacpac
  16684                Name="[CDW Work]|[SPa tient].[SP atient].[P atientName ]" 
  16685               />
  16686                                                                                                      
  16687              </Entry>
  16688                                                                                             
  16689             </Relation ship>
  16690                                                                                   
  16691            </Element>
  16692                                                                         
  16693           </Entry>
  16694                                                                        
  16695           <Entry>
  16696                                                                                  
  16697            <Element 
  16698             Type="SqlC omputedCol umn" 
  16699             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [VISN]"
  16700            >
  16701                                                                                            
  16702             <Relations hip 
  16703              Name="Expr essionDepe ndencies"
  16704             >
  16705                                                                                                     
  16706              <Entry />
  16707                                                                                             
  16708             </Relation ship>
  16709                                                                                   
  16710            </Element>
  16711                                                                         
  16712           </Entry>
  16713                                                                        
  16714           <Entry>
  16715                                                                                  
  16716            <Element 
  16717             Type="SqlC omputedCol umn" 
  16718             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [Sta3n]"
  16719            >
  16720                                                                                            
  16721             <Relations hip 
  16722              Name="Expr essionDepe ndencies"
  16723             >
  16724                                                                                                     
  16725              <Entry />
  16726                                                                                             
  16727             </Relation ship>
  16728                                                                                   
  16729            </Element>
  16730                                                                         
  16731           </Entry>
  16732                                                                        
  16733           <Entry>
  16734                                                                                  
  16735            <Element 
  16736             Type="SqlC omputedCol umn" 
  16737             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [StationNa me]"
  16738            >
  16739                                                                                            
  16740             <Relations hip 
  16741              Name="Expr essionDepe ndencies"
  16742             >
  16743                                                                                                     
  16744              <Entry />
  16745                                                                                             
  16746             </Relation ship>
  16747                                                                                   
  16748            </Element>
  16749                                                                         
  16750           </Entry>
  16751                                                                        
  16752           <Entry>
  16753                                                                                  
  16754            <Element 
  16755             Type="SqlC omputedCol umn" 
  16756             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [DateOfDis closure]" 
  16757            />
  16758                                                                         
  16759           </Entry>
  16760                                                                        
  16761           <Entry>
  16762                                                                                  
  16763            <Element 
  16764             Type="SqlC omputedCol umn" 
  16765             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [Statement OfPurpose]
  16766            />
  16767                                                                         
  16768           </Entry>
  16769                                                                        
  16770           <Entry>
  16771                                                                                  
  16772            <Element 
  16773             Type="SqlC omputedCol umn" 
  16774             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [Disclosur eAddress]"  
  16775            />
  16776                                                                         
  16777           </Entry>
  16778                                                                        
  16779           <Entry>
  16780                                                                                  
  16781            <Element 
  16782             Type="SqlC omputedCol umn" 
  16783             Name="[App ].[NVCC_us p_GetROIAd minSearch] .[#Temp1]. [nature]"
  16784            >
  16785                                                                                            
  16786             <Relations hip 
  16787              Name="Expr essionDepe ndencies"
  16788             >
  16789                                                                                                     
  16790              <Entry>
  16791                                                                                                               
  16792               <Reference
  16793                Name="[App ].[NVCC_us p_GetROIAd minSearch] .[CTE1].[C TE1].[natu re]" 
  16794               />
  16795                                                                                                      
  16796              </Entry>
  16797                                                                                             
  16798             </Relation ship>
  16799                                                                                   
  16800            </Element>
  16801                                                                         
  16802           </Entry>
  16803                                                               
  16804          </Relation ship>
  16805                                                     
  16806         </Element>
  16807                                            
  16808        </Entry>
  16809                                  
  16810       </Relation ship>
  16811                                 
  16812       <Relations hip 
  16813        Name="Para meters"
  16814       >
  16815                                           
  16816        <Entry>
  16817                                                    
  16818         <Element 
  16819          Type="SqlS ubroutineP arameter" 
  16820          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[@sta3n]"
  16821         >
  16822                                                              
  16823          <Relations hip 
  16824           Name="Type "
  16825          >
  16826                                                                        
  16827           <Entry>
  16828                                                                                  
  16829            <Element 
  16830             Type="SqlT ypeSpecifi er"
  16831            >
  16832                                                                                            
  16833             <Relations hip 
  16834              Name="Type "
  16835             >
  16836                                                                                                     
  16837              <Entry>
  16838                                                                                                               
  16839               <Reference
  16840                ExternalSo urce="Buil tIns" 
  16841                Name="[sma llint]" 
  16842               />
  16843                                                                                                      
  16844              </Entry>
  16845                                                                                             
  16846             </Relation ship>
  16847                                                                                   
  16848            </Element>
  16849                                                                         
  16850           </Entry>
  16851                                                               
  16852          </Relation ship>
  16853                                                     
  16854         </Element>
  16855                                            
  16856        </Entry>
  16857                                           
  16858        <Entry>
  16859                                                    
  16860         <Element 
  16861          Type="SqlS ubroutineP arameter" 
  16862          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[@visn]"
  16863         >
  16864                                                              
  16865          <Relations hip 
  16866           Name="Type "
  16867          >
  16868                                                                        
  16869           <Entry>
  16870                                                                                  
  16871            <Element 
  16872             Type="SqlT ypeSpecifi er"
  16873            >
  16874                                                                                            
  16875             <Relations hip 
  16876              Name="Type "
  16877             >
  16878                                                                                                     
  16879              <Entry>
  16880                                                                                                               
  16881               <Reference
  16882                ExternalSo urce="Buil tIns" 
  16883                Name="[sma llint]" 
  16884               />
  16885                                                                                                      
  16886              </Entry>
  16887                                                                                             
  16888             </Relation ship>
  16889                                                                                   
  16890            </Element>
  16891                                                                         
  16892           </Entry>
  16893                                                               
  16894          </Relation ship>
  16895                                                     
  16896         </Element>
  16897                                            
  16898        </Entry>
  16899                                           
  16900        <Entry>
  16901                                                    
  16902         <Element 
  16903          Type="SqlS ubroutineP arameter" 
  16904          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[@startDa te]"
  16905         >
  16906                                                              
  16907          <Relations hip 
  16908           Name="Type "
  16909          >
  16910                                                                        
  16911           <Entry>
  16912                                                                                  
  16913            <Element 
  16914             Type="SqlT ypeSpecifi er"
  16915            >
  16916                                                                                            
  16917             <Relations hip 
  16918              Name="Type "
  16919             >
  16920                                                                                                     
  16921              <Entry>
  16922                                                                                                               
  16923               <Reference
  16924                ExternalSo urce="Buil tIns" 
  16925                Name="[dat etime]" 
  16926               />
  16927                                                                                                      
  16928              </Entry>
  16929                                                                                             
  16930             </Relation ship>
  16931                                                                                   
  16932            </Element>
  16933                                                                         
  16934           </Entry>
  16935                                                               
  16936          </Relation ship>
  16937                                                     
  16938         </Element>
  16939                                            
  16940        </Entry>
  16941                                           
  16942        <Entry>
  16943                                                    
  16944         <Element 
  16945          Type="SqlS ubroutineP arameter" 
  16946          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[@endDate ]"
  16947         >
  16948                                                              
  16949          <Relations hip 
  16950           Name="Type "
  16951          >
  16952                                                                        
  16953           <Entry>
  16954                                                                                  
  16955            <Element 
  16956             Type="SqlT ypeSpecifi er"
  16957            >
  16958                                                                                            
  16959             <Relations hip 
  16960              Name="Type "
  16961             >
  16962                                                                                                     
  16963              <Entry>
  16964                                                                                                               
  16965               <Reference
  16966                ExternalSo urce="Buil tIns" 
  16967                Name="[dat etime]" 
  16968               />
  16969                                                                                                      
  16970              </Entry>
  16971                                                                                             
  16972             </Relation ship>
  16973                                                                                   
  16974            </Element>
  16975                                                                         
  16976           </Entry>
  16977                                                               
  16978          </Relation ship>
  16979                                                     
  16980         </Element>
  16981                                            
  16982        </Entry>
  16983                                           
  16984        <Entry>
  16985                                                    
  16986         <Element 
  16987          Type="SqlS ubroutineP arameter" 
  16988          Name="[App ].[NVCC_us p_GetROIAd minSearch] .[@userId] "
  16989         >
  16990                                                              
  16991          <Property 
  16992           Name="Defa ultExpress ionScript"
  16993          >
  16994                                                                        
  16995           <Value>
  16996            <![CDATA[n ull]]>
  16997           </Value>
  16998                                                               
  16999          </Property >
  17000                                                              
  17001          <Relations hip 
  17002           Name="Type "
  17003          >
  17004                                                                        
  17005           <Entry>
  17006                                                                                  
  17007            <Element 
  17008             Type="SqlT ypeSpecifi er"
  17009            >
  17010                                                                                            
  17011             <Property 
  17012              Name="Leng th" 
  17013              Value="50"  
  17014             />
  17015                                                                                            
  17016             <Relations hip 
  17017              Name="Type "
  17018             >
  17019                                                                                                     
  17020              <Entry>
  17021                                                                                                               
  17022               <Reference
  17023                ExternalSo urce="Buil tIns" 
  17024                Name="[var char]" 
  17025               />
  17026                                                                                                      
  17027              </Entry>
  17028                                                                                             
  17029             </Relation ship>
  17030                                                                                   
  17031            </Element>
  17032                                                                         
  17033           </Entry>
  17034                                                               
  17035          </Relation ship>
  17036                                                     
  17037         </Element>
  17038                                            
  17039        </Entry>
  17040                                  
  17041       </Relation ship>
  17042                                 
  17043       <Relations hip 
  17044        Name="Sche ma"
  17045       >
  17046                                           
  17047        <Entry>
  17048                                                    
  17049         <Reference
  17050          Name="[App ]" 
  17051         />
  17052                                            
  17053        </Entry>
  17054                                  
  17055       </Relation ship>
  17056                                 
  17057       <Annotatio
  17058        Type="SysC ommentsObj ectAnnotat ion"
  17059       >
  17060                                           
  17061        <Property 
  17062         Name="Leng th" 
  17063         Value="405 2" 
  17064        />
  17065                                           
  17066        <Property 
  17067         Name="Star tLine" 
  17068         Value="1" 
  17069        />
  17070                                           
  17071        <Property 
  17072         Name="Star tColumn" 
  17073         Value="1" 
  17074        />
  17075                                           
  17076        <Property 
  17077         Name="Head erContents
  17078         Value="CRE ATE PROCED URE [App]. [NVCC_usp_ GetROIAdmi nSearch]&# xD;&#xA;&# x9;@sta3n  smallint,  &#xD;&#xA; &#x9;@visn  smallint,  &#xD;&#xA ;&#x9;@sta rtDate Dat eTime, &#x D;&#xA;&#x 9;@endDate  DateTime,  &#xD;&#xA ;&#x9;@use rId varcha r(50) = nu ll&#xD;&#x A;&#xD;&#x A;&#x9;--E XEC [App]. [NVCC_usp_ GetROIAdmi nSearch] 5 16,8,'12/5 /2017 12:0 0:00 AM',' 12/5/2017  12:00:00 A M',null&#x D;&#xA;--  NOTICE:&#x D;&#xA;--  Do not edi t the stor ed procedu re live on  the serve r. Code to  generate& #xD;&#xA;- - the proc edures is  stored in  the projec t reposito ry. Any ch anges made &#xD;&#xA; -- that ar e not reco rded in th e reposito ry will be  overwritt en.&#xD;&# xA;&#xD;&# xA;AS" 
  17079        />
  17080                                  
  17081       </Annotati on>
  17082                        
  17083      </Element>
  17084                       
  17085      <Element 
  17086       Type="SqlP rocedure" 
  17087       Name="[App ].[NVCC_us p_GetSensD x]"
  17088      >
  17089                                 
  17090       <Property 
  17091        Name="Body Script"
  17092       >
  17093                                           
  17094        <Value>
  17095         <![CDATA[
  17096        
  17097         BEGIN
  17098             -- dec lare @pid  bigint; se t @pid=171 7444;
  17099                 --  SET NOCOU NT ON adde d to preve nt extra r esult sets  from
  17100                 --  interferi ng with SE LECT state ments.
  17101                 SE T NOCOUNT  ON;
  17102        
  17103             DECLAR E @flag in t;
  17104             SET @f lag=0;
  17105        
  17106             -- Che ck all of  a patient' s recorded  diagnoses  against o ur table o f sensitiv e
  17107             -- dia gnoses, an d record t he various  diagnosis  flags.
  17108             SELECT  --TOP 300
  17109                          CASE
  17110                                   WHEN p .ICD10SID  > 0 THEN p .ICD10SID
  17111                                   ELSE p .ICD9SID
  17112                          END  as Code
  17113                          ,CAS E
  17114                                   WHEN p .ICD10SID  > 0 THEN ' ICD10'
  17115                                   ELSE ' ICD9'
  17116                          END  as  Coding System
  17117                          ,CAS E
  17118                                   WHEN p .ICD10SID  > 0 THEN 
  17119                                            (select  top 1 s.Ab useDx from  App.NVCC_ SensitiveD xCodes s w here p.ICD 10SID = s. ICDSID)
  17120                                   ELSE
  17121                                            (select  top 1 t.Ab useDx from  App.NVCC_ SensitiveD xCodes t w here p.ICD 9SID = t.I CDSID)
  17122                          END  as AbuseDx
  17123                          ,CAS E
  17124                                   WHEN p .ICD10SID  > 0 THEN 
  17125                                            (select  top 1 s.Si ckleDx fro m App.NVCC _Sensitive DxCodes s  where p.IC D10SID = s .ICDSID)
  17126                                   ELSE
  17127                                            (select  top 1 t.Si ckleDx fro m App.NVCC _Sensitive DxCodes t  where p.IC D9SID = t. ICDSID)
  17128                          END  as SickleD x
  17129                          ,CAS E
  17130                                   WHEN p .ICD10SID  > 0 THEN 
  17131                                            (select  top 1 s.HI VDx from A pp.NVCC_Se nsitiveDxC odes s whe re p.ICD10 SID = s.IC DSID)
  17132                                   ELSE
  17133                                            (select  top 1 t.HI VDx from A pp.NVCC_Se nsitiveDxC odes t whe re p.ICD9S ID = t.ICD SID)
  17134                          END  as HIVDx
  17135              INTO  #ptsdx
  17136              FROM  CDWWork.Ou tpat.VDiag nosis p
  17137              JOIN  App.NVCC_S ensitiveDx Codes x on  (p.ICD9SI D = x.ICDS ID OR p.IC D10SID = x .ICDSID)
  17138              WHERE  PatientSI D in (sele ct PtSID f rom [App]. [udf_AllPa tientsSIDs ](@pid));
  17139        
  17140        
  17141                   
  17142              IF (( select sum (AbuseDx)  from #ptsd x) > 0)  s et @flag=@ flag+1;
  17143              IF (( select sum (HIVDx) fr om #ptsdx)  > 0)    s et @flag=@ flag+4;
  17144              IF (( select sum (SickleDx)  from #pts dx) > 0) s et @flag=@ flag+16;
  17145        
  17146        
  17147              -- Ch eck all of  a patient 's recorde d ICD code s recorded  on his pr oblem list
  17148              -- ag ainst our  table of s ensitive d iagnoses,  and record  the vario us
  17149              -- di agnosis fl ags.
  17150              SELEC T prb.ICD9 SID
  17151                     ,prb.ICD1 0SID
  17152                     ,prb.Pati entSID
  17153                     ,x.AbuseD x
  17154                     ,x.Sickle Dx
  17155                     ,x.HIVDx 
  17156              INTO  #ptsprb
  17157              FROM  CDWWork.Ou tpat.Probl emList AS  prb 
  17158              INNER  JOIN App. NVCC_Sensi tiveDxCode s x on (pr b.ICD9SID  = x.ICDSID  OR prb.IC D10SID = x .ICDSID)
  17159              WHERE  PatientSI D in (sele ct PtSID f rom [App]. [udf_AllPa tientsSIDs ](@pid))
  17160                AND  prb.Activ eFlag = 'A '
  17161                AND  prb.Probl emListCond ition <> ' H';
  17162        
  17163              if (( select sum (AbuseDx)  from #ptsp rb) > 0) s et @flag=@ flag+2;
  17164              if (( select sum (HIVDx) fr om #ptsprb )   > 0) s et @flag=@ flag+8;
  17165              if (( select sum (SickleDx)  from #pts prb)> 0) s et @flag=@ flag+32;
  17166        
  17167        
  17168              drop  table #pts dx;
  17169              drop  table #pts prb;
  17170        
  17171              selec t @flag as  sensdxfla g;
  17172              --exe c [App].[N VCC_usp_Ge tSensDx] @ pid=171744 4;
  17173              end;] ]>
  17174        </Value>
  17175                                  
  17176       </Property >
  17177                                 
  17178       <Property 
  17179        Name="IsAn siNullsOn"  
  17180        Value="Tru e" 
  17181       />
  17182                                 
  17183       <Relations hip 
  17184        Name="Body Dependenci es"
  17185       >
  17186                                           
  17187        <Entry>
  17188                                                    
  17189         <Reference
  17190          ExternalSo urce="Buil tIns" 
  17191          Name="[int ]" 
  17192         />
  17193                                            
  17194        </Entry>
  17195                                           
  17196        <Entry>
  17197                                                    
  17198         <Reference
  17199          ExternalSo urce="CDWW ork.dacpac
  17200          Name="[CDW Work]|[Out pat].[VDia gnosis]" 
  17201         />
  17202                                            
  17203        </Entry>
  17204                                           
  17205        <Entry>
  17206                                                    
  17207         <Reference
  17208          Name="[App ].[NVCC_Se nsitiveDxC odes]" 
  17209         />
  17210                                            
  17211        </Entry>
  17212                                           
  17213        <Entry>
  17214                                                    
  17215         <Reference
  17216          ExternalSo urce="CDWW ork.dacpac
  17217          Name="[CDW Work]|[Out pat].[VDia gnosis].[I CD9SID]" 
  17218         />
  17219                                            
  17220        </Entry>
  17221                                           
  17222        <Entry>
  17223                                                    
  17224         <Reference
  17225          Name="[App ].[NVCC_Se nsitiveDxC odes].[ICD SID]" 
  17226         />
  17227                                            
  17228        </Entry>
  17229                                           
  17230        <Entry>
  17231                                                    
  17232         <Reference
  17233          ExternalSo urce="CDWW ork.dacpac
  17234          Name="[CDW Work]|[Out pat].[VDia gnosis].[I CD10SID]" 
  17235         />
  17236                                            
  17237        </Entry>
  17238                                           
  17239        <Entry>
  17240                                                    
  17241         <Reference
  17242          Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]" 
  17243         />
  17244                                            
  17245        </Entry>
  17246                                           
  17247        <Entry>
  17248                                                    
  17249         <Reference
  17250          ExternalSo urce="CDWW ork.dacpac
  17251          Name="[CDW Work]|[Out pat].[VDia gnosis].[I CD10SID]" 
  17252         />
  17253                                            
  17254        </Entry>
  17255                                           
  17256        <Entry>
  17257                                                    
  17258         <Reference
  17259          Name="[App ].[NVCC_Se nsitiveDxC odes].[ICD SID]" 
  17260         />
  17261                                            
  17262        </Entry>
  17263                                           
  17264        <Entry>
  17265                                                    
  17266         <Reference
  17267          Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]" 
  17268         />
  17269                                            
  17270        </Entry>
  17271                                           
  17272        <Entry>
  17273                                                    
  17274         <Reference
  17275          ExternalSo urce="CDWW ork.dacpac
  17276          Name="[CDW Work]|[Out pat].[VDia gnosis].[I CD9SID]" 
  17277         />
  17278                                            
  17279        </Entry>
  17280                                           
  17281        <Entry>
  17282                                                    
  17283         <Reference
  17284          Name="[App ].[NVCC_Se nsitiveDxC odes].[ICD SID]" 
  17285         />
  17286                                            
  17287        </Entry>
  17288                                           
  17289        <Entry>
  17290                                                    
  17291         <Reference
  17292          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]" 
  17293         />
  17294                                            
  17295        </Entry>
  17296                                           
  17297        <Entry>
  17298                                                    
  17299         <Reference
  17300          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]" 
  17301         />
  17302                                            
  17303        </Entry>
  17304                                           
  17305        <Entry>
  17306                                                    
  17307         <Reference
  17308          Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]" 
  17309         />
  17310                                            
  17311        </Entry>
  17312                                           
  17313        <Entry>
  17314                                                    
  17315         <Reference
  17316          Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]" 
  17317         />
  17318                                            
  17319        </Entry>
  17320                                           
  17321        <Entry>
  17322                                                    
  17323         <Reference
  17324          ExternalSo urce="CDWW ork.dacpac
  17325          Name="[CDW Work]|[Out pat].[VDia gnosis].[P atientSID]
  17326         />
  17327                                            
  17328        </Entry>
  17329                                           
  17330        <Entry>
  17331                                                    
  17332         <Reference
  17333          Name="[App ].[NVCC_us p_GetSensD x].[@pid]"  
  17334         />
  17335                                            
  17336        </Entry>
  17337                                           
  17338        <Entry>
  17339                                                    
  17340         <Reference
  17341          Name="[App ].[udf_All PatientsSI Ds]" 
  17342         />
  17343                                            
  17344        </Entry>
  17345                                           
  17346        <Entry>
  17347                                                    
  17348         <Reference
  17349          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  17350         />
  17351                                            
  17352        </Entry>
  17353                                           
  17354        <Entry>
  17355                                                    
  17356         <Reference
  17357          Name="[App ].[NVCC_us p_GetSensD x].[#ptsdx ]" 
  17358         />
  17359                                            
  17360        </Entry>
  17361                                           
  17362        <Entry>
  17363                                                    
  17364         <Reference
  17365          Name="[App ].[NVCC_us p_GetSensD x].[#ptsdx ].[AbuseDx ]" 
  17366         />
  17367                                            
  17368        </Entry>
  17369                                           
  17370        <Entry>
  17371                                                    
  17372         <Reference
  17373          Name="[App ].[NVCC_us p_GetSensD x].[#ptsdx ].[HIVDx]"  
  17374         />
  17375                                            
  17376        </Entry>
  17377                                           
  17378        <Entry>
  17379                                                    
  17380         <Reference
  17381          Name="[App ].[NVCC_us p_GetSensD x].[#ptsdx ].[SickleD x]" 
  17382         />
  17383                                            
  17384        </Entry>
  17385                                           
  17386        <Entry>
  17387                                                    
  17388         <Reference
  17389          ExternalSo urce="CDWW ork.dacpac
  17390          Name="[CDW Work]|[Out pat].[Prob lemList]" 
  17391         />
  17392                                            
  17393        </Entry>
  17394                                           
  17395        <Entry>
  17396                                                    
  17397         <Reference
  17398          ExternalSo urce="CDWW ork.dacpac
  17399          Name="[CDW Work]|[Out pat].[Prob lemList].[ ICD9SID]" 
  17400         />
  17401                                            
  17402        </Entry>
  17403                                           
  17404        <Entry>
  17405                                                    
  17406         <Reference
  17407          Name="[App ].[NVCC_Se nsitiveDxC odes].[ICD SID]" 
  17408         />
  17409                                            
  17410        </Entry>
  17411                                           
  17412        <Entry>
  17413                                                    
  17414         <Reference
  17415          ExternalSo urce="CDWW ork.dacpac
  17416          Name="[CDW Work]|[Out pat].[Prob lemList].[ ICD10SID]"  
  17417         />
  17418                                            
  17419        </Entry>
  17420                                           
  17421        <Entry>
  17422                                                    
  17423         <Reference
  17424          ExternalSo urce="CDWW ork.dacpac
  17425          Name="[CDW Work]|[Out pat].[Prob lemList].[ PatientSID ]" 
  17426         />
  17427                                            
  17428        </Entry>
  17429                                           
  17430        <Entry>
  17431                                                    
  17432         <Reference
  17433          Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]" 
  17434         />
  17435                                            
  17436        </Entry>
  17437                                           
  17438        <Entry>
  17439                                                    
  17440         <Reference
  17441          Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]" 
  17442         />
  17443                                            
  17444        </Entry>
  17445                                           
  17446        <Entry>
  17447                                                    
  17448         <Reference
  17449          Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]" 
  17450         />
  17451                                            
  17452        </Entry>
  17453                                           
  17454        <Entry>
  17455                                                    
  17456         <Reference
  17457          ExternalSo urce="CDWW ork.dacpac
  17458          Name="[CDW Work]|[Out pat].[Prob lemList].[ PatientSID ]" 
  17459         />
  17460                                            
  17461        </Entry>
  17462                                           
  17463        <Entry>
  17464                                                    
  17465         <Reference
  17466          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  17467         />
  17468                                            
  17469        </Entry>
  17470                                           
  17471        <Entry>
  17472                                                    
  17473         <Reference
  17474          ExternalSo urce="CDWW ork.dacpac
  17475          Name="[CDW Work]|[Out pat].[Prob lemList].[ ActiveFlag ]" 
  17476         />
  17477                                            
  17478        </Entry>
  17479                                           
  17480        <Entry>
  17481                                                    
  17482         <Reference
  17483          ExternalSo urce="CDWW ork.dacpac
  17484          Name="[CDW Work]|[Out pat].[Prob lemList].[ ProblemLis tCondition ]" 
  17485         />
  17486                                            
  17487        </Entry>
  17488                                           
  17489        <Entry>
  17490                                                    
  17491         <Reference
  17492          Name="[App ].[NVCC_us p_GetSensD x].[#ptspr b]" 
  17493         />
  17494                                            
  17495        </Entry>
  17496                                           
  17497        <Entry>
  17498                                                    
  17499         <Reference
  17500          Name="[App ].[NVCC_us p_GetSensD x].[#ptspr b].[AbuseD x]" 
  17501         />
  17502                                            
  17503        </Entry>
  17504                                           
  17505        <Entry>
  17506                                                    
  17507         <Reference
  17508          Name="[App ].[NVCC_us p_GetSensD x].[#ptspr b].[HIVDx]
  17509         />
  17510                                            
  17511        </Entry>
  17512                                           
  17513        <Entry>
  17514                                                    
  17515         <Reference
  17516          Name="[App ].[NVCC_us p_GetSensD x].[#ptspr b].[Sickle Dx]" 
  17517         />
  17518                                            
  17519        </Entry>
  17520                                  
  17521       </Relation ship>
  17522                                 
  17523       <Relations hip 
  17524        Name="Dyna micObjects "
  17525       >
  17526                                           
  17527        <Entry>
  17528                                                    
  17529         <Element 
  17530          Type="SqlD ynamicColu mnSource" 
  17531          Name="[App ].[NVCC_us p_GetSensD x].[#ptsdx ]"
  17532         >
  17533                                                              
  17534          <Relations hip 
  17535           Name="Colu mns"
  17536          >
  17537                                                                        
  17538           <Entry>
  17539                                                                                  
  17540            <Element 
  17541             Type="SqlC omputedCol umn" 
  17542             Name="[App ].[NVCC_us p_GetSensD x].[#ptsdx ].[Code]" 
  17543            />
  17544                                                                         
  17545           </Entry>
  17546                                                                        
  17547           <Entry>
  17548                                                                                  
  17549            <Element 
  17550             Type="SqlC omputedCol umn" 
  17551             Name="[App ].[NVCC_us p_GetSensD x].[#ptsdx ].[CodingS ystem]" 
  17552            />
  17553                                                                         
  17554           </Entry>
  17555                                                                        
  17556           <Entry>
  17557                                                                                  
  17558            <Element 
  17559             Type="SqlC omputedCol umn" 
  17560             Name="[App ].[NVCC_us p_GetSensD x].[#ptsdx ].[AbuseDx ]" 
  17561            />
  17562                                                                         
  17563           </Entry>
  17564                                                                        
  17565           <Entry>
  17566                                                                                  
  17567            <Element 
  17568             Type="SqlC omputedCol umn" 
  17569             Name="[App ].[NVCC_us p_GetSensD x].[#ptsdx ].[SickleD x]" 
  17570            />
  17571                                                                         
  17572           </Entry>
  17573                                                                        
  17574           <Entry>
  17575                                                                                  
  17576            <Element 
  17577             Type="SqlC omputedCol umn" 
  17578             Name="[App ].[NVCC_us p_GetSensD x].[#ptsdx ].[HIVDx]"  
  17579            />
  17580                                                                         
  17581           </Entry>
  17582                                                               
  17583          </Relation ship>
  17584                                                     
  17585         </Element>
  17586                                            
  17587        </Entry>
  17588                                           
  17589        <Entry>
  17590                                                    
  17591         <Element 
  17592          Type="SqlD ynamicColu mnSource" 
  17593          Name="[App ].[NVCC_us p_GetSensD x].[#ptspr b]"
  17594         >
  17595                                                              
  17596          <Relations hip 
  17597           Name="Colu mns"
  17598          >
  17599                                                                        
  17600           <Entry>
  17601                                                                                  
  17602            <Element 
  17603             Type="SqlC omputedCol umn" 
  17604             Name="[App ].[NVCC_us p_GetSensD x].[#ptspr b].[ICD9SI D]"
  17605            >
  17606                                                                                            
  17607             <Relations hip 
  17608              Name="Expr essionDepe ndencies"
  17609             >
  17610                                                                                                     
  17611              <Entry>
  17612                                                                                                               
  17613               <Reference
  17614                ExternalSo urce="CDWW ork.dacpac
  17615                Name="[CDW Work]|[Out pat].[Prob lemList].[ ICD9SID]" 
  17616               />
  17617                                                                                                      
  17618              </Entry>
  17619                                                                                             
  17620             </Relation ship>
  17621                                                                                   
  17622            </Element>
  17623                                                                         
  17624           </Entry>
  17625                                                                        
  17626           <Entry>
  17627                                                                                  
  17628            <Element 
  17629             Type="SqlC omputedCol umn" 
  17630             Name="[App ].[NVCC_us p_GetSensD x].[#ptspr b].[ICD10S ID]"
  17631            >
  17632                                                                                            
  17633             <Relations hip 
  17634              Name="Expr essionDepe ndencies"
  17635             >
  17636                                                                                                     
  17637              <Entry>
  17638                                                                                                               
  17639               <Reference
  17640                ExternalSo urce="CDWW ork.dacpac
  17641                Name="[CDW Work]|[Out pat].[Prob lemList].[ ICD10SID]"  
  17642               />
  17643                                                                                                      
  17644              </Entry>
  17645                                                                                             
  17646             </Relation ship>
  17647                                                                                   
  17648            </Element>
  17649                                                                         
  17650           </Entry>
  17651                                                                        
  17652           <Entry>
  17653                                                                                  
  17654            <Element 
  17655             Type="SqlC omputedCol umn" 
  17656             Name="[App ].[NVCC_us p_GetSensD x].[#ptspr b].[Patien tSID]"
  17657            >
  17658                                                                                            
  17659             <Relations hip 
  17660              Name="Expr essionDepe ndencies"
  17661             >
  17662                                                                                                     
  17663              <Entry>
  17664                                                                                                               
  17665               <Reference
  17666                ExternalSo urce="CDWW ork.dacpac
  17667                Name="[CDW Work]|[Out pat].[Prob lemList].[ PatientSID ]" 
  17668               />
  17669                                                                                                      
  17670              </Entry>
  17671                                                                                             
  17672             </Relation ship>
  17673                                                                                   
  17674            </Element>
  17675                                                                         
  17676           </Entry>
  17677                                                                        
  17678           <Entry>
  17679                                                                                  
  17680            <Element 
  17681             Type="SqlC omputedCol umn" 
  17682             Name="[App ].[NVCC_us p_GetSensD x].[#ptspr b].[AbuseD x]"
  17683            >
  17684                                                                                            
  17685             <Relations hip 
  17686              Name="Expr essionDepe ndencies"
  17687             >
  17688                                                                                                     
  17689              <Entry>
  17690                                                                                                               
  17691               <Reference
  17692                Name="[App ].[NVCC_Se nsitiveDxC odes].[Abu seDx]" 
  17693               />
  17694                                                                                                      
  17695              </Entry>
  17696                                                                                             
  17697             </Relation ship>
  17698                                                                                   
  17699            </Element>
  17700                                                                         
  17701           </Entry>
  17702                                                                        
  17703           <Entry>
  17704                                                                                  
  17705            <Element 
  17706             Type="SqlC omputedCol umn" 
  17707             Name="[App ].[NVCC_us p_GetSensD x].[#ptspr b].[Sickle Dx]"
  17708            >
  17709                                                                                            
  17710             <Relations hip 
  17711              Name="Expr essionDepe ndencies"
  17712             >
  17713                                                                                                     
  17714              <Entry>
  17715                                                                                                               
  17716               <Reference
  17717                Name="[App ].[NVCC_Se nsitiveDxC odes].[Sic kleDx]" 
  17718               />
  17719                                                                                                      
  17720              </Entry>
  17721                                                                                             
  17722             </Relation ship>
  17723                                                                                   
  17724            </Element>
  17725                                                                         
  17726           </Entry>
  17727                                                                        
  17728           <Entry>
  17729                                                                                  
  17730            <Element 
  17731             Type="SqlC omputedCol umn" 
  17732             Name="[App ].[NVCC_us p_GetSensD x].[#ptspr b].[HIVDx] "
  17733            >
  17734                                                                                            
  17735             <Relations hip 
  17736              Name="Expr essionDepe ndencies"
  17737             >
  17738                                                                                                     
  17739              <Entry>
  17740                                                                                                               
  17741               <Reference
  17742                Name="[App ].[NVCC_Se nsitiveDxC odes].[HIV Dx]" 
  17743               />
  17744                                                                                                      
  17745              </Entry>
  17746                                                                                             
  17747             </Relation ship>
  17748                                                                                   
  17749            </Element>
  17750                                                                         
  17751           </Entry>
  17752                                                               
  17753          </Relation ship>
  17754                                                     
  17755         </Element>
  17756                                            
  17757        </Entry>
  17758                                  
  17759       </Relation ship>
  17760                                 
  17761       <Relations hip 
  17762        Name="Para meters"
  17763       >
  17764                                           
  17765        <Entry>
  17766                                                    
  17767         <Element 
  17768          Type="SqlS ubroutineP arameter" 
  17769          Name="[App ].[NVCC_us p_GetSensD x].[@pid]"
  17770         >
  17771                                                              
  17772          <Relations hip 
  17773           Name="Type "
  17774          >
  17775                                                                        
  17776           <Entry>
  17777                                                                                  
  17778            <Element 
  17779             Type="SqlT ypeSpecifi er"
  17780            >
  17781                                                                                            
  17782             <Relations hip 
  17783              Name="Type "
  17784             >
  17785                                                                                                     
  17786              <Entry>
  17787                                                                                                               
  17788               <Reference
  17789                ExternalSo urce="Buil tIns" 
  17790                Name="[big int]" 
  17791               />
  17792                                                                                                      
  17793              </Entry>
  17794                                                                                             
  17795             </Relation ship>
  17796                                                                                   
  17797            </Element>
  17798                                                                         
  17799           </Entry>
  17800                                                               
  17801          </Relation ship>
  17802                                                     
  17803         </Element>
  17804                                            
  17805        </Entry>
  17806                                  
  17807       </Relation ship>
  17808                                 
  17809       <Relations hip 
  17810        Name="Sche ma"
  17811       >
  17812                                           
  17813        <Entry>
  17814                                                    
  17815         <Reference
  17816          Name="[App ]" 
  17817         />
  17818                                            
  17819        </Entry>
  17820                                  
  17821       </Relation ship>
  17822                                 
  17823       <Annotatio
  17824        Type="SysC ommentsObj ectAnnotat ion"
  17825       >
  17826                                           
  17827        <Property 
  17828         Name="Crea teOffset" 
  17829         Value="4" 
  17830        />
  17831                                           
  17832        <Property 
  17833         Name="Leng th" 
  17834         Value="441 1" 
  17835        />
  17836                                           
  17837        <Property 
  17838         Name="Star tLine" 
  17839         Value="1" 
  17840        />
  17841                                           
  17842        <Property 
  17843         Name="Star tColumn" 
  17844         Value="1" 
  17845        />
  17846                                           
  17847        <Property 
  17848         Name="Head erContents
  17849         Value="&#x D;&#xA;&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetSensDx] &#xD;&#xA; &#x9;-- Ad d the para meters for  the store d procedur e here&#xD ;&#xA;&#x9 ;@pid bigi nt -- this  is the pa tientsid&# xD;&#xA;-- ========== ========== ========== ========== ========== ========== ========== ========== ==&#xD;&#x A;--Reques tor              : No n Va Coord inated Car e Project& #xD;&#xA;- -Author                  : Jerry  Kohler (O riginal sc ript by Dr . Charles  Demosthene s)&#xD;&#x A;--Object /SP Name         : NV CC_usp_Get SensDx&#xD ;&#xA;--Se rver                  : &#xD;&#x A;--Data B ase              : CC _REFDOC&#x D;&#xA;--S chema                  : App&#xD ;&#xA;--Re port                  : N/A&#xD; &#xA;--Fol der                 :  N/A&#xD;& #xA;--Repo rt Loc             :  N/A&#xD;&# xA;--Job                     : N one&#xD;&# xA;--Job L oc                : N one&#xD;&# xA;--Note                    : & #xD;&#xA;- -Date Crea ted           : 01-20 -2016&#xD; &#xA;--&#x D;&#xA;--C hanged                 : 01-20-2 016&#xD;&# xA;--Chang ed By             : J erry Kohle r&#xD;&#xA ;--Reason  For Change      : Rem oved stati on paramet er; we wan t the data  for the&# xD;&#xA;--                           patien t no matte r where th at patient  was treat ed.&#xD;&# xA;--&#xD; &#xA;--Cha nged                :  01-29-201 6&#xD;&#xA ;--Changed  By             : Jer ry Kohler& #xD;&#xA;- -Reason Fo r Change      : Conso lidated so me queries  the scrip t was doin g into few er,&#xD;&# xA;--                          s maller one s since we  now have  a table co ntaining a ll of&#xD; &#xA;--                           the sensi tive diagn oses &amp;  ICD SIDS  (9 &amp; 1 0)&#xD;&#x A;--&#xD;& #xA;--Purp ose                :  Retrieve a ny sensiti ve diagnos es that ma y exist fo r a&#xD;&# xA;--                          p atient.  I f there ar e any, the y require  special ha ndling&#xD ;&#xA;--                           to deter mine which  outsource  partners  can know a bout them. &#xD;&#xA; --======== ========== ========== ========== ========== ========== ========== ========== ====&#xD;& #xA;AS" 
  17850        />
  17851                                  
  17852       </Annotati on>
  17853                        
  17854      </Element>
  17855                       
  17856      <Element 
  17857       Type="SqlP rocedure" 
  17858       Name="[App ].[NVCC_us p_GetVAMed s]"
  17859      >
  17860                                 
  17861       <Property 
  17862        Name="Body Script"
  17863       >
  17864                                           
  17865        <Value>
  17866         <![CDATA[
  17867         --======== ========== ========== ========== ========== ========== ========== ========== ===
  17868         --Requesto r                                : Non Va C oordinated  Care Proj ect
  17869         --Author                  : Jerr y Kohler ( Original s cript by D r. Charles  Demosthen es)
  17870         --Object/S P Name                  : NVCC_u sp_GetVAMe ds
  17871         --SERVER                                   
  17872         --Data Bas e                                : CC_REFDO C
  17873         --Schema                                    : App
  17874         --Report                                    : N/A
  17875         --Folder                                    : N/A
  17876         --Report L oc             : N/A
  17877         --Job                     : None
  17878         --Job Loc                 : None
  17879         --Note                    : 
  17880         --Date Cre ated           : 02-0 4-2016
  17881         --
  17882         --Last Cha nged           : 08-2 3-2016
  17883         --Last Cha nged By                 : Jerry  Kohler - N orthwest I nnovation  Center (NW IC)
  17884         --Reason F or Change               : Users  registerin g complain ts that RE FDOC is no t showing
  17885         --                          the  same numbe r of curre nt prescri ptions as  CPRS.
  17886         --                          Afte r a meetin g with Jud y & Dr. D  they had u s change
  17887         --                          the  criteria t o all pres criptions  released o ver the la st
  17888         --                          year  regardles s of statu s or curre ntly takin g (see
  17889         --                          comm ents embed ded below)
  17890         --
  17891         --Last Cha nged           : 08-2 2-2016
  17892         --Last Cha nged By                 : Brian  Diggs - No rthwest In novation C enter (NWI C)
  17893         --Reason F or Change               : Reconc iled with  version on  server.
  17894         --                          Upda ted docume ntation an d creation /signing s tandards
  17895         --                                 : Remove d station  parameter  in order t o expand t he search
  17896         --                          for  a patient' s VA meds  from a sin gle statio n to any
  17897         --                          stat ion a pati ent is ass ociated wi th.
  17898         --
  17899         --Purpose                 : Retr ieve a pat ient's med ications i ssued by V A for
  17900         --                          incl usion into  NVCC docu mentation
  17901         --======== ========== ========== ========== ========== ========== ========== ========== ===
  17902        
  17903        
  17904         BEGIN
  17905             -- SET  NOCOUNT O N added to  prevent e xtra resul t sets fro m
  17906             -- int erfering w ith SELECT  statement s.
  17907             SET NO COUNT ON;
  17908        
  17909             WITH M yDrugs AS
  17910                (
  17911         --      de clare @PID  int = 100 0862763
  17912         --      se lect PTSid  from [App ].[udf_All PatientsSI Ds](@pid)
  17913                 SE LECT ROF.S ta3n
  17914                        ,ROF.[ RxOutpatSI D]
  17915                        ,ROF.[ FillNumber ]
  17916                        ,RO.[R xStatus]
  17917                        ,ROF.[ LocalDrugN ameWithDos e]
  17918                        ,ROF.[ IssueDate]
  17919                        ,ROF.[ FillDateTi me]
  17920                                     ,RO. NextPossib leFillDate
  17921                        ,ROF.[ Qty]
  17922                        ,ROF.[ DaysSupply ]
  17923                                     ,RO. [MaxRefill s]
  17924                        ,Row_N umber() OV ER(partiti on by ROF. [LocalDrug NameWithDo se] Order  by ROF.[Fi llDateTime ] desc) AS  Rn
  17925                 FR OM [CDWWor k].[RxOut] .[RxOutpat Fill] ROF
  17926                                   INNER  JOIN CDWWo rk.RxOut.R xOutpat AS  RO
  17927                                            ON ROF.R xOutpatSID  = RO.RxOu tpatSID
  17928                 WH ERE ROF.Pa tientSID i n (select  PtSID from  [App].[ud f_AllPatie ntsSIDs](@ pid)) 
  17929                    AND (Relea seDateTime  > dateadd (year, -1,  SYSDATETI ME()))
  17930                            AN D ReleaseD ateTime IS  NOT NULL
  17931                )
  17932             
  17933                 SE LECT dl.St a3n
  17934                        ,dl.rx outpatsid
  17935                        ,dl.lo caldrugnam ewithdose
  17936                        ,cast( dl.filldat etime as d ate) as fi lldate
  17937                        ,dl.qt y as qty
  17938                        ,dl.Fi llNumber
  17939                        ,sig.S ig
  17940                        ,dl.is suedate
  17941                                     ,ISN ULL(cast(d l.NextPoss ibleFillDa te as varc har), 'N/A ') as next possiblefi lldate
  17942                                     ,ISN ULL(dl.max refills, ' 0') as max refills
  17943                                     ,dl. DaysSupply  AS dayssu pply
  17944                                     ,dl. RxStatus
  17945                 FR OM MyDrugs  dl
  17946                 IN NER JOIN C DWWork.RxO ut.RxOutpa tSig sig o n dl.Rxout patsid=sig .RxOutpatS ID
  17947                 WH ERE dl.Rn  = 1
  17948             ORDER  BY dl.RxSt atus, dl.F illDateTim e desc;
  17949             
  17950         END;]]>
  17951        </Value>
  17952                                  
  17953       </Property >
  17954                                 
  17955       <Property 
  17956        Name="IsAn siNullsOn"  
  17957        Value="Tru e" 
  17958       />
  17959                                 
  17960       <Relations hip 
  17961        Name="Body Dependenci es"
  17962       >
  17963                                           
  17964        <Entry>
  17965                                                    
  17966         <Reference
  17967          ExternalSo urce="CDWW ork.dacpac
  17968          Name="[CDW Work]|[RxO ut].[RxOut patFill]" 
  17969         />
  17970                                            
  17971        </Entry>
  17972                                           
  17973        <Entry>
  17974                                                    
  17975         <Reference
  17976          ExternalSo urce="CDWW ork.dacpac
  17977          Name="[CDW Work]|[RxO ut].[RxOut pat]" 
  17978         />
  17979                                            
  17980        </Entry>
  17981                                           
  17982        <Entry>
  17983                                                    
  17984         <Reference
  17985          ExternalSo urce="CDWW ork.dacpac
  17986          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ RxOutpatSI D]" 
  17987         />
  17988                                            
  17989        </Entry>
  17990                                           
  17991        <Entry>
  17992                                                    
  17993         <Reference
  17994          ExternalSo urce="CDWW ork.dacpac
  17995          Name="[CDW Work]|[RxO ut].[RxOut pat].[RxOu tpatSID]" 
  17996         />
  17997                                            
  17998        </Entry>
  17999                                           
  18000        <Entry>
  18001                                                    
  18002         <Reference
  18003          ExternalSo urce="CDWW ork.dacpac
  18004          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ Sta3n]" 
  18005         />
  18006                                            
  18007        </Entry>
  18008                                           
  18009        <Entry>
  18010                                                    
  18011         <Reference
  18012          ExternalSo urce="CDWW ork.dacpac
  18013          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ FillNumber ]" 
  18014         />
  18015                                            
  18016        </Entry>
  18017                                           
  18018        <Entry>
  18019                                                    
  18020         <Reference
  18021          ExternalSo urce="CDWW ork.dacpac
  18022          Name="[CDW Work]|[RxO ut].[RxOut pat].[RxSt atus]" 
  18023         />
  18024                                            
  18025        </Entry>
  18026                                           
  18027        <Entry>
  18028                                                    
  18029         <Reference
  18030          ExternalSo urce="CDWW ork.dacpac
  18031          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ LocalDrugN ameWithDos e]" 
  18032         />
  18033                                            
  18034        </Entry>
  18035                                           
  18036        <Entry>
  18037                                                    
  18038         <Reference
  18039          ExternalSo urce="CDWW ork.dacpac
  18040          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ IssueDate]
  18041         />
  18042                                            
  18043        </Entry>
  18044                                           
  18045        <Entry>
  18046                                                    
  18047         <Reference
  18048          ExternalSo urce="CDWW ork.dacpac
  18049          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ FillDateTi me]" 
  18050         />
  18051                                            
  18052        </Entry>
  18053                                           
  18054        <Entry>
  18055                                                    
  18056         <Reference
  18057          ExternalSo urce="CDWW ork.dacpac
  18058          Name="[CDW Work]|[RxO ut].[RxOut pat].[Next PossibleFi llDate]" 
  18059         />
  18060                                            
  18061        </Entry>
  18062                                           
  18063        <Entry>
  18064                                                    
  18065         <Reference
  18066          ExternalSo urce="CDWW ork.dacpac
  18067          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ Qty]" 
  18068         />
  18069                                            
  18070        </Entry>
  18071                                           
  18072        <Entry>
  18073                                                    
  18074         <Reference
  18075          ExternalSo urce="CDWW ork.dacpac
  18076          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ DaysSupply ]" 
  18077         />
  18078                                            
  18079        </Entry>
  18080                                           
  18081        <Entry>
  18082                                                    
  18083         <Reference
  18084          ExternalSo urce="CDWW ork.dacpac
  18085          Name="[CDW Work]|[RxO ut].[RxOut pat].[MaxR efills]" 
  18086         />
  18087                                            
  18088        </Entry>
  18089                                           
  18090        <Entry>
  18091                                                    
  18092         <Reference
  18093          ExternalSo urce="CDWW ork.dacpac
  18094          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ PatientSID ]" 
  18095         />
  18096                                            
  18097        </Entry>
  18098                                           
  18099        <Entry>
  18100                                                    
  18101         <Reference
  18102          Name="[App ].[NVCC_us p_GetVAMed s].[@pid]"  
  18103         />
  18104                                            
  18105        </Entry>
  18106                                           
  18107        <Entry>
  18108                                                    
  18109         <Reference
  18110          Name="[App ].[udf_All PatientsSI Ds]" 
  18111         />
  18112                                            
  18113        </Entry>
  18114                                           
  18115        <Entry>
  18116                                                    
  18117         <Reference
  18118          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]" 
  18119         />
  18120                                            
  18121        </Entry>
  18122                                           
  18123        <Entry>
  18124                                                    
  18125         <Reference
  18126          ExternalSo urce="CDWW ork.dacpac
  18127          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ ReleaseDat eTime]" 
  18128         />
  18129                                            
  18130        </Entry>
  18131                                           
  18132        <Entry>
  18133                                                    
  18134         <Reference
  18135          ExternalSo urce="CDWW ork.dacpac
  18136          Name="[CDW Work]|[RxO ut].[RxOut patSig]" 
  18137         />
  18138                                            
  18139        </Entry>
  18140                                           
  18141        <Entry>
  18142                                                    
  18143         <Reference
  18144          ExternalSo urce="CDWW ork.dacpac
  18145          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ RxOutpatSI D]" 
  18146         />
  18147                                            
  18148        </Entry>
  18149                                           
  18150        <Entry>
  18151                                                    
  18152         <Reference
  18153          ExternalSo urce="CDWW ork.dacpac
  18154          Name="[CDW Work]|[RxO ut].[RxOut patSig].[R xOutpatSID ]" 
  18155         />
  18156                                            
  18157        </Entry>
  18158                                           
  18159        <Entry>
  18160                                                    
  18161         <Reference
  18162          ExternalSo urce="CDWW ork.dacpac
  18163          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ Sta3n]" 
  18164         />
  18165                                            
  18166        </Entry>
  18167                                           
  18168        <Entry>
  18169                                                    
  18170         <Reference
  18171          ExternalSo urce="CDWW ork.dacpac
  18172          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ RxOutpatSI D]" 
  18173         />
  18174                                            
  18175        </Entry>
  18176                                           
  18177        <Entry>
  18178                                                    
  18179         <Reference
  18180          ExternalSo urce="CDWW ork.dacpac
  18181          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ LocalDrugN ameWithDos e]" 
  18182         />
  18183                                            
  18184        </Entry>
  18185                                           
  18186        <Entry>
  18187                                                    
  18188         <Reference
  18189          ExternalSo urce="Buil tIns" 
  18190          Name="[dat e]" 
  18191         />
  18192                                            
  18193        </Entry>
  18194                                           
  18195        <Entry>
  18196                                                    
  18197         <Reference
  18198          ExternalSo urce="CDWW ork.dacpac
  18199          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ FillDateTi me]" 
  18200         />
  18201                                            
  18202        </Entry>
  18203                                           
  18204        <Entry>
  18205                                                    
  18206         <Reference
  18207          ExternalSo urce="CDWW ork.dacpac
  18208          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ Qty]" 
  18209         />
  18210                                            
  18211        </Entry>
  18212                                           
  18213        <Entry>
  18214                                                    
  18215         <Reference
  18216          ExternalSo urce="CDWW ork.dacpac
  18217          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ FillNumber ]" 
  18218         />
  18219                                            
  18220        </Entry>
  18221                                           
  18222        <Entry>
  18223                                                    
  18224         <Reference
  18225          ExternalSo urce="CDWW ork.dacpac
  18226          Name="[CDW Work]|[RxO ut].[RxOut patSig].[S ig]" 
  18227         />
  18228                                            
  18229        </Entry>
  18230                                           
  18231        <Entry>
  18232                                                    
  18233         <Reference
  18234          ExternalSo urce="CDWW ork.dacpac
  18235          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ IssueDate]
  18236         />
  18237                                            
  18238        </Entry>
  18239                                           
  18240        <Entry>
  18241                                                    
  18242         <Reference
  18243          ExternalSo urce="Buil tIns" 
  18244          Name="[var char]" 
  18245         />
  18246                                            
  18247        </Entry>
  18248                                           
  18249        <Entry>
  18250                                                    
  18251         <Reference
  18252          ExternalSo urce="CDWW ork.dacpac
  18253          Name="[CDW Work]|[RxO ut].[RxOut pat].[Next PossibleFi llDate]" 
  18254         />
  18255                                            
  18256        </Entry>
  18257                                           
  18258        <Entry>
  18259                                                    
  18260         <Reference
  18261          ExternalSo urce="CDWW ork.dacpac
  18262          Name="[CDW Work]|[RxO ut].[RxOut pat].[MaxR efills]" 
  18263         />
  18264                                            
  18265        </Entry>
  18266                                           
  18267        <Entry>
  18268                                                    
  18269         <Reference
  18270          ExternalSo urce="CDWW ork.dacpac
  18271          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ DaysSupply ]" 
  18272         />
  18273                                            
  18274        </Entry>
  18275                                           
  18276        <Entry>
  18277                                                    
  18278         <Reference
  18279          ExternalSo urce="CDWW ork.dacpac
  18280          Name="[CDW Work]|[RxO ut].[RxOut pat].[RxSt atus]" 
  18281         />
  18282                                            
  18283        </Entry>
  18284                                           
  18285        <Entry>
  18286                                                    
  18287         <Reference
  18288          ExternalSo urce="CDWW ork.dacpac
  18289          Name="[CDW Work]|[RxO ut].[RxOut patFill].[ FillDateTi me]" 
  18290         />
  18291                                            
  18292        </Entry>
  18293                                  
  18294       </Relation ship>
  18295                                 
  18296       <Relations hip 
  18297        Name="Dyna micObjects "
  18298       >
  18299                                           
  18300        <Entry>
  18301                                                    
  18302         <Element 
  18303          Type="SqlD ynamicColu mnSource" 
  18304          Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]"
  18305         >
  18306                                                              
  18307          <Relations hip 
  18308           Name="Colu mns"
  18309          >
  18310                                                                        
  18311           <Entry>
  18312                                                                                  
  18313            <Element 
  18314             Type="SqlC omputedCol umn" 
  18315             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [Sta3n]"
  18316            >
  18317                                                                                            
  18318             <Relations hip 
  18319              Name="Expr essionDepe ndencies"
  18320             >
  18321                                                                                                     
  18322              <Entry>
  18323                                                                                                               
  18324               <Reference
  18325                ExternalSo urce="CDWW ork.dacpac
  18326                Name="[CDW Work]|[RxO ut].[RxOut patFill].[ Sta3n]" 
  18327               />
  18328                                                                                                      
  18329              </Entry>
  18330                                                                                             
  18331             </Relation ship>
  18332                                                                                   
  18333            </Element>
  18334                                                                         
  18335           </Entry>
  18336                                                                        
  18337           <Entry>
  18338                                                                                  
  18339            <Element 
  18340             Type="SqlC omputedCol umn" 
  18341             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [RxOutpatS ID]"
  18342            >
  18343                                                                                            
  18344             <Relations hip 
  18345              Name="Expr essionDepe ndencies"
  18346             >
  18347                                                                                                     
  18348              <Entry>
  18349                                                                                                               
  18350               <Reference
  18351                ExternalSo urce="CDWW ork.dacpac
  18352                Name="[CDW Work]|[RxO ut].[RxOut patFill].[ RxOutpatSI D]" 
  18353               />
  18354                                                                                                      
  18355              </Entry>
  18356                                                                                             
  18357             </Relation ship>
  18358                                                                                   
  18359            </Element>
  18360                                                                         
  18361           </Entry>
  18362                                                                        
  18363           <Entry>
  18364                                                                                  
  18365            <Element 
  18366             Type="SqlC omputedCol umn" 
  18367             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [FillNumbe r]"
  18368            >
  18369                                                                                            
  18370             <Relations hip 
  18371              Name="Expr essionDepe ndencies"
  18372             >
  18373                                                                                                     
  18374              <Entry>
  18375                                                                                                               
  18376               <Reference
  18377                ExternalSo urce="CDWW ork.dacpac
  18378                Name="[CDW Work]|[RxO ut].[RxOut patFill].[ FillNumber ]" 
  18379               />
  18380                                                                                                      
  18381              </Entry>
  18382                                                                                             
  18383             </Relation ship>
  18384                                                                                   
  18385            </Element>
  18386                                                                         
  18387           </Entry>
  18388                                                                        
  18389           <Entry>
  18390                                                                                  
  18391            <Element 
  18392             Type="SqlC omputedCol umn" 
  18393             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [RxStatus] "
  18394            >
  18395                                                                                            
  18396             <Relations hip 
  18397              Name="Expr essionDepe ndencies"
  18398             >
  18399                                                                                                     
  18400              <Entry>
  18401                                                                                                               
  18402               <Reference
  18403                ExternalSo urce="CDWW ork.dacpac
  18404                Name="[CDW Work]|[RxO ut].[RxOut pat].[RxSt atus]" 
  18405               />
  18406                                                                                                      
  18407              </Entry>
  18408                                                                                             
  18409             </Relation ship>
  18410                                                                                   
  18411            </Element>
  18412                                                                         
  18413           </Entry>
  18414                                                                        
  18415           <Entry>
  18416                                                                                  
  18417            <Element 
  18418             Type="SqlC omputedCol umn" 
  18419             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [LocalDrug NameWithDo se]"
  18420            >
  18421                                                                                            
  18422             <Relations hip 
  18423              Name="Expr essionDepe ndencies"
  18424             >
  18425                                                                                                     
  18426              <Entry>
  18427                                                                                                               
  18428               <Reference
  18429                ExternalSo urce="CDWW ork.dacpac
  18430                Name="[CDW Work]|[RxO ut].[RxOut patFill].[ LocalDrugN ameWithDos e]" 
  18431               />
  18432                                                                                                      
  18433              </Entry>
  18434                                                                                             
  18435             </Relation ship>
  18436                                                                                   
  18437            </Element>
  18438                                                                         
  18439           </Entry>
  18440                                                                        
  18441           <Entry>
  18442                                                                                  
  18443            <Element 
  18444             Type="SqlC omputedCol umn" 
  18445             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [IssueDate ]"
  18446            >
  18447                                                                                            
  18448             <Relations hip 
  18449              Name="Expr essionDepe ndencies"
  18450             >
  18451                                                                                                     
  18452              <Entry>
  18453                                                                                                               
  18454               <Reference
  18455                ExternalSo urce="CDWW ork.dacpac
  18456                Name="[CDW Work]|[RxO ut].[RxOut patFill].[ IssueDate]
  18457               />
  18458                                                                                                      
  18459              </Entry>
  18460                                                                                             
  18461             </Relation ship>
  18462                                                                                   
  18463            </Element>
  18464                                                                         
  18465           </Entry>
  18466                                                                        
  18467           <Entry>
  18468                                                                                  
  18469            <Element 
  18470             Type="SqlC omputedCol umn" 
  18471             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [FillDateT ime]"
  18472            >
  18473                                                                                            
  18474             <Relations hip 
  18475              Name="Expr essionDepe ndencies"
  18476             >
  18477                                                                                                     
  18478              <Entry>
  18479                                                                                                               
  18480               <Reference
  18481                ExternalSo urce="CDWW ork.dacpac
  18482                Name="[CDW Work]|[RxO ut].[RxOut patFill].[ FillDateTi me]" 
  18483               />
  18484                                                                                                      
  18485              </Entry>
  18486                                                                                             
  18487             </Relation ship>
  18488                                                                                   
  18489            </Element>
  18490                                                                         
  18491           </Entry>
  18492                                                                        
  18493           <Entry>
  18494                                                                                  
  18495            <Element 
  18496             Type="SqlC omputedCol umn" 
  18497             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [NextPossi bleFillDat e]"
  18498            >
  18499                                                                                            
  18500             <Relations hip 
  18501              Name="Expr essionDepe ndencies"
  18502             >
  18503                                                                                                     
  18504              <Entry>
  18505                                                                                                               
  18506               <Reference
  18507                ExternalSo urce="CDWW ork.dacpac
  18508                Name="[CDW Work]|[RxO ut].[RxOut pat].[Next PossibleFi llDate]" 
  18509               />
  18510                                                                                                      
  18511              </Entry>
  18512                                                                                             
  18513             </Relation ship>
  18514                                                                                   
  18515            </Element>
  18516                                                                         
  18517           </Entry>
  18518                                                                        
  18519           <Entry>
  18520                                                                                  
  18521            <Element 
  18522             Type="SqlC omputedCol umn" 
  18523             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [Qty]"
  18524            >
  18525                                                                                            
  18526             <Relations hip 
  18527              Name="Expr essionDepe ndencies"
  18528             >
  18529                                                                                                     
  18530              <Entry>
  18531                                                                                                               
  18532               <Reference
  18533                ExternalSo urce="CDWW ork.dacpac
  18534                Name="[CDW Work]|[RxO ut].[RxOut patFill].[ Qty]" 
  18535               />
  18536                                                                                                      
  18537              </Entry>
  18538                                                                                             
  18539             </Relation ship>
  18540                                                                                   
  18541            </Element>
  18542                                                                         
  18543           </Entry>
  18544                                                                        
  18545           <Entry>
  18546                                                                                  
  18547            <Element 
  18548             Type="SqlC omputedCol umn" 
  18549             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [DaysSuppl y]"
  18550            >
  18551                                                                                            
  18552             <Relations hip 
  18553              Name="Expr essionDepe ndencies"
  18554             >
  18555                                                                                                     
  18556              <Entry>
  18557                                                                                                               
  18558               <Reference
  18559                ExternalSo urce="CDWW ork.dacpac
  18560                Name="[CDW Work]|[RxO ut].[RxOut patFill].[ DaysSupply ]" 
  18561               />
  18562                                                                                                      
  18563              </Entry>
  18564                                                                                             
  18565             </Relation ship>
  18566                                                                                   
  18567            </Element>
  18568                                                                         
  18569           </Entry>
  18570                                                                        
  18571           <Entry>
  18572                                                                                  
  18573            <Element 
  18574             Type="SqlC omputedCol umn" 
  18575             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [MaxRefill s]"
  18576            >
  18577                                                                                            
  18578             <Relations hip 
  18579              Name="Expr essionDepe ndencies"
  18580             >
  18581                                                                                                     
  18582              <Entry>
  18583                                                                                                               
  18584               <Reference
  18585                ExternalSo urce="CDWW ork.dacpac
  18586                Name="[CDW Work]|[RxO ut].[RxOut pat].[MaxR efills]" 
  18587               />
  18588                                                                                                      
  18589              </Entry>
  18590                                                                                             
  18591             </Relation ship>
  18592                                                                                   
  18593            </Element>
  18594                                                                         
  18595           </Entry>
  18596                                                                        
  18597           <Entry>
  18598                                                                                  
  18599            <Element 
  18600             Type="SqlC omputedCol umn" 
  18601             Name="[App ].[NVCC_us p_GetVAMed s].[CTE1]. [MyDrugs]. [Rn]" 
  18602            />
  18603                                                                         
  18604           </Entry>
  18605                                                               
  18606          </Relation ship>
  18607                                                     
  18608         </Element>
  18609                                            
  18610        </Entry>
  18611                                  
  18612       </Relation ship>
  18613                                 
  18614       <Relations hip 
  18615        Name="Para meters"
  18616       >
  18617                                           
  18618        <Entry>
  18619                                                    
  18620         <Element 
  18621          Type="SqlS ubroutineP arameter" 
  18622          Name="[App ].[NVCC_us p_GetVAMed s].[@pid]"
  18623         >
  18624                                                              
  18625          <Relations hip 
  18626           Name="Type "
  18627          >
  18628                                                                        
  18629           <Entry>
  18630                                                                                  
  18631            <Element 
  18632             Type="SqlT ypeSpecifi er"
  18633            >
  18634                                                                                            
  18635             <Relations hip 
  18636              Name="Type "
  18637             >
  18638                                                                                                     
  18639              <Entry>
  18640                                                                                                               
  18641               <Reference
  18642                ExternalSo urce="Buil tIns" 
  18643                Name="[big int]" 
  18644               />
  18645                                                                                                      
  18646              </Entry>
  18647                                                                                             
  18648             </Relation ship>
  18649                                                                                   
  18650            </Element>
  18651                                                                         
  18652           </Entry>
  18653                                                               
  18654          </Relation ship>
  18655                                                     
  18656         </Element>
  18657                                            
  18658        </Entry>
  18659                                  
  18660       </Relation ship>
  18661                                 
  18662       <Relations hip 
  18663        Name="Sche ma"
  18664       >
  18665                                           
  18666        <Entry>
  18667                                                    
  18668         <Reference
  18669          Name="[App ]" 
  18670         />
  18671                                            
  18672        </Entry>
  18673                                  
  18674       </Relation ship>
  18675                                 
  18676       <Annotatio
  18677        Type="SysC ommentsObj ectAnnotat ion"
  18678       >
  18679                                           
  18680        <Property 
  18681         Name="Crea teOffset" 
  18682         Value="2" 
  18683        />
  18684                                           
  18685        <Property 
  18686         Name="Leng th" 
  18687         Value="383 7" 
  18688        />
  18689                                           
  18690        <Property 
  18691         Name="Star tLine" 
  18692         Value="1" 
  18693        />
  18694                                           
  18695        <Property 
  18696         Name="Star tColumn" 
  18697         Value="1" 
  18698        />
  18699                                           
  18700        <Property 
  18701         Name="Head erContents
  18702         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetVAMeds] &#xD;&#xA; &#x9;@pid  bigint --  this is th e patients id&#xD;&#x A;&#xD;&#x A;-- NOTIC E:&#xD;&#x A;-- Do no t edit the  stored pr ocedure li ve on the  server. Co de to gene rate&#xD;& #xA;-- the  procedure s is store d in the p roject rep ository. A ny changes  made&#xD; &#xA;-- th at are not  recorded  in the rep ository wi ll be over written.&# xD;&#xA;&# xD;&#xA;AS
  18703        />
  18704                                  
  18705       </Annotati on>
  18706                        
  18707      </Element>
  18708                       
  18709      <Element 
  18710       Type="SqlP rocedure" 
  18711       Name="[App ].[NVCC_us p_GetVisn] "
  18712      >
  18713                                 
  18714       <Property 
  18715        Name="Body Script"
  18716       >
  18717                                           
  18718        <Value>
  18719         <![CDATA[
  18720         --======== ========== ========== ========== ========== ========== ========== ========== ===
  18721         --Requesto r                                : REFDOC
  18722         --Author                  : Lava nya Epuri
  18723         --Object/S P Name                  : NVCC_u sp_GetVisn
  18724         --SERVER                                   
  18725         --Data Bas e                                : CC_REFDO C
  18726         --Schema                                    : app
  18727         --Report                                    : N/A
  18728         --Folder                                    : N/A
  18729         --Report L oc             : N/A
  18730         --Job                     : None
  18731         --Job Loc                 : None
  18732         --Note                    : 
  18733         --Date Cre ated           : 12-1 1-2017
  18734         --
  18735         --Purpose                 : Retr ieve all t he VISN 
  18736         --======== ========== ========== ========== ========== ========== ========== ========== ===
  18737         --Uses: CD WWork.Dim. Sta3n
  18738        
  18739         BEGIN
  18740                 --  SET NOCOU NT ON adde d to preve nt extra r esult sets  from
  18741                 --  interferi ng with SE LECT state ments.
  18742                 SE T NOCOUNT  ON;
  18743                 SE LECT 
  18744                  V ISNFY17 AS  ID, VISNF Y17 
  18745             FROM   CDWWork.Di m.Sta3n 
  18746                 WH ERE  Sta3n  > 0
  18747                 GR OUP BY VIS NFY17
  18748                 OR DER BY VIS NFY17
  18749               
  18750         END;]]>
  18751        </Value>
  18752                                  
  18753       </Property >
  18754                                 
  18755       <Property 
  18756        Name="IsAn siNullsOn"  
  18757        Value="Tru e" 
  18758       />
  18759                                 
  18760       <Relations hip 
  18761        Name="Body Dependenci es"
  18762       >
  18763                                           
  18764        <Entry>
  18765                                                    
  18766         <Reference
  18767          ExternalSo urce="CDWW ork.dacpac
  18768          Name="[CDW Work]|[Dim ].[Sta3n]"  
  18769         />
  18770                                            
  18771        </Entry>
  18772                                           
  18773        <Entry>
  18774                                                    
  18775         <Reference
  18776          ExternalSo urce="CDWW ork.dacpac
  18777          Name="[CDW Work]|[Dim ].[Sta3n]. [VISNFY17]
  18778         />
  18779                                            
  18780        </Entry>
  18781                                           
  18782        <Entry>
  18783                                                    
  18784         <Reference
  18785          ExternalSo urce="CDWW ork.dacpac
  18786          Name="[CDW Work]|[Dim ].[Sta3n]. [Sta3n]" 
  18787         />
  18788                                            
  18789        </Entry>
  18790                                  
  18791       </Relation ship>
  18792                                 
  18793       <Relations hip 
  18794        Name="Sche ma"
  18795       >
  18796                                           
  18797        <Entry>
  18798                                                    
  18799         <Reference
  18800          Name="[App ]" 
  18801         />
  18802                                            
  18803        </Entry>
  18804                                  
  18805       </Relation ship>
  18806                                 
  18807       <Annotatio
  18808        Type="SysC ommentsObj ectAnnotat ion"
  18809       >
  18810                                           
  18811        <Property 
  18812         Name="Crea teOffset" 
  18813         Value="2" 
  18814        />
  18815                                           
  18816        <Property 
  18817         Name="Leng th" 
  18818         Value="116 4" 
  18819        />
  18820                                           
  18821        <Property 
  18822         Name="Star tLine" 
  18823         Value="1" 
  18824        />
  18825                                           
  18826        <Property 
  18827         Name="Star tColumn" 
  18828         Value="1" 
  18829        />
  18830                                           
  18831        <Property 
  18832         Name="Head erContents
  18833         Value="&#x D;&#xA;CRE ATE  PROCE DURE [App] .[NVCC_usp _GetVisn]& #xD;&#xA;& #x9;&#xD;& #xA;-- NOT ICE:&#xD;& #xA;-- Do  not edit t he stored  procedure  live on th e server.  Code to ge nerate&#xD ;&#xA;-- t he procedu res is sto red in the  project r epository.  Any chang es made&#x D;&#xA;--  that are n ot recorde d in the r epository  will be ov erwritten. &#xD;&#xA; &#xD;&#xA; AS" 
  18834        />
  18835                                  
  18836       </Annotati on>
  18837                        
  18838      </Element>
  18839                       
  18840      <Element 
  18841       Type="SqlP rocedure" 
  18842       Name="[App ].[NVCC_us p_GetXdwFa cility]"
  18843      >
  18844                                 
  18845       <Property 
  18846        Name="Body Script"
  18847       >
  18848                                           
  18849        <Value>
  18850         <![CDATA[
  18851         --======== ========== ========== ========== ========== ========== ========== ========== ====
  18852         --Requesto r              : Non  Va Coordin ated Care  Project
  18853         --Author                  : Bria n Diggs
  18854         --Object/S P Name         : NVCC _usp_GetXd wFacility
  18855         --Server                  : 
  18856         --Data Bas e              : CC_R EFDOC
  18857         --Schema                  : app
  18858         --Report                  : N/A
  18859         --Folder                  : N/A
  18860         --Report L oc             : N/A
  18861         --Job                     : None
  18862         --Job Loc                 : None
  18863         --Note                    : 
  18864         --Date Cre ated           : 2017 -02-14
  18865         --
  18866         --
  18867         --Last Cha nged           : 
  18868         --Last Cha nged By                 : 
  18869         --Reason F or Change               : 
  18870         --
  18871         --Purpose                 : To g et the sit es for whi ch a user  has PHI/PI I access
  18872         --======== ========== ========== ========== ========== ========== ========== ========== ====
  18873         --Uses: Ap p.udf_Stat ionName
  18874         --Uses: CD WWork.LCus tomer.AllP ermissions
  18875         --Uses: CD WWork.Dim. Sta3n
  18876        
  18877         BEGIN
  18878                 SE LECT
  18879                          s.St a3n AS Fac ilityID
  18880                          ,App .udf_Stati onName(s.S ta3n) AS F acilityNam e
  18881                          ,s.V ISNFY17 AS  VISN
  18882                          ,s.D istrictNum berFY17 AS  District
  18883                 FR OM CDWWork .LCustomer .AllPermis sions AS a p
  18884                          JOIN  CDWWork.D im.Sta3n A S s
  18885                                   ON ap. Sta3n = s. Sta3n
  18886                 WH ERE 
  18887                          ap.L CustomerID  = @LCusto merID 
  18888                          AND  ap.PHIPII  = 1 
  18889                          AND  ap.Sta3n >  0
  18890                          AND  s.Active =  'Y'
  18891         END]]>
  18892        </Value>
  18893                                  
  18894       </Property >
  18895                                 
  18896       <Property 
  18897        Name="IsAn siNullsOn"  
  18898        Value="Tru e" 
  18899       />
  18900                                 
  18901       <Relations hip 
  18902        Name="Body Dependenci es"
  18903       >
  18904                                           
  18905        <Entry>
  18906                                                    
  18907         <Reference
  18908          ExternalSo urce="CDWW ork.dacpac
  18909          Name="[CDW Work]|[LCu stomer].[A llPermissi ons]" 
  18910         />
  18911                                            
  18912        </Entry>
  18913                                           
  18914        <Entry>
  18915                                                    
  18916         <Reference
  18917          ExternalSo urce="CDWW ork.dacpac
  18918          Name="[CDW Work]|[Dim ].[Sta3n]"  
  18919         />
  18920                                            
  18921        </Entry>
  18922                                           
  18923        <Entry>
  18924                                                    
  18925         <Reference
  18926          ExternalSo urce="CDWW ork.dacpac
  18927          Name="[CDW Work]|[LCu stomer].[A llPermissi ons].[Sta3 n]" 
  18928         />
  18929                                            
  18930        </Entry>
  18931                                           
  18932        <Entry>
  18933                                                    
  18934         <Reference
  18935          ExternalSo urce="CDWW ork.dacpac
  18936          Name="[CDW Work]|[Dim ].[Sta3n]. [Sta3n]" 
  18937         />
  18938                                            
  18939        </Entry>
  18940                                           
  18941        <Entry>
  18942                                                    
  18943         <Reference
  18944          ExternalSo urce="CDWW ork.dacpac
  18945          Name="[CDW Work]|[Dim ].[Sta3n]. [Sta3n]" 
  18946         />
  18947                                            
  18948        </Entry>
  18949                                           
  18950        <Entry>
  18951                                                    
  18952         <Reference
  18953          Name="[App ].[udf_Sta tionName]"  
  18954         />
  18955                                            
  18956        </Entry>
  18957                                           
  18958        <Entry>
  18959                                                    
  18960         <Reference
  18961          ExternalSo urce="CDWW ork.dacpac
  18962          Name="[CDW Work]|[Dim ].[Sta3n]. [VISNFY17]
  18963         />
  18964                                            
  18965        </Entry>
  18966                                           
  18967        <Entry>
  18968                                                    
  18969         <Reference
  18970          ExternalSo urce="CDWW ork.dacpac
  18971          Name="[CDW Work]|[Dim ].[Sta3n]. [DistrictN umberFY17]
  18972         />
  18973                                            
  18974        </Entry>
  18975                                           
  18976        <Entry>
  18977                                                    
  18978         <Reference
  18979          ExternalSo urce="CDWW ork.dacpac
  18980          Name="[CDW Work]|[LCu stomer].[A llPermissi ons].[LCus tomerID]" 
  18981         />
  18982                                            
  18983        </Entry>
  18984                                           
  18985        <Entry>
  18986                                                    
  18987         <Reference
  18988          Name="[App ].[NVCC_us p_GetXdwFa cility].[@ LCustomerI D]" 
  18989         />
  18990                                            
  18991        </Entry>
  18992                                           
  18993        <Entry>
  18994                                                    
  18995         <Reference
  18996          ExternalSo urce="CDWW ork.dacpac
  18997          Name="[CDW Work]|[LCu stomer].[A llPermissi ons].[PHIP II]" 
  18998         />
  18999                                            
  19000        </Entry>
  19001                                           
  19002        <Entry>
  19003                                                    
  19004         <Reference
  19005          ExternalSo urce="CDWW ork.dacpac
  19006          Name="[CDW Work]|[Dim ].[Sta3n]. [Active]" 
  19007         />
  19008                                            
  19009        </Entry>
  19010                                  
  19011       </Relation ship>
  19012                                 
  19013       <Relations hip 
  19014        Name="Para meters"
  19015       >
  19016                                           
  19017        <Entry>
  19018                                                    
  19019         <Element 
  19020          Type="SqlS ubroutineP arameter" 
  19021          Name="[App ].[NVCC_us p_GetXdwFa cility].[@ LCustomerI D]"
  19022         >
  19023                                                              
  19024          <Relations hip 
  19025           Name="Type "
  19026          >
  19027                                                                        
  19028           <Entry>
  19029                                                                                  
  19030            <Element 
  19031             Type="SqlT ypeSpecifi er"
  19032            >
  19033                                                                                            
  19034             <Relations hip 
  19035              Name="Type "
  19036             >
  19037                                                                                                     
  19038              <Entry>
  19039                                                                                                               
  19040               <Reference
  19041                ExternalSo urce="Buil tIns" 
  19042                Name="[int ]" 
  19043               />
  19044                                                                                                      
  19045              </Entry>
  19046                                                                                             
  19047             </Relation ship>
  19048                                                                                   
  19049            </Element>
  19050                                                                         
  19051           </Entry>
  19052                                                               
  19053          </Relation ship>
  19054                                                     
  19055         </Element>
  19056                                            
  19057        </Entry>
  19058                                  
  19059       </Relation ship>
  19060                                 
  19061       <Relations hip 
  19062        Name="Sche ma"
  19063       >
  19064                                           
  19065        <Entry>
  19066                                                    
  19067         <Reference
  19068          Name="[App ]" 
  19069         />
  19070                                            
  19071        </Entry>
  19072                                  
  19073       </Relation ship>
  19074                                 
  19075       <Annotatio
  19076        Type="SysC ommentsObj ectAnnotat ion"
  19077       >
  19078                                           
  19079        <Property 
  19080         Name="Crea teOffset" 
  19081         Value="2" 
  19082        />
  19083                                           
  19084        <Property 
  19085         Name="Leng th" 
  19086         Value="140 0" 
  19087        />
  19088                                           
  19089        <Property 
  19090         Name="Star tLine" 
  19091         Value="1" 
  19092        />
  19093                                           
  19094        <Property 
  19095         Name="Star tColumn" 
  19096         Value="1" 
  19097        />
  19098                                           
  19099        <Property 
  19100         Name="Head erContents
  19101         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetXdwFaci lity]&#xD; &#xA;&#x9; -- @LCusto merID is f rom CDWWor k.LCustome r.LCustome r&#xD;&#xA ;&#x9;@LCu stomerID i nt&#xD;&#x A;AS" 
  19102        />
  19103                                  
  19104       </Annotati on>
  19105                        
  19106      </Element>
  19107                       
  19108      <Element 
  19109       Type="SqlP rocedure" 
  19110       Name="[App ].[NVCC_us p_GetXdwFa cilityBySt a3n]"
  19111      >
  19112                                 
  19113       <Property 
  19114        Name="Body Script"
  19115       >
  19116                                           
  19117        <Value>
  19118         <![CDATA[
  19119         --======== ========== ========== ========== ========== ========== ========== ========== ====
  19120         --Requesto r              : Non  Va Coordin ated Care  Project
  19121         --Author                  : Bria n Diggs
  19122         --Object/S P Name         : NVCC _usp_GetXd wFacilityB ySta3n
  19123         --Server                  : 
  19124         --Data Bas e              : CC_R EFDOC
  19125         --Schema                  : app
  19126         --Report                  : N/A
  19127         --Folder                  : N/A
  19128         --Report L oc             : N/A
  19129         --Job                     : None
  19130         --Job Loc                 : None
  19131         --Note                    : 
  19132         --Date Cre ated           : 2017 -02-14
  19133         --
  19134         --
  19135         --Last Cha nged           : 
  19136         --Last Cha nged By                 : 
  19137         --Reason F or Change               : 
  19138         --
  19139         --Purpose                 : To g et details  about a g iven site  from the S ta3n
  19140         --======== ========== ========== ========== ========== ========== ========== ========== ====
  19141         --Uses: Ap p.udf_Stat ionName
  19142         --Uses: CD WWork.Dim. Sta3n
  19143        
  19144         BEGIN
  19145                 SE LECT
  19146                          s.St a3n AS Fac ilityID
  19147                          ,App .udf_Stati onName(s.S ta3n) AS F acilityNam e
  19148                          ,s.V ISNFY17 AS  VISN
  19149                          ,s.D istrictNum berFY17 AS  District
  19150                 FR OM CDWWork .Dim.Sta3n  AS s
  19151                 WH ERE 
  19152                          s.St a3n = @Sta 3n
  19153         END]]>
  19154        </Value>
  19155                                  
  19156       </Property >
  19157                                 
  19158       <Property 
  19159        Name="IsAn siNullsOn"  
  19160        Value="Tru e" 
  19161       />
  19162                                 
  19163       <Relations hip 
  19164        Name="Body Dependenci es"
  19165       >
  19166                                           
  19167        <Entry>
  19168                                                    
  19169         <Reference
  19170          ExternalSo urce="CDWW ork.dacpac
  19171          Name="[CDW Work]|[Dim ].[Sta3n]"  
  19172         />
  19173                                            
  19174        </Entry>
  19175                                           
  19176        <Entry>
  19177                                                    
  19178         <Reference
  19179          ExternalSo urce="CDWW ork.dacpac
  19180          Name="[CDW Work]|[Dim ].[Sta3n]. [Sta3n]" 
  19181         />
  19182                                            
  19183        </Entry>
  19184                                           
  19185        <Entry>
  19186                                                    
  19187         <Reference
  19188          ExternalSo urce="CDWW ork.dacpac
  19189          Name="[CDW Work]|[Dim ].[Sta3n]. [Sta3n]" 
  19190         />
  19191                                            
  19192        </Entry>
  19193                                           
  19194        <Entry>
  19195                                                    
  19196         <Reference
  19197          Name="[App ].[udf_Sta tionName]"  
  19198         />
  19199                                            
  19200        </Entry>
  19201                                           
  19202        <Entry>
  19203                                                    
  19204         <Reference
  19205          ExternalSo urce="CDWW ork.dacpac
  19206          Name="[CDW Work]|[Dim ].[Sta3n]. [VISNFY17]
  19207         />
  19208                                            
  19209        </Entry>
  19210                                           
  19211        <Entry>
  19212                                                    
  19213         <Reference
  19214          ExternalSo urce="CDWW ork.dacpac
  19215          Name="[CDW Work]|[Dim ].[Sta3n]. [DistrictN umberFY17]
  19216         />
  19217                                            
  19218        </Entry>
  19219                                           
  19220        <Entry>
  19221                                                    
  19222         <Reference
  19223          Name="[App ].[NVCC_us p_GetXdwFa cilityBySt a3n].[@Sta 3n]" 
  19224         />
  19225                                            
  19226        </Entry>
  19227                                  
  19228       </Relation ship>
  19229                                 
  19230       <Relations hip 
  19231        Name="Para meters"
  19232       >
  19233                                           
  19234        <Entry>
  19235                                                    
  19236         <Element 
  19237          Type="SqlS ubroutineP arameter" 
  19238          Name="[App ].[NVCC_us p_GetXdwFa cilityBySt a3n].[@Sta 3n]"
  19239         >
  19240                                                              
  19241          <Relations hip 
  19242           Name="Type "
  19243          >
  19244                                                                        
  19245           <Entry>
  19246                                                                                  
  19247            <Element 
  19248             Type="SqlT ypeSpecifi er"
  19249            >
  19250                                                                                            
  19251             <Relations hip 
  19252              Name="Type "
  19253             >
  19254                                                                                                     
  19255              <Entry>
  19256                                                                                                               
  19257               <Reference
  19258                ExternalSo urce="Buil tIns" 
  19259                Name="[sma llint]" 
  19260               />
  19261                                                                                                      
  19262              </Entry>
  19263                                                                                             
  19264             </Relation ship>
  19265                                                                                   
  19266            </Element>
  19267                                                                         
  19268           </Entry>
  19269                                                               
  19270          </Relation ship>
  19271                                                     
  19272         </Element>
  19273                                            
  19274        </Entry>
  19275                                  
  19276       </Relation ship>
  19277                                 
  19278       <Relations hip 
  19279        Name="Sche ma"
  19280       >
  19281                                           
  19282        <Entry>
  19283                                                    
  19284         <Reference
  19285          Name="[App ]" 
  19286         />
  19287                                            
  19288        </Entry>
  19289                                  
  19290       </Relation ship>
  19291                                 
  19292       <Annotatio
  19293        Type="SysC ommentsObj ectAnnotat ion"
  19294       >
  19295                                           
  19296        <Property 
  19297         Name="Crea teOffset" 
  19298         Value="2" 
  19299        />
  19300                                           
  19301        <Property 
  19302         Name="Leng th" 
  19303         Value="139 0" 
  19304        />
  19305                                           
  19306        <Property 
  19307         Name="Star tLine" 
  19308         Value="1" 
  19309        />
  19310                                           
  19311        <Property 
  19312         Name="Star tColumn" 
  19313         Value="1" 
  19314        />
  19315                                           
  19316        <Property 
  19317         Name="Head erContents
  19318         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetXdwFaci lityBySta3 n]&#xD;&#x A;&#x9;@St a3n smalli nt&#xD;&#x A;&#xD;&#x A;-- NOTIC E:&#xD;&#x A;-- Do no t edit the  stored pr ocedure li ve on the  server. Co de to gene rate&#xD;& #xA;-- the  procedure s is store d in the p roject rep ository. A ny changes  made&#xD; &#xA;-- th at are not  recorded  in the rep ository wi ll be over written.&# xD;&#xA;&# xD;&#xA;AS
  19319        />
  19320                                  
  19321       </Annotati on>
  19322                        
  19323      </Element>
  19324                       
  19325      <Element 
  19326       Type="SqlP rocedure" 
  19327       Name="[App ].[NVCC_us p_GetXdwUs er]"
  19328      >
  19329                                 
  19330       <Property 
  19331        Name="Body Script"
  19332       >
  19333                                           
  19334        <Value>
  19335         <![CDATA[
  19336         --======== ========== ========== ========== ========== ========== ========== ========== ====
  19337         --Requesto r              : Non  Va Coordin ated Care  Project
  19338         --Author                  : Bria n Diggs
  19339         --Object/S P Name         : NVCC _usp_GetXd wUser
  19340         --Server                  : 
  19341         --Data Bas e              : CC_R EFDOC
  19342         --Schema                  : app
  19343         --Report                  : N/A
  19344         --Folder                  : N/A
  19345         --Report L oc             : N/A
  19346         --Job                     : None
  19347         --Job Loc                 : None
  19348         --Note                    : 
  19349         --Date Cre ated           : 2017 -02-14
  19350         --
  19351         --
  19352         --Last Cha nged           : 
  19353         --Last Cha nged By                 : 
  19354         --Reason F or Change               : 
  19355         --
  19356         --Purpose                 : To g et LCustom er and AD  informatio n about a  user
  19357         --======== ========== ========== ========== ========== ========== ========== ========== ====
  19358         --Uses: CD WWork.NDim .ActiveDir ectoryAcco unt
  19359         --Uses: CD WWork.LCus tomer.LCus tomer
  19360         --Uses: CD WWork.Dim. Sta3n
  19361        
  19362         BEGIN
  19363                 SE LECT TOP 1
  19364                          UPPE R(ada.SamA ccountName ) AS NetWo rkName
  19365                          ,ada .Surname A S LastName
  19366                          ,ada .GivenName  AS FirstN ame
  19367                          ,lc. LCustomerI D
  19368                          ,Acc ountEmailA ddress as  Email
  19369                          ,lc. UpdatedDat e as DateA dded
  19370                          ,lc. InferredSt a3n
  19371                          ,s.S ta3n AS AD LoginInfer redSta3n
  19372                 FR OM
  19373                          CDWW ork.NDim.A ctiveDirec toryAccoun t AS ada
  19374                          LEFT  JOIN CDWW ork.LCusto mer.LCusto mer AS lc
  19375                                   ON ada .SamAccoun tName = lc .ADLogin
  19376                          LEFT  JOIN CDWW ork.Dim.St a3n s
  19377                                   ON s.S iteCode =  SUBSTRING( UPPER(@use rname), 4,  3)
  19378                 WH ERE SamAcc ountName =  @username
  19379                 OR DER BY lc. UpdatedDat e DESC
  19380         END]]>
  19381        </Value>
  19382                                  
  19383       </Property >
  19384                                 
  19385       <Property 
  19386        Name="IsAn siNullsOn"  
  19387        Value="Tru e" 
  19388       />
  19389                                 
  19390       <Relations hip 
  19391        Name="Body Dependenci es"
  19392       >
  19393                                           
  19394        <Entry>
  19395                                                    
  19396         <Reference
  19397          ExternalSo urce="CDWW ork.dacpac
  19398          Name="[CDW Work]|[NDi m].[Active DirectoryA ccount]" 
  19399         />
  19400                                            
  19401        </Entry>
  19402                                           
  19403        <Entry>
  19404                                                    
  19405         <Reference
  19406          ExternalSo urce="CDWW ork.dacpac
  19407          Name="[CDW Work]|[LCu stomer].[L Customer]"  
  19408         />
  19409                                            
  19410        </Entry>
  19411                                           
  19412        <Entry>
  19413                                                    
  19414         <Reference
  19415          ExternalSo urce="CDWW ork.dacpac
  19416          Name="[CDW Work]|[NDi m].[Active DirectoryA ccount].[S amAccountN ame]" 
  19417         />
  19418                                            
  19419        </Entry>
  19420                                           
  19421        <Entry>
  19422                                                    
  19423         <Reference
  19424          ExternalSo urce="CDWW ork.dacpac
  19425          Name="[CDW Work]|[LCu stomer].[L Customer]. [ADLogin]"  
  19426         />
  19427                                            
  19428        </Entry>
  19429                                           
  19430        <Entry>
  19431                                                    
  19432         <Reference
  19433          ExternalSo urce="CDWW ork.dacpac
  19434          Name="[CDW Work]|[Dim ].[Sta3n]"  
  19435         />
  19436                                            
  19437        </Entry>
  19438                                           
  19439        <Entry>
  19440                                                    
  19441         <Reference
  19442          ExternalSo urce="CDWW ork.dacpac
  19443          Name="[CDW Work]|[Dim ].[Sta3n]. [SiteCode]
  19444         />
  19445                                            
  19446        </Entry>
  19447                                           
  19448        <Entry>
  19449                                                    
  19450         <Reference
  19451          Name="[App ].[NVCC_us p_GetXdwUs er].[@user name]" 
  19452         />
  19453                                            
  19454        </Entry>
  19455                                           
  19456        <Entry>
  19457                                                    
  19458         <Reference
  19459          ExternalSo urce="CDWW ork.dacpac
  19460          Name="[CDW Work]|[NDi m].[Active DirectoryA ccount].[S amAccountN ame]" 
  19461         />
  19462                                            
  19463        </Entry>
  19464                                           
  19465        <Entry>
  19466                                                    
  19467         <Reference
  19468          ExternalSo urce="CDWW ork.dacpac
  19469          Name="[CDW Work]|[NDi m].[Active DirectoryA ccount].[S urname]" 
  19470         />
  19471                                            
  19472        </Entry>
  19473                                           
  19474        <Entry>
  19475                                                    
  19476         <Reference
  19477          ExternalSo urce="CDWW ork.dacpac
  19478          Name="[CDW Work]|[NDi m].[Active DirectoryA ccount].[G ivenName]"  
  19479         />
  19480                                            
  19481        </Entry>
  19482                                           
  19483        <Entry>
  19484                                                    
  19485         <Reference
  19486          ExternalSo urce="CDWW ork.dacpac
  19487          Name="[CDW Work]|[LCu stomer].[L Customer]. [LCustomer ID]" 
  19488         />
  19489                                            
  19490        </Entry>
  19491                                           
  19492        <Entry>
  19493                                                    
  19494         <Reference
  19495          ExternalSo urce="CDWW ork.dacpac
  19496          Name="[CDW Work]|[NDi m].[Active DirectoryA ccount].[A ccountEmai lAddress]"  
  19497         />
  19498                                            
  19499        </Entry>
  19500                                           
  19501        <Entry>
  19502                                                    
  19503         <Reference
  19504          ExternalSo urce="CDWW ork.dacpac
  19505          Name="[CDW Work]|[LCu stomer].[L Customer]. [UpdatedDa te]" 
  19506         />
  19507                                            
  19508        </Entry>
  19509                                           
  19510        <Entry>
  19511                                                    
  19512         <Reference
  19513          ExternalSo urce="CDWW ork.dacpac
  19514          Name="[CDW Work]|[LCu stomer].[L Customer]. [InferredS ta3n]" 
  19515         />
  19516                                            
  19517        </Entry>
  19518                                           
  19519        <Entry>
  19520                                                    
  19521         <Reference
  19522          ExternalSo urce="CDWW ork.dacpac
  19523          Name="[CDW Work]|[Dim ].[Sta3n]. [Sta3n]" 
  19524         />
  19525                                            
  19526        </Entry>
  19527                                           
  19528        <Entry>
  19529                                                    
  19530         <Reference
  19531          ExternalSo urce="CDWW ork.dacpac
  19532          Name="[CDW Work]|[NDi m].[Active DirectoryA ccount].[S amAccountN ame]" 
  19533         />
  19534                                            
  19535        </Entry>
  19536                                           
  19537        <Entry>
  19538                                                    
  19539         <Reference
  19540          ExternalSo urce="CDWW ork.dacpac
  19541          Name="[CDW Work]|[LCu stomer].[L Customer]. [UpdatedDa te]" 
  19542         />
  19543                                            
  19544        </Entry>
  19545                                  
  19546       </Relation ship>
  19547                                 
  19548       <Relations hip 
  19549        Name="Para meters"
  19550       >
  19551                                           
  19552        <Entry>
  19553                                                    
  19554         <Element 
  19555          Type="SqlS ubroutineP arameter" 
  19556          Name="[App ].[NVCC_us p_GetXdwUs er].[@user name]"
  19557         >
  19558                                                              
  19559          <Relations hip 
  19560           Name="Type "
  19561          >
  19562                                                                        
  19563           <Entry>
  19564                                                                                  
  19565            <Element 
  19566             Type="SqlT ypeSpecifi er"
  19567            >
  19568                                                                                            
  19569             <Property 
  19570              Name="Leng th" 
  19571              Value="50"  
  19572             />
  19573                                                                                            
  19574             <Relations hip 
  19575              Name="Type "
  19576             >
  19577                                                                                                     
  19578              <Entry>
  19579                                                                                                               
  19580               <Reference
  19581                ExternalSo urce="Buil tIns" 
  19582                Name="[var char]" 
  19583               />
  19584                                                                                                      
  19585              </Entry>
  19586                                                                                             
  19587             </Relation ship>
  19588                                                                                   
  19589            </Element>
  19590                                                                         
  19591           </Entry>
  19592                                                               
  19593          </Relation ship>
  19594                                                     
  19595         </Element>
  19596                                            
  19597        </Entry>
  19598                                  
  19599       </Relation ship>
  19600                                 
  19601       <Relations hip 
  19602        Name="Sche ma"
  19603       >
  19604                                           
  19605        <Entry>
  19606                                                    
  19607         <Reference
  19608          Name="[App ]" 
  19609         />
  19610                                            
  19611        </Entry>
  19612                                  
  19613       </Relation ship>
  19614                                 
  19615       <Annotatio
  19616        Type="SysC ommentsObj ectAnnotat ion"
  19617       >
  19618                                           
  19619        <Property 
  19620         Name="Crea teOffset" 
  19621         Value="2" 
  19622        />
  19623                                           
  19624        <Property 
  19625         Name="Leng th" 
  19626         Value="161 0" 
  19627        />
  19628                                           
  19629        <Property 
  19630         Name="Star tLine" 
  19631         Value="1" 
  19632        />
  19633                                           
  19634        <Property 
  19635         Name="Star tColumn" 
  19636         Value="1" 
  19637        />
  19638                                           
  19639        <Property 
  19640         Name="Head erContents
  19641         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ GetXdwUser ]&#xD;&#xA ;&#x9;-- @ username i s the netw ork (AD) u sername/lo gin of the  user&#xD; &#xA;&#x9; @username  varchar(50 )&#xD;&#xA ;AS" 
  19642        />
  19643                                  
  19644       </Annotati on>
  19645                        
  19646      </Element>
  19647                       
  19648      <Element 
  19649       Type="SqlP rocedure" 
  19650       Name="[App ].[NVCC_us p_Producti onAccessLo gUniqueSta 3n]"
  19651      >
  19652                                 
  19653       <Property 
  19654        Name="Body Script"
  19655       >
  19656                                           
  19657        <Value>
  19658         <![CDATA[
  19659         --======== ========== ========== ========== ========== ========== ========== ========== ====
  19660         --Requesto r              : Non  Va Coordin ated Care  Project
  19661         --Author                  : Bria n Diggs
  19662         --Object/S P Name         : NVCC _usp_Produ ctionAcces sLogUnique Sta3n
  19663         --Server                  : 
  19664         --Data Bas e              : CC_R EFDOC
  19665         --Schema                  : App
  19666         --Report                  : N/A
  19667         --Folder                  : N/A
  19668         --Report L oc             : N/A
  19669         --Job                     : None
  19670         --Job Loc                 : None
  19671         --Note                    : 
  19672         --Date Cre ated           : 05-2 7-2016
  19673         --
  19674         --Last Cha nged           : 2017 -07-24
  19675         --Last Cha nged By                 : Brian  Diggs
  19676         --Reason F or Change               : Conver t to using  NVCC_Prod uctionLog
  19677         --
  19678         --Purpose                 : Get  unique sta tions from  the acces s log
  19679         --======== ========== ========== ========== ========== ========== ========== ========== ====
  19680         --Uses: Ap p.NVCC_Pro ductionLog
  19681         --Uses: Ap p.udf_Stat ionName
  19682         BEGIN
  19683                 SE LECT
  19684                          Sta3 n,
  19685                          App. udf_Statio nName(Sta3 n) AS Stat ion
  19686                 FR OM (
  19687                          SELE CT DISTINC T
  19688                                   Sta3n
  19689                          FROM
  19690                                   App.NV CC_Product ionLog
  19691                 )  S
  19692                 OR DER BY Sta tion
  19693         END]]>
  19694        </Value>
  19695                                  
  19696       </Property >
  19697                                 
  19698       <Property 
  19699        Name="IsAn siNullsOn"  
  19700        Value="Tru e" 
  19701       />
  19702                                 
  19703       <Relations hip 
  19704        Name="Body Dependenci es"
  19705       >
  19706                                           
  19707        <Entry>
  19708                                                    
  19709         <Reference
  19710          Name="[App ].[NVCC_Pr oductionLo g]" 
  19711         />
  19712                                            
  19713        </Entry>
  19714                                           
  19715        <Entry>
  19716                                                    
  19717         <Reference
  19718          Name="[App ].[NVCC_Pr oductionLo g].[Sta3n]
  19719         />
  19720                                            
  19721        </Entry>
  19722                                           
  19723        <Entry>
  19724                                                    
  19725         <Reference
  19726          Name="[App ].[NVCC_Pr oductionLo g].[Sta3n]
  19727         />
  19728                                            
  19729        </Entry>
  19730                                           
  19731        <Entry>
  19732                                                    
  19733         <Reference
  19734          Name="[App ].[udf_Sta tionName]"  
  19735         />
  19736                                            
  19737        </Entry>
  19738                                  
  19739       </Relation ship>
  19740                                 
  19741       <Relations hip 
  19742        Name="Sche ma"
  19743       >
  19744                                           
  19745        <Entry>
  19746                                                    
  19747         <Reference
  19748          Name="[App ]" 
  19749         />
  19750                                            
  19751        </Entry>
  19752                                  
  19753       </Relation ship>
  19754                                 
  19755       <Annotatio
  19756        Type="SysC ommentsObj ectAnnotat ion"
  19757       >
  19758                                           
  19759        <Property 
  19760         Name="Crea teOffset" 
  19761         Value="64"  
  19762        />
  19763                                           
  19764        <Property 
  19765         Name="Leng th" 
  19766         Value="145 4" 
  19767        />
  19768                                           
  19769        <Property 
  19770         Name="Star tLine" 
  19771         Value="1" 
  19772        />
  19773                                           
  19774        <Property 
  19775         Name="Star tColumn" 
  19776         Value="1" 
  19777        />
  19778                                           
  19779        <Property 
  19780         Name="Head erContents
  19781         Value="--D ROP PROCED URE App.NV CC_usp_Pro ductionAcc essLogUniq ueSta3n&#x D;&#xA;&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ Production AccessLogU niqueSta3n ]&#xD;&#xA ;&#xD;&#xA ;-- NOTICE :&#xD;&#xA ;-- Do not  edit the  stored pro cedure liv e on the s erver. Cod e to gener ate&#xD;&# xA;-- the  procedures  is stored  in the pr oject repo sitory. An y changes  made&#xD;& #xA;-- tha t are not  recorded i n the repo sitory wil l be overw ritten.&#x D;&#xA;&#x D;&#xA;AS"  
  19782        />
  19783                                  
  19784       </Annotati on>
  19785                        
  19786      </Element>
  19787                       
  19788      <Element 
  19789       Type="SqlP rocedure" 
  19790       Name="[App ].[NVCC_us p_Producti onAccessLo gUniqueUse rs]"
  19791      >
  19792                                 
  19793       <Property 
  19794        Name="Body Script"
  19795       >
  19796                                           
  19797        <Value>
  19798         <![CDATA[
  19799         --======== ========== ========== ========== ========== ========== ========== ========== ====
  19800         --Requesto r              : Non  Va Coordin ated Care  Project
  19801         --Author                  : Bria n Diggs
  19802         --Object/S P Name         : NVCC _usp_Produ ctionAcces sLogUnique Users
  19803         --Server                  : 
  19804         --Data Bas e              : CC_R EFDOC
  19805         --Schema                  : App
  19806         --Report                  : N/A
  19807         --Folder                  : N/A
  19808         --Report L oc             : N/A
  19809         --Job                     : None
  19810         --Job Loc                 : None
  19811         --Note                    : 
  19812         --Date Cre ated           : 05-2 7-2016
  19813         --
  19814         --Last Cha nged           : 2017 -07-24
  19815         --Last Cha nged By                 : Brian  Diggs
  19816         --Reason F or Change               : Conver t from vNV CC_Produci onAccessLo g, SStaff,  and NVCC_ Users
  19817         --                        : to N VCC_Produc tionLog an d LCustome r
  19818         --
  19819         --Purpose                 : Get  unique use rs from th e access l og
  19820         --======== ========== ========== ========== ========== ========== ========== ========== ====
  19821         --Uses: Ap p.NVCC_Pro ductionLog
  19822         --Uses: CD WWork.LCus tomer.LCus tomer
  19823         BEGIN
  19824                 SE LECT
  19825                          U.Us erID,
  19826                          lc.L astName +  ', ' + lc. FirstName  AS StaffNa me,
  19827                          U.St a3n
  19828                 FR OM (
  19829                          SELE CT DISTINC T
  19830                                   pl.Use rID,
  19831                                   pl.Sta 3n
  19832                          FROM
  19833                                   App.NV CC_Product ionLog pl
  19834                 )  AS U
  19835                          LEFT  JOIN CDWW ork.LCusto mer.LCusto mer lc
  19836                                   ON U.U serID = lc .ADDomain  + '\' + lc .ADLogin
  19837                 OR DER BY Sta ffName
  19838         END]]>
  19839        </Value>
  19840                                  
  19841       </Property >
  19842                                 
  19843       <Property 
  19844        Name="IsAn siNullsOn"  
  19845        Value="Tru e" 
  19846       />
  19847                                 
  19848       <Relations hip 
  19849        Name="Body Dependenci es"
  19850       >
  19851                                           
  19852        <Entry>
  19853                                                    
  19854         <Reference
  19855          Name="[App ].[NVCC_Pr oductionLo g]" 
  19856         />
  19857                                            
  19858        </Entry>
  19859                                           
  19860        <Entry>
  19861                                                    
  19862         <Reference
  19863          Name="[App ].[NVCC_Pr oductionLo g].[UserID ]" 
  19864         />
  19865                                            
  19866        </Entry>
  19867                                           
  19868        <Entry>
  19869                                                    
  19870         <Reference
  19871          Name="[App ].[NVCC_Pr oductionLo g].[Sta3n]
  19872         />
  19873                                            
  19874        </Entry>
  19875                                           
  19876        <Entry>
  19877                                                    
  19878         <Reference
  19879          ExternalSo urce="CDWW ork.dacpac
  19880          Name="[CDW Work]|[LCu stomer].[L Customer]"  
  19881         />
  19882                                            
  19883        </Entry>
  19884                                           
  19885        <Entry>
  19886                                                    
  19887         <Reference
  19888          Name="[App ].[NVCC_Pr oductionLo g].[UserID ]" 
  19889         />
  19890                                            
  19891        </Entry>
  19892                                           
  19893        <Entry>
  19894                                                    
  19895         <Reference
  19896          ExternalSo urce="CDWW ork.dacpac
  19897          Name="[CDW Work]|[LCu stomer].[L Customer]. [ADDomain]
  19898         />
  19899                                            
  19900        </Entry>
  19901                                           
  19902        <Entry>
  19903                                                    
  19904         <Reference
  19905          ExternalSo urce="CDWW ork.dacpac
  19906          Name="[CDW Work]|[LCu stomer].[L Customer]. [ADLogin]"  
  19907         />
  19908                                            
  19909        </Entry>
  19910                                           
  19911        <Entry>
  19912                                                    
  19913         <Reference
  19914          ExternalSo urce="CDWW ork.dacpac
  19915          Name="[CDW Work]|[LCu stomer].[L Customer]. [LastName]
  19916         />
  19917                                            
  19918        </Entry>
  19919                                           
  19920        <Entry>
  19921                                                    
  19922         <Reference
  19923          ExternalSo urce="CDWW ork.dacpac
  19924          Name="[CDW Work]|[LCu stomer].[L Customer]. [FirstName ]" 
  19925         />
  19926                                            
  19927        </Entry>
  19928                                           
  19929        <Entry>
  19930                                                    
  19931         <Reference
  19932          Name="[App ].[NVCC_Pr oductionLo g].[Sta3n]
  19933         />
  19934                                            
  19935        </Entry>
  19936                                  
  19937       </Relation ship>
  19938                                 
  19939       <Relations hip 
  19940        Name="Sche ma"
  19941       >
  19942                                           
  19943        <Entry>
  19944                                                    
  19945         <Reference
  19946          Name="[App ]" 
  19947         />
  19948                                            
  19949        </Entry>
  19950                                  
  19951       </Relation ship>
  19952                                 
  19953       <Annotatio
  19954        Type="SysC ommentsObj ectAnnotat ion"
  19955       >
  19956                                           
  19957        <Property 
  19958         Name="Crea teOffset" 
  19959         Value="64"  
  19960        />
  19961                                           
  19962        <Property 
  19963         Name="Leng th" 
  19964         Value="169 1" 
  19965        />
  19966                                           
  19967        <Property 
  19968         Name="Star tLine" 
  19969         Value="1" 
  19970        />
  19971                                           
  19972        <Property 
  19973         Name="Star tColumn" 
  19974         Value="1" 
  19975        />
  19976                                           
  19977        <Property 
  19978         Name="Head erContents
  19979         Value="--D ROP PROCED URE App.NV CC_usp_Pro ductionAcc essLogUniq ueUsers&#x D;&#xA;&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ Production AccessLogU niqueUsers ]&#xD;&#xA ;&#xD;&#xA ;-- NOTICE :&#xD;&#xA ;-- Do not  edit the  stored pro cedure liv e on the s erver. Cod e to gener ate&#xD;&# xA;-- the  procedures  is stored  in the pr oject repo sitory. An y changes  made&#xD;& #xA;-- tha t are not  recorded i n the repo sitory wil l be overw ritten.&#x D;&#xA;&#x D;&#xA;AS"  
  19980        />
  19981                                  
  19982       </Annotati on>
  19983                        
  19984      </Element>
  19985                       
  19986      <Element 
  19987       Type="SqlP rocedure" 
  19988       Name="[App ].[NVCC_us p_UniqueVe terans]"
  19989      >
  19990                                 
  19991       <Property 
  19992        Name="Body Script"
  19993       >
  19994                                           
  19995        <Value>
  19996         <![CDATA[
  19997         --======== ========== ========== ========== ========== ========== ========== ========== ====
  19998         --Requesto r              : Non  Va Coordin ated Care  Project
  19999         --Author                  : Bria n Diggs
  20000         --Object/S P Name         : App. NVCC_usp_U niqueVeter ans
  20001         --Server                  : 
  20002         --Data Bas e              : CC_R EFDOC
  20003         --Schema                  : app
  20004         --Report                  : N/A
  20005         --Folder                  : N/A
  20006         --Report L oc             : N/A
  20007         --Job                     : None
  20008         --Job Loc                 : None
  20009         --Note                    : 
  20010         --Date Cre ated           : 11-0 2-2016
  20011         --
  20012         --Last Cha nged           : 
  20013         --Last Cha nged By                 : 
  20014         --Reason F or Change               : 
  20015         --
  20016         --Purpose                 : To g et aggrega ted counts  of RDPs a nd unique  veterans a t
  20017         --                          stat ion and VI SN levels  of aggrega tion
  20018         --======== ========== ========== ========== ========== ========== ========== ========== ====
  20019        
  20020         BEGIN
  20021                 SE LECT 
  20022                          pl.P atientICN,  pl.Sta3n,  s.VISNFY1 7, s.Distr ictNumberF Y17 AS Dis trict
  20023                 IN TO #TMP
  20024                 FR OM 
  20025                          App. NVCC_Produ ctionLog p l
  20026                          INNE R JOIN CDW Work.Dim.S ta3n s
  20027                                   ON pl. Sta3n = s. Sta3n
  20028        
  20029                 SE LECT
  20030                          ROW_ NUMBER() O VER (ORDER  BY Distri ct, VISNFY 17, Sta3n)  AS ID,
  20031                          Dist rict,
  20032                          VISN FY17,
  20033                          Sta3 n,
  20034                          App. udf_Statio nName(Sta3 n) AS Stat ion,
  20035                          RDP,
  20036                          Uniq ueVeterans
  20037                 FR OM (
  20038                          SELE CT
  20039                                   Distri ct,
  20040                                   VISNFY 17,
  20041                                   Sta3n,
  20042                                   count( *) AS RDP,
  20043                                   count( distinct P atientICN)  AS Unique Veterans
  20044                          FROM  #TMP
  20045                          GROU P BY Sta3n , VISNFY17 , District
  20046                          UNIO N
  20047                          SELE CT
  20048                                   Distri ct,
  20049                                   VISNFY 17,
  20050                                   NULL A S Sta3n,
  20051                                   count( *) AS RDP,
  20052                                   count( distinct P atientICN)  AS Unique Veterans
  20053                          FROM  #TMP
  20054                          GROU P BY VISNF Y17, Distr ict
  20055                          UNIO N
  20056                          SELE CT
  20057                                   Distri ct,
  20058                                   NULL A S VISNFY17 ,
  20059                                   NULL A S Sta3n, 
  20060                                   count( *) AS RDP,
  20061                                   count( distinct P atientICN)  AS Unique Veterans
  20062                          FROM  #TMP
  20063                          GROU P BY Distr ict
  20064                          UNIO N
  20065                          SELE CT
  20066                                   NULL A S District ,
  20067                                   NULL A S VISNFY17 ,
  20068                                   NULL A S Sta3n, 
  20069                                   count( *) AS RDP,
  20070                                   count( distinct P atientICN)  AS Unique Veterans
  20071                          FROM  #TMP
  20072        
  20073                 )  A
  20074                 OR DER BY Dis trict, VIS NFY17, Sta 3n
  20075        
  20076                 DR OP TABLE # TMP
  20077         END]]>
  20078        </Value>
  20079                                  
  20080       </Property >
  20081                                 
  20082       <Property 
  20083        Name="IsAn siNullsOn"  
  20084        Value="Tru e" 
  20085       />
  20086                                 
  20087       <Relations hip 
  20088        Name="Body Dependenci es"
  20089       >
  20090                                           
  20091        <Entry>
  20092                                                    
  20093         <Reference
  20094          Name="[App ].[NVCC_Pr oductionLo g]" 
  20095         />
  20096                                            
  20097        </Entry>
  20098                                           
  20099        <Entry>
  20100                                                    
  20101         <Reference
  20102          ExternalSo urce="CDWW ork.dacpac
  20103          Name="[CDW Work]|[Dim ].[Sta3n]"  
  20104         />
  20105                                            
  20106        </Entry>
  20107                                           
  20108        <Entry>
  20109                                                    
  20110         <Reference
  20111          Name="[App ].[NVCC_Pr oductionLo g].[Sta3n]
  20112         />
  20113                                            
  20114        </Entry>
  20115                                           
  20116        <Entry>
  20117                                                    
  20118         <Reference
  20119          ExternalSo urce="CDWW ork.dacpac
  20120          Name="[CDW Work]|[Dim ].[Sta3n]. [Sta3n]" 
  20121         />
  20122                                            
  20123        </Entry>
  20124                                           
  20125        <Entry>
  20126                                                    
  20127         <Reference
  20128          Name="[App ].[NVCC_Pr oductionLo g].[Patien tICN]" 
  20129         />
  20130                                            
  20131        </Entry>
  20132                                           
  20133        <Entry>
  20134                                                    
  20135         <Reference
  20136          ExternalSo urce="CDWW ork.dacpac
  20137          Name="[CDW Work]|[Dim ].[Sta3n]. [VISNFY17]
  20138         />
  20139                                            
  20140        </Entry>
  20141                                           
  20142        <Entry>
  20143                                                    
  20144         <Reference
  20145          ExternalSo urce="CDWW ork.dacpac
  20146          Name="[CDW Work]|[Dim ].[Sta3n]. [DistrictN umberFY17]
  20147         />
  20148                                            
  20149        </Entry>
  20150                                           
  20151        <Entry>
  20152                                                    
  20153         <Reference
  20154          Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP]" 
  20155         />
  20156                                            
  20157        </Entry>
  20158                                           
  20159        <Entry>
  20160                                                    
  20161         <Reference
  20162          Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP].[Dist rict]" 
  20163         />
  20164                                            
  20165        </Entry>
  20166                                           
  20167        <Entry>
  20168                                                    
  20169         <Reference
  20170          Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP].[VISN FY17]" 
  20171         />
  20172                                            
  20173        </Entry>
  20174                                           
  20175        <Entry>
  20176                                                    
  20177         <Reference
  20178          Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP].[Sta3 n]" 
  20179         />
  20180                                            
  20181        </Entry>
  20182                                           
  20183        <Entry>
  20184                                                    
  20185         <Reference
  20186          Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP].[Pati entICN]" 
  20187         />
  20188                                            
  20189        </Entry>
  20190                                           
  20191        <Entry>
  20192                                                    
  20193         <Reference
  20194          Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP].[Dist rict]" 
  20195         />
  20196                                            
  20197        </Entry>
  20198                                           
  20199        <Entry>
  20200                                                    
  20201         <Reference
  20202          Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP].[VISN FY17]" 
  20203         />
  20204                                            
  20205        </Entry>
  20206                                           
  20207        <Entry>
  20208                                                    
  20209         <Reference
  20210          Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP].[Sta3 n]" 
  20211         />
  20212                                            
  20213        </Entry>
  20214                                           
  20215        <Entry>
  20216                                                    
  20217         <Reference
  20218          Name="[App ].[udf_Sta tionName]"  
  20219         />
  20220                                            
  20221        </Entry>
  20222                                  
  20223       </Relation ship>
  20224                                 
  20225       <Relations hip 
  20226        Name="Dyna micObjects "
  20227       >
  20228                                           
  20229        <Entry>
  20230                                                    
  20231         <Element 
  20232          Type="SqlD ynamicColu mnSource" 
  20233          Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP]"
  20234         >
  20235                                                              
  20236          <Relations hip 
  20237           Name="Colu mns"
  20238          >
  20239                                                                        
  20240           <Entry>
  20241                                                                                  
  20242            <Element 
  20243             Type="SqlC omputedCol umn" 
  20244             Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP].[Pati entICN]"
  20245            >
  20246                                                                                            
  20247             <Relations hip 
  20248              Name="Expr essionDepe ndencies"
  20249             >
  20250                                                                                                     
  20251              <Entry>
  20252                                                                                                               
  20253               <Reference
  20254                Name="[App ].[NVCC_Pr oductionLo g].[Patien tICN]" 
  20255               />
  20256                                                                                                      
  20257              </Entry>
  20258                                                                                             
  20259             </Relation ship>
  20260                                                                                   
  20261            </Element>
  20262                                                                         
  20263           </Entry>
  20264                                                                        
  20265           <Entry>
  20266                                                                                  
  20267            <Element 
  20268             Type="SqlC omputedCol umn" 
  20269             Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP].[Sta3 n]"
  20270            >
  20271                                                                                            
  20272             <Relations hip 
  20273              Name="Expr essionDepe ndencies"
  20274             >
  20275                                                                                                     
  20276              <Entry>
  20277                                                                                                               
  20278               <Reference
  20279                Name="[App ].[NVCC_Pr oductionLo g].[Sta3n]
  20280               />
  20281                                                                                                      
  20282              </Entry>
  20283                                                                                             
  20284             </Relation ship>
  20285                                                                                   
  20286            </Element>
  20287                                                                         
  20288           </Entry>
  20289                                                                        
  20290           <Entry>
  20291                                                                                  
  20292            <Element 
  20293             Type="SqlC omputedCol umn" 
  20294             Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP].[VISN FY17]"
  20295            >
  20296                                                                                            
  20297             <Relations hip 
  20298              Name="Expr essionDepe ndencies"
  20299             >
  20300                                                                                                     
  20301              <Entry>
  20302                                                                                                               
  20303               <Reference
  20304                ExternalSo urce="CDWW ork.dacpac
  20305                Name="[CDW Work]|[Dim ].[Sta3n]. [VISNFY17]
  20306               />
  20307                                                                                                      
  20308              </Entry>
  20309                                                                                             
  20310             </Relation ship>
  20311                                                                                   
  20312            </Element>
  20313                                                                         
  20314           </Entry>
  20315                                                                        
  20316           <Entry>
  20317                                                                                  
  20318            <Element 
  20319             Type="SqlC omputedCol umn" 
  20320             Name="[App ].[NVCC_us p_UniqueVe terans].[# TMP].[Dist rict]"
  20321            >
  20322                                                                                            
  20323             <Relations hip 
  20324              Name="Expr essionDepe ndencies"
  20325             >
  20326                                                                                                     
  20327              <Entry>
  20328                                                                                                               
  20329               <Reference
  20330                ExternalSo urce="CDWW ork.dacpac
  20331                Name="[CDW Work]|[Dim ].[Sta3n]. [DistrictN umberFY17]
  20332               />
  20333                                                                                                      
  20334              </Entry>
  20335                                                                                             
  20336             </Relation ship>
  20337                                                                                   
  20338            </Element>
  20339                                                                         
  20340           </Entry>
  20341                                                               
  20342          </Relation ship>
  20343                                                     
  20344         </Element>
  20345                                            
  20346        </Entry>
  20347                                  
  20348       </Relation ship>
  20349                                 
  20350       <Relations hip 
  20351        Name="Sche ma"
  20352       >
  20353                                           
  20354        <Entry>
  20355                                                    
  20356         <Reference
  20357          Name="[App ]" 
  20358         />
  20359                                            
  20360        </Entry>
  20361                                  
  20362       </Relation ship>
  20363                                 
  20364       <Annotatio
  20365        Type="SysC ommentsObj ectAnnotat ion"
  20366       >
  20367                                           
  20368        <Property 
  20369         Name="Crea teOffset" 
  20370         Value="2" 
  20371        />
  20372                                           
  20373        <Property 
  20374         Name="Leng th" 
  20375         Value="231 4" 
  20376        />
  20377                                           
  20378        <Property 
  20379         Name="Star tLine" 
  20380         Value="1" 
  20381        />
  20382                                           
  20383        <Property 
  20384         Name="Star tColumn" 
  20385         Value="1" 
  20386        />
  20387                                           
  20388        <Property 
  20389         Name="Head erContents
  20390         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ UniqueVete rans]&#xD; &#xA;&#xD; &#xA;-- NO TICE:&#xD; &#xA;-- Do  not edit  the stored  procedure  live on t he server.  Code to g enerate&#x D;&#xA;--  the proced ures is st ored in th e project  repository . Any chan ges made&# xD;&#xA;--  that are  not record ed in the  repository  will be o verwritten .&#xD;&#xA ;&#xD;&#xA ;AS" 
  20391        />
  20392                                  
  20393       </Annotati on>
  20394                        
  20395      </Element>
  20396                       
  20397      <Element 
  20398       Type="SqlP rocedure" 
  20399       Name="[App ].[NVCC_us p_UpdatePr oductionLo g]"
  20400      >
  20401                                 
  20402       <Property 
  20403        Name="Body Script"
  20404       >
  20405                                           
  20406        <Value>
  20407         <![CDATA[
  20408         --======== ========== ========== ========== ========== ========== ========== ========== ====
  20409         --Requesto r              : Non  Va Coordin ated Care  Project
  20410         --Author                  : Bria n Diggs
  20411         --Object/S P Name         : App. NVCC_usp_U pdateProdu ctionLog
  20412         --Server                  : 
  20413         --Data Bas e              : CC_R EFDOC
  20414         --Schema                  : App
  20415         --Report                  : N/A
  20416         --Folder                  : N/A
  20417         --Report L oc             : N/A
  20418         --Job                     : None
  20419         --Job Loc                 : None
  20420         --Note                    : 
  20421         --Date Cre ated           : 2017 -07-21
  20422         --
  20423         --Last Cha nged           : 2017 -08-01
  20424         --Last Cha nged By                 : Brian  Diggs
  20425         --Reason F or Change               : Explic it check t hat Access DateTime i s not null
  20426         --                          and  UserID and  HostName  (to elimin ate possib le
  20427         --                          NULL  predicate s)
  20428         --
  20429         --Purpose                 : Proc edure to b e run peri odically t o update t he table
  20430         --                          NVCC _Productio nLog from  the table  NVCC_Acces sLog
  20431         --                          base d on the c riteria of  what is c onsidered  to be a
  20432         --                          pack age create d in the p roduction  environmen t
  20433         --
  20434         --                          NVCC _Productio nLog is a  non-normal ized set o f data
  20435         --                          (sin ce it can  be defined  based on  the conten ts of
  20436         --                          NVCC _AccessLog ) that is  indexed/op timized fo r reportin g
  20437         --======== ========== ========== ========== ========== ========== ========== ========== ====
  20438        
  20439         BEGIN
  20440                 DE CLARE @Las tID int;
  20441                 SE LECT @Last ID = MAX(A ccessLogID ) FROM App .NVCC_Prod uctionLog
  20442        
  20443                 IN SERT INTO  App.NVCC_P roductionL og
  20444                 SE LECT
  20445                          al.A ccessLogID ,
  20446                          al.U serID,
  20447                          al.A ccessDateT ime,
  20448                          al.P atientSID,
  20449                          p.Pa tientICN,
  20450                          p.St a3n
  20451                 FR OM
  20452                          App. NVCC_Acces sLog al
  20453                          INNE R JOIN CDW Work.Patie nt.Patient  p
  20454                                   ON al. PatientSID  = p.Patie ntSID
  20455                 WH ERE
  20456                           al.UserID  NOT IN ('V HA20\
U SER ', 'VHA20\ USER ', 'VHA20\ USER ', 'VHA20\ US E R ', 'VHA20\ USE R
') 
  20457                          AND  al.UserID  IS NOT NUL L
  20458                          AND  (
  20459                                    al.HostNam e = ' SERVER . URL         ' OR
  20460                                   --dev. nwic was b eing used  to host us ers who co uld not co vert to th e VIA vers ion during  these dat es
  20461                                     (al.HostNa me = ' SERVER . URL         ' AND Acce ssDateTime  BETWEEN ' 2016-10-19 ' AND '201 6-11-15')
  20462                                    OR al.Host Name = 'va ww.refdoc. DNS     ' --the EW IS hosted  national p roduction  site
  20463                          )
  20464                          AND  al.HostNam e IS NOT N ULL
  20465                          AND  AccessDate Time IS NO T NULL
  20466                          AND  al.Action  = 'PDF'
  20467                          AND  ((AccessLo gID > @Las tID) OR (@ LastID IS  NULL))
  20468         END]]>
  20469        </Value>
  20470                                  
  20471       </Property >
  20472                                 
  20473       <Property 
  20474        Name="IsAn siNullsOn"  
  20475        Value="Tru e" 
  20476       />
  20477                                 
  20478       <Relations hip 
  20479        Name="Body Dependenci es"
  20480       >
  20481                                           
  20482        <Entry>
  20483                                                    
  20484         <Reference
  20485          ExternalSo urce="Buil tIns" 
  20486          Name="[int ]" 
  20487         />
  20488                                            
  20489        </Entry>
  20490                                           
  20491        <Entry>
  20492                                                    
  20493         <Reference
  20494          Name="[App ].[NVCC_Pr oductionLo g]" 
  20495         />
  20496                                            
  20497        </Entry>
  20498                                           
  20499        <Entry>
  20500                                                    
  20501         <Reference
  20502          Name="[App ].[NVCC_Pr oductionLo g].[Access LogID]" 
  20503         />
  20504                                            
  20505        </Entry>
  20506                                           
  20507        <Entry>
  20508                                                    
  20509         <Reference
  20510          Name="[App ].[NVCC_Ac cessLog]" 
  20511         />
  20512                                            
  20513        </Entry>
  20514                                           
  20515        <Entry>
  20516                                                    
  20517         <Reference
  20518          ExternalSo urce="CDWW ork.dacpac
  20519          Name="[CDW Work]|[Pat ient].[Pat ient]" 
  20520         />
  20521                                            
  20522        </Entry>
  20523                                           
  20524        <Entry>
  20525                                                    
  20526         <Reference
  20527          Name="[App ].[NVCC_Ac cessLog].[ PatientSID ]" 
  20528         />
  20529                                            
  20530        </Entry>
  20531                                           
  20532        <Entry>
  20533                                                    
  20534         <Reference
  20535          ExternalSo urce="CDWW ork.dacpac
  20536          Name="[CDW Work]|[Pat ient].[Pat ient].[Pat ientSID]" 
  20537         />
  20538                                            
  20539        </Entry>
  20540                                           
  20541        <Entry>
  20542                                                    
  20543         <Reference
  20544          Name="[App ].[NVCC_Ac cessLog].[ AccessLogI D]" 
  20545         />
  20546                                            
  20547        </Entry>
  20548                                           
  20549        <Entry>
  20550                                                    
  20551         <Reference
  20552          Name="[App ].[NVCC_Ac cessLog].[ UserID]" 
  20553         />
  20554                                            
  20555        </Entry>
  20556                                           
  20557        <Entry>
  20558                                                    
  20559         <Reference
  20560          Name="[App ].[NVCC_Ac cessLog].[ AccessDate Time]" 
  20561         />
  20562                                            
  20563        </Entry>
  20564                                           
  20565        <Entry>
  20566                                                    
  20567         <Reference
  20568          ExternalSo urce="CDWW ork.dacpac
  20569          Name="[CDW Work]|[Pat ient].[Pat ient].[Pat ientICN]" 
  20570         />
  20571                                            
  20572        </Entry>
  20573                                           
  20574        <Entry>
  20575                                                    
  20576         <Reference
  20577          ExternalSo urce="CDWW ork.dacpac
  20578          Name="[CDW Work]|[Pat ient].[Pat ient].[Sta 3n]" 
  20579         />
  20580                                            
  20581        </Entry>
  20582                                           
  20583        <Entry>
  20584                                                    
  20585         <Reference
  20586          Name="[App ].[NVCC_Ac cessLog].[ HostName]"  
  20587         />
  20588                                            
  20589        </Entry>
  20590                                           
  20591        <Entry>
  20592                                                    
  20593         <Reference
  20594          Name="[App ].[NVCC_Ac cessLog].[ AccessDate Time]" 
  20595         />
  20596                                            
  20597        </Entry>
  20598                                           
  20599        <Entry>
  20600                                                    
  20601         <Reference
  20602          Name="[App ].[NVCC_Ac cessLog].[ Action]" 
  20603         />
  20604                                            
  20605        </Entry>
  20606                                           
  20607        <Entry>
  20608                                                    
  20609         <Reference
  20610          Name="[App ].[NVCC_Ac cessLog].[ AccessLogI D]" 
  20611         />
  20612                                            
  20613        </Entry>
  20614                                  
  20615       </Relation ship>
  20616                                 
  20617       <Relations hip 
  20618        Name="Sche ma"
  20619       >
  20620                                           
  20621        <Entry>
  20622                                                    
  20623         <Reference
  20624          Name="[App ]" 
  20625         />
  20626                                            
  20627        </Entry>
  20628                                  
  20629       </Relation ship>
  20630                                 
  20631       <Annotatio
  20632        Type="SysC ommentsObj ectAnnotat ion"
  20633       >
  20634                                           
  20635        <Property 
  20636         Name="Crea teOffset" 
  20637         Value="2" 
  20638        />
  20639                                           
  20640        <Property 
  20641         Name="Leng th" 
  20642         Value="278 0" 
  20643        />
  20644                                           
  20645        <Property 
  20646         Name="Star tLine" 
  20647         Value="1" 
  20648        />
  20649                                           
  20650        <Property 
  20651         Name="Star tColumn" 
  20652         Value="1" 
  20653        />
  20654                                           
  20655        <Property 
  20656         Name="Head erContents
  20657         Value="&#x D;&#xA;CRE ATE PROCED URE App.NV CC_usp_Upd ateProduct ionLog&#xD ;&#xA;&#xD ;&#xA;-- N OTICE:&#xD ;&#xA;-- D o not edit  the store d procedur e live on  the server . Code to  generate&# xD;&#xA;--  the proce dures is s tored in t he project  repositor y. Any cha nges made& #xD;&#xA;- - that are  not recor ded in the  repositor y will be  overwritte n.&#xD;&#x A;&#xD;&#x A;AS" 
  20658        />
  20659                                  
  20660       </Annotati on>
  20661                        
  20662      </Element>
  20663                       
  20664      <Element 
  20665       Type="SqlP rocedure" 
  20666       Name="[App ].[NVCC_us p_UsageDat a2]"
  20667      >
  20668                                 
  20669       <Property 
  20670        Name="Body Script"
  20671       >
  20672                                           
  20673        <Value>
  20674         <![CDATA[
  20675         --======== ========== ========== ========== ========== ========== ========== ========== ====
  20676         --Requesto r              : Non  Va Coordin ated Care  Project
  20677         --Author                  : Bria n Diggs
  20678         --Object/S P Name         : App. NVCC_usp_U sageData2
  20679         --Server                  : 
  20680         --Data Bas e              : CC_R EFDOC
  20681         --Schema                  : app
  20682         --Report                  : N/A
  20683         --Folder                  : N/A
  20684         --Report L oc             : N/A
  20685         --Job                     : None
  20686         --Job Loc                 : None
  20687         --Note                    : 
  20688         --Date Cre ated           : 08-0 3-2016
  20689         --
  20690         --Last Cha nged           : 2017 -07-24
  20691         --Last Cha nged By                 : Brian  Diggs
  20692         --Reason F or Change               : Use NV CC_Product ionLog ins tead of vN VCC_Produc tionAccess Log
  20693         --
  20694         --Purpose                 : To g et aggrega ted, subse tted produ ction coun ts.
  20695         --======== ========== ========== ========== ========== ========== ========== ========== ====
  20696         --Uses: Ap p.udf_Spli tString
  20697         --Uses: Ap p.NVCC_Pro ductionLog
  20698         --Uses: Ap p.udf_Stat ionName
  20699         --Uses: CD WWork.LCus tomer.LCus tomer
  20700        
  20701         BEGIN
  20702                 --  First, cr eate a tem porary tab le, #LogDa ta, which  pulls reco rds from
  20703                 --  App.NVCC_ Production AccessLog.
  20704                 --
  20705                 --  The Acces sDateTime  and UserID  are kept  from the l og, and th e
  20706                 --  PatientSI D is used  to determi ne the Sta 3n for tha t patient.
  20707                 --
  20708                 --  This list  is furthe r restrict ed to thos e stations  and users  specified
  20709                 --  by the pa rameters.  This is ac complished  by conver ting the p arameter
  20710                 --  string to  a table u sing App.u df_SplitSt ring. Only  the value  is kept
  20711                 --  and, for  the statio n, convert ed to a sm allint to  match the  datatype
  20712                 --  elsewhere . An input  of NULL w ill give a  single ro w table wi th value
  20713                 --  NULL. The se convers ions are d one as com mon table  expression s.
  20714                 --  These tab le are INN ER JOIN-ed  to the da ta, with t he clause  that
  20715                 --  everythin g is kept  if the val ue is NULL .
  20716                 --
  20717                 --  UserID an d Sta3n ar e converte d to NULL  if their r espective  parameters
  20718                 --  are NULL.  This indi cates that  there is  no stratif ication do ne (or
  20719                 --  possible)  on those  variables.  The TimeG roup colum n contains  a date
  20720                 --  which is  the start  of the int erval corr esponding  to the req uested
  20721                 --  aggregati on level ( day, start  of week,  start of m onth, star t of
  20722                 --  quarter,  start of y ear).
  20723                 WI TH
  20724                          Sta3 n AS (SELE CT CONVERT (smallint,  Value) AS  Sta3n FRO M App.udf_ SplitStrin g(@sta3n,  ',')),
  20725                          User ID AS (SEL ECT Value  AS UserID  FROM App.u df_SplitSt ring(@user id, ','))
  20726                          SELE CT
  20727                                   CASE
  20728                                            WHEN @us erid IS NU LL THEN NU LL
  20729                                            ELSE pl. UserID
  20730                                   END AS  UserID,
  20731                                   CASE
  20732                                            WHEN @st a3n IS NUL L THEN NUL L
  20733                                            ELSE pl. Sta3n
  20734                                   END AS  Sta3n,
  20735                                   CASE @ timegroup
  20736                                            WHEN 'da y' THEN
  20737                                                     CONVERT(DA TE, pl.Acc essDateTim e)
  20738                                            WHEN 'we ek' THEN
  20739                                                     CONVERT(DA TE, DATEAD D(DAY, 7 *  (DATEDIFF (DAY, '199 0-01-07',  pl.AccessD ateTime) /  7), '1990 -01-07'))
  20740                                            WHEN 'mo nth' THEN
  20741                                                     DATEFROMPA RTS(DATEPA RT(YEAR, p l.AccessDa teTime), D ATEPART(MO NTH, pl.Ac cessDateTi me), 1)
  20742                                            WHEN 'qu arter' THE N
  20743                                                     DATEFROMPA RTS(DATEPA RT(YEAR, p l.AccessDa teTime), ( ((DATEPART (MONTH, pl .AccessDat eTime) - 1 ) / 3) * 3 ) + 1, 1)
  20744                                            WHEN 'ye ar' THEN
  20745                                                     DATEFROMPA RTS(DATEPA RT(YEAR, p l.AccessDa teTime), 1 , 1)
  20746                                            WHEN 'ev er' THEN
  20747                                                     NULL
  20748                                   END AS  TimeGroup
  20749                          INTO  #LogData
  20750                          FROM
  20751                                   App.NV CC_Product ionLog pl
  20752                                   INNER  JOIN Sta3n  st
  20753                                            ON (pl.S ta3n = st. Sta3n OR s t.Sta3n IS  NULL)
  20754                                   INNER  JOIN UserI D uid
  20755                                            ON (pl.U serID = ui d.UserID O R uid.User ID IS NULL )
  20756        
  20757                 --  A tempora ry table,  #LogAgg, i s created  based on t he structu re of #Log Agg plus o ne
  20758                 --  other, NU LLable num eric colum n N. This  must be do ne in a se parate ste p
  20759                 --  step (rat her than i mplicitly  with a SEL ECT ... IN TO) becaus e the same  named
  20760                 --  temporary  table can  not be us ed as a ta rget for m ultiple SE LECT ... I NTO statem ents.
  20761                 --  The WHERE  clause is  designed  to select  no rows, s o no data  is initial ly seeded
  20762                 --  in the te mporary ta ble.
  20763                 SE LECT
  20764                          ld.U serID,
  20765                          ld.S ta3n,
  20766                          ld.T imeGroup,
  20767                          CONV ERT(intege r, NULL) A S N
  20768                 IN TO #LogAgg
  20769                 FR OM #LogDat a AS ld
  20770                 WH ERE 1=0;
  20771        
  20772                 --  Choose th e code pat h based on  the value  of @stati stic.
  20773                 IF  (@statist ic = 'coun t')
  20774                          BEGI N
  20775                                   INSERT  INTO #Log Agg (Sta3n , UserID,  TimeGroup,  N)
  20776                                   SELECT
  20777                                            Sta3n,
  20778                                            UserID,
  20779                                            TimeGrou p,
  20780                                            COUNT(*)  AS N
  20781                                   FROM # LogData
  20782                                   GROUP  BY Sta3n,  UserID, Ti meGroup
  20783                          END
  20784        
  20785                 IF  (@statist ic = 'cumu lative')
  20786                          BEGI N
  20787                                   INSERT  INTO #Log Agg (Sta3n , UserID,  TimeGroup,  N)
  20788                                   SELECT
  20789                                            Sta3n,
  20790                                            UserID,
  20791                                            TimeGrou p,
  20792                                            SUM(N) O VER (PARTI TION BY St a3n, UserI D ORDER BY  TimeGroup ) AS N
  20793                                   FROM (
  20794                                            SELECT
  20795                                                     Sta3n,
  20796                                                     UserID,
  20797                                                     TimeGroup,
  20798                                                     COUNT(*) A S N
  20799                                            FROM #Lo gData
  20800                                            GROUP BY  Sta3n, Us erID, Time Group
  20801                                   ) A
  20802                          END
  20803        
  20804                 --  This temp orary tabl e is no lo nger neede d.
  20805                 DR OP TABLE # LogData;
  20806        
  20807                 --  Further a nnotate th e #LogAgg  table by c onverting  the UserID
  20808                 --  into the  Staff Name  and conve rting the  station nu mber into
  20809                 --  a more us able versi on of the  station na me based o n the
  20810                 --  App.udf_S tationName  function.
  20811                 --
  20812                 --  An additi onal ID co lumn is in cluded so  that Entit y Framewor k
  20813                 --  has somet hing to us e as a pri mary key.  Ironically , there is
  20814                 --  no column  in the ta ble which  is guarant eed to be  non-NULL
  20815                 --  for all v alues of t he paramet ers. And a pparently,  having
  20816                 --  ID as the  ORDER BY  inside the  OVER clau se definin g ID
  20817                 --  isn't inv alid. I ha ve no idea  what it m eans, thou gh.
  20818                 --  However,  since the  ID is not  semantical ly meaning ful (it
  20819                 --  just has  to be uniq ue), it do esn't matt er.
  20820                 --
  20821                 --  Return th is further  annotated  table.
  20822                 SE LECT
  20823                          ROW_ NUMBER() O VER (ORDER  BY la.Sta 3n) AS ID,
  20824                          la.U serID,
  20825                          la.S ta3n,
  20826                          la.T imeGroup,
  20827                          la.N ,
  20828                          lc.L astName +  ', ' + lc. FirstName  AS StaffNa me,
  20829                          App. udf_Statio nName(la.S ta3n) AS S tation
  20830                 FR OM
  20831                          #Log Agg AS la
  20832                          LEFT  JOIN CDWW ork.LCusto mer.LCusto mer lc
  20833                                   ON la. UserID = l c.ADDomain  + '\' + l c.ADLogin
  20834                 OR DER BY Sta 3n, UserID , TimeGrou p
  20835         END]]>
  20836        </Value>
  20837                                  
  20838       </Property >
  20839                                 
  20840       <Property 
  20841        Name="IsAn siNullsOn"  
  20842        Value="Tru e" 
  20843       />
  20844                                 
  20845       <Relations hip 
  20846        Name="Body Dependenci es"
  20847       >
  20848                                           
  20849        <Entry>
  20850                                                    
  20851         <Reference
  20852          Name="[App ].[NVCC_us p_UsageDat a2].[@sta3 n]" 
  20853         />
  20854                                            
  20855        </Entry>
  20856                                           
  20857        <Entry>
  20858                                                    
  20859         <Reference
  20860          Name="[App ].[udf_Spl itString]"  
  20861         />
  20862                                            
  20863        </Entry>
  20864                                           
  20865        <Entry>
  20866                                                    
  20867         <Reference
  20868          ExternalSo urce="Buil tIns" 
  20869          Name="[sma llint]" 
  20870         />
  20871                                            
  20872        </Entry>
  20873                                           
  20874        <Entry>
  20875                                                    
  20876         <Reference
  20877          Name="[App ].[udf_Spl itString]. [Value]" 
  20878         />
  20879                                            
  20880        </Entry>
  20881                                           
  20882        <Entry>
  20883                                                    
  20884         <Reference
  20885          Name="[App ].[NVCC_us p_UsageDat a2].[@user id]" 
  20886         />
  20887                                            
  20888        </Entry>
  20889                                           
  20890        <Entry>
  20891                                                    
  20892         <Reference
  20893          Name="[App ].[NVCC_Pr oductionLo g]" 
  20894         />
  20895                                            
  20896        </Entry>
  20897                                           
  20898        <Entry>
  20899                                                    
  20900         <Reference
  20901          Name="[App ].[NVCC_Pr oductionLo g].[Sta3n]
  20902         />
  20903                                            
  20904        </Entry>
  20905                                           
  20906        <Entry>
  20907                                                    
  20908         <Reference
  20909          Name="[App ].[NVCC_Pr oductionLo g].[UserID ]" 
  20910         />
  20911                                            
  20912        </Entry>
  20913                                           
  20914        <Entry>
  20915                                                    
  20916         <Reference
  20917          Name="[App ].[udf_Spl itString]. [Value]" 
  20918         />
  20919                                            
  20920        </Entry>
  20921                                           
  20922        <Entry>
  20923                                                    
  20924         <Reference
  20925          Name="[App ].[NVCC_us p_UsageDat a2].[@time group]" 
  20926         />
  20927                                            
  20928        </Entry>
  20929                                           
  20930        <Entry>
  20931                                                    
  20932         <Reference
  20933          ExternalSo urce="Buil tIns" 
  20934          Name="[dat e]" 
  20935         />
  20936                                            
  20937        </Entry>
  20938                                           
  20939        <Entry>
  20940                                                    
  20941         <Reference
  20942          Name="[App ].[NVCC_Pr oductionLo g].[Access DateTime]"  
  20943         />
  20944                                            
  20945        </Entry>
  20946                                           
  20947        <Entry>
  20948                                                    
  20949         <Reference
  20950          ExternalSo urce="Buil tIns" 
  20951          Name="[dat e]" 
  20952         />
  20953                                            
  20954        </Entry>
  20955                                           
  20956        <Entry>
  20957                                                    
  20958         <Reference
  20959          Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata]" 
  20960         />
  20961                                            
  20962        </Entry>
  20963                                           
  20964        <Entry>
  20965                                                    
  20966         <Reference
  20967          Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[User ID]" 
  20968         />
  20969                                            
  20970        </Entry>
  20971                                           
  20972        <Entry>
  20973                                                    
  20974         <Reference
  20975          Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[Sta3 n]" 
  20976         />
  20977                                            
  20978        </Entry>
  20979                                           
  20980        <Entry>
  20981                                                    
  20982         <Reference
  20983          Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[Time Group]" 
  20984         />
  20985                                            
  20986        </Entry>
  20987                                           
  20988        <Entry>
  20989                                                    
  20990         <Reference
  20991          ExternalSo urce="Buil tIns" 
  20992          Name="[int ]" 
  20993         />
  20994                                            
  20995        </Entry>
  20996                                           
  20997        <Entry>
  20998                                                    
  20999         <Reference
  21000          Name="[App ].[NVCC_us p_UsageDat a2].[@stat istic]" 
  21001         />
  21002                                            
  21003        </Entry>
  21004                                           
  21005        <Entry>
  21006                                                    
  21007         <Reference
  21008          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg]" 
  21009         />
  21010                                            
  21011        </Entry>
  21012                                           
  21013        <Entry>
  21014                                                    
  21015         <Reference
  21016          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[Sta3n ]" 
  21017         />
  21018                                            
  21019        </Entry>
  21020                                           
  21021        <Entry>
  21022                                                    
  21023         <Reference
  21024          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[UserI D]" 
  21025         />
  21026                                            
  21027        </Entry>
  21028                                           
  21029        <Entry>
  21030                                                    
  21031         <Reference
  21032          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[TimeG roup]" 
  21033         />
  21034                                            
  21035        </Entry>
  21036                                           
  21037        <Entry>
  21038                                                    
  21039         <Reference
  21040          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[N]" 
  21041         />
  21042                                            
  21043        </Entry>
  21044                                           
  21045        <Entry>
  21046                                                    
  21047         <Reference
  21048          Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[Sta3 n]" 
  21049         />
  21050                                            
  21051        </Entry>
  21052                                           
  21053        <Entry>
  21054                                                    
  21055         <Reference
  21056          Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[User ID]" 
  21057         />
  21058                                            
  21059        </Entry>
  21060                                           
  21061        <Entry>
  21062                                                    
  21063         <Reference
  21064          Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[Time Group]" 
  21065         />
  21066                                            
  21067        </Entry>
  21068                                           
  21069        <Entry>
  21070                                                    
  21071         <Reference
  21072          Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[Sta3 n]" 
  21073         />
  21074                                            
  21075        </Entry>
  21076                                           
  21077        <Entry>
  21078                                                    
  21079         <Reference
  21080          Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[User ID]" 
  21081         />
  21082                                            
  21083        </Entry>
  21084                                           
  21085        <Entry>
  21086                                                    
  21087         <Reference
  21088          Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[Time Group]" 
  21089         />
  21090                                            
  21091        </Entry>
  21092                                           
  21093        <Entry>
  21094                                                    
  21095         <Reference
  21096          ExternalSo urce="CDWW ork.dacpac
  21097          Name="[CDW Work]|[LCu stomer].[L Customer]"  
  21098         />
  21099                                            
  21100        </Entry>
  21101                                           
  21102        <Entry>
  21103                                                    
  21104         <Reference
  21105          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[UserI D]" 
  21106         />
  21107                                            
  21108        </Entry>
  21109                                           
  21110        <Entry>
  21111                                                    
  21112         <Reference
  21113          ExternalSo urce="CDWW ork.dacpac
  21114          Name="[CDW Work]|[LCu stomer].[L Customer]. [ADDomain]
  21115         />
  21116                                            
  21117        </Entry>
  21118                                           
  21119        <Entry>
  21120                                                    
  21121         <Reference
  21122          ExternalSo urce="CDWW ork.dacpac
  21123          Name="[CDW Work]|[LCu stomer].[L Customer]. [ADLogin]"  
  21124         />
  21125                                            
  21126        </Entry>
  21127                                           
  21128        <Entry>
  21129                                                    
  21130         <Reference
  21131          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[Sta3n ]" 
  21132         />
  21133                                            
  21134        </Entry>
  21135                                           
  21136        <Entry>
  21137                                                    
  21138         <Reference
  21139          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[TimeG roup]" 
  21140         />
  21141                                            
  21142        </Entry>
  21143                                           
  21144        <Entry>
  21145                                                    
  21146         <Reference
  21147          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[N]" 
  21148         />
  21149                                            
  21150        </Entry>
  21151                                           
  21152        <Entry>
  21153                                                    
  21154         <Reference
  21155          ExternalSo urce="CDWW ork.dacpac
  21156          Name="[CDW Work]|[LCu stomer].[L Customer]. [LastName]
  21157         />
  21158                                            
  21159        </Entry>
  21160                                           
  21161        <Entry>
  21162                                                    
  21163         <Reference
  21164          ExternalSo urce="CDWW ork.dacpac
  21165          Name="[CDW Work]|[LCu stomer].[L Customer]. [FirstName ]" 
  21166         />
  21167                                            
  21168        </Entry>
  21169                                           
  21170        <Entry>
  21171                                                    
  21172         <Reference
  21173          Name="[App ].[udf_Sta tionName]"  
  21174         />
  21175                                            
  21176        </Entry>
  21177                                           
  21178        <Entry>
  21179                                                    
  21180         <Reference
  21181          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[Sta3n ]" 
  21182         />
  21183                                            
  21184        </Entry>
  21185                                           
  21186        <Entry>
  21187                                                    
  21188         <Reference
  21189          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[UserI D]" 
  21190         />
  21191                                            
  21192        </Entry>
  21193                                           
  21194        <Entry>
  21195                                                    
  21196         <Reference
  21197          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[TimeG roup]" 
  21198         />
  21199                                            
  21200        </Entry>
  21201                                  
  21202       </Relation ship>
  21203                                 
  21204       <Relations hip 
  21205        Name="Dyna micObjects "
  21206       >
  21207                                           
  21208        <Entry>
  21209                                                    
  21210         <Element 
  21211          Type="SqlD ynamicColu mnSource" 
  21212          Name="[App ].[NVCC_us p_UsageDat a2].[CTE1] .[Sta3n]"
  21213         >
  21214                                                              
  21215          <Relations hip 
  21216           Name="Colu mns"
  21217          >
  21218                                                                        
  21219           <Entry>
  21220                                                                                  
  21221            <Element 
  21222             Type="SqlC omputedCol umn" 
  21223             Name="[App ].[NVCC_us p_UsageDat a2].[CTE1] .[Sta3n].[ Sta3n]" 
  21224            />
  21225                                                                         
  21226           </Entry>
  21227                                                               
  21228          </Relation ship>
  21229                                                     
  21230         </Element>
  21231                                            
  21232        </Entry>
  21233                                           
  21234        <Entry>
  21235                                                    
  21236         <Element 
  21237          Type="SqlD ynamicColu mnSource" 
  21238          Name="[App ].[NVCC_us p_UsageDat a2].[CTE1] .[UserID]"
  21239         >
  21240                                                              
  21241          <Relations hip 
  21242           Name="Colu mns"
  21243          >
  21244                                                                        
  21245           <Entry>
  21246                                                                                  
  21247            <Element 
  21248             Type="SqlC omputedCol umn" 
  21249             Name="[App ].[NVCC_us p_UsageDat a2].[CTE1] .[UserID]. [UserID]"
  21250            >
  21251                                                                                            
  21252             <Relations hip 
  21253              Name="Expr essionDepe ndencies"
  21254             >
  21255                                                                                                     
  21256              <Entry>
  21257                                                                                                               
  21258               <Reference
  21259                Name="[App ].[udf_Spl itString]. [Value]" 
  21260               />
  21261                                                                                                      
  21262              </Entry>
  21263                                                                                             
  21264             </Relation ship>
  21265                                                                                   
  21266            </Element>
  21267                                                                         
  21268           </Entry>
  21269                                                               
  21270          </Relation ship>
  21271                                                     
  21272         </Element>
  21273                                            
  21274        </Entry>
  21275                                           
  21276        <Entry>
  21277                                                    
  21278         <Element 
  21279          Type="SqlD ynamicColu mnSource" 
  21280          Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata]"
  21281         >
  21282                                                              
  21283          <Relations hip 
  21284           Name="Colu mns"
  21285          >
  21286                                                                        
  21287           <Entry>
  21288                                                                                  
  21289            <Element 
  21290             Type="SqlC omputedCol umn" 
  21291             Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[User ID]" 
  21292            />
  21293                                                                         
  21294           </Entry>
  21295                                                                        
  21296           <Entry>
  21297                                                                                  
  21298            <Element 
  21299             Type="SqlC omputedCol umn" 
  21300             Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[Sta3 n]" 
  21301            />
  21302                                                                         
  21303           </Entry>
  21304                                                                        
  21305           <Entry>
  21306                                                                                  
  21307            <Element 
  21308             Type="SqlC omputedCol umn" 
  21309             Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[Time Group]" 
  21310            />
  21311                                                                         
  21312           </Entry>
  21313                                                               
  21314          </Relation ship>
  21315                                                     
  21316         </Element>
  21317                                            
  21318        </Entry>
  21319                                           
  21320        <Entry>
  21321                                                    
  21322         <Element 
  21323          Type="SqlD ynamicColu mnSource" 
  21324          Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg]"
  21325         >
  21326                                                              
  21327          <Relations hip 
  21328           Name="Colu mns"
  21329          >
  21330                                                                        
  21331           <Entry>
  21332                                                                                  
  21333            <Element 
  21334             Type="SqlC omputedCol umn" 
  21335             Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[UserI D]"
  21336            >
  21337                                                                                            
  21338             <Relations hip 
  21339              Name="Expr essionDepe ndencies"
  21340             >
  21341                                                                                                     
  21342              <Entry>
  21343                                                                                                               
  21344               <Reference
  21345                Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[User ID]" 
  21346               />
  21347                                                                                                      
  21348              </Entry>
  21349                                                                                             
  21350             </Relation ship>
  21351                                                                                   
  21352            </Element>
  21353                                                                         
  21354           </Entry>
  21355                                                                        
  21356           <Entry>
  21357                                                                                  
  21358            <Element 
  21359             Type="SqlC omputedCol umn" 
  21360             Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[Sta3n ]"
  21361            >
  21362                                                                                            
  21363             <Relations hip 
  21364              Name="Expr essionDepe ndencies"
  21365             >
  21366                                                                                                     
  21367              <Entry>
  21368                                                                                                               
  21369               <Reference
  21370                Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[Sta3 n]" 
  21371               />
  21372                                                                                                      
  21373              </Entry>
  21374                                                                                             
  21375             </Relation ship>
  21376                                                                                   
  21377            </Element>
  21378                                                                         
  21379           </Entry>
  21380                                                                        
  21381           <Entry>
  21382                                                                                  
  21383            <Element 
  21384             Type="SqlC omputedCol umn" 
  21385             Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[TimeG roup]"
  21386            >
  21387                                                                                            
  21388             <Relations hip 
  21389              Name="Expr essionDepe ndencies"
  21390             >
  21391                                                                                                     
  21392              <Entry>
  21393                                                                                                               
  21394               <Reference
  21395                Name="[App ].[NVCC_us p_UsageDat a2].[#LogD ata].[Time Group]" 
  21396               />
  21397                                                                                                      
  21398              </Entry>
  21399                                                                                             
  21400             </Relation ship>
  21401                                                                                   
  21402            </Element>
  21403                                                                         
  21404           </Entry>
  21405                                                                        
  21406           <Entry>
  21407                                                                                  
  21408            <Element 
  21409             Type="SqlC omputedCol umn" 
  21410             Name="[App ].[NVCC_us p_UsageDat a2].[#LogA gg].[N]" 
  21411            />
  21412                                                                         
  21413           </Entry>
  21414                                                               
  21415          </Relation ship>
  21416                                                     
  21417         </Element>
  21418                                            
  21419        </Entry>
  21420                                  
  21421       </Relation ship>
  21422                                 
  21423       <Relations hip 
  21424        Name="Para meters"
  21425       >
  21426                                           
  21427        <Entry>
  21428                                                    
  21429         <Element 
  21430          Type="SqlS ubroutineP arameter" 
  21431          Name="[App ].[NVCC_us p_UsageDat a2].[@time group]"
  21432         >
  21433                                                              
  21434          <Property 
  21435           Name="Defa ultExpress ionScript"
  21436          >
  21437                                                                        
  21438           <Value>
  21439            <![CDATA[N ULL]]>
  21440           </Value>
  21441                                                               
  21442          </Property >
  21443                                                              
  21444          <Relations hip 
  21445           Name="Type "
  21446          >
  21447                                                                        
  21448           <Entry>
  21449                                                                                  
  21450            <Element 
  21451             Type="SqlT ypeSpecifi er"
  21452            >
  21453                                                                                            
  21454             <Property 
  21455              Name="IsMa x" 
  21456              Value="Tru e" 
  21457             />
  21458                                                                                            
  21459             <Relations hip 
  21460              Name="Type "
  21461             >
  21462                                                                                                     
  21463              <Entry>
  21464                                                                                                               
  21465               <Reference
  21466                ExternalSo urce="Buil tIns" 
  21467                Name="[var char]" 
  21468               />
  21469                                                                                                      
  21470              </Entry>
  21471                                                                                             
  21472             </Relation ship>
  21473                                                                                   
  21474            </Element>
  21475                                                                         
  21476           </Entry>
  21477                                                               
  21478          </Relation ship>
  21479                                                     
  21480         </Element>
  21481                                            
  21482        </Entry>
  21483                                           
  21484        <Entry>
  21485                                                    
  21486         <Element 
  21487          Type="SqlS ubroutineP arameter" 
  21488          Name="[App ].[NVCC_us p_UsageDat a2].[@stat istic]"
  21489         >
  21490                                                              
  21491          <Property 
  21492           Name="Defa ultExpress ionScript"
  21493          >
  21494                                                                        
  21495           <Value>
  21496            <![CDATA[N ULL]]>
  21497           </Value>
  21498                                                               
  21499          </Property >
  21500                                                              
  21501          <Relations hip 
  21502           Name="Type "
  21503          >
  21504                                                                        
  21505           <Entry>
  21506                                                                                  
  21507            <Element 
  21508             Type="SqlT ypeSpecifi er"
  21509            >
  21510                                                                                            
  21511             <Property 
  21512              Name="IsMa x" 
  21513              Value="Tru e" 
  21514             />
  21515                                                                                            
  21516             <Relations hip 
  21517              Name="Type "
  21518             >
  21519                                                                                                     
  21520              <Entry>
  21521                                                                                                               
  21522               <Reference
  21523                ExternalSo urce="Buil tIns" 
  21524                Name="[var char]" 
  21525               />
  21526                                                                                                      
  21527              </Entry>
  21528                                                                                             
  21529             </Relation ship>
  21530                                                                                   
  21531            </Element>
  21532                                                                         
  21533           </Entry>
  21534                                                               
  21535          </Relation ship>
  21536                                                     
  21537         </Element>
  21538                                            
  21539        </Entry>
  21540                                           
  21541        <Entry>
  21542                                                    
  21543         <Element 
  21544          Type="SqlS ubroutineP arameter" 
  21545          Name="[App ].[NVCC_us p_UsageDat a2].[@sta3 n]"
  21546         >
  21547                                                              
  21548          <Property 
  21549           Name="Defa ultExpress ionScript"
  21550          >
  21551                                                                        
  21552           <Value>
  21553            <![CDATA[N ULL]]>
  21554           </Value>
  21555                                                               
  21556          </Property >
  21557                                                              
  21558          <Relations hip 
  21559           Name="Type "
  21560          >
  21561                                                                        
  21562           <Entry>
  21563                                                                                  
  21564            <Element 
  21565             Type="SqlT ypeSpecifi er"
  21566            >
  21567                                                                                            
  21568             <Property 
  21569              Name="IsMa x" 
  21570              Value="Tru e" 
  21571             />
  21572                                                                                            
  21573             <Relations hip 
  21574              Name="Type "
  21575             >
  21576                                                                                                     
  21577              <Entry>
  21578                                                                                                               
  21579               <Reference
  21580                ExternalSo urce="Buil tIns" 
  21581                Name="[var char]" 
  21582               />
  21583                                                                                                      
  21584              </Entry>
  21585                                                                                             
  21586             </Relation ship>
  21587                                                                                   
  21588            </Element>
  21589                                                                         
  21590           </Entry>
  21591                                                               
  21592          </Relation ship>
  21593                                                     
  21594         </Element>
  21595                                            
  21596        </Entry>
  21597                                           
  21598        <Entry>
  21599                                                    
  21600         <Element 
  21601          Type="SqlS ubroutineP arameter" 
  21602          Name="[App ].[NVCC_us p_UsageDat a2].[@user id]"
  21603         >
  21604                                                              
  21605          <Property 
  21606           Name="Defa ultExpress ionScript"
  21607          >
  21608                                                                        
  21609           <Value>
  21610            <![CDATA[N ULL]]>
  21611           </Value>
  21612                                                               
  21613          </Property >
  21614                                                              
  21615          <Relations hip 
  21616           Name="Type "
  21617          >
  21618                                                                        
  21619           <Entry>
  21620                                                                                  
  21621            <Element 
  21622             Type="SqlT ypeSpecifi er"
  21623            >
  21624                                                                                            
  21625             <Property 
  21626              Name="IsMa x" 
  21627              Value="Tru e" 
  21628             />
  21629                                                                                            
  21630             <Relations hip 
  21631              Name="Type "
  21632             >
  21633                                                                                                     
  21634              <Entry>
  21635                                                                                                               
  21636               <Reference
  21637                ExternalSo urce="Buil tIns" 
  21638                Name="[var char]" 
  21639               />
  21640                                                                                                      
  21641              </Entry>
  21642                                                                                             
  21643             </Relation ship>
  21644                                                                                   
  21645            </Element>
  21646                                                                         
  21647           </Entry>
  21648                                                               
  21649          </Relation ship>
  21650                                                     
  21651         </Element>
  21652                                            
  21653        </Entry>
  21654                                  
  21655       </Relation ship>
  21656                                 
  21657       <Relations hip 
  21658        Name="Sche ma"
  21659       >
  21660                                           
  21661        <Entry>
  21662                                                    
  21663         <Reference
  21664          Name="[App ]" 
  21665         />
  21666                                            
  21667        </Entry>
  21668                                  
  21669       </Relation ship>
  21670                                 
  21671       <Annotatio
  21672        Type="SysC ommentsObj ectAnnotat ion"
  21673       >
  21674                                           
  21675        <Property 
  21676         Name="Crea teOffset" 
  21677         Value="2" 
  21678        />
  21679                                           
  21680        <Property 
  21681         Name="Leng th" 
  21682         Value="770 9" 
  21683        />
  21684                                           
  21685        <Property 
  21686         Name="Star tLine" 
  21687         Value="1" 
  21688        />
  21689                                           
  21690        <Property 
  21691         Name="Star tColumn" 
  21692         Value="1" 
  21693        />
  21694                                           
  21695        <Property 
  21696         Name="Head erContents
  21697         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ UsageData2 ]&#xD;&#xA ;&#x9;-- @ timegroup  is a chara cter param eter which  can take  values NUL L, 'day',  'week',&#x D;&#xA;&#x 9;-- 'mont h', 'quart er', 'year ', or 'eve r'. NULL i s equivale nt to 'eve r'. Any ot her value& #xD;&#xA;& #x9;-- wil l result i n undefind  behavior. &#xD;&#xA; &#x9;@time group varc har(max) =  NULL,&#xD ;&#xA;&#x9 ;-- @stati stic is a  character  parameter  which can  take value s 'count'  or 'cumula tive'.&#xD ;&#xA;&#x9 ;-- Any ot her value  will resul t in undef ined behav ior.&#xD;& #xA;&#x9;- - For 'cou nt', the v alue N rep resents nu mber withi n that tim egroup and  any&#xD;& #xA;&#x9;- - other gr ouping cat egories&#x D;&#xA;&#x 9;-- For ' cumulative ', the val ue N repre sents the  cumulative  number, o ver time,& #xD;&#xA;& #x9;-- up  to that ti mepoint, s eparated b y any othe r grouping  categorie s&#xD;&#xA ;&#x9;@sta tistic var char(max)  = NULL,&#x D;&#xA;&#x 9;-- @sta3 n is a cha racter par ameter whi ch can eit her NULL,  a single s tation num ber,&#xD;& #xA;&#x9;- - or a com ma demlimi ted list o f station  numbers. N ULL implie s that the  data for& #xD;&#xA;& #x9;-- all  stations  should be  returned/u sed and th at no stra tification  by statio n should&# xD;&#xA;&# x9;-- be d one. A sin gle statio n number ( as a strin g) will re turn data  for only t hat&#xD;&# xA;&#x9;--  station.  A comma de limited li st of stat ion number s will res trict the  returned d ata&#xD;&# xA;&#x9;--  to those  present in  the list  and any ag gregation  or ordinat ion will b e done&#xD ;&#xA;&#x9 ;-- separa tely for e ach statio n.&#xD;&#x A;&#x9;@st a3n varcha r(max) = N ULL,&#xD;& #xA;&#x9;- - @userid  is a chara cter param eter which  can eithe r NULL, a  single use r identifi er,&#xD;&# xA;&#x9;--  or a comm a demlimit ed list of  user iden tifiers. A  user iden tifier is  a login,&# xD;&#xA;&# x9;-- incl uding the  domain. NU LL implies  that the  data for a ll userss  stations s hould&#xD; &#xA;&#x9; -- be retu rned/used  and that n o stratifi cation by  user shoul d be done.  A userid& #xD;&#xA;& #x9;-- wil l return d ata for on ly that us er. A comm a delimite d list of  users will &#xD;&#xA; &#x9;-- re strict the  returned  data to th ose presen t in the l ist and an y aggregat ion&#xD;&# xA;&#x9;--  or ordina tion will  be done se parately f or each us er.&#xD;&# xA;&#x9;@u serid varc har(max) =  NULL&#xD; &#xA;AS" 
  21698        />
  21699                                  
  21700       </Annotati on>
  21701                        
  21702      </Element>
  21703                       
  21704      <Element 
  21705       Type="SqlP rocedure" 
  21706       Name="[App ].[NVCC_us p_UserCoun ts]"
  21707      >
  21708                                 
  21709       <Property 
  21710        Name="Body Script"
  21711       >
  21712                                           
  21713        <Value>
  21714         <![CDATA[
  21715         --======== ========== ========== ========== ========== ========== ========== ========== ====
  21716         --Requesto r              : Non  Va Coordin ated Care  Project
  21717         --Author                  : Bria n Diggs
  21718         --Object/S P Name         : NVCC _usp_UserC ounts
  21719         --Server                  : 
  21720         --Data Bas e              : CC_R EFDOC
  21721         --Schema                  : App
  21722         --Report                  : N/A
  21723         --Folder                  : N/A
  21724         --Report L oc             : N/A
  21725         --Job                     : None
  21726         --Job Loc                 : None
  21727         --Note                    : 
  21728         --Date Cre ated           : 08-0 2-2016
  21729         --
  21730         --Last Cha nged           : 2017 -07-24
  21731         --Last Cha nged By                 : Brian  Diggs
  21732         --Reason F or Change               : Conver t to use N VCC_UsersV 2 and NVCC _Productio nLog.
  21733         --                          Drop  LoggedUse rs.
  21734         --
  21735         --Purpose                 : Vari ous counts  of users
  21736         --======== ========== ========== ========== ========== ========== ========== ========== ====
  21737         --Uses: Ap p.NVCC_Use rsV2
  21738         --Uses: Ap p.NVCC_Pro ductionLog
  21739         --Uses: Ap p.NVCC_udf _ActiveUse rCount()
  21740        
  21741         SELECT
  21742                 T. LookedUser s,
  21743                 0  AS LoggedU sers, -- U sed to be  the number  of users  who had ge nerated a  logged ent ry, but ex pensive to  calculate  and not u seful beca use poorly  defined
  21744                 R. RDPUsers,
  21745                 A. ActiveUser s,
  21746                 A. ActiveSite s
  21747         FROM
  21748                 (
  21749                          SELE CT COUNT(* ) AS Looke dUsers
  21750                          FROM  App.NVCC_ UsersV2
  21751                 )  AS T
  21752                 CR OSS JOIN
  21753                 (
  21754                          SELE CT COUNT(D ISTINCT Us erID) AS R DPUsers
  21755                          FROM  App.NVCC_ Production Log
  21756                 )  AS R
  21757                 CR OSS JOIN
  21758                 (
  21759                          SELE CT
  21760                                   SUM(Ac tiveUsers)  AS Active Users,
  21761                                   COUNT( *) AS Acti veSites
  21762                          FROM  App.NVCC_ udf_Active UserCount( )
  21763                 )  AS A]]>
  21764        </Value>
  21765                                  
  21766       </Property >
  21767                                 
  21768       <Property 
  21769        Name="IsAn siNullsOn"  
  21770        Value="Tru e" 
  21771       />
  21772                                 
  21773       <Relations hip 
  21774        Name="Body Dependenci es"
  21775       >
  21776                                           
  21777        <Entry>
  21778                                                    
  21779         <Reference
  21780          Name="[App ].[NVCC_Us ersV2]" 
  21781         />
  21782                                            
  21783        </Entry>
  21784                                           
  21785        <Entry>
  21786                                                    
  21787         <Reference
  21788          Name="[App ].[NVCC_Pr oductionLo g]" 
  21789         />
  21790                                            
  21791        </Entry>
  21792                                           
  21793        <Entry>
  21794                                                    
  21795         <Reference
  21796          Name="[App ].[NVCC_Pr oductionLo g].[UserID ]" 
  21797         />
  21798                                            
  21799        </Entry>
  21800                                           
  21801        <Entry>
  21802                                                    
  21803         <Reference
  21804          Name="[App ].[NVCC_ud f_ActiveUs erCount]" 
  21805         />
  21806                                            
  21807        </Entry>
  21808                                           
  21809        <Entry>
  21810                                                    
  21811         <Reference
  21812          Name="[App ].[NVCC_ud f_ActiveUs erCount].[ ActiveUser s]" 
  21813         />
  21814                                            
  21815        </Entry>
  21816                                  
  21817       </Relation ship>
  21818                                 
  21819       <Relations hip 
  21820        Name="Sche ma"
  21821       >
  21822                                           
  21823        <Entry>
  21824                                                    
  21825         <Reference
  21826          Name="[App ]" 
  21827         />
  21828                                            
  21829        </Entry>
  21830                                  
  21831       </Relation ship>
  21832                                 
  21833       <Annotatio
  21834        Type="SysC ommentsObj ectAnnotat ion"
  21835       >
  21836                                           
  21837        <Property 
  21838         Name="Crea teOffset" 
  21839         Value="2" 
  21840        />
  21841                                           
  21842        <Property 
  21843         Name="Leng th" 
  21844         Value="181 1" 
  21845        />
  21846                                           
  21847        <Property 
  21848         Name="Star tLine" 
  21849         Value="1" 
  21850        />
  21851                                           
  21852        <Property 
  21853         Name="Star tColumn" 
  21854         Value="1" 
  21855        />
  21856                                           
  21857        <Property 
  21858         Name="Head erContents
  21859         Value="&#x D;&#xA;CRE ATE PROCED URE [App]. [NVCC_usp_ UserCounts ]&#xD;&#xA ;&#xD;&#xA ;-- NOTICE :&#xD;&#xA ;-- Do not  edit the  stored pro cedure liv e on the s erver. Cod e to gener ate&#xD;&# xA;-- the  procedures  is stored  in the pr oject repo sitory. An y changes  made&#xD;& #xA;-- tha t are not  recorded i n the repo sitory wil l be overw ritten.&#x D;&#xA;&#x D;&#xA;AS"  
  21860        />
  21861                                  
  21862       </Annotati on>
  21863                        
  21864      </Element>
  21865                       
  21866      <Element 
  21867       Type="SqlV iew" 
  21868       Name="[App ].[NVCC_vG etNVAMeds] "
  21869      >
  21870                                 
  21871       <Property 
  21872        Name="Quer yScript"
  21873       >
  21874                                           
  21875        <Value>
  21876         <![CDATA[
  21877         --======== ========== ========== ========== ========== ========== ========== ========== ===
  21878         --Requesto r                                : Non Va C oordinated  Care Proj ect
  21879         --Author                  : Jerr y Kohler ( Original s cript by D r. Charles  Demosthen es)
  21880         --Object/S P Name                  : NVCC_v GetNVAMeds
  21881         --SERVER                                   
  21882         --Data Bas e                                : CC_REFDO C
  21883         --Schema                                    : app
  21884         --Report                                    : N/A
  21885         --Folder                                    : N/A
  21886         --Report L oc             : N/A
  21887         --Job                     : None
  21888         --Job Loc                 : None
  21889         --Note                    : 
  21890         --Date Cre ated           : 02-0 5-2016
  21891         --Last Cha nged           : 
  21892         --Last Cha nged By                 : 
  21893         --Reason F or Change               : 
  21894         --
  21895         --Purpose                 : Retr ieve a pat ient's med ications n ot issued  by VA for
  21896         --                          incl usion into  NVCC docu mentation
  21897         --======== ========== ========== ========== ========== ========== ========== ========== ===
  21898        
  21899         SELECT n.N onVAMedSID
  21900                          d.Lo calDrugNam eWithDose
  21901               ,n.M edicationR oute
  21902               ,n.S chedule
  21903                    , n.Patien tSID
  21904         FROM CDWWo rk.NonVAMe d.NonVAMed  n
  21905         INNER JOIN  CDWWork.D im.LocalDr ug d ON n. LocalDrugS ID = d.Loc alDrugSID
  21906         where NonV AMedSID no t in (0, - 1)]]>
  21907        </Value>
  21908                                  
  21909       </Property >
  21910                                 
  21911       <Property 
  21912        Name="IsAn siNullsOn"  
  21913        Value="Tru e" 
  21914       />
  21915                                 
  21916       <Relations hip 
  21917        Name="Colu mns"
  21918       >
  21919                                           
  21920        <Entry>
  21921                                                    
  21922         <Element 
  21923          Type="SqlC omputedCol umn" 
  21924          Name="[App ].[NVCC_vG etNVAMeds] .[NonVAMed SID]"
  21925         >
  21926                                                              
  21927          <Relations hip 
  21928           Name="Expr essionDepe ndencies"
  21929          >
  21930                                                                        
  21931           <Entry>
  21932                                                                                  
  21933            <Reference
  21934             ExternalSo urce="CDWW ork.dacpac
  21935             Name="[CDW Work]|[Non VAMed].[No nVAMed].[N onVAMedSID ]" 
  21936            />
  21937                                                                         
  21938           </Entry>
  21939                                                               
  21940          </Relation ship>
  21941                                                     
  21942         </Element>
  21943                                            
  21944        </Entry>
  21945                                           
  21946        <Entry>
  21947                                                    
  21948         <Element 
  21949          Type="SqlC omputedCol umn" 
  21950          Name="[App ].[NVCC_vG etNVAMeds] .[LocalDru gNameWithD ose]"
  21951         >
  21952                                                              
  21953          <Relations hip 
  21954           Name="Expr essionDepe ndencies"
  21955          >
  21956                                                                        
  21957           <Entry>
  21958                                                                                  
  21959            <Reference
  21960             ExternalSo urce="CDWW ork.dacpac
  21961             Name="[CDW Work]|[Dim ].[LocalDr ug].[Local DrugNameWi thDose]" 
  21962            />
  21963                                                                         
  21964           </Entry>
  21965                                                               
  21966          </Relation ship>
  21967                                                     
  21968         </Element>
  21969                                            
  21970        </Entry>
  21971                                           
  21972        <Entry>
  21973                                                    
  21974         <Element 
  21975          Type="SqlC omputedCol umn" 
  21976          Name="[App ].[NVCC_vG etNVAMeds] .[Medicati onRoute]"
  21977         >
  21978                                                              
  21979          <Relations hip 
  21980           Name="Expr essionDepe ndencies"
  21981          >
  21982                                                                        
  21983           <Entry>
  21984                                                                                  
  21985            <Reference
  21986             ExternalSo urce="CDWW ork.dacpac
  21987             Name="[CDW Work]|[Non VAMed].[No nVAMed].[M edicationR oute]" 
  21988            />
  21989                                                                         
  21990           </Entry>
  21991                                                               
  21992          </Relation ship>
  21993                                                     
  21994         </Element>
  21995                                            
  21996        </Entry>
  21997                                           
  21998        <Entry>
  21999                                                    
  22000         <Element 
  22001          Type="SqlC omputedCol umn" 
  22002          Name="[App ].[NVCC_vG etNVAMeds] .[Schedule ]"
  22003         >
  22004                                                              
  22005          <Relations hip 
  22006           Name="Expr essionDepe ndencies"
  22007          >
  22008                                                                        
  22009           <Entry>
  22010                                                                                  
  22011            <Reference
  22012             ExternalSo urce="CDWW ork.dacpac
  22013             Name="[CDW Work]|[Non VAMed].[No nVAMed].[S chedule]" 
  22014            />
  22015                                                                         
  22016           </Entry>
  22017                                                               
  22018          </Relation ship>
  22019                                                     
  22020         </Element>
  22021                                            
  22022        </Entry>
  22023                                           
  22024        <Entry>
  22025                                                    
  22026         <Element 
  22027          Type="SqlC omputedCol umn" 
  22028          Name="[App ].[NVCC_vG etNVAMeds] .[PatientS ID]"
  22029         >
  22030                                                              
  22031          <Relations hip 
  22032           Name="Expr essionDepe ndencies"
  22033          >
  22034                                                                        
  22035           <Entry>
  22036                                                                                  
  22037            <Reference
  22038             ExternalSo urce="CDWW ork.dacpac
  22039             Name="[CDW Work]|[Non VAMed].[No nVAMed].[P atientSID]
  22040            />
  22041                                                                         
  22042           </Entry>
  22043                                                               
  22044          </Relation ship>
  22045                                                     
  22046         </Element>
  22047                                            
  22048        </Entry>
  22049                                  
  22050       </Relation ship>
  22051                                 
  22052       <Relations hip 
  22053        Name="Quer yDependenc ies"
  22054       >
  22055                                           
  22056        <Entry>
  22057                                                    
  22058         <Reference
  22059          ExternalSo urce="CDWW ork.dacpac
  22060          Name="[CDW Work]|[Non VAMed].[No nVAMed]" 
  22061         />
  22062                                            
  22063        </Entry>
  22064                                           
  22065        <Entry>
  22066                                                    
  22067         <Reference
  22068          ExternalSo urce="CDWW ork.dacpac
  22069          Name="[CDW Work]|[Dim ].[LocalDr ug]" 
  22070         />
  22071                                            
  22072        </Entry>
  22073                                           
  22074        <Entry>
  22075                                                    
  22076         <Reference
  22077          ExternalSo urce="CDWW ork.dacpac
  22078          Name="[CDW Work]|[Non VAMed].[No nVAMed].[L ocalDrugSI D]" 
  22079         />
  22080                                            
  22081        </Entry>
  22082                                           
  22083        <Entry>
  22084                                                    
  22085         <Reference
  22086          ExternalSo urce="CDWW ork.dacpac
  22087          Name="[CDW Work]|[Dim ].[LocalDr ug].[Local DrugSID]" 
  22088         />
  22089                                            
  22090        </Entry>
  22091                                           
  22092        <Entry>
  22093                                                    
  22094         <Reference
  22095          ExternalSo urce="CDWW ork.dacpac
  22096          Name="[CDW Work]|[Non VAMed].[No nVAMed].[N onVAMedSID ]" 
  22097         />
  22098                                            
  22099        </Entry>
  22100                                           
  22101        <Entry>
  22102                                                    
  22103         <Reference
  22104          ExternalSo urce="CDWW ork.dacpac
  22105          Name="[CDW Work]|[Dim ].[LocalDr ug].[Local DrugNameWi thDose]" 
  22106         />
  22107                                            
  22108        </Entry>
  22109                                           
  22110        <Entry>
  22111                                                    
  22112         <Reference
  22113          ExternalSo urce="CDWW ork.dacpac
  22114          Name="[CDW Work]|[Non VAMed].[No nVAMed].[M edicationR oute]" 
  22115         />
  22116                                            
  22117        </Entry>
  22118                                           
  22119        <Entry>
  22120                                                    
  22121         <Reference
  22122          ExternalSo urce="CDWW ork.dacpac
  22123          Name="[CDW Work]|[Non VAMed].[No nVAMed].[S chedule]" 
  22124         />
  22125                                            
  22126        </Entry>
  22127                                           
  22128        <Entry>
  22129                                                    
  22130         <Reference
  22131          ExternalSo urce="CDWW ork.dacpac
  22132          Name="[CDW Work]|[Non VAMed].[No nVAMed].[P atientSID]
  22133         />
  22134                                            
  22135        </Entry>
  22136                                           
  22137        <Entry>
  22138                                                    
  22139         <Reference
  22140          ExternalSo urce="CDWW ork.dacpac
  22141          Name="[CDW Work]|[Non VAMed].[No nVAMed].[N onVAMedSID ]" 
  22142         />
  22143                                            
  22144        </Entry>
  22145                                  
  22146       </Relation ship>
  22147                                 
  22148       <Relations hip 
  22149        Name="Sche ma"
  22150       >
  22151                                           
  22152        <Entry>
  22153                                                    
  22154         <Reference
  22155          Name="[App ]" 
  22156         />
  22157                                            
  22158        </Entry>
  22159                                  
  22160       </Relation ship>
  22161                                 
  22162       <Annotatio
  22163        Type="SysC ommentsObj ectAnnotat ion"
  22164       >
  22165                                           
  22166        <Property 
  22167         Name="Crea teOffset" 
  22168         Value="10"  
  22169        />
  22170                                           
  22171        <Property 
  22172         Name="Leng th" 
  22173         Value="113 6" 
  22174        />
  22175                                           
  22176        <Property 
  22177         Name="Star tLine" 
  22178         Value="1" 
  22179        />
  22180                                           
  22181        <Property 
  22182         Name="Star tColumn" 
  22183         Value="1" 
  22184        />
  22185                                           
  22186        <Property 
  22187         Name="Head erContents
  22188         Value="&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;CRE ATE VIEW [ App].[NVCC _vGetNVAMe ds]&#xD;&# xA;&#xD;&# xA;AS" 
  22189        />
  22190                                           
  22191        <Property 
  22192         Name="Foot erContents
  22193         Value=";" 
  22194        />
  22195                                  
  22196       </Annotati on>
  22197                        
  22198      </Element>
  22199                       
  22200      <Element 
  22201       Type="SqlT able" 
  22202       Name="[App ].[PCMMCur rentPatien tProviderR elationshi p]"
  22203      >
  22204                                 
  22205       <Property 
  22206        Name="IsAn siNullsOn"  
  22207        Value="Tru e" 
  22208       />
  22209                                 
  22210       <Relations hip 
  22211        Name="Colu mns"
  22212       >
  22213                                           
  22214        <Entry>
  22215                                                    
  22216         <Element 
  22217          Type="SqlS impleColum n" 
  22218          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Sta3n] "
  22219         >
  22220                                                              
  22221          <Property 
  22222           Name="IsNu llable" 
  22223           Value="Fal se" 
  22224          />
  22225                                                              
  22226          <Relations hip 
  22227           Name="Type Specifier"
  22228          >
  22229                                                                        
  22230           <Entry>
  22231                                                                                  
  22232            <Element 
  22233             Type="SqlT ypeSpecifi er"
  22234            >
  22235                                                                                            
  22236             <Relations hip 
  22237              Name="Type "
  22238             >
  22239                                                                                                     
  22240              <Entry>
  22241                                                                                                               
  22242               <Reference
  22243                ExternalSo urce="Buil tIns" 
  22244                Name="[sma llint]" 
  22245               />
  22246                                                                                                      
  22247              </Entry>
  22248                                                                                             
  22249             </Relation ship>
  22250                                                                                   
  22251            </Element>
  22252                                                                         
  22253           </Entry>
  22254                                                               
  22255          </Relation ship>
  22256                                                     
  22257         </Element>
  22258                                            
  22259        </Entry>
  22260                                           
  22261        <Entry>
  22262                                                    
  22263         <Element 
  22264          Type="SqlS impleColum n" 
  22265          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Patien tSID]"
  22266         >
  22267                                                              
  22268          <Relations hip 
  22269           Name="Type Specifier"
  22270          >
  22271                                                                        
  22272           <Entry>
  22273                                                                                  
  22274            <Element 
  22275             Type="SqlT ypeSpecifi er"
  22276            >
  22277                                                                                            
  22278             <Relations hip 
  22279              Name="Type "
  22280             >
  22281                                                                                                     
  22282              <Entry>
  22283                                                                                                               
  22284               <Reference
  22285                ExternalSo urce="Buil tIns" 
  22286                Name="[int ]" 
  22287               />
  22288                                                                                                      
  22289              </Entry>
  22290                                                                                             
  22291             </Relation ship>
  22292                                                                                   
  22293            </Element>
  22294                                                                         
  22295           </Entry>
  22296                                                               
  22297          </Relation ship>
  22298                                                     
  22299         </Element>
  22300                                            
  22301        </Entry>
  22302                                           
  22303        <Entry>
  22304                                                    
  22305         <Element 
  22306          Type="SqlS impleColum n" 
  22307          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[StaffI EN]"
  22308         >
  22309                                                              
  22310          <Relations hip 
  22311           Name="Type Specifier"
  22312          >
  22313                                                                        
  22314           <Entry>
  22315                                                                                  
  22316            <Element 
  22317             Type="SqlT ypeSpecifi er"
  22318            >
  22319                                                                                            
  22320             <Property 
  22321              Name="Leng th" 
  22322              Value="50"  
  22323             />
  22324                                                                                            
  22325             <Relations hip 
  22326              Name="Type "
  22327             >
  22328                                                                                                     
  22329              <Entry>
  22330                                                                                                               
  22331               <Reference
  22332                ExternalSo urce="Buil tIns" 
  22333                Name="[var char]" 
  22334               />
  22335                                                                                                      
  22336              </Entry>
  22337                                                                                             
  22338             </Relation ship>
  22339                                                                                   
  22340            </Element>
  22341                                                                         
  22342           </Entry>
  22343                                                               
  22344          </Relation ship>
  22345                                                     
  22346         </Element>
  22347                                            
  22348        </Entry>
  22349                                           
  22350        <Entry>
  22351                                                    
  22352         <Element 
  22353          Type="SqlS impleColum n" 
  22354          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Primar yProviderS ID]"
  22355         >
  22356                                                              
  22357          <Relations hip 
  22358           Name="Type Specifier"
  22359          >
  22360                                                                        
  22361           <Entry>
  22362                                                                                  
  22363            <Element 
  22364             Type="SqlT ypeSpecifi er"
  22365            >
  22366                                                                                            
  22367             <Relations hip 
  22368              Name="Type "
  22369             >
  22370                                                                                                     
  22371              <Entry>
  22372                                                                                                               
  22373               <Reference
  22374                ExternalSo urce="Buil tIns" 
  22375                Name="[int ]" 
  22376               />
  22377                                                                                                      
  22378              </Entry>
  22379                                                                                             
  22380             </Relation ship>
  22381                                                                                   
  22382            </Element>
  22383                                                                         
  22384           </Entry>
  22385                                                               
  22386          </Relation ship>
  22387                                                     
  22388         </Element>
  22389                                            
  22390        </Entry>
  22391                                           
  22392        <Entry>
  22393                                                    
  22394         <Element 
  22395          Type="SqlS impleColum n" 
  22396          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Primar yProvider] "
  22397         >
  22398                                                              
  22399          <Relations hip 
  22400           Name="Type Specifier"
  22401          >
  22402                                                                        
  22403           <Entry>
  22404                                                                                  
  22405            <Element 
  22406             Type="SqlT ypeSpecifi er"
  22407            >
  22408                                                                                            
  22409             <Property 
  22410              Name="Leng th" 
  22411              Value="100
  22412             />
  22413                                                                                            
  22414             <Relations hip 
  22415              Name="Type "
  22416             >
  22417                                                                                                     
  22418              <Entry>
  22419                                                                                                               
  22420               <Reference
  22421                ExternalSo urce="Buil tIns" 
  22422                Name="[var char]" 
  22423               />
  22424                                                                                                      
  22425              </Entry>
  22426                                                                                             
  22427             </Relation ship>
  22428                                                                                   
  22429            </Element>
  22430                                                                         
  22431           </Entry>
  22432                                                               
  22433          </Relation ship>
  22434                                                     
  22435         </Element>
  22436                                            
  22437        </Entry>
  22438                                           
  22439        <Entry>
  22440                                                    
  22441         <Element 
  22442          Type="SqlS impleColum n" 
  22443          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Associ ateProvide rSID]"
  22444         >
  22445                                                              
  22446          <Relations hip 
  22447           Name="Type Specifier"
  22448          >
  22449                                                                        
  22450           <Entry>
  22451                                                                                  
  22452            <Element 
  22453             Type="SqlT ypeSpecifi er"
  22454            >
  22455                                                                                            
  22456             <Relations hip 
  22457              Name="Type "
  22458             >
  22459                                                                                                     
  22460              <Entry>
  22461                                                                                                               
  22462               <Reference
  22463                ExternalSo urce="Buil tIns" 
  22464                Name="[int ]" 
  22465               />
  22466                                                                                                      
  22467              </Entry>
  22468                                                                                             
  22469             </Relation ship>
  22470                                                                                   
  22471            </Element>
  22472                                                                         
  22473           </Entry>
  22474                                                               
  22475          </Relation ship>
  22476                                                     
  22477         </Element>
  22478                                            
  22479        </Entry>
  22480                                           
  22481        <Entry>
  22482                                                    
  22483         <Element 
  22484          Type="SqlS impleColum n" 
  22485          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Associ ateProvide rIEN]"
  22486         >
  22487                                                              
  22488          <Relations hip 
  22489           Name="Type Specifier"
  22490          >
  22491                                                                        
  22492           <Entry>
  22493                                                                                  
  22494            <Element 
  22495             Type="SqlT ypeSpecifi er"
  22496            >
  22497                                                                                            
  22498             <Property 
  22499              Name="Leng th" 
  22500              Value="50"  
  22501             />
  22502                                                                                            
  22503             <Relations hip 
  22504              Name="Type "
  22505             >
  22506                                                                                                     
  22507              <Entry>
  22508                                                                                                               
  22509               <Reference
  22510                ExternalSo urce="Buil tIns" 
  22511                Name="[var char]" 
  22512               />
  22513                                                                                                      
  22514              </Entry>
  22515                                                                                             
  22516             </Relation ship>
  22517                                                                                   
  22518            </Element>
  22519                                                                         
  22520           </Entry>
  22521                                                               
  22522          </Relation ship>
  22523                                                     
  22524         </Element>
  22525                                            
  22526        </Entry>
  22527                                           
  22528        <Entry>
  22529                                                    
  22530         <Element 
  22531          Type="SqlS impleColum n" 
  22532          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Associ ateProvide r]"
  22533         >
  22534                                                              
  22535          <Relations hip 
  22536           Name="Type Specifier"
  22537          >
  22538                                                                        
  22539           <Entry>
  22540                                                                                  
  22541            <Element 
  22542             Type="SqlT ypeSpecifi er"
  22543            >
  22544                                                                                            
  22545             <Property 
  22546              Name="Leng th" 
  22547              Value="100
  22548             />
  22549                                                                                            
  22550             <Relations hip 
  22551              Name="Type "
  22552             >
  22553                                                                                                     
  22554              <Entry>
  22555                                                                                                               
  22556               <Reference
  22557                ExternalSo urce="Buil tIns" 
  22558                Name="[var char]" 
  22559               />
  22560                                                                                                      
  22561              </Entry>
  22562                                                                                             
  22563             </Relation ship>
  22564                                                                                   
  22565            </Element>
  22566                                                                         
  22567           </Entry>
  22568                                                               
  22569          </Relation ship>
  22570                                                     
  22571         </Element>
  22572                                            
  22573        </Entry>
  22574                                           
  22575        <Entry>
  22576                                                    
  22577         <Element 
  22578          Type="SqlS impleColum n" 
  22579          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Provid erRole]"
  22580         >
  22581                                                              
  22582          <Relations hip 
  22583           Name="Type Specifier"
  22584          >
  22585                                                                        
  22586           <Entry>
  22587                                                                                  
  22588            <Element 
  22589             Type="SqlT ypeSpecifi er"
  22590            >
  22591                                                                                            
  22592             <Property 
  22593              Name="Leng th" 
  22594              Value="100
  22595             />
  22596                                                                                            
  22597             <Relations hip 
  22598              Name="Type "
  22599             >
  22600                                                                                                     
  22601              <Entry>
  22602                                                                                                               
  22603               <Reference
  22604                ExternalSo urce="Buil tIns" 
  22605                Name="[var char]" 
  22606               />
  22607                                                                                                      
  22608              </Entry>
  22609                                                                                             
  22610             </Relation ship>
  22611                                                                                   
  22612            </Element>
  22613                                                                         
  22614           </Entry>
  22615                                                               
  22616          </Relation ship>
  22617                                                     
  22618         </Element>
  22619                                            
  22620        </Entry>
  22621                                           
  22622        <Entry>
  22623                                                    
  22624         <Element 
  22625          Type="SqlS impleColum n" 
  22626          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[TeamSI D]"
  22627         >
  22628                                                              
  22629          <Relations hip 
  22630           Name="Type Specifier"
  22631          >
  22632                                                                        
  22633           <Entry>
  22634                                                                                  
  22635            <Element 
  22636             Type="SqlT ypeSpecifi er"
  22637            >
  22638                                                                                            
  22639             <Relations hip 
  22640              Name="Type "
  22641             >
  22642                                                                                                     
  22643              <Entry>
  22644                                                                                                               
  22645               <Reference
  22646                ExternalSo urce="Buil tIns" 
  22647                Name="[int ]" 
  22648               />
  22649                                                                                                      
  22650              </Entry>
  22651                                                                                             
  22652             </Relation ship>
  22653                                                                                   
  22654            </Element>
  22655                                                                         
  22656           </Entry>
  22657                                                               
  22658          </Relation ship>
  22659                                                     
  22660         </Element>
  22661                                            
  22662        </Entry>
  22663                                           
  22664        <Entry>
  22665                                                    
  22666         <Element 
  22667          Type="SqlS impleColum n" 
  22668          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[TeamIE N]"
  22669         >
  22670                                                              
  22671          <Relations hip 
  22672           Name="Type Specifier"
  22673          >
  22674                                                                        
  22675           <Entry>
  22676                                                                                  
  22677            <Element 
  22678             Type="SqlT ypeSpecifi er"
  22679            >
  22680                                                                                            
  22681             <Property 
  22682              Name="Leng th" 
  22683              Value="50"  
  22684             />
  22685                                                                                            
  22686             <Relations hip 
  22687              Name="Type "
  22688             >
  22689                                                                                                     
  22690              <Entry>
  22691                                                                                                               
  22692               <Reference
  22693                ExternalSo urce="Buil tIns" 
  22694                Name="[var char]" 
  22695               />
  22696                                                                                                      
  22697              </Entry>
  22698                                                                                             
  22699             </Relation ship>
  22700                                                                                   
  22701            </Element>
  22702                                                                         
  22703           </Entry>
  22704                                                               
  22705          </Relation ship>
  22706                                                     
  22707         </Element>
  22708                                            
  22709        </Entry>
  22710                                           
  22711        <Entry>
  22712                                                    
  22713         <Element 
  22714          Type="SqlS impleColum n" 
  22715          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Team]"
  22716         >
  22717                                                              
  22718          <Relations hip 
  22719           Name="Type Specifier"
  22720          >
  22721                                                                        
  22722           <Entry>
  22723                                                                                  
  22724            <Element 
  22725             Type="SqlT ypeSpecifi er"
  22726            >
  22727                                                                                            
  22728             <Property 
  22729              Name="Leng th" 
  22730              Value="50"  
  22731             />
  22732                                                                                            
  22733             <Relations hip 
  22734              Name="Type "
  22735             >
  22736                                                                                                     
  22737              <Entry>
  22738                                                                                                               
  22739               <Reference
  22740                ExternalSo urce="Buil tIns" 
  22741                Name="[var char]" 
  22742               />
  22743                                                                                                      
  22744              </Entry>
  22745                                                                                             
  22746             </Relation ship>
  22747                                                                                   
  22748            </Element>
  22749                                                                         
  22750           </Entry>
  22751                                                               
  22752          </Relation ship>
  22753                                                     
  22754         </Element>
  22755                                            
  22756        </Entry>
  22757                                           
  22758        <Entry>
  22759                                                    
  22760         <Element 
  22761          Type="SqlS impleColum n" 
  22762          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Instit utionSID]"
  22763         >
  22764                                                              
  22765          <Relations hip 
  22766           Name="Type Specifier"
  22767          >
  22768                                                                        
  22769           <Entry>
  22770                                                                                  
  22771            <Element 
  22772             Type="SqlT ypeSpecifi er"
  22773            >
  22774                                                                                            
  22775             <Relations hip 
  22776              Name="Type "
  22777             >
  22778                                                                                                     
  22779              <Entry>
  22780                                                                                                               
  22781               <Reference
  22782                ExternalSo urce="Buil tIns" 
  22783                Name="[int ]" 
  22784               />
  22785                                                                                                      
  22786              </Entry>
  22787                                                                                             
  22788             </Relation ship>
  22789                                                                                   
  22790            </Element>
  22791                                                                         
  22792           </Entry>
  22793                                                               
  22794          </Relation ship>
  22795                                                     
  22796         </Element>
  22797                                            
  22798        </Entry>
  22799                                           
  22800        <Entry>
  22801                                                    
  22802         <Element 
  22803          Type="SqlS impleColum n" 
  22804          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Instit utionCode] "
  22805         >
  22806                                                              
  22807          <Relations hip 
  22808           Name="Type Specifier"
  22809          >
  22810                                                                        
  22811           <Entry>
  22812                                                                                  
  22813            <Element 
  22814             Type="SqlT ypeSpecifi er"
  22815            >
  22816                                                                                            
  22817             <Property 
  22818              Name="Leng th" 
  22819              Value="50"  
  22820             />
  22821                                                                                            
  22822             <Relations hip 
  22823              Name="Type "
  22824             >
  22825                                                                                                     
  22826              <Entry>
  22827                                                                                                               
  22828               <Reference
  22829                ExternalSo urce="Buil tIns" 
  22830                Name="[var char]" 
  22831               />
  22832                                                                                                      
  22833              </Entry>
  22834                                                                                             
  22835             </Relation ship>
  22836                                                                                   
  22837            </Element>
  22838                                                                         
  22839           </Entry>
  22840                                                               
  22841          </Relation ship>
  22842                                                     
  22843         </Element>
  22844                                            
  22845        </Entry>
  22846                                           
  22847        <Entry>
  22848                                                    
  22849         <Element 
  22850          Type="SqlS impleColum n" 
  22851          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Divisi onName]"
  22852         >
  22853                                                              
  22854          <Relations hip 
  22855           Name="Type Specifier"
  22856          >
  22857                                                                        
  22858           <Entry>
  22859                                                                                  
  22860            <Element 
  22861             Type="SqlT ypeSpecifi er"
  22862            >
  22863                                                                                            
  22864             <Property 
  22865              Name="Leng th" 
  22866              Value="50"  
  22867             />
  22868                                                                                            
  22869             <Relations hip 
  22870              Name="Type "
  22871             >
  22872                                                                                                     
  22873              <Entry>
  22874                                                                                                               
  22875               <Reference
  22876                ExternalSo urce="Buil tIns" 
  22877                Name="[var char]" 
  22878               />
  22879                                                                                                      
  22880              </Entry>
  22881                                                                                             
  22882             </Relation ship>
  22883                                                                                   
  22884            </Element>
  22885                                                                         
  22886           </Entry>
  22887                                                               
  22888          </Relation ship>
  22889                                                     
  22890         </Element>
  22891                                            
  22892        </Entry>
  22893                                           
  22894        <Entry>
  22895                                                    
  22896         <Element 
  22897          Type="SqlS impleColum n" 
  22898          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[TeamPu rpose]"
  22899         >
  22900                                                              
  22901          <Relations hip 
  22902           Name="Type Specifier"
  22903          >
  22904                                                                        
  22905           <Entry>
  22906                                                                                  
  22907            <Element 
  22908             Type="SqlT ypeSpecifi er"
  22909            >
  22910                                                                                            
  22911             <Property 
  22912              Name="Leng th" 
  22913              Value="50"  
  22914             />
  22915                                                                                            
  22916             <Relations hip 
  22917              Name="Type "
  22918             >
  22919                                                                                                     
  22920              <Entry>
  22921                                                                                                               
  22922               <Reference
  22923                ExternalSo urce="Buil tIns" 
  22924                Name="[var char]" 
  22925               />
  22926                                                                                                      
  22927              </Entry>
  22928                                                                                             
  22929             </Relation ship>
  22930                                                                                   
  22931            </Element>
  22932                                                                         
  22933           </Entry>
  22934                                                               
  22935          </Relation ship>
  22936                                                     
  22937         </Element>
  22938                                            
  22939        </Entry>
  22940                                           
  22941        <Entry>
  22942                                                    
  22943         <Element 
  22944          Type="SqlS impleColum n" 
  22945          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Relati onshipStar tDate]"
  22946         >
  22947                                                              
  22948          <Relations hip 
  22949           Name="Type Specifier"
  22950          >
  22951                                                                        
  22952           <Entry>
  22953                                                                                  
  22954            <Element 
  22955             Type="SqlT ypeSpecifi er"
  22956            >
  22957                                                                                            
  22958             <Relations hip 
  22959              Name="Type "
  22960             >
  22961                                                                                                     
  22962              <Entry>
  22963                                                                                                               
  22964               <Reference
  22965                ExternalSo urce="Buil tIns" 
  22966                Name="[dat etime2]" 
  22967               />
  22968                                                                                                      
  22969              </Entry>
  22970                                                                                             
  22971             </Relation ship>
  22972                                                                                   
  22973            </Element>
  22974                                                                         
  22975           </Entry>
  22976                                                               
  22977          </Relation ship>
  22978                                                     
  22979         </Element>
  22980                                            
  22981        </Entry>
  22982                                           
  22983        <Entry>
  22984                                                    
  22985         <Element 
  22986          Type="SqlS impleColum n" 
  22987          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Relati onshipEndD ate]"
  22988         >
  22989                                                              
  22990          <Relations hip 
  22991           Name="Type Specifier"
  22992          >
  22993                                                                        
  22994           <Entry>
  22995                                                                                  
  22996            <Element 
  22997             Type="SqlT ypeSpecifi er"
  22998            >
  22999                                                                                            
  23000             <Relations hip 
  23001              Name="Type "
  23002             >
  23003                                                                                                     
  23004              <Entry>
  23005                                                                                                               
  23006               <Reference
  23007                ExternalSo urce="Buil tIns" 
  23008                Name="[dat etime2]" 
  23009               />
  23010                                                                                                      
  23011              </Entry>
  23012                                                                                             
  23013             </Relation ship>
  23014                                                                                   
  23015            </Element>
  23016                                                                         
  23017           </Entry>
  23018                                                               
  23019          </Relation ship>
  23020                                                     
  23021         </Element>
  23022                                            
  23023        </Entry>
  23024                                           
  23025        <Entry>
  23026                                                    
  23027         <Element 
  23028          Type="SqlS impleColum n" 
  23029          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Curren tProviderF lag]"
  23030         >
  23031                                                              
  23032          <Relations hip 
  23033           Name="Type Specifier"
  23034          >
  23035                                                                        
  23036           <Entry>
  23037                                                                                  
  23038            <Element 
  23039             Type="SqlT ypeSpecifi er"
  23040            >
  23041                                                                                            
  23042             <Property 
  23043              Name="Leng th" 
  23044              Value="1" 
  23045             />
  23046                                                                                            
  23047             <Relations hip 
  23048              Name="Type "
  23049             >
  23050                                                                                                     
  23051              <Entry>
  23052                                                                                                               
  23053               <Reference
  23054                ExternalSo urce="Buil tIns" 
  23055                Name="[cha r]" 
  23056               />
  23057                                                                                                      
  23058              </Entry>
  23059                                                                                             
  23060             </Relation ship>
  23061                                                                                   
  23062            </Element>
  23063                                                                         
  23064           </Entry>
  23065                                                               
  23066          </Relation ship>
  23067                                                     
  23068         </Element>
  23069                                            
  23070        </Entry>
  23071                                           
  23072        <Entry>
  23073                                                    
  23074         <Element 
  23075          Type="SqlS impleColum n" 
  23076          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Associ ateProvide rFlag]"
  23077         >
  23078                                                              
  23079          <Relations hip 
  23080           Name="Type Specifier"
  23081          >
  23082                                                                        
  23083           <Entry>
  23084                                                                                  
  23085            <Element 
  23086             Type="SqlT ypeSpecifi er"
  23087            >
  23088                                                                                            
  23089             <Property 
  23090              Name="Leng th" 
  23091              Value="1" 
  23092             />
  23093                                                                                            
  23094             <Relations hip 
  23095              Name="Type "
  23096             >
  23097                                                                                                     
  23098              <Entry>
  23099                                                                                                               
  23100               <Reference
  23101                ExternalSo urce="Buil tIns" 
  23102                Name="[cha r]" 
  23103               />
  23104                                                                                                      
  23105              </Entry>
  23106                                                                                             
  23107             </Relation ship>
  23108                                                                                   
  23109            </Element>
  23110                                                                         
  23111           </Entry>
  23112                                                               
  23113          </Relation ship>
  23114                                                     
  23115         </Element>
  23116                                            
  23117        </Entry>
  23118                                           
  23119        <Entry>
  23120                                                    
  23121         <Element 
  23122          Type="SqlS impleColum n" 
  23123          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Primar yPosition] "
  23124         >
  23125                                                              
  23126          <Relations hip 
  23127           Name="Type Specifier"
  23128          >
  23129                                                                        
  23130           <Entry>
  23131                                                                                  
  23132            <Element 
  23133             Type="SqlT ypeSpecifi er"
  23134            >
  23135                                                                                            
  23136             <Property 
  23137              Name="Leng th" 
  23138              Value="100
  23139             />
  23140                                                                                            
  23141             <Relations hip 
  23142              Name="Type "
  23143             >
  23144                                                                                                     
  23145              <Entry>
  23146                                                                                                               
  23147               <Reference
  23148                ExternalSo urce="Buil tIns" 
  23149                Name="[var char]" 
  23150               />
  23151                                                                                                      
  23152              </Entry>
  23153                                                                                             
  23154             </Relation ship>
  23155                                                                                   
  23156            </Element>
  23157                                                                         
  23158           </Entry>
  23159                                                               
  23160          </Relation ship>
  23161                                                     
  23162         </Element>
  23163                                            
  23164        </Entry>
  23165                                           
  23166        <Entry>
  23167                                                    
  23168         <Element 
  23169          Type="SqlS impleColum n" 
  23170          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Primar yCarePosit ionFlag]"
  23171         >
  23172                                                              
  23173          <Property 
  23174           Name="IsNu llable" 
  23175           Value="Fal se" 
  23176          />
  23177                                                              
  23178          <Relations hip 
  23179           Name="Type Specifier"
  23180          >
  23181                                                                        
  23182           <Entry>
  23183                                                                                  
  23184            <Element 
  23185             Type="SqlT ypeSpecifi er"
  23186            >
  23187                                                                                            
  23188             <Property 
  23189              Name="Leng th" 
  23190              Value="1" 
  23191             />
  23192                                                                                            
  23193             <Relations hip 
  23194              Name="Type "
  23195             >
  23196                                                                                                     
  23197              <Entry>
  23198                                                                                                               
  23199               <Reference
  23200                ExternalSo urce="Buil tIns" 
  23201                Name="[var char]" 
  23202               />
  23203                                                                                                      
  23204              </Entry>
  23205                                                                                             
  23206             </Relation ship>
  23207                                                                                   
  23208            </Element>
  23209                                                                         
  23210           </Entry>
  23211                                                               
  23212          </Relation ship>
  23213                                                     
  23214         </Element>
  23215                                            
  23216        </Entry>
  23217                                           
  23218        <Entry>
  23219                                                    
  23220         <Element 
  23221          Type="SqlS impleColum n" 
  23222          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Source ]"
  23223         >
  23224                                                              
  23225          <Property 
  23226           Name="IsNu llable" 
  23227           Value="Fal se" 
  23228          />
  23229                                                              
  23230          <Relations hip 
  23231           Name="Type Specifier"
  23232          >
  23233                                                                        
  23234           <Entry>
  23235                                                                                  
  23236            <Element 
  23237             Type="SqlT ypeSpecifi er"
  23238            >
  23239                                                                                            
  23240             <Property 
  23241              Name="Leng th" 
  23242              Value="10"  
  23243             />
  23244                                                                                            
  23245             <Relations hip 
  23246              Name="Type "
  23247             >
  23248                                                                                                     
  23249              <Entry>
  23250                                                                                                               
  23251               <Reference
  23252                ExternalSo urce="Buil tIns" 
  23253                Name="[var char]" 
  23254               />
  23255                                                                                                      
  23256              </Entry>
  23257                                                                                             
  23258             </Relation ship>
  23259                                                                                   
  23260            </Element>
  23261                                                                         
  23262           </Entry>
  23263                                                               
  23264          </Relation ship>
  23265                                                     
  23266         </Element>
  23267                                            
  23268        </Entry>
  23269                                           
  23270        <Entry>
  23271                                                    
  23272         <Element 
  23273          Type="SqlS impleColum n" 
  23274          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Provid erType]"
  23275         >
  23276                                                              
  23277          <Relations hip 
  23278           Name="Type Specifier"
  23279          >
  23280                                                                        
  23281           <Entry>
  23282                                                                                  
  23283            <Element 
  23284             Type="SqlT ypeSpecifi er"
  23285            >
  23286                                                                                            
  23287             <Property 
  23288              Name="Leng th" 
  23289              Value="50"  
  23290             />
  23291                                                                                            
  23292             <Relations hip 
  23293              Name="Type "
  23294             >
  23295                                                                                                     
  23296              <Entry>
  23297                                                                                                               
  23298               <Reference
  23299                ExternalSo urce="Buil tIns" 
  23300                Name="[var char]" 
  23301               />
  23302                                                                                                      
  23303              </Entry>
  23304                                                                                             
  23305             </Relation ship>
  23306                                                                                   
  23307            </Element>
  23308                                                                         
  23309           </Entry>
  23310                                                               
  23311          </Relation ship>
  23312                                                     
  23313         </Element>
  23314                                            
  23315        </Entry>
  23316                                  
  23317       </Relation ship>
  23318                                 
  23319       <Relations hip 
  23320        Name="Sche ma"
  23321       >
  23322                                           
  23323        <Entry>
  23324                                                    
  23325         <Reference
  23326          Name="[App ]" 
  23327         />
  23328                                            
  23329        </Entry>
  23330                                  
  23331       </Relation ship>
  23332                        
  23333      </Element>
  23334                       
  23335      <Element 
  23336       Type="SqlI ndex" 
  23337       Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[PCMMCu rrentPatie ntProvider Relationsh ip_Patient SID]"
  23338      >
  23339                                 
  23340       <Property 
  23341        Name="IsCl ustered" 
  23342        Value="Tru e" 
  23343       />
  23344                                 
  23345       <Relations hip 
  23346        Name="Colu mnSpecific ations"
  23347       >
  23348                                           
  23349        <Entry>
  23350                                                    
  23351         <Element 
  23352          Type="SqlI ndexedColu mnSpecific ation"
  23353         >
  23354                                                              
  23355          <Relations hip 
  23356           Name="Colu mn"
  23357          >
  23358                                                                        
  23359           <Entry>
  23360                                                                                  
  23361            <Reference
  23362             Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Patien tSID]" 
  23363            />
  23364                                                                         
  23365           </Entry>
  23366                                                               
  23367          </Relation ship>
  23368                                                     
  23369         </Element>
  23370                                            
  23371        </Entry>
  23372                                  
  23373       </Relation ship>
  23374                                 
  23375       <Relations hip 
  23376        Name="Data Compressio nOptions"
  23377       >
  23378                                           
  23379        <Entry>
  23380                                                    
  23381         <Element 
  23382          Type="SqlD ataCompres sionOption "
  23383         >
  23384                                                              
  23385          <Property 
  23386           Name="Comp ressionLev el" 
  23387           Value="2" 
  23388          />
  23389                                                              
  23390          <Property 
  23391           Name="Part itionNumbe r" 
  23392           Value="1" 
  23393          />
  23394                                                     
  23395         </Element>
  23396                                            
  23397        </Entry>
  23398                                  
  23399       </Relation ship>
  23400                                 
  23401       <Relations hip 
  23402        Name="Inde xedObject"
  23403       >
  23404                                           
  23405        <Entry>
  23406                                                    
  23407         <Reference
  23408          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p]" 
  23409         />
  23410                                            
  23411        </Entry>
  23412                                  
  23413       </Relation ship>
  23414                        
  23415      </Element>
  23416                       
  23417      <Element 
  23418       Type="SqlI ndex" 
  23419       Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[PCMMCu rrentPatie ntProvider Relationsh ip_Primary ProviderSI D]"
  23420      >
  23421                                 
  23422       <Relations hip 
  23423        Name="Colu mnSpecific ations"
  23424       >
  23425                                           
  23426        <Entry>
  23427                                                    
  23428         <Element 
  23429          Type="SqlI ndexedColu mnSpecific ation"
  23430         >
  23431                                                              
  23432          <Relations hip 
  23433           Name="Colu mn"
  23434          >
  23435                                                                        
  23436           <Entry>
  23437                                                                                  
  23438            <Reference
  23439             Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Primar yProviderS ID]" 
  23440            />
  23441                                                                         
  23442           </Entry>
  23443                                                               
  23444          </Relation ship>
  23445                                                     
  23446         </Element>
  23447                                            
  23448        </Entry>
  23449                                  
  23450       </Relation ship>
  23451                                 
  23452       <Relations hip 
  23453        Name="Data Compressio nOptions"
  23454       >
  23455                                           
  23456        <Entry>
  23457                                                    
  23458         <Element 
  23459          Type="SqlD ataCompres sionOption "
  23460         >
  23461                                                              
  23462          <Property 
  23463           Name="Comp ressionLev el" 
  23464           Value="2" 
  23465          />
  23466                                                              
  23467          <Property 
  23468           Name="Part itionNumbe r" 
  23469           Value="1" 
  23470          />
  23471                                                     
  23472         </Element>
  23473                                            
  23474        </Entry>
  23475                                  
  23476       </Relation ship>
  23477                                 
  23478       <Relations hip 
  23479        Name="Incl udedColumn s"
  23480       >
  23481                                           
  23482        <Entry>
  23483                                                    
  23484         <Reference
  23485          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Associ ateProvide rSID]" 
  23486         />
  23487                                            
  23488        </Entry>
  23489                                           
  23490        <Entry>
  23491                                                    
  23492         <Reference
  23493          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p].[Patien tSID]" 
  23494         />
  23495                                            
  23496        </Entry>
  23497                                  
  23498       </Relation ship>
  23499                                 
  23500       <Relations hip 
  23501        Name="Inde xedObject"
  23502       >
  23503                                           
  23504        <Entry>
  23505                                                    
  23506         <Reference
  23507          Name="[App ].[PCMMCur rentPatien tProviderR elationshi p]" 
  23508         />
  23509                                            
  23510        </Entry>
  23511                                  
  23512       </Relation ship>
  23513                        
  23514      </Element>
  23515                       
  23516      <Element 
  23517       Type="SqlP rimaryKeyC onstraint"  
  23518       Name="[App ].[PK_App_ NVCC_Annou ncement]"
  23519      >
  23520                                 
  23521       <Relations hip 
  23522        Name="Colu mnSpecific ations"
  23523       >
  23524                                           
  23525        <Entry>
  23526                                                    
  23527         <Element 
  23528          Type="SqlI ndexedColu mnSpecific ation"
  23529         >
  23530                                                              
  23531          <Relations hip 
  23532           Name="Colu mn"
  23533          >
  23534                                                                        
  23535           <Entry>
  23536                                                                                  
  23537            <Reference
  23538             Name="[App ].[NVCC_An nouncement ].[Announc ementID]" 
  23539            />
  23540                                                                         
  23541           </Entry>
  23542                                                               
  23543          </Relation ship>
  23544                                                     
  23545         </Element>
  23546                                            
  23547        </Entry>
  23548                                  
  23549       </Relation ship>
  23550                                 
  23551       <Relations hip 
  23552        Name="Data Compressio nOptions"
  23553       >
  23554                                           
  23555        <Entry>
  23556                                                    
  23557         <Element 
  23558          Type="SqlD ataCompres sionOption "
  23559         >
  23560                                                              
  23561          <Property 
  23562           Name="Comp ressionLev el" 
  23563           Value="2" 
  23564          />
  23565                                                              
  23566          <Property 
  23567           Name="Part itionNumbe r" 
  23568           Value="1" 
  23569          />
  23570                                                     
  23571         </Element>
  23572                                            
  23573        </Entry>
  23574                                  
  23575       </Relation ship>
  23576                                 
  23577       <Relations hip 
  23578        Name="Defi ningTable"
  23579       >
  23580                                           
  23581        <Entry>
  23582                                                    
  23583         <Reference
  23584          Name="[App ].[NVCC_An nouncement ]" 
  23585         />
  23586                                            
  23587        </Entry>
  23588                                  
  23589       </Relation ship>
  23590                                 
  23591       <AttachedA nnotation 
  23592        Disambigua tor="12" 
  23593       />
  23594                        
  23595      </Element>
  23596                       
  23597      <Element 
  23598       Type="SqlP rimaryKeyC onstraint"  
  23599       Name="[App ].[PK_App_ NVCC_DimAn nouncement ]"
  23600      >
  23601                                 
  23602       <Relations hip 
  23603        Name="Colu mnSpecific ations"
  23604       >
  23605                                           
  23606        <Entry>
  23607                                                    
  23608         <Element 
  23609          Type="SqlI ndexedColu mnSpecific ation"
  23610         >
  23611                                                              
  23612          <Relations hip 
  23613           Name="Colu mn"
  23614          >
  23615                                                                        
  23616           <Entry>
  23617                                                                                  
  23618            <Reference
  23619             Name="[App ].[NVCC_Di mAnnouncem ent].[Anno uncementTy peID]" 
  23620            />
  23621                                                                         
  23622           </Entry>
  23623                                                               
  23624          </Relation ship>
  23625                                                     
  23626         </Element>
  23627                                            
  23628        </Entry>
  23629                                  
  23630       </Relation ship>
  23631                                 
  23632       <Relations hip 
  23633        Name="Data Compressio nOptions"
  23634       >
  23635                                           
  23636        <Entry>
  23637                                                    
  23638         <Element 
  23639          Type="SqlD ataCompres sionOption "
  23640         >
  23641                                                              
  23642          <Property 
  23643           Name="Comp ressionLev el" 
  23644           Value="2" 
  23645          />
  23646                                                              
  23647          <Property 
  23648           Name="Part itionNumbe r" 
  23649           Value="1" 
  23650          />
  23651                                                     
  23652         </Element>
  23653                                            
  23654        </Entry>
  23655                                  
  23656       </Relation ship>
  23657                                 
  23658       <Relations hip 
  23659        Name="Defi ningTable"
  23660       >
  23661                                           
  23662        <Entry>
  23663                                                    
  23664         <Reference
  23665          Name="[App ].[NVCC_Di mAnnouncem ent]" 
  23666         />
  23667                                            
  23668        </Entry>
  23669                                  
  23670       </Relation ship>
  23671                                 
  23672       <AttachedA nnotation 
  23673        Disambigua tor="13" 
  23674       />
  23675                        
  23676      </Element>
  23677                       
  23678      <Element 
  23679       Type="SqlP rimaryKeyC onstraint"  
  23680       Name="[App ].[PK_App_ NVCC_HIPAA Terms]"
  23681      >
  23682                                 
  23683       <Relations hip 
  23684        Name="Colu mnSpecific ations"
  23685       >
  23686                                           
  23687        <Entry>
  23688                                                    
  23689         <Element 
  23690          Type="SqlI ndexedColu mnSpecific ation"
  23691         >
  23692                                                              
  23693          <Relations hip 
  23694           Name="Colu mn"
  23695          >
  23696                                                                        
  23697           <Entry>
  23698                                                                                  
  23699            <Reference
  23700             Name="[App ].[NVCC_HI PAATerms]. [term]" 
  23701            />
  23702                                                                         
  23703           </Entry>
  23704                                                               
  23705          </Relation ship>
  23706                                                     
  23707         </Element>
  23708                                            
  23709        </Entry>
  23710                                  
  23711       </Relation ship>
  23712                                 
  23713       <Relations hip 
  23714        Name="Data Compressio nOptions"
  23715       >
  23716                                           
  23717        <Entry>
  23718                                                    
  23719         <Element 
  23720          Type="SqlD ataCompres sionOption "
  23721         >
  23722                                                              
  23723          <Property 
  23724           Name="Comp ressionLev el" 
  23725           Value="2" 
  23726          />
  23727                                                              
  23728          <Property 
  23729           Name="Part itionNumbe r" 
  23730           Value="1" 
  23731          />
  23732                                                     
  23733         </Element>
  23734                                            
  23735        </Entry>
  23736                                  
  23737       </Relation ship>
  23738                                 
  23739       <Relations hip 
  23740        Name="Defi ningTable"
  23741       >
  23742                                           
  23743        <Entry>
  23744                                                    
  23745         <Reference
  23746          Name="[App ].[NVCC_HI PAATerms]"  
  23747         />
  23748                                            
  23749        </Entry>
  23750                                  
  23751       </Relation ship>
  23752                                 
  23753       <AttachedA nnotation 
  23754        Disambigua tor="14" 
  23755       />
  23756                        
  23757      </Element>
  23758                       
  23759      <Element 
  23760       Type="SqlP rimaryKeyC onstraint"  
  23761       Name="[App ].[PK_App_ NVCCAccess Log]"
  23762      >
  23763                                 
  23764       <Property 
  23765        Name="IsCl ustered" 
  23766        Value="Fal se" 
  23767       />
  23768                                 
  23769       <Relations hip 
  23770        Name="Colu mnSpecific ations"
  23771       >
  23772                                           
  23773        <Entry>
  23774                                                    
  23775         <Element 
  23776          Type="SqlI ndexedColu mnSpecific ation"
  23777         >
  23778                                                              
  23779          <Relations hip 
  23780           Name="Colu mn"
  23781          >
  23782                                                                        
  23783           <Entry>
  23784                                                                                  
  23785            <Reference
  23786             Name="[App ].[NVCC_Ac cessLog].[ AccessLogI D]" 
  23787            />
  23788                                                                         
  23789           </Entry>
  23790                                                               
  23791          </Relation ship>
  23792                                                     
  23793         </Element>
  23794                                            
  23795        </Entry>
  23796                                  
  23797       </Relation ship>
  23798                                 
  23799       <Relations hip 
  23800        Name="Data Compressio nOptions"
  23801       >
  23802                                           
  23803        <Entry>
  23804                                                    
  23805         <Element 
  23806          Type="SqlD ataCompres sionOption "
  23807         >
  23808                                                              
  23809          <Property 
  23810           Name="Comp ressionLev el" 
  23811           Value="2" 
  23812          />
  23813                                                              
  23814          <Property 
  23815           Name="Part itionNumbe r" 
  23816           Value="1" 
  23817          />
  23818                                                     
  23819         </Element>
  23820                                            
  23821        </Entry>
  23822                                  
  23823       </Relation ship>
  23824                                 
  23825       <Relations hip 
  23826        Name="Defi ningTable"
  23827       >
  23828                                           
  23829        <Entry>
  23830                                                    
  23831         <Reference
  23832          Name="[App ].[NVCC_Ac cessLog]" 
  23833         />
  23834                                            
  23835        </Entry>
  23836                                  
  23837       </Relation ship>
  23838                                 
  23839       <AttachedA nnotation 
  23840        Disambigua tor="11" 
  23841       />
  23842                        
  23843      </Element>
  23844                       
  23845      <Element 
  23846       Type="SqlP rimaryKeyC onstraint"  
  23847       Name="[App ].[PK_dbo. Users1]"
  23848      >
  23849                                 
  23850       <Relations hip 
  23851        Name="Colu mnSpecific ations"
  23852       >
  23853                                           
  23854        <Entry>
  23855                                                    
  23856         <Element 
  23857          Type="SqlI ndexedColu mnSpecific ation"
  23858         >
  23859                                                              
  23860          <Relations hip 
  23861           Name="Colu mn"
  23862          >
  23863                                                                        
  23864           <Entry>
  23865                                                                                  
  23866            <Reference
  23867             Name="[App ].[NVCC_Us ers].[ID]"  
  23868            />
  23869                                                                         
  23870           </Entry>
  23871                                                               
  23872          </Relation ship>
  23873                                                     
  23874         </Element>
  23875                                            
  23876        </Entry>
  23877                                  
  23878       </Relation ship>
  23879                                 
  23880       <Relations hip 
  23881        Name="Data Compressio nOptions"
  23882       >
  23883                                           
  23884        <Entry>
  23885                                                    
  23886         <Element 
  23887          Type="SqlD ataCompres sionOption "
  23888         >
  23889                                                              
  23890          <Property 
  23891           Name="Comp ressionLev el" 
  23892           Value="2" 
  23893          />
  23894                                                              
  23895          <Property 
  23896           Name="Part itionNumbe r" 
  23897           Value="1" 
  23898          />
  23899                                                     
  23900         </Element>
  23901                                            
  23902        </Entry>
  23903                                  
  23904       </Relation ship>
  23905                                 
  23906       <Relations hip 
  23907        Name="Defi ningTable"
  23908       >
  23909                                           
  23910        <Entry>
  23911                                                    
  23912         <Reference
  23913          Name="[App ].[NVCC_Us ers]" 
  23914         />
  23915                                            
  23916        </Entry>
  23917                                  
  23918       </Relation ship>
  23919                                 
  23920       <AttachedA nnotation 
  23921        Disambigua tor="16" 
  23922       />
  23923                        
  23924      </Element>
  23925                       
  23926      <Element 
  23927       Type="SqlP rimaryKeyC onstraint"  
  23928       Name="[App ].[PK_NVCC _Stations_ Sta3n]"
  23929      >
  23930                                 
  23931       <Relations hip 
  23932        Name="Colu mnSpecific ations"
  23933       >
  23934                                           
  23935        <Entry>
  23936                                                    
  23937         <Element 
  23938          Type="SqlI ndexedColu mnSpecific ation"
  23939         >
  23940                                                              
  23941          <Relations hip 
  23942           Name="Colu mn"
  23943          >
  23944                                                                        
  23945           <Entry>
  23946                                                                                  
  23947            <Reference
  23948             Name="[App ].[NVCC_St ations].[S ta3n]" 
  23949            />
  23950                                                                         
  23951           </Entry>
  23952                                                               
  23953          </Relation ship>
  23954                                                     
  23955         </Element>
  23956                                            
  23957        </Entry>
  23958                                  
  23959       </Relation ship>
  23960                                 
  23961       <Relations hip 
  23962        Name="Data Compressio nOptions"
  23963       >
  23964                                           
  23965        <Entry>
  23966                                                    
  23967         <Element 
  23968          Type="SqlD ataCompres sionOption "
  23969         >
  23970                                                              
  23971          <Property 
  23972           Name="Comp ressionLev el" 
  23973           Value="2" 
  23974          />
  23975                                                              
  23976          <Property 
  23977           Name="Part itionNumbe r" 
  23978           Value="1" 
  23979          />
  23980                                                     
  23981         </Element>
  23982                                            
  23983        </Entry>
  23984                                  
  23985       </Relation ship>
  23986                                 
  23987       <Relations hip 
  23988        Name="Defi ningTable"
  23989       >
  23990                                           
  23991        <Entry>
  23992                                                    
  23993         <Reference
  23994          Name="[App ].[NVCC_St ations]" 
  23995         />
  23996                                            
  23997        </Entry>
  23998                                  
  23999       </Relation ship>
  24000                                 
  24001       <AttachedA nnotation 
  24002        Disambigua tor="15" 
  24003       />
  24004                        
  24005      </Element>
  24006                       
  24007      <Element 
  24008       Type="SqlM ultiStatem entTableVa luedFuncti on" 
  24009       Name="[App ].[udf_All PatientsSI Ds]"
  24010      >
  24011                                 
  24012       <Property 
  24013        Name="Retu rnTableVar iable" 
  24014        Value="@Al lPtSIDS" 
  24015       />
  24016                                 
  24017       <Property 
  24018        Name="IsAn siNullsOn"  
  24019        Value="Tru e" 
  24020       />
  24021                                 
  24022       <Relations hip 
  24023        Name="Body Dependenci es"
  24024       >
  24025                                           
  24026        <Entry>
  24027                                                    
  24028         <Reference
  24029          Name="[App ].[AllCDWP atients]" 
  24030         />
  24031                                            
  24032        </Entry>
  24033                                           
  24034        <Entry>
  24035                                                    
  24036         <Reference
  24037          Name="[App ].[AllCDWP atients].[ PatientICN ]" 
  24038         />
  24039                                            
  24040        </Entry>
  24041                                           
  24042        <Entry>
  24043                                                    
  24044         <Reference
  24045          Name="[App ].[AllCDWP atients].[ PatientSID ]" 
  24046         />
  24047                                            
  24048        </Entry>
  24049                                           
  24050        <Entry>
  24051                                                    
  24052         <Reference
  24053          Name="[App ].[AllCDWP atients].[ Sta3n]" 
  24054         />
  24055                                            
  24056        </Entry>
  24057                                           
  24058        <Entry>
  24059                                                    
  24060         <Reference
  24061          Name="[App ].[AllCDWP atients].[ PatientIEN ]" 
  24062         />
  24063                                            
  24064        </Entry>
  24065                                           
  24066        <Entry>
  24067                                                    
  24068         <Reference
  24069          Name="[App ].[AllCDWP atients].[ PatientICN ]" 
  24070         />
  24071                                            
  24072        </Entry>
  24073                                           
  24074        <Entry>
  24075                                                    
  24076         <Reference
  24077          Name="[App ].[AllCDWP atients].[ PatientSID ]" 
  24078         />
  24079                                            
  24080        </Entry>
  24081                                           
  24082        <Entry>
  24083                                                    
  24084         <Reference
  24085          Name="[App ].[udf_All PatientsSI Ds].[@pid]
  24086         />
  24087                                            
  24088        </Entry>
  24089                                  
  24090       </Relation ship>
  24091                                 
  24092       <Relations hip 
  24093        Name="Colu mns"
  24094       >
  24095                                           
  24096        <Entry>
  24097                                                    
  24098         <Element 
  24099          Type="SqlS impleColum n" 
  24100          Name="[App ].[udf_All PatientsSI Ds].[PtICN ]"
  24101         >
  24102                                                              
  24103          <Relations hip 
  24104           Name="Type Specifier"
  24105          >
  24106                                                                        
  24107           <Entry>
  24108                                                                                  
  24109            <Element 
  24110             Type="SqlT ypeSpecifi er"
  24111            >
  24112                                                                                            
  24113             <Property 
  24114              Name="Leng th" 
  24115              Value="50"  
  24116             />
  24117                                                                                            
  24118             <Relations hip 
  24119              Name="Type "
  24120             >
  24121                                                                                                     
  24122              <Entry>
  24123                                                                                                               
  24124               <Reference
  24125                ExternalSo urce="Buil tIns" 
  24126                Name="[var char]" 
  24127               />
  24128                                                                                                      
  24129              </Entry>
  24130                                                                                             
  24131             </Relation ship>
  24132                                                                                   
  24133            </Element>
  24134                                                                         
  24135           </Entry>
  24136                                                               
  24137          </Relation ship>
  24138                                                     
  24139         </Element>
  24140                                            
  24141        </Entry>
  24142                                           
  24143        <Entry>
  24144                                                    
  24145         <Element 
  24146          Type="SqlS impleColum n" 
  24147          Name="[App ].[udf_All PatientsSI Ds].[PtSID ]"
  24148         >
  24149                                                              
  24150          <Property 
  24151           Name="IsNu llable" 
  24152           Value="Fal se" 
  24153          />
  24154                                                              
  24155          <Relations hip 
  24156           Name="Type Specifier"
  24157          >
  24158                                                                        
  24159           <Entry>
  24160                                                                                  
  24161            <Element 
  24162             Type="SqlT ypeSpecifi er"
  24163            >
  24164                                                                                            
  24165             <Relations hip 
  24166              Name="Type "
  24167             >
  24168                                                                                                     
  24169              <Entry>
  24170                                                                                                               
  24171               <Reference
  24172                ExternalSo urce="Buil tIns" 
  24173                Name="[int ]" 
  24174               />
  24175                                                                                                      
  24176              </Entry>
  24177                                                                                             
  24178             </Relation ship>
  24179                                                                                   
  24180            </Element>
  24181                                                                         
  24182           </Entry>
  24183                                                               
  24184          </Relation ship>
  24185                                                              
  24186          <AttachedA nnotation 
  24187           Disambigua tor="7" 
  24188          />
  24189                                                     
  24190         </Element>
  24191                                            
  24192        </Entry>
  24193                                           
  24194        <Entry>
  24195                                                    
  24196         <Element 
  24197          Type="SqlS impleColum n" 
  24198          Name="[App ].[udf_All PatientsSI Ds].[Sta3n ]"
  24199         >
  24200                                                              
  24201          <Relations hip 
  24202           Name="Type Specifier"
  24203          >
  24204                                                                        
  24205           <Entry>
  24206                                                                                  
  24207            <Element 
  24208             Type="SqlT ypeSpecifi er"
  24209            >
  24210                                                                                            
  24211             <Relations hip 
  24212              Name="Type "
  24213             >
  24214                                                                                                     
  24215              <Entry>
  24216                                                                                                               
  24217               <Reference
  24218                ExternalSo urce="Buil tIns" 
  24219                Name="[sma llint]" 
  24220               />
  24221                                                                                                      
  24222              </Entry>
  24223                                                                                             
  24224             </Relation ship>
  24225                                                                                   
  24226            </Element>
  24227                                                                         
  24228           </Entry>
  24229                                                               
  24230          </Relation ship>
  24231                                                     
  24232         </Element>
  24233                                            
  24234        </Entry>
  24235                                           
  24236        <Entry>
  24237                                                    
  24238         <Element 
  24239          Type="SqlS impleColum n" 
  24240          Name="[App ].[udf_All PatientsSI Ds].[Patie ntIEN]"
  24241         >
  24242                                                              
  24243          <Relations hip 
  24244           Name="Type Specifier"
  24245          >
  24246                                                                        
  24247           <Entry>
  24248                                                                                  
  24249            <Element 
  24250             Type="SqlT ypeSpecifi er"
  24251            >
  24252                                                                                            
  24253             <Property 
  24254              Name="Leng th" 
  24255              Value="50"  
  24256             />
  24257                                                                                            
  24258             <Relations hip 
  24259              Name="Type "
  24260             >
  24261                                                                                                     
  24262              <Entry>
  24263                                                                                                               
  24264               <Reference
  24265                ExternalSo urce="Buil tIns" 
  24266                Name="[var char]" 
  24267               />
  24268                                                                                                      
  24269              </Entry>
  24270                                                                                             
  24271             </Relation ship>
  24272                                                                                   
  24273            </Element>
  24274                                                                         
  24275           </Entry>
  24276                                                               
  24277          </Relation ship>
  24278                                                     
  24279         </Element>
  24280                                            
  24281        </Entry>
  24282                                  
  24283       </Relation ship>
  24284                                 
  24285       <Relations hip 
  24286        Name="Func tionBody"
  24287       >
  24288                                           
  24289        <Entry>
  24290                                                    
  24291         <Element 
  24292          Type="SqlS criptFunct ionImpleme ntation"
  24293         >
  24294                                                              
  24295          <Property 
  24296           Name="Body Script"
  24297          >
  24298                                                                        
  24299           <Value>
  24300            <![CDATA[
  24301            --======== ========== ========== ========== ========== ========== ========== ========== ===
  24302            --Requesto r                                : Non Va C oordinated  Care Proj ect
  24303            --Author                  : Jerr y Kohler -  Northwest  Innovatio n Center ( NWIC)
  24304            --Object/S P Name                  : udf_Al lPatientsS IDs
  24305            --SERVER                                   
  24306            --Data Bas e                                : CC_REFDO C
  24307            --Schema                                    : app
  24308            --Report                                    : N/A
  24309            --Folder                                    : N/A
  24310            --Report L oc             : N/A
  24311            --Job                     : None
  24312            --Job Loc                 : None
  24313            --Note                    : 
  24314            --Date Cre ated           : 01-1 4-2016
  24315            --Last Cha nged           : 
  24316            --Last Cha nged By                 : 
  24317            --Reason F or Change               : 
  24318            --
  24319            --Purpose                 : Retu rns a tabl e containi ng ALL pat ient SIDS  plus other
  24320            --                          data base key d ata for a  single pat ient.  Thi s facilita tes
  24321            --                          retr ieving all  data for  a patient,  regardles s of what
  24322            --                          stat ion the pa tient rece ived care  at.  This  facilitate s
  24323            --                          show ing a cont inuum of c are.
  24324            --
  24325            --Last Cha nged           : 03-2 3-2017
  24326            --Last Cha nged By                 : Jerry  Kohler - N WIC
  24327            --Reason F or Change               : Change  function  to look at  App.AllCD WPatients  instead of
  24328            --                        : RDWW ork.SPatie nt.SPatien t because  AllCDWPati ents is mu ch
  24329            --                        : smal ler and si gnificantl y improves  performan ce.
  24330            --======== ========== ========== ========== ========== ========== ========== ========== ===
  24331            BEGIN
  24332               INSERT  @AllPtSIDS
  24333                  Sele ct x.Patie ntICN
  24334                         ,x.Patie ntSID
  24335                         ,x.Sta3n
  24336                         ,x.Patie ntIEN
  24337                    Fr om App.All CDWPatient s AS x
  24338                   Whe re x.Patie ntICN = (S elect y.Pa tientICN
  24339                                              From App. AllCDWPati ents y
  24340                                             Where y.Pa tientSID =  @pid);
  24341               RETURN
  24342           
  24343            END]]>
  24344           </Value>
  24345                                                               
  24346          </Property >
  24347                                                              
  24348          <Annotatio
  24349           Type="SysC ommentsObj ectAnnotat ion"
  24350          >
  24351                                                                        
  24352           <Property 
  24353            Name="Crea teOffset" 
  24354            Value="2" 
  24355           />
  24356                                                                        
  24357           <Property 
  24358            Name="Leng th" 
  24359            Value="199 4" 
  24360           />
  24361                                                                        
  24362           <Property 
  24363            Name="Star tLine" 
  24364            Value="1" 
  24365           />
  24366                                                                        
  24367           <Property 
  24368            Name="Star tColumn" 
  24369            Value="1" 
  24370           />
  24371                                                                        
  24372           <Property 
  24373            Name="Head erContents
  24374            Value="&#x D;&#xA;CRE ATE FUNCTI ON [App].[ udf_AllPat ientsSIDs]  (@pid INT )&#xD;&#xA ;RETURNS @ AllPtSIDS  TABLE&#xD; &#xA;   (& #xD;&#xA;        PtIC N VARCHAR( 50),&#xD;& #xA;        PtSID INT  PRIMARY K EY NOT NUL L,&#xD;&#x A;       S ta3n SMALL INT,&#xD;& #xA;        PatientIE N VARCHAR( 50)&#xD;&# xA;        --PtIEN VA RCHAR(50)& #xD;&#xA;    )&#xD;&# xA;AS" 
  24375           />
  24376                                                               
  24377          </Annotati on>
  24378                                                     
  24379         </Element>
  24380                                            
  24381        </Entry>
  24382                                  
  24383       </Relation ship>
  24384                                 
  24385       <Relations hip 
  24386        Name="Para meters"
  24387       >
  24388                                           
  24389        <Entry>
  24390                                                    
  24391         <Element 
  24392          Type="SqlS ubroutineP arameter" 
  24393          Name="[App ].[udf_All PatientsSI Ds].[@pid] "
  24394         >
  24395                                                              
  24396          <Relations hip 
  24397           Name="Type "
  24398          >
  24399                                                                        
  24400           <Entry>
  24401                                                                                  
  24402            <Element 
  24403             Type="SqlT ypeSpecifi er"
  24404            >
  24405                                                                                            
  24406             <Relations hip 
  24407              Name="Type "
  24408             >
  24409                                                                                                     
  24410              <Entry>
  24411                                                                                                               
  24412               <Reference
  24413                ExternalSo urce="Buil tIns" 
  24414                Name="[int ]" 
  24415               />
  24416                                                                                                      
  24417              </Entry>
  24418                                                                                             
  24419             </Relation ship>
  24420                                                                                   
  24421            </Element>
  24422                                                                         
  24423           </Entry>
  24424                                                               
  24425          </Relation ship>
  24426                                                     
  24427         </Element>
  24428                                            
  24429        </Entry>
  24430                                  
  24431       </Relation ship>
  24432                                 
  24433       <Relations hip 
  24434        Name="Sche ma"
  24435       >
  24436                                           
  24437        <Entry>
  24438                                                    
  24439         <Reference
  24440          Name="[App ]" 
  24441         />
  24442                                            
  24443        </Entry>
  24444                                  
  24445       </Relation ship>
  24446                        
  24447      </Element>
  24448                       
  24449      <Element 
  24450       Type="SqlM ultiStatem entTableVa luedFuncti on" 
  24451       Name="[App ].[udf_Spl itString]"
  24452      >
  24453                                 
  24454       <Property 
  24455        Name="Retu rnTableVar iable" 
  24456        Value="@Rt nValue" 
  24457       />
  24458                                 
  24459       <Property 
  24460        Name="IsAn siNullsOn"  
  24461        Value="Tru e" 
  24462       />
  24463                                 
  24464       <Relations hip 
  24465        Name="Body Dependenci es"
  24466       >
  24467                                           
  24468        <Entry>
  24469                                                    
  24470         <Reference
  24471          Name="[App ].[udf_Spl itString]. [@SplitOn]
  24472         />
  24473                                            
  24474        </Entry>
  24475                                           
  24476        <Entry>
  24477                                                    
  24478         <Reference
  24479          Name="[App ].[udf_Spl itString]. [@List]" 
  24480         />
  24481                                            
  24482        </Entry>
  24483                                           
  24484        <Entry>
  24485                                                    
  24486         <Reference
  24487          Name="[App ].[udf_Spl itString]. [Value]" 
  24488         />
  24489                                            
  24490        </Entry>
  24491                                  
  24492       </Relation ship>
  24493                                 
  24494       <Relations hip 
  24495        Name="Colu mns"
  24496       >
  24497                                           
  24498        <Entry>
  24499                                                    
  24500         <Element 
  24501          Type="SqlS impleColum n" 
  24502          Name="[App ].[udf_Spl itString]. [Id]"
  24503         >
  24504                                                              
  24505          <Property 
  24506           Name="IsNu llable" 
  24507           Value="Fal se" 
  24508          />
  24509                                                              
  24510          <Property 
  24511           Name="IsId entity" 
  24512           Value="Tru e" 
  24513          />
  24514                                                              
  24515          <Relations hip 
  24516           Name="Type Specifier"
  24517          >
  24518                                                                        
  24519           <Entry>
  24520                                                                                  
  24521            <Element 
  24522             Type="SqlT ypeSpecifi er"
  24523            >
  24524                                                                                            
  24525             <Relations hip 
  24526              Name="Type "
  24527             >
  24528                                                                                                     
  24529              <Entry>
  24530                                                                                                               
  24531               <Reference
  24532                ExternalSo urce="Buil tIns" 
  24533                Name="[int ]" 
  24534               />
  24535                                                                                                      
  24536              </Entry>
  24537                                                                                             
  24538             </Relation ship>
  24539                                                                                   
  24540            </Element>
  24541                                                                         
  24542           </Entry>
  24543                                                               
  24544          </Relation ship>
  24545                                                     
  24546         </Element>
  24547                                            
  24548        </Entry>
  24549                                           
  24550        <Entry>
  24551                                                    
  24552         <Element 
  24553          Type="SqlS impleColum n" 
  24554          Name="[App ].[udf_Spl itString]. [Value]"
  24555         >
  24556                                                              
  24557          <Relations hip 
  24558           Name="Type Specifier"
  24559          >
  24560                                                                        
  24561           <Entry>
  24562                                                                                  
  24563            <Element 
  24564             Type="SqlT ypeSpecifi er"
  24565            >
  24566                                                                                            
  24567             <Property 
  24568              Name="IsMa x" 
  24569              Value="Tru e" 
  24570             />
  24571                                                                                            
  24572             <Relations hip 
  24573              Name="Type "
  24574             >
  24575                                                                                                     
  24576              <Entry>
  24577                                                                                                               
  24578               <Reference
  24579                ExternalSo urce="Buil tIns" 
  24580                Name="[var char]" 
  24581               />
  24582                                                                                                      
  24583              </Entry>
  24584                                                                                             
  24585             </Relation ship>
  24586                                                                                   
  24587            </Element>
  24588                                                                         
  24589           </Entry>
  24590                                                               
  24591          </Relation ship>
  24592                                                     
  24593         </Element>
  24594                                            
  24595        </Entry>
  24596                                  
  24597       </Relation ship>
  24598                                 
  24599       <Relations hip 
  24600        Name="Func tionBody"
  24601       >
  24602                                           
  24603        <Entry>
  24604                                                    
  24605         <Element 
  24606          Type="SqlS criptFunct ionImpleme ntation"
  24607         >
  24608                                                              
  24609          <Property 
  24610           Name="Body Script"
  24611          >
  24612                                                                        
  24613           <Value>
  24614            <![CDATA[
  24615            BEGIN
  24616                  Whil e (Charind ex(@SplitO n,@List)>0 )
  24617                  BEGI N
  24618                         INSERT I NTO @RtnVa lue (Value )
  24619                         SELECT l trim(rtrim (Substring (@List,1,C harindex(@ SplitOn,@L ist)-1))) 
  24620                         
  24621                         SET @Lis t = Substr ing(@List, Charindex( @SplitOn,@ List)+len( @SplitOn), len(@List) )
  24622                  END 
  24623           
  24624                  INSE RT INTO @R tnValue (V alue)
  24625                  SELE CT ltrim(r trim(@List ))
  24626           
  24627                Return
  24628            END]]>
  24629           </Value>
  24630                                                               
  24631          </Property >
  24632                                                              
  24633          <Annotatio
  24634           Type="SysC ommentsObj ectAnnotat ion"
  24635          >
  24636                                                                        
  24637           <Property 
  24638            Name="Leng th" 
  24639            Value="620
  24640           />
  24641                                                                        
  24642           <Property 
  24643            Name="Star tLine" 
  24644            Value="1" 
  24645           />
  24646                                                                        
  24647           <Property 
  24648            Name="Star tColumn" 
  24649            Value="1" 
  24650           />
  24651                                                                        
  24652           <Property 
  24653            Name="Head erContents
  24654            Value="CRE ATE FUNCTI ON [App].[ udf_SplitS tring]&#xD ;&#xA;&#xD ;&#xA;(@Li st NVARCHA R (MAX), @ SplitOn VA RCHAR (MAX ))&#xD;&#x A;RETURNS  &#xD;&#xA;     @RtnVa lue TABLE  (&#xD;&#xA ;        [ Id]    INT              IDENTITY  (1, 1) NO T NULL,&#x D;&#xA;         [Valu e] VARCHAR  (MAX) NUL L)&#xD;&#x A;AS" 
  24655           />
  24656                                                               
  24657          </Annotati on>
  24658                                                     
  24659         </Element>
  24660                                            
  24661        </Entry>
  24662                                  
  24663       </Relation ship>
  24664                                 
  24665       <Relations hip 
  24666        Name="Para meters"
  24667       >
  24668                                           
  24669        <Entry>
  24670                                                    
  24671         <Element 
  24672          Type="SqlS ubroutineP arameter" 
  24673          Name="[App ].[udf_Spl itString]. [@List]"
  24674         >
  24675                                                              
  24676          <Relations hip 
  24677           Name="Type "
  24678          >
  24679                                                                        
  24680           <Entry>
  24681                                                                                  
  24682            <Element 
  24683             Type="SqlT ypeSpecifi er"
  24684            >
  24685                                                                                            
  24686             <Property 
  24687              Name="IsMa x" 
  24688              Value="Tru e" 
  24689             />
  24690                                                                                            
  24691             <Relations hip 
  24692              Name="Type "
  24693             >
  24694                                                                                                     
  24695              <Entry>
  24696                                                                                                               
  24697               <Reference
  24698                ExternalSo urce="Buil tIns" 
  24699                Name="[nva rchar]" 
  24700               />
  24701                                                                                                      
  24702              </Entry>
  24703                                                                                             
  24704             </Relation ship>
  24705                                                                                   
  24706            </Element>
  24707                                                                         
  24708           </Entry>
  24709                                                               
  24710          </Relation ship>
  24711                                                     
  24712         </Element>
  24713                                            
  24714        </Entry>
  24715                                           
  24716        <Entry>
  24717                                                    
  24718         <Element 
  24719          Type="SqlS ubroutineP arameter" 
  24720          Name="[App ].[udf_Spl itString]. [@SplitOn] "
  24721         >
  24722                                                              
  24723          <Relations hip 
  24724           Name="Type "
  24725          >
  24726                                                                        
  24727           <Entry>
  24728                                                                                  
  24729            <Element 
  24730             Type="SqlT ypeSpecifi er"
  24731            >
  24732                                                                                            
  24733             <Property 
  24734              Name="IsMa x" 
  24735              Value="Tru e" 
  24736             />
  24737                                                                                            
  24738             <Relations hip 
  24739              Name="Type "
  24740             >
  24741                                                                                                     
  24742              <Entry>
  24743                                                                                                               
  24744               <Reference
  24745                ExternalSo urce="Buil tIns" 
  24746                Name="[var char]" 
  24747               />
  24748                                                                                                      
  24749              </Entry>
  24750                                                                                             
  24751             </Relation ship>
  24752                                                                                   
  24753            </Element>
  24754                                                                         
  24755           </Entry>
  24756                                                               
  24757          </Relation ship>
  24758                                                     
  24759         </Element>
  24760                                            
  24761        </Entry>
  24762                                  
  24763       </Relation ship>
  24764                                 
  24765       <Relations hip 
  24766        Name="Sche ma"
  24767       >
  24768                                           
  24769        <Entry>
  24770                                                    
  24771         <Reference
  24772          Name="[App ]" 
  24773         />
  24774                                            
  24775        </Entry>
  24776                                  
  24777       </Relation ship>
  24778                        
  24779      </Element>
  24780                       
  24781      <Element 
  24782       Type="SqlS calarFunct ion" 
  24783       Name="[App ].[udf_Sta tionName]"
  24784      >
  24785                                 
  24786       <Property 
  24787        Name="IsAn siNullsOn"  
  24788        Value="Tru e" 
  24789       />
  24790                                 
  24791       <Relations hip 
  24792        Name="Body Dependenci es"
  24793       >
  24794                                           
  24795        <Entry>
  24796                                                    
  24797         <Reference
  24798          ExternalSo urce="CDWW ork.dacpac
  24799          Name="[CDW Work]|[Dim ].[Sta3n]"  
  24800         />
  24801                                            
  24802        </Entry>
  24803                                           
  24804        <Entry>
  24805                                                    
  24806         <Reference
  24807          ExternalSo urce="CDWW ork.dacpac
  24808          Name="[CDW Work]|[Dim ].[Sta3n]. [Sta3nName ]" 
  24809         />
  24810                                            
  24811        </Entry>
  24812                                           
  24813        <Entry>
  24814                                                    
  24815         <Reference
  24816          ExternalSo urce="CDWW ork.dacpac
  24817          Name="[CDW Work]|[Dim ].[Sta3n]. [Sta3n]" 
  24818         />
  24819                                            
  24820        </Entry>
  24821                                           
  24822        <Entry>
  24823                                                    
  24824         <Reference
  24825          Name="[App ].[udf_Sta tionName]. [@Sta3n]" 
  24826         />
  24827                                            
  24828        </Entry>
  24829                                           
  24830        <Entry>
  24831                                                    
  24832         <Reference
  24833          ExternalSo urce="CDWW ork.dacpac
  24834          Name="[CDW Work]|[Dim ].[Sta3n]. [Active]" 
  24835         />
  24836                                            
  24837        </Entry>
  24838                                  
  24839       </Relation ship>
  24840                                 
  24841       <Relations hip 
  24842        Name="Func tionBody"
  24843       >
  24844                                           
  24845        <Entry>
  24846                                                    
  24847         <Element 
  24848          Type="SqlS criptFunct ionImpleme ntation"
  24849         >
  24850                                                              
  24851          <Property 
  24852           Name="Body Script"
  24853          >
  24854                                                                        
  24855           <Value>
  24856            <![CDATA[
  24857            --======== ========== ========== ========== ========== ========== ========== ========== ===
  24858            --Requesto r                                : Non Va C oordinated  Care Proj ect
  24859            --Author                  : Jerr y Kohler -  Northwest  Innovatio n Center ( NWIC)
  24860            --Object/S P Name                  : udf_St ationName
  24861            --SERVER                                   
  24862            --Data Bas e                                : CC_REFDO C
  24863            --Schema                                    : app
  24864            --Report                                    : N/A
  24865            --Folder                                    : N/A
  24866            --Report L oc             : N/A
  24867            --Job                     : None
  24868            --Job Loc                 : None
  24869            --Note                    : 
  24870            --Date Cre ated           : 02-1 8-2016
  24871            --Last Cha nged           : 
  24872            --Last Cha nged By                 : 
  24873            --Reason F or Change               : 
  24874            --
  24875            --Purpose                 : Retu rns a "nic er" statio n name tha n what is  stored in
  24876            --                          xDWW ork.dim.in stitution
  24877            --======== ========== ========== ========== ========== ========== ========== ========== ===
  24878            BEGIN
  24879           
  24880               RETURN
  24881               (
  24882                  SELE CT
  24883                  CASE
  24884                     W HEN charin dex('(',su bstring(St a3nName,7, 50)) <=0 T HEN substr ing(Sta3nN ame,7,50)
  24885                     E LSE substr ing(Sta3nN ame, 7, (c harindex(' (', substr ing(Sta3nN ame,7,50)) -1))
  24886                  END
  24887           
  24888                  FROM  CDWWork.D im.Sta3n
  24889           
  24890                  WHER E Sta3n =  @Sta3n
  24891                    AN D Active =  'Y'
  24892               )
  24893           
  24894            END]]>
  24895           </Value>
  24896                                                               
  24897          </Property >
  24898                                                              
  24899          <Annotatio
  24900           Type="SysC ommentsObj ectAnnotat ion"
  24901          >
  24902                                                                        
  24903           <Property 
  24904            Name="Crea teOffset" 
  24905            Value="2" 
  24906           />
  24907                                                                        
  24908           <Property 
  24909            Name="Leng th" 
  24910            Value="123 7" 
  24911           />
  24912                                                                        
  24913           <Property 
  24914            Name="Star tLine" 
  24915            Value="1" 
  24916           />
  24917                                                                        
  24918           <Property 
  24919            Name="Star tColumn" 
  24920            Value="1" 
  24921           />
  24922                                                                        
  24923           <Property 
  24924            Name="Head erContents
  24925            Value="&#x D;&#xA;CRE ATE FUNCTI ON [App].[ udf_Statio nName] (@S ta3n VARCH AR(MAX))&# xD;&#xA;RE TURNS VARC HAR(50)&#x D;&#xA;AS"  
  24926           />
  24927                                                               
  24928          </Annotati on>
  24929                                                     
  24930         </Element>
  24931                                            
  24932        </Entry>
  24933                                  
  24934       </Relation ship>
  24935                                 
  24936       <Relations hip 
  24937        Name="Para meters"
  24938       >
  24939                                           
  24940        <Entry>
  24941                                                    
  24942         <Element 
  24943          Type="SqlS ubroutineP arameter" 
  24944          Name="[App ].[udf_Sta tionName]. [@Sta3n]"
  24945         >
  24946                                                              
  24947          <Relations hip 
  24948           Name="Type "
  24949          >
  24950                                                                        
  24951           <Entry>
  24952                                                                                  
  24953            <Element 
  24954             Type="SqlT ypeSpecifi er"
  24955            >
  24956                                                                                            
  24957             <Property 
  24958              Name="IsMa x" 
  24959              Value="Tru e" 
  24960             />
  24961                                                                                            
  24962             <Relations hip 
  24963              Name="Type "
  24964             >
  24965                                                                                                     
  24966              <Entry>
  24967                                                                                                               
  24968               <Reference
  24969                ExternalSo urce="Buil tIns" 
  24970                Name="[var char]" 
  24971               />
  24972                                                                                                      
  24973              </Entry>
  24974                                                                                             
  24975             </Relation ship>
  24976                                                                                   
  24977            </Element>
  24978                                                                         
  24979           </Entry>
  24980                                                               
  24981          </Relation ship>
  24982                                                     
  24983         </Element>
  24984                                            
  24985        </Entry>
  24986                                  
  24987       </Relation ship>
  24988                                 
  24989       <Relations hip 
  24990        Name="Sche ma"
  24991       >
  24992                                           
  24993        <Entry>
  24994                                                    
  24995         <Reference
  24996          Name="[App ]" 
  24997         />
  24998                                            
  24999        </Entry>
  25000                                  
  25001       </Relation ship>
  25002                                 
  25003       <Relations hip 
  25004        Name="Type "
  25005       >
  25006                                           
  25007        <Entry>
  25008                                                    
  25009         <Element 
  25010          Type="SqlT ypeSpecifi er"
  25011         >
  25012                                                              
  25013          <Property 
  25014           Name="Leng th" 
  25015           Value="50"  
  25016          />
  25017                                                              
  25018          <Relations hip 
  25019           Name="Type "
  25020          >
  25021                                                                        
  25022           <Entry>
  25023                                                                                  
  25024            <Reference
  25025             ExternalSo urce="Buil tIns" 
  25026             Name="[var char]" 
  25027            />
  25028                                                                         
  25029           </Entry>
  25030                                                               
  25031          </Relation ship>
  25032                                                     
  25033         </Element>
  25034                                            
  25035        </Entry>
  25036                                  
  25037       </Relation ship>
  25038                        
  25039      </Element>
  25040                       
  25041      <Element 
  25042       Type="SqlV iew" 
  25043       Name="[App ].[vNVCC_D ivision]"
  25044      >
  25045                                 
  25046       <Property 
  25047        Name="Quer yScript"
  25048       >
  25049                                           
  25050        <Value>
  25051         <![CDATA[
  25052         --======== ========== ========== ========== ========== ========== ========== ========== ===
  25053         --Requesto r                                : Non Va C oordinated  Care Proj ect
  25054         --Author                  : Bria n Diggs
  25055         --Object/S P Name                  : vNVCC_ Division
  25056         --SERVER                                   
  25057         --Data Bas e                                : CC_REFDO C
  25058         --Schema                                    : App
  25059         --Report                                    : N/A
  25060         --Folder                                    : N/A
  25061         --Report L oc             : N/A
  25062         --Job                     : None
  25063         --Job Loc                 : None
  25064         --Note                    : 
  25065         --Date Cre ated           : 05-2 5-2017
  25066         --Last Cha nged           : 
  25067         --Last Cha nged By                 : 
  25068         --Reason F or Change               : 
  25069         --
  25070         --Purpose                 : Crea te a restr icted view  of CDWWor k.dim.Divi sion for
  25071         --                          each  Sta6a app ears only  once.
  25072         --======== ========== ========== ========== ========== ========== ========== ========== ===
  25073         --
  25074         -- Goal: t o get a li st of vali d sta6a's  and their  associated  names, st a3n.
  25075         -- One ent ry per Sta 6a
  25076         -- Only St a6a's that  are "real " and affi liated wit h a reason able sta3n .
  25077         --
  25078         -- Primary  source of  data is C DWWork.Dim .Division
  25079         -- Seconda ry source  is CDWWork .Dim.Insti tution
  25080         --
  25081         -- Don't w ant Sta6a' s that are  NULL, '*M issing*',  '*Unknown  at this ti me*', or 
  25082         -- any whe re the fir st three c haracters  of the sta 6a is not  the corres ponding st a3n.
  25083         -- This la st criteri a will cov er all the  previous  ones as we ll.
  25084         --
  25085         -- This st ill leaves  multiple  entries fo r some sta 6a.
  25086         -- Which e ntries are  chosen is  based on  a scoring  algorithm  that was c reated by  listing 
  25087         -- all the  sta6a's t hat were m ultiples a nd, by han d, selecti ng the "be st" one ba sed on
  25088         -- the inf ormation i n the reco rd and the  correspon ding (LEFT  JOINed) I nstitution  record.
  25089         -- The sco re criteri a that cou ld be used  to recrea te the sel ection was :
  25090         -- If the  name (CDWW ork.Dim.Di vision.Div isionName)  starts wi th 'ZZ', - 100 points
  25091         -- If the  CDWWork.Di m.Institut ion.StaPa  is NULL, - 50 points
  25092         -- If the  CDWWork.Di m.Institut ion.Inacti veFlag is  anything b ut NULL, - 20 points
  25093         --
  25094         -- The rea son that t hese crite ria are ex pressed as  a score i s so that  for any st a6a,
  25095         -- there w ill always  be some e ntry which  is the "b est", even  if it is  the only o ne. That
  25096         -- is, eve n if there  is only o ne entry,  it would b e selected  even if i t met one  of these
  25097         -- "bad" c riteria.
  25098        
  25099         SELECT
  25100                 Or deredSta6a .DivisionS ID,
  25101                 Or deredSta6a .Sta3n,
  25102                 Or deredSta6a .DivisionN ame,
  25103                 Or deredSta6a .Sta6a
  25104         FROM (
  25105                 SE LECT 
  25106                          Scor edSta6a.Di visionSID,
  25107                          Scor edSta6a.St a3n,
  25108                          Scor edSta6a.Di visionName
  25109                          Scor edSta6a.St a6a,
  25110                          -- i ncluding t ie breaker s for scor e to guara ntee same  order ever y time
  25111                          ROW_ NUMBER() O VER (PARTI TION BY St a6a ORDER  BY Score D ESC, Divis ionName, D ivisionSID ) as N 
  25112                 FR OM (
  25113                          SELE CT
  25114                                   Divisi on.Divisio nSID,
  25115                                   Divisi on.Sta3n,
  25116                                   Divisi on.Divisio nName, 
  25117                                   Divisi on.Sta6a,
  25118                                   (
  25119                                            CASE
  25120                                                     WHEN SUBST RING(Divis ion.Divisi onName, 1,  2) = 'ZZ'  THEN -100
  25121                                                     ELSE 0
  25122                                            END +
  25123                                            CASE
  25124                                                     WHEN Insti tution.Sta Pa IS NULL  THEN -50
  25125                                                     ELSE 0
  25126                                            END +
  25127                                            CASE
  25128                                                     WHEN Insti tution.Ina ctiveFlag  IS NOT NUL L THEN -20
  25129                                                     ELSE 0
  25130                                            END
  25131                                   ) AS S core
  25132                          FROM  
  25133                                   CDWWor k.Dim.Divi sion
  25134                                   LEFT J OIN CDWWor k.Dim.Inst itution 
  25135                                            ON Divis ion.Instit utionSID =  Instituti on.Institu tionSID
  25136                          WHER E
  25137                                   -- The  first thr ee digits  of Sta6a m atch Sta3n  
  25138                                   Divisi on.Sta3n =  CASE
  25139                                            WHEN ISN UMERIC(SUB STRING(Sta 6a, 1, 3))  = 1 THEN
  25140                                                     CONVERT(SM ALLINT, SU BSTRING(St a6a, 1, 3) )
  25141                                            ELSE NUL L
  25142                                   END
  25143                          ) AS  ScoredSta 6a 
  25144                 )  AS Ordered Sta6a
  25145         WHERE
  25146                 N= 1
  25147         --ORDER BY  Sta6a]]>
  25148        </Value>
  25149                                  
  25150       </Property >
  25151                                 
  25152       <Property 
  25153        Name="IsAn siNullsOn"  
  25154        Value="Tru e" 
  25155       />
  25156                                 
  25157       <Relations hip 
  25158        Name="Colu mns"
  25159       >
  25160                                           
  25161        <Entry>
  25162                                                    
  25163         <Element 
  25164          Type="SqlC omputedCol umn" 
  25165          Name="[App ].[vNVCC_D ivision].[ DivisionSI D]"
  25166         >
  25167                                                              
  25168          <Relations hip 
  25169           Name="Expr essionDepe ndencies"
  25170          >
  25171                                                                        
  25172           <Entry>
  25173                                                                                  
  25174            <Reference
  25175             ExternalSo urce="CDWW ork.dacpac
  25176             Name="[CDW Work]|[Dim ].[Divisio n].[Divisi onSID]" 
  25177            />
  25178                                                                         
  25179           </Entry>
  25180                                                               
  25181          </Relation ship>
  25182                                                     
  25183         </Element>
  25184                                            
  25185        </Entry>
  25186                                           
  25187        <Entry>
  25188                                                    
  25189         <Element 
  25190          Type="SqlC omputedCol umn" 
  25191          Name="[App ].[vNVCC_D ivision].[ Sta3n]"
  25192         >
  25193                                                              
  25194          <Relations hip 
  25195           Name="Expr essionDepe ndencies"
  25196          >
  25197                                                                        
  25198           <Entry>
  25199                                                                                  
  25200            <Reference
  25201             ExternalSo urce="CDWW ork.dacpac
  25202             Name="[CDW Work]|[Dim ].[Divisio n].[Sta3n]
  25203            />
  25204                                                                         
  25205           </Entry>
  25206                                                               
  25207          </Relation ship>
  25208                                                     
  25209         </Element>
  25210                                            
  25211        </Entry>
  25212                                           
  25213        <Entry>
  25214                                                    
  25215         <Element 
  25216          Type="SqlC omputedCol umn" 
  25217          Name="[App ].[vNVCC_D ivision].[ DivisionNa me]"
  25218         >
  25219                                                              
  25220          <Relations hip 
  25221           Name="Expr essionDepe ndencies"
  25222          >
  25223                                                                        
  25224           <Entry>
  25225                                                                                  
  25226            <Reference
  25227             ExternalSo urce="CDWW ork.dacpac
  25228             Name="[CDW Work]|[Dim ].[Divisio n].[Divisi onName]" 
  25229            />
  25230                                                                         
  25231           </Entry>
  25232                                                               
  25233          </Relation ship>
  25234                                                     
  25235         </Element>
  25236                                            
  25237        </Entry>
  25238                                           
  25239        <Entry>
  25240                                                    
  25241         <Element 
  25242          Type="SqlC omputedCol umn" 
  25243          Name="[App ].[vNVCC_D ivision].[ Sta6a]"
  25244         >
  25245                                                              
  25246          <Relations hip 
  25247           Name="Expr essionDepe ndencies"
  25248          >
  25249                                                                        
  25250           <Entry>
  25251                                                                                  
  25252            <Reference
  25253             ExternalSo urce="CDWW ork.dacpac
  25254             Name="[CDW Work]|[Dim ].[Divisio n].[Sta6a]
  25255            />
  25256                                                                         
  25257           </Entry>
  25258                                                               
  25259          </Relation ship>
  25260                                                     
  25261         </Element>
  25262                                            
  25263        </Entry>
  25264                                  
  25265       </Relation ship>
  25266                                 
  25267       <Relations hip 
  25268        Name="Quer yDependenc ies"
  25269       >
  25270                                           
  25271        <Entry>
  25272                                                    
  25273         <Reference
  25274          ExternalSo urce="CDWW ork.dacpac
  25275          Name="[CDW Work]|[Dim ].[Divisio n]" 
  25276         />
  25277                                            
  25278        </Entry>
  25279                                           
  25280        <Entry>
  25281                                                    
  25282         <Reference
  25283          ExternalSo urce="CDWW ork.dacpac
  25284          Name="[CDW Work]|[Dim ].[Institu tion]" 
  25285         />
  25286                                            
  25287        </Entry>
  25288                                           
  25289        <Entry>
  25290                                                    
  25291         <Reference
  25292          ExternalSo urce="CDWW ork.dacpac
  25293          Name="[CDW Work]|[Dim ].[Divisio n].[Instit utionSID]"  
  25294         />
  25295                                            
  25296        </Entry>
  25297                                           
  25298        <Entry>
  25299                                                    
  25300         <Reference
  25301          ExternalSo urce="CDWW ork.dacpac
  25302          Name="[CDW Work]|[Dim ].[Institu tion].[Ins titutionSI D]" 
  25303         />
  25304                                            
  25305        </Entry>
  25306                                           
  25307        <Entry>
  25308                                                    
  25309         <Reference
  25310          ExternalSo urce="CDWW ork.dacpac
  25311          Name="[CDW Work]|[Dim ].[Divisio n].[Divisi onSID]" 
  25312         />
  25313                                            
  25314        </Entry>
  25315                                           
  25316        <Entry>
  25317                                                    
  25318         <Reference
  25319          ExternalSo urce="CDWW ork.dacpac
  25320          Name="[CDW Work]|[Dim ].[Divisio n].[Sta3n]
  25321         />
  25322                                            
  25323        </Entry>
  25324                                           
  25325        <Entry>
  25326                                                    
  25327         <Reference
  25328          ExternalSo urce="CDWW ork.dacpac
  25329          Name="[CDW Work]|[Dim ].[Divisio n].[Divisi onName]" 
  25330         />
  25331                                            
  25332        </Entry>
  25333                                           
  25334        <Entry>
  25335                                                    
  25336         <Reference
  25337          ExternalSo urce="CDWW ork.dacpac
  25338          Name="[CDW Work]|[Dim ].[Divisio n].[Sta6a]
  25339         />
  25340                                            
  25341        </Entry>
  25342                                           
  25343        <Entry>
  25344                                                    
  25345         <Reference
  25346          ExternalSo urce="CDWW ork.dacpac
  25347          Name="[CDW Work]|[Dim ].[Institu tion].[Sta Pa]" 
  25348         />
  25349                                            
  25350        </Entry>
  25351                                           
  25352        <Entry>
  25353                                                    
  25354         <Reference
  25355          ExternalSo urce="CDWW ork.dacpac
  25356          Name="[CDW Work]|[Dim ].[Institu tion].[Ina ctiveFlag]
  25357         />
  25358                                            
  25359        </Entry>
  25360                                           
  25361        <Entry>
  25362                                                    
  25363         <Reference
  25364          ExternalSo urce="CDWW ork.dacpac
  25365          Name="[CDW Work]|[Dim ].[Divisio n].[Sta6a]
  25366         />
  25367                                            
  25368        </Entry>
  25369                                           
  25370        <Entry>
  25371                                                    
  25372         <Reference
  25373          ExternalSo urce="Buil tIns" 
  25374          Name="[sma llint]" 
  25375         />
  25376                                            
  25377        </Entry>
  25378                                           
  25379        <Entry>
  25380                                                    
  25381         <Reference
  25382          ExternalSo urce="CDWW ork.dacpac
  25383          Name="[CDW Work]|[Dim ].[Divisio n].[Divisi onSID]" 
  25384         />
  25385                                            
  25386        </Entry>
  25387                                           
  25388        <Entry>
  25389                                                    
  25390         <Reference
  25391          ExternalSo urce="CDWW ork.dacpac
  25392          Name="[CDW Work]|[Dim ].[Divisio n].[Sta3n]
  25393         />
  25394                                            
  25395        </Entry>
  25396                                           
  25397        <Entry>
  25398                                                    
  25399         <Reference
  25400          ExternalSo urce="CDWW ork.dacpac
  25401          Name="[CDW Work]|[Dim ].[Divisio n].[Divisi onName]" 
  25402         />
  25403                                            
  25404        </Entry>
  25405                                           
  25406        <Entry>
  25407                                                    
  25408         <Reference
  25409          ExternalSo urce="CDWW ork.dacpac
  25410          Name="[CDW Work]|[Dim ].[Divisio n].[Sta6a]
  25411         />
  25412                                            
  25413        </Entry>
  25414                                           
  25415        <Entry>
  25416                                                    
  25417         <Reference
  25418          ExternalSo urce="CDWW ork.dacpac
  25419          Name="[CDW Work]|[Dim ].[Divisio n].[Divisi onSID]" 
  25420         />
  25421                                            
  25422        </Entry>
  25423                                           
  25424        <Entry>
  25425                                                    
  25426         <Reference
  25427          ExternalSo urce="CDWW ork.dacpac
  25428          Name="[CDW Work]|[Dim ].[Divisio n].[Sta3n]
  25429         />
  25430                                            
  25431        </Entry>
  25432                                           
  25433        <Entry>
  25434                                                    
  25435         <Reference
  25436          ExternalSo urce="CDWW ork.dacpac
  25437          Name="[CDW Work]|[Dim ].[Divisio n].[Divisi onName]" 
  25438         />
  25439                                            
  25440        </Entry>
  25441                                           
  25442        <Entry>
  25443                                                    
  25444         <Reference
  25445          ExternalSo urce="CDWW ork.dacpac
  25446          Name="[CDW Work]|[Dim ].[Divisio n].[Sta6a]
  25447         />
  25448                                            
  25449        </Entry>
  25450                                  
  25451       </Relation ship>
  25452                                 
  25453       <Relations hip 
  25454        Name="Sche ma"
  25455       >
  25456                                           
  25457        <Entry>
  25458                                                    
  25459         <Reference
  25460          Name="[App ]" 
  25461         />
  25462                                            
  25463        </Entry>
  25464                                  
  25465       </Relation ship>
  25466                                 
  25467       <Annotatio
  25468        Type="SysC ommentsObj ectAnnotat ion"
  25469       >
  25470                                           
  25471        <Property 
  25472         Name="Leng th" 
  25473         Value="366 8" 
  25474        />
  25475                                           
  25476        <Property 
  25477         Name="Star tLine" 
  25478         Value="1" 
  25479        />
  25480                                           
  25481        <Property 
  25482         Name="Star tColumn" 
  25483         Value="1" 
  25484        />
  25485                                           
  25486        <Property 
  25487         Name="Head erContents
  25488         Value="CRE ATE VIEW A pp.vNVCC_D ivision&#x D;&#xA;&#x D;&#xA;--  NOTICE:&#x D;&#xA;--  Do not edi t the view  live on t he server.  Code to g enerate&#x D;&#xA;--  the view i s stored i n the proj ect reposi tory. Any  changes ma de&#xD;&#x A;-- that  are not re corded in  the reposi tory will  be overwri tten.&#xD; &#xA;&#xD; &#xA;AS" 
  25489        />
  25490                                  
  25491       </Annotati on>
  25492                        
  25493      </Element>
  25494                       
  25495      <Element 
  25496       Type="SqlF ilegroup" 
  25497       Name="[Def FG]" 
  25498      />
  25499                       
  25500      <Element 
  25501       Type="SqlP ermissionS tatement" 
  25502       Name="[Den y.Alter.Sc hema].[uCC _REFDOC].[ dbo].[dbo] "
  25503      >
  25504                                 
  25505       <Property 
  25506        Name="Perm issionActi on" 
  25507        Value="1" 
  25508       />
  25509                                 
  25510       <Property 
  25511        Name="Perm ission" 
  25512        Value="100 1" 
  25513       />
  25514                                 
  25515       <Relations hip 
  25516        Name="Gran tee"
  25517       >
  25518                                           
  25519        <Entry>
  25520                                                    
  25521         <Reference
  25522          Name="[uCC _REFDOC]" 
  25523         />
  25524                                            
  25525        </Entry>
  25526                                  
  25527       </Relation ship>
  25528                                 
  25529       <Relations hip 
  25530        Name="Secu redObject"
  25531       >
  25532                                           
  25533        <Entry>
  25534                                                    
  25535         <Reference
  25536          ExternalSo urce="Buil tIns" 
  25537          Name="[dbo ]" 
  25538          Type="SqlS chema" 
  25539         />
  25540                                            
  25541        </Entry>
  25542                                  
  25543       </Relation ship>
  25544                        
  25545      </Element>
  25546                       
  25547      <Element 
  25548       Type="SqlS chema" 
  25549       Name="[Dfl t]"
  25550      >
  25551                                 
  25552       <Relations hip 
  25553        Name="Auth orizer"
  25554       >
  25555                                           
  25556        <Entry>
  25557                                                    
  25558         <Reference
  25559          Name="[uCC _REFDOC]" 
  25560         />
  25561                                            
  25562        </Entry>
  25563                                  
  25564       </Relation ship>
  25565                        
  25566      </Element>
  25567                       
  25568      <Element 
  25569       Type="SqlD efaultCons traint" 
  25570       Name="[Dfl t].[DF__Ex tractBa__L astE__151B 244E]"
  25571      >
  25572                                 
  25573       <Property 
  25574        Name="Defa ultExpress ionScript"
  25575       >
  25576                                           
  25577        <Value>
  25578         <![CDATA[( getdate()) ]]>
  25579        </Value>
  25580                                  
  25581       </Property >
  25582                                 
  25583       <Relations hip 
  25584        Name="Defi ningTable"
  25585       >
  25586                                           
  25587        <Entry>
  25588                                                    
  25589         <Reference
  25590          Name="[Dfl t].[Extrac tBatchLog]
  25591         />
  25592                                            
  25593        </Entry>
  25594                                  
  25595       </Relation ship>
  25596                                 
  25597       <Relations hip 
  25598        Name="ForC olumn"
  25599       >
  25600                                           
  25601        <Entry>
  25602                                                    
  25603         <Reference
  25604          Name="[Dfl t].[Extrac tBatchLog] .[LastExtr actDateTim e]" 
  25605         />
  25606                                            
  25607        </Entry>
  25608                                  
  25609       </Relation ship>
  25610                                 
  25611       <Annotatio
  25612        Type="SqlI nlineConst raintAnnot ation" 
  25613        Disambigua tor="17" 
  25614       />
  25615                        
  25616      </Element>
  25617                       
  25618      <Element 
  25619       Type="SqlT able" 
  25620       Name="[Dfl t].[Extrac tBatchLog] "
  25621      >
  25622                                 
  25623       <Property 
  25624        Name="IsAn siNullsOn"  
  25625        Value="Tru e" 
  25626       />
  25627                                 
  25628       <Relations hip 
  25629        Name="Colu mns"
  25630       >
  25631                                           
  25632        <Entry>
  25633                                                    
  25634         <Element 
  25635          Type="SqlS impleColum n" 
  25636          Name="[Dfl t].[Extrac tBatchLog] .[DWViewSc hema]"
  25637         >
  25638                                                              
  25639          <Relations hip 
  25640           Name="Type Specifier"
  25641          >
  25642                                                                        
  25643           <Entry>
  25644                                                                                  
  25645            <Element 
  25646             Type="SqlT ypeSpecifi er"
  25647            >
  25648                                                                                            
  25649             <Property 
  25650              Name="Leng th" 
  25651              Value="50"  
  25652             />
  25653                                                                                            
  25654             <Relations hip 
  25655              Name="Type "
  25656             >
  25657                                                                                                     
  25658              <Entry>
  25659                                                                                                               
  25660               <Reference
  25661                ExternalSo urce="Buil tIns" 
  25662                Name="[var char]" 
  25663               />
  25664                                                                                                      
  25665              </Entry>
  25666                                                                                             
  25667             </Relation ship>
  25668                                                                                   
  25669            </Element>
  25670                                                                         
  25671           </Entry>
  25672                                                               
  25673          </Relation ship>
  25674                                                     
  25675         </Element>
  25676                                            
  25677        </Entry>
  25678                                           
  25679        <Entry>
  25680                                                    
  25681         <Element 
  25682          Type="SqlS impleColum n" 
  25683          Name="[Dfl t].[Extrac tBatchLog] .[DWViewNa me]"
  25684         >
  25685                                                              
  25686          <Relations hip 
  25687           Name="Type Specifier"
  25688          >
  25689                                                                        
  25690           <Entry>
  25691                                                                                  
  25692            <Element 
  25693             Type="SqlT ypeSpecifi er"
  25694            >
  25695                                                                                            
  25696             <Property 
  25697              Name="Leng th" 
  25698              Value="50"  
  25699             />
  25700                                                                                            
  25701             <Relations hip 
  25702              Name="Type "
  25703             >
  25704                                                                                                     
  25705              <Entry>
  25706                                                                                                               
  25707               <Reference
  25708                ExternalSo urce="Buil tIns" 
  25709                Name="[var char]" 
  25710               />
  25711                                                                                                      
  25712              </Entry>
  25713                                                                                             
  25714             </Relation ship>
  25715                                                                                   
  25716            </Element>
  25717                                                                         
  25718           </Entry>
  25719                                                               
  25720          </Relation ship>
  25721                                                     
  25722         </Element>
  25723                                            
  25724        </Entry>
  25725                                           
  25726        <Entry>
  25727                                                    
  25728         <Element 
  25729          Type="SqlS impleColum n" 
  25730          Name="[Dfl t].[Extrac tBatchLog] .[LastExtr actBatchID ]"
  25731         >
  25732                                                              
  25733          <Relations hip 
  25734           Name="Type Specifier"
  25735          >
  25736                                                                        
  25737           <Entry>
  25738                                                                                  
  25739            <Element 
  25740             Type="SqlT ypeSpecifi er"
  25741            >
  25742                                                                                            
  25743             <Relations hip 
  25744              Name="Type "
  25745             >
  25746                                                                                                     
  25747              <Entry>
  25748                                                                                                               
  25749               <Reference
  25750                ExternalSo urce="Buil tIns" 
  25751                Name="[big int]" 
  25752               />
  25753                                                                                                      
  25754              </Entry>
  25755                                                                                             
  25756             </Relation ship>
  25757                                                                                   
  25758            </Element>
  25759                                                                         
  25760           </Entry>
  25761                                                               
  25762          </Relation ship>
  25763                                                     
  25764         </Element>
  25765                                            
  25766        </Entry>
  25767                                           
  25768        <Entry>
  25769                                                    
  25770         <Element 
  25771          Type="SqlS impleColum n" 
  25772          Name="[Dfl t].[Extrac tBatchLog] .[LastExtr actDateTim e]"
  25773         >
  25774                                                              
  25775          <Relations hip 
  25776           Name="Type Specifier"
  25777          >
  25778                                                                        
  25779           <Entry>
  25780                                                                                  
  25781            <Element 
  25782             Type="SqlT ypeSpecifi er"
  25783            >
  25784                                                                                            
  25785             <Relations hip 
  25786              Name="Type "
  25787             >
  25788                                                                                                     
  25789              <Entry>
  25790                                                                                                               
  25791               <Reference
  25792                ExternalSo urce="Buil tIns" 
  25793                Name="[dat etime]" 
  25794               />
  25795                                                                                                      
  25796              </Entry>
  25797                                                                                             
  25798             </Relation ship>
  25799                                                                                   
  25800            </Element>
  25801                                                                         
  25802           </Entry>
  25803                                                               
  25804          </Relation ship>
  25805                                                              
  25806          <AttachedA nnotation 
  25807           Disambigua tor="17" 
  25808          />
  25809                                                     
  25810         </Element>
  25811                                            
  25812        </Entry>
  25813                                  
  25814       </Relation ship>
  25815                                 
  25816       <Relations hip 
  25817        Name="Sche ma"
  25818       >
  25819                                           
  25820        <Entry>
  25821                                                    
  25822         <Reference
  25823          Name="[Dfl t]" 
  25824         />
  25825                                            
  25826        </Entry>
  25827                                  
  25828       </Relation ship>
  25829                        
  25830      </Element>
  25831                       
  25832      <Element 
  25833       Type="SqlS chema" 
  25834       Name="[ETL ]"
  25835      >
  25836                                 
  25837       <Relations hip 
  25838        Name="Auth orizer"
  25839       >
  25840                                           
  25841        <Entry>
  25842                                                    
  25843         <Reference
  25844          Name="[uCC _REFDOC]" 
  25845         />
  25846                                            
  25847        </Entry>
  25848                                  
  25849       </Relation ship>
  25850                        
  25851      </Element>
  25852                       
  25853      <Element 
  25854       Type="SqlT able" 
  25855       Name="[ETL ].[ProdLab Chem]"
  25856      >
  25857                                 
  25858       <Property 
  25859        Name="IsAn siNullsOn"  
  25860        Value="Tru e" 
  25861       />
  25862                                 
  25863       <Relations hip 
  25864        Name="Colu mns"
  25865       >
  25866                                           
  25867        <Entry>
  25868                                                    
  25869         <Element 
  25870          Type="SqlS impleColum n" 
  25871          Name="[ETL ].[ProdLab Chem].[Sta 3n]"
  25872         >
  25873                                                              
  25874          <Property 
  25875           Name="IsNu llable" 
  25876           Value="Fal se" 
  25877          />
  25878                                                              
  25879          <Relations hip 
  25880           Name="Type Specifier"
  25881          >
  25882                                                                        
  25883           <Entry>
  25884                                                                                  
  25885            <Element 
  25886             Type="SqlT ypeSpecifi er"
  25887            >
  25888                                                                                            
  25889             <Relations hip 
  25890              Name="Type "
  25891             >
  25892                                                                                                     
  25893              <Entry>
  25894                                                                                                               
  25895               <Reference
  25896                ExternalSo urce="Buil tIns" 
  25897                Name="[sma llint]" 
  25898               />
  25899                                                                                                      
  25900              </Entry>
  25901                                                                                             
  25902             </Relation ship>
  25903                                                                                   
  25904            </Element>
  25905                                                                         
  25906           </Entry>
  25907                                                               
  25908          </Relation ship>
  25909                                                     
  25910         </Element>
  25911                                            
  25912        </Entry>
  25913                                           
  25914        <Entry>
  25915                                                    
  25916         <Element 
  25917          Type="SqlS impleColum n" 
  25918          Name="[ETL ].[ProdLab Chem].[Lab ChemTestSI D]"
  25919         >
  25920                                                              
  25921          <Relations hip 
  25922           Name="Type Specifier"
  25923          >
  25924                                                                        
  25925           <Entry>
  25926                                                                                  
  25927            <Element 
  25928             Type="SqlT ypeSpecifi er"
  25929            >
  25930                                                                                            
  25931             <Relations hip 
  25932              Name="Type "
  25933             >
  25934                                                                                                     
  25935              <Entry>
  25936                                                                                                               
  25937               <Reference
  25938                ExternalSo urce="Buil tIns" 
  25939                Name="[int ]" 
  25940               />
  25941                                                                                                      
  25942              </Entry>
  25943                                                                                             
  25944             </Relation ship>
  25945                                                                                   
  25946            </Element>
  25947                                                                         
  25948           </Entry>
  25949                                                               
  25950          </Relation ship>
  25951                                                     
  25952         </Element>
  25953                                            
  25954        </Entry>
  25955                                           
  25956        <Entry>
  25957                                                    
  25958         <Element 
  25959          Type="SqlS impleColum n" 
  25960          Name="[ETL ].[ProdLab Chem].[LOI NCSID]"
  25961         >
  25962                                                              
  25963          <Relations hip 
  25964           Name="Type Specifier"
  25965          >
  25966                                                                        
  25967           <Entry>
  25968                                                                                  
  25969            <Element 
  25970             Type="SqlT ypeSpecifi er"
  25971            >
  25972                                                                                            
  25973             <Relations hip 
  25974              Name="Type "
  25975             >
  25976                                                                                                     
  25977              <Entry>
  25978                                                                                                               
  25979               <Reference
  25980                ExternalSo urce="Buil tIns" 
  25981                Name="[int ]" 
  25982               />
  25983                                                                                                      
  25984              </Entry>
  25985                                                                                             
  25986             </Relation ship>
  25987                                                                                   
  25988            </Element>
  25989                                                                         
  25990           </Entry>
  25991                                                               
  25992          </Relation ship>
  25993                                                     
  25994         </Element>
  25995                                            
  25996        </Entry>
  25997                                           
  25998        <Entry>
  25999                                                    
  26000         <Element 
  26001          Type="SqlS impleColum n" 
  26002          Name="[ETL ].[ProdLab Chem].[Lab ChemSpecim enDateTime ]"
  26003         >
  26004                                                              
  26005          <Relations hip 
  26006           Name="Type Specifier"
  26007          >
  26008                                                                        
  26009           <Entry>
  26010                                                                                  
  26011            <Element 
  26012             Type="SqlT ypeSpecifi er"
  26013            >
  26014                                                                                            
  26015             <Relations hip 
  26016              Name="Type "
  26017             >
  26018                                                                                                     
  26019              <Entry>
  26020                                                                                                               
  26021               <Reference
  26022                ExternalSo urce="Buil tIns" 
  26023                Name="[dat etime2]" 
  26024               />
  26025                                                                                                      
  26026              </Entry>
  26027                                                                                             
  26028             </Relation ship>
  26029                                                                                   
  26030            </Element>
  26031                                                                         
  26032           </Entry>
  26033                                                               
  26034          </Relation ship>
  26035                                                     
  26036         </Element>
  26037                                            
  26038        </Entry>
  26039                                           
  26040        <Entry>
  26041                                                    
  26042         <Element 
  26043          Type="SqlS impleColum n" 
  26044          Name="[ETL ].[ProdLab Chem].[Lab ChemComple teDateTime ]"
  26045         >
  26046                                                              
  26047          <Relations hip 
  26048           Name="Type Specifier"
  26049          >
  26050                                                                        
  26051           <Entry>
  26052                                                                                  
  26053            <Element 
  26054             Type="SqlT ypeSpecifi er"
  26055            >
  26056                                                                                            
  26057             <Relations hip 
  26058              Name="Type "
  26059             >
  26060                                                                                                     
  26061              <Entry>
  26062                                                                                                               
  26063               <Reference
  26064                ExternalSo urce="Buil tIns" 
  26065                Name="[dat etime2]" 
  26066               />
  26067                                                                                                      
  26068              </Entry>
  26069                                                                                             
  26070             </Relation ship>
  26071                                                                                   
  26072            </Element>
  26073                                                                         
  26074           </Entry>
  26075                                                               
  26076          </Relation ship>
  26077                                                     
  26078         </Element>
  26079                                            
  26080        </Entry>
  26081                                           
  26082        <Entry>
  26083                                                    
  26084         <Element 
  26085          Type="SqlS impleColum n" 
  26086          Name="[ETL ].[ProdLab Chem].[ETL BatchID]"
  26087         >
  26088                                                              
  26089          <Relations hip 
  26090           Name="Type Specifier"
  26091          >
  26092                                                                        
  26093           <Entry>
  26094                                                                                  
  26095            <Element 
  26096             Type="SqlT ypeSpecifi er"
  26097            >
  26098                                                                                            
  26099             <Relations hip 
  26100              Name="Type "
  26101             >
  26102                                                                                                     
  26103              <Entry>
  26104                                                                                                               
  26105               <Reference
  26106                ExternalSo urce="Buil tIns" 
  26107                Name="[int ]" 
  26108               />
  26109                                                                                                      
  26110              </Entry>
  26111                                                                                             
  26112             </Relation ship>
  26113                                                                                   
  26114            </Element>
  26115                                                                         
  26116           </Entry>
  26117                                                               
  26118          </Relation ship>
  26119                                                     
  26120         </Element>
  26121                                            
  26122        </Entry>
  26123                                           
  26124        <Entry>
  26125                                                    
  26126         <Element 
  26127          Type="SqlS impleColum n" 
  26128          Name="[ETL ].[ProdLab Chem].[OpC ode]"
  26129         >
  26130                                                              
  26131          <Property 
  26132           Name="IsNu llable" 
  26133           Value="Fal se" 
  26134          />
  26135                                                              
  26136          <Relations hip 
  26137           Name="Type Specifier"
  26138          >
  26139                                                                        
  26140           <Entry>
  26141                                                                                  
  26142            <Element 
  26143             Type="SqlT ypeSpecifi er"
  26144            >
  26145                                                                                            
  26146             <Property 
  26147              Name="Leng th" 
  26148              Value="1" 
  26149             />
  26150                                                                                            
  26151             <Relations hip 
  26152              Name="Type "
  26153             >
  26154                                                                                                     
  26155              <Entry>
  26156                                                                                                               
  26157               <Reference
  26158                ExternalSo urce="Buil tIns" 
  26159                Name="[cha r]" 
  26160               />
  26161                                                                                                      
  26162              </Entry>
  26163                                                                                             
  26164             </Relation ship>
  26165                                                                                   
  26166            </Element>
  26167                                                                         
  26168           </Entry>
  26169                                                               
  26170          </Relation ship>
  26171                                                     
  26172         </Element>
  26173                                            
  26174        </Entry>
  26175                                           
  26176        <Entry>
  26177                                                    
  26178         <Element 
  26179          Type="SqlS impleColum n" 
  26180          Name="[ETL ].[ProdLab Chem].[Vis taCreateDa te]"
  26181         >
  26182                                                              
  26183          <Relations hip 
  26184           Name="Type Specifier"
  26185          >
  26186                                                                        
  26187           <Entry>
  26188                                                                                  
  26189            <Element 
  26190             Type="SqlT ypeSpecifi er"
  26191            >
  26192                                                                                            
  26193             <Relations hip 
  26194              Name="Type "
  26195             >
  26196                                                                                                     
  26197              <Entry>
  26198                                                                                                               
  26199               <Reference
  26200                ExternalSo urce="Buil tIns" 
  26201                Name="[dat etime]" 
  26202               />
  26203                                                                                                      
  26204              </Entry>
  26205                                                                                             
  26206             </Relation ship>
  26207                                                                                   
  26208            </Element>
  26209                                                                         
  26210           </Entry>
  26211                                                               
  26212          </Relation ship>
  26213                                                     
  26214         </Element>
  26215                                            
  26216        </Entry>
  26217                                           
  26218        <Entry>
  26219                                                    
  26220         <Element 
  26221          Type="SqlS impleColum n" 
  26222          Name="[ETL ].[ProdLab Chem].[Vis taEditDate ]"
  26223         >
  26224                                                              
  26225          <Relations hip 
  26226           Name="Type Specifier"
  26227          >
  26228                                                                        
  26229           <Entry>
  26230                                                                                  
  26231            <Element 
  26232             Type="SqlT ypeSpecifi er"
  26233            >
  26234                                                                                            
  26235             <Relations hip 
  26236              Name="Type "
  26237             >
  26238                                                                                                     
  26239              <Entry>
  26240                                                                                                               
  26241               <Reference
  26242                ExternalSo urce="Buil tIns" 
  26243                Name="[dat etime]" 
  26244               />
  26245                                                                                                      
  26246              </Entry>
  26247                                                                                             
  26248             </Relation ship>
  26249                                                                                   
  26250            </Element>
  26251                                                                         
  26252           </Entry>
  26253                                                               
  26254          </Relation ship>
  26255                                                     
  26256         </Element>
  26257                                            
  26258        </Entry>
  26259                                  
  26260       </Relation ship>
  26261                                 
  26262       <Relations hip 
  26263        Name="Sche ma"
  26264       >
  26265                                           
  26266        <Entry>
  26267                                                    
  26268         <Reference
  26269          Name="[ETL ]" 
  26270         />
  26271                                            
  26272        </Entry>
  26273                                  
  26274       </Relation ship>
  26275                        
  26276      </Element>
  26277                       
  26278      <Element 
  26279       Type="SqlP ermissionS tatement" 
  26280       Name="[Gra nt.Delete. Schema].[u CC_REFDOC_ App].[dbo] .[App]"
  26281      >
  26282                                 
  26283       <Property 
  26284        Name="Perm ission" 
  26285        Value="4" 
  26286       />
  26287                                 
  26288       <Relations hip 
  26289        Name="Gran tee"
  26290       >
  26291                                           
  26292        <Entry>
  26293                                                    
  26294         <Reference
  26295          Name="[uCC _REFDOC_Ap p]" 
  26296         />
  26297                                            
  26298        </Entry>
  26299                                  
  26300       </Relation ship>
  26301                                 
  26302       <Relations hip 
  26303        Name="Secu redObject"
  26304       >
  26305                                           
  26306        <Entry>
  26307                                                    
  26308         <Reference
  26309          Name="[App ]" 
  26310         />
  26311                                            
  26312        </Entry>
  26313                                  
  26314       </Relation ship>
  26315                        
  26316      </Element>
  26317                       
  26318      <Element 
  26319       Type="SqlP ermissionS tatement" 
  26320       Name="[Gra nt.Execute .Schema].[ uCC_REFDOC _App].[dbo ].[App]"
  26321      >
  26322                                 
  26323       <Property 
  26324        Name="Perm ission" 
  26325        Value="107 0" 
  26326       />
  26327                                 
  26328       <Relations hip 
  26329        Name="Gran tee"
  26330       >
  26331                                           
  26332        <Entry>
  26333                                                    
  26334         <Reference
  26335          Name="[uCC _REFDOC_Ap p]" 
  26336         />
  26337                                            
  26338        </Entry>
  26339                                  
  26340       </Relation ship>
  26341                                 
  26342       <Relations hip 
  26343        Name="Secu redObject"
  26344       >
  26345                                           
  26346        <Entry>
  26347                                                    
  26348         <Reference
  26349          Name="[App ]" 
  26350         />
  26351                                            
  26352        </Entry>
  26353                                  
  26354       </Relation ship>
  26355                        
  26356      </Element>
  26357                       
  26358      <Element 
  26359       Type="SqlP ermissionS tatement" 
  26360       Name="[Gra nt.Insert. Schema].[u CC_REFDOC_ App].[dbo] .[App]"
  26361      >
  26362                                 
  26363       <Property 
  26364        Name="Perm ission" 
  26365        Value="1" 
  26366       />
  26367                                 
  26368       <Relations hip 
  26369        Name="Gran tee"
  26370       >
  26371                                           
  26372        <Entry>
  26373                                                    
  26374         <Reference
  26375          Name="[uCC _REFDOC_Ap p]" 
  26376         />
  26377                                            
  26378        </Entry>
  26379                                  
  26380       </Relation ship>
  26381                                 
  26382       <Relations hip 
  26383        Name="Secu redObject"
  26384       >
  26385                                           
  26386        <Entry>
  26387                                                    
  26388         <Reference
  26389          Name="[App ]" 
  26390         />
  26391                                            
  26392        </Entry>
  26393                                  
  26394       </Relation ship>
  26395                        
  26396      </Element>
  26397                       
  26398      <Element 
  26399       Type="SqlP ermissionS tatement" 
  26400       Name="[Gra nt.Select. Schema].[u CC_REFDOC_ App].[dbo] .[App]"
  26401      >
  26402                                 
  26403       <Property 
  26404        Name="Perm ission" 
  26405        Value="2" 
  26406       />
  26407                                 
  26408       <Relations hip 
  26409        Name="Gran tee"
  26410       >
  26411                                           
  26412        <Entry>
  26413                                                    
  26414         <Reference
  26415          Name="[uCC _REFDOC_Ap p]" 
  26416         />
  26417                                            
  26418        </Entry>
  26419                                  
  26420       </Relation ship>
  26421                                 
  26422       <Relations hip 
  26423        Name="Secu redObject"
  26424       >
  26425                                           
  26426        <Entry>
  26427                                                    
  26428         <Reference
  26429          Name="[App ]" 
  26430         />
  26431                                            
  26432        </Entry>
  26433                                  
  26434       </Relation ship>
  26435                        
  26436      </Element>
  26437                       
  26438      <Element 
  26439       Type="SqlP ermissionS tatement" 
  26440       Name="[Gra nt.Update. Schema].[u CC_REFDOC_ App].[dbo] .[App]"
  26441      >
  26442                                 
  26443       <Property 
  26444        Name="Perm ission" 
  26445        Value="3" 
  26446       />
  26447                                 
  26448       <Relations hip 
  26449        Name="Gran tee"
  26450       >
  26451                                           
  26452        <Entry>
  26453                                                    
  26454         <Reference
  26455          Name="[uCC _REFDOC_Ap p]" 
  26456         />
  26457                                            
  26458        </Entry>
  26459                                  
  26460       </Relation ship>
  26461                                 
  26462       <Relations hip 
  26463        Name="Secu redObject"
  26464       >
  26465                                           
  26466        <Entry>
  26467                                                    
  26468         <Reference
  26469          Name="[App ]" 
  26470         />
  26471                                            
  26472        </Entry>
  26473                                  
  26474       </Relation ship>
  26475                        
  26476      </Element>
  26477                       
  26478      <Element 
  26479       Type="SqlS chema" 
  26480       Name="[Pan elMgmt]"
  26481      >
  26482                                 
  26483       <Relations hip 
  26484        Name="Auth orizer"
  26485       >
  26486                                           
  26487        <Entry>
  26488                                                    
  26489         <Reference
  26490          Name="[uCC _REFDOC]" 
  26491         />
  26492                                            
  26493        </Entry>
  26494                                  
  26495       </Relation ship>
  26496                        
  26497      </Element>
  26498                       
  26499      <Element 
  26500       Type="SqlP rimaryKeyC onstraint"  
  26501       Name="[Pan elMgmt].[P K_PMMaster CohortLabT estGroups] "
  26502      >
  26503                                 
  26504       <Relations hip 
  26505        Name="Colu mnSpecific ations"
  26506       >
  26507                                           
  26508        <Entry>
  26509                                                    
  26510         <Element 
  26511          Type="SqlI ndexedColu mnSpecific ation"
  26512         >
  26513                                                              
  26514          <Relations hip 
  26515           Name="Colu mn"
  26516          >
  26517                                                                        
  26518           <Entry>
  26519                                                                                  
  26520            <Reference
  26521             Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[R owID]" 
  26522            />
  26523                                                                         
  26524           </Entry>
  26525                                                               
  26526          </Relation ship>
  26527                                                     
  26528         </Element>
  26529                                            
  26530        </Entry>
  26531                                  
  26532       </Relation ship>
  26533                                 
  26534       <Relations hip 
  26535        Name="Data Compressio nOptions"
  26536       >
  26537                                           
  26538        <Entry>
  26539                                                    
  26540         <Element 
  26541          Type="SqlD ataCompres sionOption "
  26542         >
  26543                                                              
  26544          <Property 
  26545           Name="Comp ressionLev el" 
  26546           Value="2" 
  26547          />
  26548                                                              
  26549          <Property 
  26550           Name="Part itionNumbe r" 
  26551           Value="1" 
  26552          />
  26553                                                     
  26554         </Element>
  26555                                            
  26556        </Entry>
  26557                                  
  26558       </Relation ship>
  26559                                 
  26560       <Relations hip 
  26561        Name="Defi ningTable"
  26562       >
  26563                                           
  26564        <Entry>
  26565                                                    
  26566         <Reference
  26567          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups]" 
  26568         />
  26569                                            
  26570        </Entry>
  26571                                  
  26572       </Relation ship>
  26573                                 
  26574       <Annotatio
  26575        Type="SqlI nlineConst raintAnnot ation" 
  26576        Disambigua tor="18" 
  26577       />
  26578                        
  26579      </Element>
  26580                       
  26581      <Element 
  26582       Type="SqlP rimaryKeyC onstraint"  
  26583       Name="[Pan elMgmt].[P K_PMMaster CohortLabT estGroupsL OINCCodes] "
  26584      >
  26585                                 
  26586       <Relations hip 
  26587        Name="Colu mnSpecific ations"
  26588       >
  26589                                           
  26590        <Entry>
  26591                                                    
  26592         <Element 
  26593          Type="SqlI ndexedColu mnSpecific ation"
  26594         >
  26595                                                              
  26596          <Relations hip 
  26597           Name="Colu mn"
  26598          >
  26599                                                                        
  26600           <Entry>
  26601                                                                                  
  26602            <Reference
  26603             Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[R owID]" 
  26604            />
  26605                                                                         
  26606           </Entry>
  26607                                                               
  26608          </Relation ship>
  26609                                                     
  26610         </Element>
  26611                                            
  26612        </Entry>
  26613                                  
  26614       </Relation ship>
  26615                                 
  26616       <Relations hip 
  26617        Name="Defi ningTable"
  26618       >
  26619                                           
  26620        <Entry>
  26621                                                    
  26622         <Reference
  26623          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes]" 
  26624         />
  26625                                            
  26626        </Entry>
  26627                                  
  26628       </Relation ship>
  26629                                 
  26630       <Annotatio
  26631        Type="SqlI nlineConst raintAnnot ation" 
  26632        Disambigua tor="19" 
  26633       />
  26634                        
  26635      </Element>
  26636                       
  26637      <Element 
  26638       Type="SqlP rimaryKeyC onstraint"  
  26639       Name="[Pan elMgmt].[P K_PMMaster LabTestGro upsCohort] "
  26640      >
  26641                                 
  26642       <Relations hip 
  26643        Name="Colu mnSpecific ations"
  26644       >
  26645                                           
  26646        <Entry>
  26647                                                    
  26648         <Element 
  26649          Type="SqlI ndexedColu mnSpecific ation"
  26650         >
  26651                                                              
  26652          <Relations hip 
  26653           Name="Colu mn"
  26654          >
  26655                                                                        
  26656           <Entry>
  26657                                                                                  
  26658            <Reference
  26659             Name="[Pan elMgmt].[P MMasterLab TestGroups Cohort].[R owID]" 
  26660            />
  26661                                                                         
  26662           </Entry>
  26663                                                               
  26664          </Relation ship>
  26665                                                     
  26666         </Element>
  26667                                            
  26668        </Entry>
  26669                                  
  26670       </Relation ship>
  26671                                 
  26672       <Relations hip 
  26673        Name="Defi ningTable"
  26674       >
  26675                                           
  26676        <Entry>
  26677                                                    
  26678         <Reference
  26679          Name="[Pan elMgmt].[P MMasterLab TestGroups Cohort]" 
  26680         />
  26681                                            
  26682        </Entry>
  26683                                  
  26684       </Relation ship>
  26685                                 
  26686       <Annotatio
  26687        Type="SqlI nlineConst raintAnnot ation" 
  26688        Disambigua tor="20" 
  26689       />
  26690                        
  26691      </Element>
  26692                       
  26693      <Element 
  26694       Type="SqlT able" 
  26695       Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups]"
  26696      >
  26697                                 
  26698       <Property 
  26699        Name="IsAn siNullsOn"  
  26700        Value="Tru e" 
  26701       />
  26702                                 
  26703       <Relations hip 
  26704        Name="Colu mns"
  26705       >
  26706                                           
  26707        <Entry>
  26708                                                    
  26709         <Element 
  26710          Type="SqlS impleColum n" 
  26711          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[R owID]"
  26712         >
  26713                                                              
  26714          <Property 
  26715           Name="IsNu llable" 
  26716           Value="Fal se" 
  26717          />
  26718                                                              
  26719          <Property 
  26720           Name="IsId entity" 
  26721           Value="Tru e" 
  26722          />
  26723                                                              
  26724          <Relations hip 
  26725           Name="Type Specifier"
  26726          >
  26727                                                                        
  26728           <Entry>
  26729                                                                                  
  26730            <Element 
  26731             Type="SqlT ypeSpecifi er"
  26732            >
  26733                                                                                            
  26734             <Relations hip 
  26735              Name="Type "
  26736             >
  26737                                                                                                     
  26738              <Entry>
  26739                                                                                                               
  26740               <Reference
  26741                ExternalSo urce="Buil tIns" 
  26742                Name="[int ]" 
  26743               />
  26744                                                                                                      
  26745              </Entry>
  26746                                                                                             
  26747             </Relation ship>
  26748                                                                                   
  26749            </Element>
  26750                                                                         
  26751           </Entry>
  26752                                                               
  26753          </Relation ship>
  26754                                                     
  26755         </Element>
  26756                                            
  26757        </Entry>
  26758                                           
  26759        <Entry>
  26760                                                    
  26761         <Element 
  26762          Type="SqlS impleColum n" 
  26763          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[T estGroup]"
  26764         >
  26765                                                              
  26766          <Relations hip 
  26767           Name="Type Specifier"
  26768          >
  26769                                                                        
  26770           <Entry>
  26771                                                                                  
  26772            <Element 
  26773             Type="SqlT ypeSpecifi er"
  26774            >
  26775                                                                                            
  26776             <Property 
  26777              Name="Leng th" 
  26778              Value="30"  
  26779             />
  26780                                                                                            
  26781             <Relations hip 
  26782              Name="Type "
  26783             >
  26784                                                                                                     
  26785              <Entry>
  26786                                                                                                               
  26787               <Reference
  26788                ExternalSo urce="Buil tIns" 
  26789                Name="[var char]" 
  26790               />
  26791                                                                                                      
  26792              </Entry>
  26793                                                                                             
  26794             </Relation ship>
  26795                                                                                   
  26796            </Element>
  26797                                                                         
  26798           </Entry>
  26799                                                               
  26800          </Relation ship>
  26801                                                     
  26802         </Element>
  26803                                            
  26804        </Entry>
  26805                                           
  26806        <Entry>
  26807                                                    
  26808         <Element 
  26809          Type="SqlS impleColum n" 
  26810          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[R esultForTe stNumeric] "
  26811         >
  26812                                                              
  26813          <Relations hip 
  26814           Name="Type Specifier"
  26815          >
  26816                                                                        
  26817           <Entry>
  26818                                                                                  
  26819            <Element 
  26820             Type="SqlT ypeSpecifi er"
  26821            >
  26822                                                                                            
  26823             <Relations hip 
  26824              Name="Type "
  26825             >
  26826                                                                                                     
  26827              <Entry>
  26828                                                                                                               
  26829               <Reference
  26830                ExternalSo urce="Buil tIns" 
  26831                Name="[int ]" 
  26832               />
  26833                                                                                                      
  26834              </Entry>
  26835                                                                                             
  26836             </Relation ship>
  26837                                                                                   
  26838            </Element>
  26839                                                                         
  26840           </Entry>
  26841                                                               
  26842          </Relation ship>
  26843                                                     
  26844         </Element>
  26845                                            
  26846        </Entry>
  26847                                           
  26848        <Entry>
  26849                                                    
  26850         <Element 
  26851          Type="SqlS impleColum n" 
  26852          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[L abProcedur e]"
  26853         >
  26854                                                              
  26855          <Relations hip 
  26856           Name="Type Specifier"
  26857          >
  26858                                                                        
  26859           <Entry>
  26860                                                                                  
  26861            <Element 
  26862             Type="SqlT ypeSpecifi er"
  26863            >
  26864                                                                                            
  26865             <Property 
  26866              Name="Leng th" 
  26867              Value="100
  26868             />
  26869                                                                                            
  26870             <Relations hip 
  26871              Name="Type "
  26872             >
  26873                                                                                                     
  26874              <Entry>
  26875                                                                                                               
  26876               <Reference
  26877                ExternalSo urce="Buil tIns" 
  26878                Name="[var char]" 
  26879               />
  26880                                                                                                      
  26881              </Entry>
  26882                                                                                             
  26883             </Relation ship>
  26884                                                                                   
  26885            </Element>
  26886                                                                         
  26887           </Entry>
  26888                                                               
  26889          </Relation ship>
  26890                                                     
  26891         </Element>
  26892                                            
  26893        </Entry>
  26894                                           
  26895        <Entry>
  26896                                                    
  26897         <Element 
  26898          Type="SqlS impleColum n" 
  26899          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[W orkloadCod e]"
  26900         >
  26901                                                              
  26902          <Relations hip 
  26903           Name="Type Specifier"
  26904          >
  26905                                                                        
  26906           <Entry>
  26907                                                                                  
  26908            <Element 
  26909             Type="SqlT ypeSpecifi er"
  26910            >
  26911                                                                                            
  26912             <Property 
  26913              Name="Leng th" 
  26914              Value="50"  
  26915             />
  26916                                                                                            
  26917             <Relations hip 
  26918              Name="Type "
  26919             >
  26920                                                                                                     
  26921              <Entry>
  26922                                                                                                               
  26923               <Reference
  26924                ExternalSo urce="Buil tIns" 
  26925                Name="[var char]" 
  26926               />
  26927                                                                                                      
  26928              </Entry>
  26929                                                                                             
  26930             </Relation ship>
  26931                                                                                   
  26932            </Element>
  26933                                                                         
  26934           </Entry>
  26935                                                               
  26936          </Relation ship>
  26937                                                     
  26938         </Element>
  26939                                            
  26940        </Entry>
  26941                                           
  26942        <Entry>
  26943                                                    
  26944         <Element 
  26945          Type="SqlS impleColum n" 
  26946          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[T estSearchC riteria]"
  26947         >
  26948                                                              
  26949          <Relations hip 
  26950           Name="Type Specifier"
  26951          >
  26952                                                                        
  26953           <Entry>
  26954                                                                                  
  26955            <Element 
  26956             Type="SqlT ypeSpecifi er"
  26957            >
  26958                                                                                            
  26959             <Property 
  26960              Name="Leng th" 
  26961              Value="200
  26962             />
  26963                                                                                            
  26964             <Relations hip 
  26965              Name="Type "
  26966             >
  26967                                                                                                     
  26968              <Entry>
  26969                                                                                                               
  26970               <Reference
  26971                ExternalSo urce="Buil tIns" 
  26972                Name="[var char]" 
  26973               />
  26974                                                                                                      
  26975              </Entry>
  26976                                                                                             
  26977             </Relation ship>
  26978                                                                                   
  26979            </Element>
  26980                                                                         
  26981           </Entry>
  26982                                                               
  26983          </Relation ship>
  26984                                                     
  26985         </Element>
  26986                                            
  26987        </Entry>
  26988                                  
  26989       </Relation ship>
  26990                                 
  26991       <Relations hip 
  26992        Name="Sche ma"
  26993       >
  26994                                           
  26995        <Entry>
  26996                                                    
  26997         <Reference
  26998          Name="[Pan elMgmt]" 
  26999         />
  27000                                            
  27001        </Entry>
  27002                                  
  27003       </Relation ship>
  27004                                 
  27005       <AttachedA nnotation 
  27006        Disambigua tor="18" 
  27007       />
  27008                        
  27009      </Element>
  27010                       
  27011      <Element 
  27012       Type="SqlT able" 
  27013       Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes]"
  27014      >
  27015                                 
  27016       <Property 
  27017        Name="IsAn siNullsOn"  
  27018        Value="Tru e" 
  27019       />
  27020                                 
  27021       <Relations hip 
  27022        Name="Colu mns"
  27023       >
  27024                                           
  27025        <Entry>
  27026                                                    
  27027         <Element 
  27028          Type="SqlS impleColum n" 
  27029          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[R owID]"
  27030         >
  27031                                                              
  27032          <Property 
  27033           Name="IsNu llable" 
  27034           Value="Fal se" 
  27035          />
  27036                                                              
  27037          <Property 
  27038           Name="IsId entity" 
  27039           Value="Tru e" 
  27040          />
  27041                                                              
  27042          <Relations hip 
  27043           Name="Type Specifier"
  27044          >
  27045                                                                        
  27046           <Entry>
  27047                                                                                  
  27048            <Element 
  27049             Type="SqlT ypeSpecifi er"
  27050            >
  27051                                                                                            
  27052             <Relations hip 
  27053              Name="Type "
  27054             >
  27055                                                                                                     
  27056              <Entry>
  27057                                                                                                               
  27058               <Reference
  27059                ExternalSo urce="Buil tIns" 
  27060                Name="[int ]" 
  27061               />
  27062                                                                                                      
  27063              </Entry>
  27064                                                                                             
  27065             </Relation ship>
  27066                                                                                   
  27067            </Element>
  27068                                                                         
  27069           </Entry>
  27070                                                               
  27071          </Relation ship>
  27072                                                     
  27073         </Element>
  27074                                            
  27075        </Entry>
  27076                                           
  27077        <Entry>
  27078                                                    
  27079         <Element 
  27080          Type="SqlS impleColum n" 
  27081          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[T estGroup]"
  27082         >
  27083                                                              
  27084          <Property 
  27085           Name="IsNu llable" 
  27086           Value="Fal se" 
  27087          />
  27088                                                              
  27089          <Relations hip 
  27090           Name="Type Specifier"
  27091          >
  27092                                                                        
  27093           <Entry>
  27094                                                                                  
  27095            <Element 
  27096             Type="SqlT ypeSpecifi er"
  27097            >
  27098                                                                                            
  27099             <Property 
  27100              Name="Leng th" 
  27101              Value="30"  
  27102             />
  27103                                                                                            
  27104             <Relations hip 
  27105              Name="Type "
  27106             >
  27107                                                                                                     
  27108              <Entry>
  27109                                                                                                               
  27110               <Reference
  27111                ExternalSo urce="Buil tIns" 
  27112                Name="[var char]" 
  27113               />
  27114                                                                                                      
  27115              </Entry>
  27116                                                                                             
  27117             </Relation ship>
  27118                                                                                   
  27119            </Element>
  27120                                                                         
  27121           </Entry>
  27122                                                               
  27123          </Relation ship>
  27124                                                     
  27125         </Element>
  27126                                            
  27127        </Entry>
  27128                                           
  27129        <Entry>
  27130                                                    
  27131         <Element 
  27132          Type="SqlS impleColum n" 
  27133          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[R esultForTe stNumeric] "
  27134         >
  27135                                                              
  27136          <Relations hip 
  27137           Name="Type Specifier"
  27138          >
  27139                                                                        
  27140           <Entry>
  27141                                                                                  
  27142            <Element 
  27143             Type="SqlT ypeSpecifi er"
  27144            >
  27145                                                                                            
  27146             <Relations hip 
  27147              Name="Type "
  27148             >
  27149                                                                                                     
  27150              <Entry>
  27151                                                                                                               
  27152               <Reference
  27153                ExternalSo urce="Buil tIns" 
  27154                Name="[int ]" 
  27155               />
  27156                                                                                                      
  27157              </Entry>
  27158                                                                                             
  27159             </Relation ship>
  27160                                                                                   
  27161            </Element>
  27162                                                                         
  27163           </Entry>
  27164                                                               
  27165          </Relation ship>
  27166                                                     
  27167         </Element>
  27168                                            
  27169        </Entry>
  27170                                           
  27171        <Entry>
  27172                                                    
  27173         <Element 
  27174          Type="SqlS impleColum n" 
  27175          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[L ongName]"
  27176         >
  27177                                                              
  27178          <Relations hip 
  27179           Name="Type Specifier"
  27180          >
  27181                                                                        
  27182           <Entry>
  27183                                                                                  
  27184            <Element 
  27185             Type="SqlT ypeSpecifi er"
  27186            >
  27187                                                                                            
  27188             <Property 
  27189              Name="Leng th" 
  27190              Value="100
  27191             />
  27192                                                                                            
  27193             <Relations hip 
  27194              Name="Type "
  27195             >
  27196                                                                                                     
  27197              <Entry>
  27198                                                                                                               
  27199               <Reference
  27200                ExternalSo urce="Buil tIns" 
  27201                Name="[var char]" 
  27202               />
  27203                                                                                                      
  27204              </Entry>
  27205                                                                                             
  27206             </Relation ship>
  27207                                                                                   
  27208            </Element>
  27209                                                                         
  27210           </Entry>
  27211                                                               
  27212          </Relation ship>
  27213                                                     
  27214         </Element>
  27215                                            
  27216        </Entry>
  27217                                           
  27218        <Entry>
  27219                                                    
  27220         <Element 
  27221          Type="SqlS impleColum n" 
  27222          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[L OINC]"
  27223         >
  27224                                                              
  27225          <Property 
  27226           Name="IsNu llable" 
  27227           Value="Fal se" 
  27228          />
  27229                                                              
  27230          <Relations hip 
  27231           Name="Type Specifier"
  27232          >
  27233                                                                        
  27234           <Entry>
  27235                                                                                  
  27236            <Element 
  27237             Type="SqlT ypeSpecifi er"
  27238            >
  27239                                                                                            
  27240             <Property 
  27241              Name="Leng th" 
  27242              Value="50"  
  27243             />
  27244                                                                                            
  27245             <Relations hip 
  27246              Name="Type "
  27247             >
  27248                                                                                                     
  27249              <Entry>
  27250                                                                                                               
  27251               <Reference
  27252                ExternalSo urce="Buil tIns" 
  27253                Name="[var char]" 
  27254               />
  27255                                                                                                      
  27256              </Entry>
  27257                                                                                             
  27258             </Relation ship>
  27259                                                                                   
  27260            </Element>
  27261                                                                         
  27262           </Entry>
  27263                                                               
  27264          </Relation ship>
  27265                                                     
  27266         </Element>
  27267                                            
  27268        </Entry>
  27269                                           
  27270        <Entry>
  27271                                                    
  27272         <Element 
  27273          Type="SqlS impleColum n" 
  27274          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[S ystem]"
  27275         >
  27276                                                              
  27277          <Relations hip 
  27278           Name="Type Specifier"
  27279          >
  27280                                                                        
  27281           <Entry>
  27282                                                                                  
  27283            <Element 
  27284             Type="SqlT ypeSpecifi er"
  27285            >
  27286                                                                                            
  27287             <Property 
  27288              Name="Leng th" 
  27289              Value="30"  
  27290             />
  27291                                                                                            
  27292             <Relations hip 
  27293              Name="Type "
  27294             >
  27295                                                                                                     
  27296              <Entry>
  27297                                                                                                               
  27298               <Reference
  27299                ExternalSo urce="Buil tIns" 
  27300                Name="[var char]" 
  27301               />
  27302                                                                                                      
  27303              </Entry>
  27304                                                                                             
  27305             </Relation ship>
  27306                                                                                   
  27307            </Element>
  27308                                                                         
  27309           </Entry>
  27310                                                               
  27311          </Relation ship>
  27312                                                     
  27313         </Element>
  27314                                            
  27315        </Entry>
  27316                                           
  27317        <Entry>
  27318                                                    
  27319         <Element 
  27320          Type="SqlS impleColum n" 
  27321          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[Y earSearchC riteria]"
  27322         >
  27323                                                              
  27324          <Relations hip 
  27325           Name="Type Specifier"
  27326          >
  27327                                                                        
  27328           <Entry>
  27329                                                                                  
  27330            <Element 
  27331             Type="SqlT ypeSpecifi er"
  27332            >
  27333                                                                                            
  27334             <Relations hip 
  27335              Name="Type "
  27336             >
  27337                                                                                                     
  27338              <Entry>
  27339                                                                                                               
  27340               <Reference
  27341                ExternalSo urce="Buil tIns" 
  27342                Name="[int ]" 
  27343               />
  27344                                                                                                      
  27345              </Entry>
  27346                                                                                             
  27347             </Relation ship>
  27348                                                                                   
  27349            </Element>
  27350                                                                         
  27351           </Entry>
  27352                                                               
  27353          </Relation ship>
  27354                                                     
  27355         </Element>
  27356                                            
  27357        </Entry>
  27358                                           
  27359        <Entry>
  27360                                                    
  27361         <Element 
  27362          Type="SqlS impleColum n" 
  27363          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[L astUpdate] "
  27364         >
  27365                                                              
  27366          <Relations hip 
  27367           Name="Type Specifier"
  27368          >
  27369                                                                        
  27370           <Entry>
  27371                                                                                  
  27372            <Element 
  27373             Type="SqlT ypeSpecifi er"
  27374            >
  27375                                                                                            
  27376             <Relations hip 
  27377              Name="Type "
  27378             >
  27379                                                                                                     
  27380              <Entry>
  27381                                                                                                               
  27382               <Reference
  27383                ExternalSo urce="Buil tIns" 
  27384                Name="[dat e]" 
  27385               />
  27386                                                                                                      
  27387              </Entry>
  27388                                                                                             
  27389             </Relation ship>
  27390                                                                                   
  27391            </Element>
  27392                                                                         
  27393           </Entry>
  27394                                                               
  27395          </Relation ship>
  27396                                                     
  27397         </Element>
  27398                                            
  27399        </Entry>
  27400                                  
  27401       </Relation ship>
  27402                                 
  27403       <Relations hip 
  27404        Name="Sche ma"
  27405       >
  27406                                           
  27407        <Entry>
  27408                                                    
  27409         <Reference
  27410          Name="[Pan elMgmt]" 
  27411         />
  27412                                            
  27413        </Entry>
  27414                                  
  27415       </Relation ship>
  27416                                 
  27417       <AttachedA nnotation 
  27418        Disambigua tor="19" 
  27419       />
  27420                        
  27421      </Element>
  27422                       
  27423      <Element 
  27424       Type="SqlT able" 
  27425       Name="[Pan elMgmt].[P MMasterCoh ortSite]"
  27426      >
  27427                                 
  27428       <Property 
  27429        Name="IsAn siNullsOn"  
  27430        Value="Tru e" 
  27431       />
  27432                                 
  27433       <Relations hip 
  27434        Name="Colu mns"
  27435       >
  27436                                           
  27437        <Entry>
  27438                                                    
  27439         <Element 
  27440          Type="SqlS impleColum n" 
  27441          Name="[Pan elMgmt].[P MMasterCoh ortSite].[ Sta3n]"
  27442         >
  27443                                                              
  27444          <Property 
  27445           Name="IsNu llable" 
  27446           Value="Fal se" 
  27447          />
  27448                                                              
  27449          <Relations hip 
  27450           Name="Type Specifier"
  27451          >
  27452                                                                        
  27453           <Entry>
  27454                                                                                  
  27455            <Element 
  27456             Type="SqlT ypeSpecifi er"
  27457            >
  27458                                                                                            
  27459             <Relations hip 
  27460              Name="Type "
  27461             >
  27462                                                                                                     
  27463              <Entry>
  27464                                                                                                               
  27465               <Reference
  27466                ExternalSo urce="Buil tIns" 
  27467                Name="[sma llint]" 
  27468               />
  27469                                                                                                      
  27470              </Entry>
  27471                                                                                             
  27472             </Relation ship>
  27473                                                                                   
  27474            </Element>
  27475                                                                         
  27476           </Entry>
  27477                                                               
  27478          </Relation ship>
  27479                                                     
  27480         </Element>
  27481                                            
  27482        </Entry>
  27483                                           
  27484        <Entry>
  27485                                                    
  27486         <Element 
  27487          Type="SqlS impleColum n" 
  27488          Name="[Pan elMgmt].[P MMasterCoh ortSite].[ Facility]"
  27489         >
  27490                                                              
  27491          <Property 
  27492           Name="IsNu llable" 
  27493           Value="Fal se" 
  27494          />
  27495                                                              
  27496          <Relations hip 
  27497           Name="Type Specifier"
  27498          >
  27499                                                                        
  27500           <Entry>
  27501                                                                                  
  27502            <Element 
  27503             Type="SqlT ypeSpecifi er"
  27504            >
  27505                                                                                            
  27506             <Property 
  27507              Name="Leng th" 
  27508              Value="50"  
  27509             />
  27510                                                                                            
  27511             <Relations hip 
  27512              Name="Type "
  27513             >
  27514                                                                                                     
  27515              <Entry>
  27516                                                                                                               
  27517               <Reference
  27518                ExternalSo urce="Buil tIns" 
  27519                Name="[var char]" 
  27520               />
  27521                                                                                                      
  27522              </Entry>
  27523                                                                                             
  27524             </Relation ship>
  27525                                                                                   
  27526            </Element>
  27527                                                                         
  27528           </Entry>
  27529                                                               
  27530          </Relation ship>
  27531                                                     
  27532         </Element>
  27533                                            
  27534        </Entry>
  27535                                           
  27536        <Entry>
  27537                                                    
  27538         <Element 
  27539          Type="SqlS impleColum n" 
  27540          Name="[Pan elMgmt].[P MMasterCoh ortSite].[ VISN]"
  27541         >
  27542                                                              
  27543          <Property 
  27544           Name="IsNu llable" 
  27545           Value="Fal se" 
  27546          />
  27547                                                              
  27548          <Relations hip 
  27549           Name="Type Specifier"
  27550          >
  27551                                                                        
  27552           <Entry>
  27553                                                                                  
  27554            <Element 
  27555             Type="SqlT ypeSpecifi er"
  27556            >
  27557                                                                                            
  27558             <Relations hip 
  27559              Name="Type "
  27560             >
  27561                                                                                                     
  27562              <Entry>
  27563                                                                                                               
  27564               <Reference
  27565                ExternalSo urce="Buil tIns" 
  27566                Name="[sma llint]" 
  27567               />
  27568                                                                                                      
  27569              </Entry>
  27570                                                                                             
  27571             </Relation ship>
  27572                                                                                   
  27573            </Element>
  27574                                                                         
  27575           </Entry>
  27576                                                               
  27577          </Relation ship>
  27578                                                     
  27579         </Element>
  27580                                            
  27581        </Entry>
  27582                                           
  27583        <Entry>
  27584                                                    
  27585         <Element 
  27586          Type="SqlS impleColum n" 
  27587          Name="[Pan elMgmt].[P MMasterCoh ortSite].[ Active]"
  27588         >
  27589                                                              
  27590          <Relations hip 
  27591           Name="Type Specifier"
  27592          >
  27593                                                                        
  27594           <Entry>
  27595                                                                                  
  27596            <Element 
  27597             Type="SqlT ypeSpecifi er"
  27598            >
  27599                                                                                            
  27600             <Property 
  27601              Name="Leng th" 
  27602              Value="1" 
  27603             />
  27604                                                                                            
  27605             <Relations hip 
  27606              Name="Type "
  27607             >
  27608                                                                                                     
  27609              <Entry>
  27610                                                                                                               
  27611               <Reference
  27612                ExternalSo urce="Buil tIns" 
  27613                Name="[cha r]" 
  27614               />
  27615                                                                                                      
  27616              </Entry>
  27617                                                                                             
  27618             </Relation ship>
  27619                                                                                   
  27620            </Element>
  27621                                                                         
  27622           </Entry>
  27623                                                               
  27624          </Relation ship>
  27625                                                     
  27626         </Element>
  27627                                            
  27628        </Entry>
  27629                                           
  27630        <Entry>
  27631                                                    
  27632         <Element 
  27633          Type="SqlS impleColum n" 
  27634          Name="[Pan elMgmt].[P MMasterCoh ortSite].[ NextSta3n] "
  27635         >
  27636                                                              
  27637          <Relations hip 
  27638           Name="Type Specifier"
  27639          >
  27640                                                                        
  27641           <Entry>
  27642                                                                                  
  27643            <Element 
  27644             Type="SqlT ypeSpecifi er"
  27645            >
  27646                                                                                            
  27647             <Relations hip 
  27648              Name="Type "
  27649             >
  27650                                                                                                     
  27651              <Entry>
  27652                                                                                                               
  27653               <Reference
  27654                ExternalSo urce="Buil tIns" 
  27655                Name="[int ]" 
  27656               />
  27657                                                                                                      
  27658              </Entry>
  27659                                                                                             
  27660             </Relation ship>
  27661                                                                                   
  27662            </Element>
  27663                                                                         
  27664           </Entry>
  27665                                                               
  27666          </Relation ship>
  27667                                                     
  27668         </Element>
  27669                                            
  27670        </Entry>
  27671                                           
  27672        <Entry>
  27673                                                    
  27674         <Element 
  27675          Type="SqlS impleColum n" 
  27676          Name="[Pan elMgmt].[P MMasterCoh ortSite].[ Region]"
  27677         >
  27678                                                              
  27679          <Property 
  27680           Name="IsNu llable" 
  27681           Value="Fal se" 
  27682          />
  27683                                                              
  27684          <Relations hip 
  27685           Name="Type Specifier"
  27686          >
  27687                                                                        
  27688           <Entry>
  27689                                                                                  
  27690            <Element 
  27691             Type="SqlT ypeSpecifi er"
  27692            >
  27693                                                                                            
  27694             <Relations hip 
  27695              Name="Type "
  27696             >
  27697                                                                                                     
  27698              <Entry>
  27699                                                                                                               
  27700               <Reference
  27701                ExternalSo urce="Buil tIns" 
  27702                Name="[sma llint]" 
  27703               />
  27704                                                                                                      
  27705              </Entry>
  27706                                                                                             
  27707             </Relation ship>
  27708                                                                                   
  27709            </Element>
  27710                                                                         
  27711           </Entry>
  27712                                                               
  27713          </Relation ship>
  27714                                                     
  27715         </Element>
  27716                                            
  27717        </Entry>
  27718                                           
  27719        <Entry>
  27720                                                    
  27721         <Element 
  27722          Type="SqlS impleColum n" 
  27723          Name="[Pan elMgmt].[P MMasterCoh ortSite].[ SiteName]"
  27724         >
  27725                                                              
  27726          <Property 
  27727           Name="IsNu llable" 
  27728           Value="Fal se" 
  27729          />
  27730                                                              
  27731          <Relations hip 
  27732           Name="Type Specifier"
  27733          >
  27734                                                                        
  27735           <Entry>
  27736                                                                                  
  27737            <Element 
  27738             Type="SqlT ypeSpecifi er"
  27739            >
  27740                                                                                            
  27741             <Property 
  27742              Name="Leng th" 
  27743              Value="50"  
  27744             />
  27745                                                                                            
  27746             <Relations hip 
  27747              Name="Type "
  27748             >
  27749                                                                                                     
  27750              <Entry>
  27751                                                                                                               
  27752               <Reference
  27753                ExternalSo urce="Buil tIns" 
  27754                Name="[var char]" 
  27755               />
  27756                                                                                                      
  27757              </Entry>
  27758                                                                                             
  27759             </Relation ship>
  27760                                                                                   
  27761            </Element>
  27762                                                                         
  27763           </Entry>
  27764                                                               
  27765          </Relation ship>
  27766                                                     
  27767         </Element>
  27768                                            
  27769        </Entry>
  27770                                  
  27771       </Relation ship>
  27772                                 
  27773       <Relations hip 
  27774        Name="Sche ma"
  27775       >
  27776                                           
  27777        <Entry>
  27778                                                    
  27779         <Reference
  27780          Name="[Pan elMgmt]" 
  27781         />
  27782                                            
  27783        </Entry>
  27784                                  
  27785       </Relation ship>
  27786                        
  27787      </Element>
  27788                       
  27789      <Element 
  27790       Type="SqlT able" 
  27791       Name="[Pan elMgmt].[P MMasterLab Index]"
  27792      >
  27793                                 
  27794       <Property 
  27795        Name="IsAn siNullsOn"  
  27796        Value="Tru e" 
  27797       />
  27798                                 
  27799       <Relations hip 
  27800        Name="Colu mns"
  27801       >
  27802                                           
  27803        <Entry>
  27804                                                    
  27805         <Element 
  27806          Type="SqlS impleColum n" 
  27807          Name="[Pan elMgmt].[P MMasterLab Index].[La bChemTestS ID]"
  27808         >
  27809                                                              
  27810          <Property 
  27811           Name="IsNu llable" 
  27812           Value="Fal se" 
  27813          />
  27814                                                              
  27815          <Relations hip 
  27816           Name="Type Specifier"
  27817          >
  27818                                                                        
  27819           <Entry>
  27820                                                                                  
  27821            <Element 
  27822             Type="SqlT ypeSpecifi er"
  27823            >
  27824                                                                                            
  27825             <Relations hip 
  27826              Name="Type "
  27827             >
  27828                                                                                                     
  27829              <Entry>
  27830                                                                                                               
  27831               <Reference
  27832                ExternalSo urce="Buil tIns" 
  27833                Name="[int ]" 
  27834               />
  27835                                                                                                      
  27836              </Entry>
  27837                                                                                             
  27838             </Relation ship>
  27839                                                                                   
  27840            </Element>
  27841                                                                         
  27842           </Entry>
  27843                                                               
  27844          </Relation ship>
  27845                                                     
  27846         </Element>
  27847                                            
  27848        </Entry>
  27849                                           
  27850        <Entry>
  27851                                                    
  27852         <Element 
  27853          Type="SqlS impleColum n" 
  27854          Name="[Pan elMgmt].[P MMasterLab Index].[St a3n]"
  27855         >
  27856                                                              
  27857          <Property 
  27858           Name="IsNu llable" 
  27859           Value="Fal se" 
  27860          />
  27861                                                              
  27862          <Relations hip 
  27863           Name="Type Specifier"
  27864          >
  27865                                                                        
  27866           <Entry>
  27867                                                                                  
  27868            <Element 
  27869             Type="SqlT ypeSpecifi er"
  27870            >
  27871                                                                                            
  27872             <Relations hip 
  27873              Name="Type "
  27874             >
  27875                                                                                                     
  27876              <Entry>
  27877                                                                                                               
  27878               <Reference
  27879                ExternalSo urce="Buil tIns" 
  27880                Name="[sma llint]" 
  27881               />
  27882                                                                                                      
  27883              </Entry>
  27884                                                                                             
  27885             </Relation ship>
  27886                                                                                   
  27887            </Element>
  27888                                                                         
  27889           </Entry>
  27890                                                               
  27891          </Relation ship>
  27892                                                     
  27893         </Element>
  27894                                            
  27895        </Entry>
  27896                                           
  27897        <Entry>
  27898                                                    
  27899         <Element 
  27900          Type="SqlS impleColum n" 
  27901          Name="[Pan elMgmt].[P MMasterLab Index].[La bChemTestN ame]"
  27902         >
  27903                                                              
  27904          <Relations hip 
  27905           Name="Type Specifier"
  27906          >
  27907                                                                        
  27908           <Entry>
  27909                                                                                  
  27910            <Element 
  27911             Type="SqlT ypeSpecifi er"
  27912            >
  27913                                                                                            
  27914             <Property 
  27915              Name="Leng th" 
  27916              Value="50"  
  27917             />
  27918                                                                                            
  27919             <Relations hip 
  27920              Name="Type "
  27921             >
  27922                                                                                                     
  27923              <Entry>
  27924                                                                                                               
  27925               <Reference
  27926                ExternalSo urce="Buil tIns" 
  27927                Name="[var char]" 
  27928               />
  27929                                                                                                      
  27930              </Entry>
  27931                                                                                             
  27932             </Relation ship>
  27933                                                                                   
  27934            </Element>
  27935                                                                         
  27936           </Entry>
  27937                                                               
  27938          </Relation ship>
  27939                                                     
  27940         </Element>
  27941                                            
  27942        </Entry>
  27943                                           
  27944        <Entry>
  27945                                                    
  27946         <Element 
  27947          Type="SqlS impleColum n" 
  27948          Name="[Pan elMgmt].[P MMasterLab Index].[Re sultForTes tNumeric]"
  27949         >
  27950                                                              
  27951          <Property 
  27952           Name="IsNu llable" 
  27953           Value="Fal se" 
  27954          />
  27955                                                              
  27956          <Relations hip 
  27957           Name="Type Specifier"
  27958          >
  27959                                                                        
  27960           <Entry>
  27961                                                                                  
  27962            <Element 
  27963             Type="SqlT ypeSpecifi er"
  27964            >
  27965                                                                                            
  27966             <Relations hip 
  27967              Name="Type "
  27968             >
  27969                                                                                                     
  27970              <Entry>
  27971                                                                                                               
  27972               <Reference
  27973                ExternalSo urce="Buil tIns" 
  27974                Name="[int ]" 
  27975               />
  27976                                                                                                      
  27977              </Entry>
  27978                                                                                             
  27979             </Relation ship>
  27980                                                                                   
  27981            </Element>
  27982                                                                         
  27983           </Entry>
  27984                                                               
  27985          </Relation ship>
  27986                                                     
  27987         </Element>
  27988                                            
  27989        </Entry>
  27990                                           
  27991        <Entry>
  27992                                                    
  27993         <Element 
  27994          Type="SqlS impleColum n" 
  27995          Name="[Pan elMgmt].[P MMasterLab Index].[Da teExtracte d]"
  27996         >
  27997                                                              
  27998          <Property 
  27999           Name="IsNu llable" 
  28000           Value="Fal se" 
  28001          />
  28002                                                              
  28003          <Relations hip 
  28004           Name="Type Specifier"
  28005          >
  28006                                                                        
  28007           <Entry>
  28008                                                                                  
  28009            <Element 
  28010             Type="SqlT ypeSpecifi er"
  28011            >
  28012                                                                                            
  28013             <Relations hip 
  28014              Name="Type "
  28015             >
  28016                                                                                                     
  28017              <Entry>
  28018                                                                                                               
  28019               <Reference
  28020                ExternalSo urce="Buil tIns" 
  28021                Name="[dat etime]" 
  28022               />
  28023                                                                                                      
  28024              </Entry>
  28025                                                                                             
  28026             </Relation ship>
  28027                                                                                   
  28028            </Element>
  28029                                                                         
  28030           </Entry>
  28031                                                               
  28032          </Relation ship>
  28033                                                     
  28034         </Element>
  28035                                            
  28036        </Entry>
  28037                                           
  28038        <Entry>
  28039                                                    
  28040         <Element 
  28041          Type="SqlS impleColum n" 
  28042          Name="[Pan elMgmt].[P MMasterLab Index].[Te stGroup]"
  28043         >
  28044                                                              
  28045          <Relations hip 
  28046           Name="Type Specifier"
  28047          >
  28048                                                                        
  28049           <Entry>
  28050                                                                                  
  28051            <Element 
  28052             Type="SqlT ypeSpecifi er"
  28053            >
  28054                                                                                            
  28055             <Property 
  28056              Name="Leng th" 
  28057              Value="100
  28058             />
  28059                                                                                            
  28060             <Relations hip 
  28061              Name="Type "
  28062             >
  28063                                                                                                     
  28064              <Entry>
  28065                                                                                                               
  28066               <Reference
  28067                ExternalSo urce="Buil tIns" 
  28068                Name="[var char]" 
  28069               />
  28070                                                                                                      
  28071              </Entry>
  28072                                                                                             
  28073             </Relation ship>
  28074                                                                                   
  28075            </Element>
  28076                                                                         
  28077           </Entry>
  28078                                                               
  28079          </Relation ship>
  28080                                                     
  28081         </Element>
  28082                                            
  28083        </Entry>
  28084                                           
  28085        <Entry>
  28086                                                    
  28087         <Element 
  28088          Type="SqlS impleColum n" 
  28089          Name="[Pan elMgmt].[P MMasterLab Index].[LO INC]"
  28090         >
  28091                                                              
  28092          <Relations hip 
  28093           Name="Type Specifier"
  28094          >
  28095                                                                        
  28096           <Entry>
  28097                                                                                  
  28098            <Element 
  28099             Type="SqlT ypeSpecifi er"
  28100            >
  28101                                                                                            
  28102             <Property 
  28103              Name="Leng th" 
  28104              Value="50"  
  28105             />
  28106                                                                                            
  28107             <Relations hip 
  28108              Name="Type "
  28109             >
  28110                                                                                                     
  28111              <Entry>
  28112                                                                                                               
  28113               <Reference
  28114                ExternalSo urce="Buil tIns" 
  28115                Name="[var char]" 
  28116               />
  28117                                                                                                      
  28118              </Entry>
  28119                                                                                             
  28120             </Relation ship>
  28121                                                                                   
  28122            </Element>
  28123                                                                         
  28124           </Entry>
  28125                                                               
  28126          </Relation ship>
  28127                                                     
  28128         </Element>
  28129                                            
  28130        </Entry>
  28131                                           
  28132        <Entry>
  28133                                                    
  28134         <Element 
  28135          Type="SqlS impleColum n" 
  28136          Name="[Pan elMgmt].[P MMasterLab Index].[Wo rkLoadCode ]"
  28137         >
  28138                                                              
  28139          <Relations hip 
  28140           Name="Type Specifier"
  28141          >
  28142                                                                        
  28143           <Entry>
  28144                                                                                  
  28145            <Element 
  28146             Type="SqlT ypeSpecifi er"
  28147            >
  28148                                                                                            
  28149             <Property 
  28150              Name="Leng th" 
  28151              Value="50"  
  28152             />
  28153                                                                                            
  28154             <Relations hip 
  28155              Name="Type "
  28156             >
  28157                                                                                                     
  28158              <Entry>
  28159                                                                                                               
  28160               <Reference
  28161                ExternalSo urce="Buil tIns" 
  28162                Name="[var char]" 
  28163               />
  28164                                                                                                      
  28165              </Entry>
  28166                                                                                             
  28167             </Relation ship>
  28168                                                                                   
  28169            </Element>
  28170                                                                         
  28171           </Entry>
  28172                                                               
  28173          </Relation ship>
  28174                                                     
  28175         </Element>
  28176                                            
  28177        </Entry>
  28178                                  
  28179       </Relation ship>
  28180                                 
  28181       <Relations hip 
  28182        Name="Sche ma"
  28183       >
  28184                                           
  28185        <Entry>
  28186                                                    
  28187         <Reference
  28188          Name="[Pan elMgmt]" 
  28189         />
  28190                                            
  28191        </Entry>
  28192                                  
  28193       </Relation ship>
  28194                        
  28195      </Element>
  28196                       
  28197      <Element 
  28198       Type="SqlI ndex" 
  28199       Name="[Pan elMgmt].[P MMasterLab Index].[CL _PMMasterL abIndex_La bChemTestS ID_TestGro up]"
  28200      >
  28201                                 
  28202       <Property 
  28203        Name="Fill Factor" 
  28204        Value="95"  
  28205       />
  28206                                 
  28207       <Property 
  28208        Name="IsCl ustered" 
  28209        Value="Tru e" 
  28210       />
  28211                                 
  28212       <Relations hip 
  28213        Name="Colu mnSpecific ations"
  28214       >
  28215                                           
  28216        <Entry>
  28217                                                    
  28218         <Element 
  28219          Type="SqlI ndexedColu mnSpecific ation"
  28220         >
  28221                                                              
  28222          <Relations hip 
  28223           Name="Colu mn"
  28224          >
  28225                                                                        
  28226           <Entry>
  28227                                                                                  
  28228            <Reference
  28229             Name="[Pan elMgmt].[P MMasterLab Index].[La bChemTestS ID]" 
  28230            />
  28231                                                                         
  28232           </Entry>
  28233                                                               
  28234          </Relation ship>
  28235                                                     
  28236         </Element>
  28237                                            
  28238        </Entry>
  28239                                           
  28240        <Entry>
  28241                                                    
  28242         <Element 
  28243          Type="SqlI ndexedColu mnSpecific ation"
  28244         >
  28245                                                              
  28246          <Relations hip 
  28247           Name="Colu mn"
  28248          >
  28249                                                                        
  28250           <Entry>
  28251                                                                                  
  28252            <Reference
  28253             Name="[Pan elMgmt].[P MMasterLab Index].[Te stGroup]" 
  28254            />
  28255                                                                         
  28256           </Entry>
  28257                                                               
  28258          </Relation ship>
  28259                                                     
  28260         </Element>
  28261                                            
  28262        </Entry>
  28263                                  
  28264       </Relation ship>
  28265                                 
  28266       <Relations hip 
  28267        Name="Data Compressio nOptions"
  28268       >
  28269                                           
  28270        <Entry>
  28271                                                    
  28272         <Element 
  28273          Type="SqlD ataCompres sionOption "
  28274         >
  28275                                                              
  28276          <Property 
  28277           Name="Comp ressionLev el" 
  28278           Value="2" 
  28279          />
  28280                                                              
  28281          <Property 
  28282           Name="Part itionNumbe r" 
  28283           Value="1" 
  28284          />
  28285                                                     
  28286         </Element>
  28287                                            
  28288        </Entry>
  28289                                  
  28290       </Relation ship>
  28291                                 
  28292       <Relations hip 
  28293        Name="Inde xedObject"
  28294       >
  28295                                           
  28296        <Entry>
  28297                                                    
  28298         <Reference
  28299          Name="[Pan elMgmt].[P MMasterLab Index]" 
  28300         />
  28301                                            
  28302        </Entry>
  28303                                  
  28304       </Relation ship>
  28305                        
  28306      </Element>
  28307                       
  28308      <Element 
  28309       Type="SqlI ndex" 
  28310       Name="[Pan elMgmt].[P MMasterLab Index].[PM MasterLabI ndex_TestG roup_LabCh emTestName _Sta3n]"
  28311      >
  28312                                 
  28313       <Property 
  28314        Name="Fill Factor" 
  28315        Value="95"  
  28316       />
  28317                                 
  28318       <Relations hip 
  28319        Name="Colu mnSpecific ations"
  28320       >
  28321                                           
  28322        <Entry>
  28323                                                    
  28324         <Element 
  28325          Type="SqlI ndexedColu mnSpecific ation"
  28326         >
  28327                                                              
  28328          <Relations hip 
  28329           Name="Colu mn"
  28330          >
  28331                                                                        
  28332           <Entry>
  28333                                                                                  
  28334            <Reference
  28335             Name="[Pan elMgmt].[P MMasterLab Index].[Te stGroup]" 
  28336            />
  28337                                                                         
  28338           </Entry>
  28339                                                               
  28340          </Relation ship>
  28341                                                     
  28342         </Element>
  28343                                            
  28344        </Entry>
  28345                                           
  28346        <Entry>
  28347                                                    
  28348         <Element 
  28349          Type="SqlI ndexedColu mnSpecific ation"
  28350         >
  28351                                                              
  28352          <Relations hip 
  28353           Name="Colu mn"
  28354          >
  28355                                                                        
  28356           <Entry>
  28357                                                                                  
  28358            <Reference
  28359             Name="[Pan elMgmt].[P MMasterLab Index].[La bChemTestN ame]" 
  28360            />
  28361                                                                         
  28362           </Entry>
  28363                                                               
  28364          </Relation ship>
  28365                                                     
  28366         </Element>
  28367                                            
  28368        </Entry>
  28369                                           
  28370        <Entry>
  28371                                                    
  28372         <Element 
  28373          Type="SqlI ndexedColu mnSpecific ation"
  28374         >
  28375                                                              
  28376          <Relations hip 
  28377           Name="Colu mn"
  28378          >
  28379                                                                        
  28380           <Entry>
  28381                                                                                  
  28382            <Reference
  28383             Name="[Pan elMgmt].[P MMasterLab Index].[St a3n]" 
  28384            />
  28385                                                                         
  28386           </Entry>
  28387                                                               
  28388          </Relation ship>
  28389                                                     
  28390         </Element>
  28391                                            
  28392        </Entry>
  28393                                  
  28394       </Relation ship>
  28395                                 
  28396       <Relations hip 
  28397        Name="Data Compressio nOptions"
  28398       >
  28399                                           
  28400        <Entry>
  28401                                                    
  28402         <Element 
  28403          Type="SqlD ataCompres sionOption "
  28404         >
  28405                                                              
  28406          <Property 
  28407           Name="Comp ressionLev el" 
  28408           Value="2" 
  28409          />
  28410                                                              
  28411          <Property 
  28412           Name="Part itionNumbe r" 
  28413           Value="1" 
  28414          />
  28415                                                     
  28416         </Element>
  28417                                            
  28418        </Entry>
  28419                                  
  28420       </Relation ship>
  28421                                 
  28422       <Relations hip 
  28423        Name="Inde xedObject"
  28424       >
  28425                                           
  28426        <Entry>
  28427                                                    
  28428         <Reference
  28429          Name="[Pan elMgmt].[P MMasterLab Index]" 
  28430         />
  28431                                            
  28432        </Entry>
  28433                                  
  28434       </Relation ship>
  28435                        
  28436      </Element>
  28437                       
  28438      <Element 
  28439       Type="SqlT able" 
  28440       Name="[Pan elMgmt].[P MMasterLab TestGroups Cohort]"
  28441      >
  28442                                 
  28443       <Property 
  28444        Name="IsAn siNullsOn"  
  28445        Value="Tru e" 
  28446       />
  28447                                 
  28448       <Relations hip 
  28449        Name="Colu mns"
  28450       >
  28451                                           
  28452        <Entry>
  28453                                                    
  28454         <Element 
  28455          Type="SqlS impleColum n" 
  28456          Name="[Pan elMgmt].[P MMasterLab TestGroups Cohort].[R owID]"
  28457         >
  28458                                                              
  28459          <Property 
  28460           Name="IsNu llable" 
  28461           Value="Fal se" 
  28462          />
  28463                                                              
  28464          <Property 
  28465           Name="IsId entity" 
  28466           Value="Tru e" 
  28467          />
  28468                                                              
  28469          <Relations hip 
  28470           Name="Type Specifier"
  28471          >
  28472                                                                        
  28473           <Entry>
  28474                                                                                  
  28475            <Element 
  28476             Type="SqlT ypeSpecifi er"
  28477            >
  28478                                                                                            
  28479             <Relations hip 
  28480              Name="Type "
  28481             >
  28482                                                                                                     
  28483              <Entry>
  28484                                                                                                               
  28485               <Reference
  28486                ExternalSo urce="Buil tIns" 
  28487                Name="[int ]" 
  28488               />
  28489                                                                                                      
  28490              </Entry>
  28491                                                                                             
  28492             </Relation ship>
  28493                                                                                   
  28494            </Element>
  28495                                                                         
  28496           </Entry>
  28497                                                               
  28498          </Relation ship>
  28499                                                     
  28500         </Element>
  28501                                            
  28502        </Entry>
  28503                                           
  28504        <Entry>
  28505                                                    
  28506         <Element 
  28507          Type="SqlS impleColum n" 
  28508          Name="[Pan elMgmt].[P MMasterLab TestGroups Cohort].[C ohortIEN]"
  28509         >
  28510                                                              
  28511          <Property 
  28512           Name="IsNu llable" 
  28513           Value="Fal se" 
  28514          />
  28515                                                              
  28516          <Relations hip 
  28517           Name="Type Specifier"
  28518          >
  28519                                                                        
  28520           <Entry>
  28521                                                                                  
  28522            <Element 
  28523             Type="SqlT ypeSpecifi er"
  28524            >
  28525                                                                                            
  28526             <Relations hip 
  28527              Name="Type "
  28528             >
  28529                                                                                                     
  28530              <Entry>
  28531                                                                                                               
  28532               <Reference
  28533                ExternalSo urce="Buil tIns" 
  28534                Name="[int ]" 
  28535               />
  28536                                                                                                      
  28537              </Entry>
  28538                                                                                             
  28539             </Relation ship>
  28540                                                                                   
  28541            </Element>
  28542                                                                         
  28543           </Entry>
  28544                                                               
  28545          </Relation ship>
  28546                                                     
  28547         </Element>
  28548                                            
  28549        </Entry>
  28550                                           
  28551        <Entry>
  28552                                                    
  28553         <Element 
  28554          Type="SqlS impleColum n" 
  28555          Name="[Pan elMgmt].[P MMasterLab TestGroups Cohort].[C ohort]"
  28556         >
  28557                                                              
  28558          <Relations hip 
  28559           Name="Type Specifier"
  28560          >
  28561                                                                        
  28562           <Entry>
  28563                                                                                  
  28564            <Element 
  28565             Type="SqlT ypeSpecifi er"
  28566            >
  28567                                                                                            
  28568             <Property 
  28569              Name="Leng th" 
  28570              Value="30"  
  28571             />
  28572                                                                                            
  28573             <Relations hip 
  28574              Name="Type "
  28575             >
  28576                                                                                                     
  28577              <Entry>
  28578                                                                                                               
  28579               <Reference
  28580                ExternalSo urce="Buil tIns" 
  28581                Name="[var char]" 
  28582               />
  28583                                                                                                      
  28584              </Entry>
  28585                                                                                             
  28586             </Relation ship>
  28587                                                                                   
  28588            </Element>
  28589                                                                         
  28590           </Entry>
  28591                                                               
  28592          </Relation ship>
  28593                                                     
  28594         </Element>
  28595                                            
  28596        </Entry>
  28597                                           
  28598        <Entry>
  28599                                                    
  28600         <Element 
  28601          Type="SqlS impleColum n" 
  28602          Name="[Pan elMgmt].[P MMasterLab TestGroups Cohort].[T estGroup]"
  28603         >
  28604                                                              
  28605          <Relations hip 
  28606           Name="Type Specifier"
  28607          >
  28608                                                                        
  28609           <Entry>
  28610                                                                                  
  28611            <Element 
  28612             Type="SqlT ypeSpecifi er"
  28613            >
  28614                                                                                            
  28615             <Property 
  28616              Name="Leng th" 
  28617              Value="30"  
  28618             />
  28619                                                                                            
  28620             <Relations hip 
  28621              Name="Type "
  28622             >
  28623                                                                                                     
  28624              <Entry>
  28625                                                                                                               
  28626               <Reference
  28627                ExternalSo urce="Buil tIns" 
  28628                Name="[var char]" 
  28629               />
  28630                                                                                                      
  28631              </Entry>
  28632                                                                                             
  28633             </Relation ship>
  28634                                                                                   
  28635            </Element>
  28636                                                                         
  28637           </Entry>
  28638                                                               
  28639          </Relation ship>
  28640                                                     
  28641         </Element>
  28642                                            
  28643        </Entry>
  28644                                  
  28645       </Relation ship>
  28646                                 
  28647       <Relations hip 
  28648        Name="Sche ma"
  28649       >
  28650                                           
  28651        <Entry>
  28652                                                    
  28653         <Reference
  28654          Name="[Pan elMgmt]" 
  28655         />
  28656                                            
  28657        </Entry>
  28658                                  
  28659       </Relation ship>
  28660                                 
  28661       <AttachedA nnotation 
  28662        Disambigua tor="20" 
  28663       />
  28664                        
  28665      </Element>
  28666                       
  28667      <Element 
  28668       Type="SqlP rocedure" 
  28669       Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC]"
  28670      >
  28671                                 
  28672       <Property 
  28673        Name="Body Script"
  28674       >
  28675                                           
  28676        <Value>
  28677         <![CDATA[
  28678         --======== ========== ========== ========== ========== ========== ========== ========== ===
  28679         --Requesto r                                : Jianji Y ang
  28680         --Author                  : Jerr y Kohler ( Original s cript by S teve Schre iner)
  28681         --Object/S P Name                  : [Panel Mgmt].[usp _PMUpdateM asterLabIn dexfromLOI NC]
  28682         --SERVER                                    SERVER       
  28683         --Data Bas e                                : NWIC_Pan elMgmt
  28684         --Schema                                    : PanelMgm t
  28685         --Report                                    : None Yet
  28686         --Folder                                    :
  28687         --Report L oc             : 
  28688         --Job                     : None
  28689         --Job Loc                 : None
  28690         --Note                    : 
  28691         --Date Cre ated           : 12-2 8-2015
  28692         --Last Cha nged           :   
  28693         --Last Cha nged By                 : 
  28694         --Reason F or Change               :                                 
  28695         --Purpose                 : Upda te Panel M anagement  Master Lab  Index tab le 
  28696         --                          with  lab test  that have  valid LOIN C codes.   This is do ne
  28697         --                          thro ugh the BI SL's incre mental upd ate method  in the fi rst
  28698         --                          sect ion.  This  is done t o decrease  the proce ssing time
  28699         --                          and  conserve s erver reso urces.
  28700         --======== ========== ========== ========== ========== ========== ========== ========== ===
  28701         SET NOCOUN T on
  28702        
  28703         BEGIN
  28704             /* 
  28705             Locate  and load  the outsta nding Chem .LabChem b atches sin ce the
  28706             last e xecution r ather than  processin g the enti re Chem.La bChem view .
  28707             */
  28708        
  28709                 -- declare ba tch variab les and cu rsor
  28710                 DE CLARE @ETL BatchID    AS INT, @E xtractBatc hID AS INT ;
  28711                 DE CLARE @DWV iewSchema  AS VARCHAR (50) = 'Ch em';
  28712                 DE CLARE @DWV iewName    AS VARCHAR (50) = 'La bChem';
  28713        
  28714        
  28715             DECLAR E BatchCur sor CURSOR  STATIC FO R
  28716                 -- get batch  ids
  28717                     SELECT EX .ETLBatchI D, EX.Extr actBatchID
  28718                     FROM SPV. EB.Extract Batch AS E X
  28719                     INNER JOI N Dflt.Ext ractBatchL og AS EL
  28720                         ON EX .DWViewSch ema = EL.D WViewSchem a AND EX.D WViewName  = EL.DWVie wName
  28721                     WHERE EX. DWViewSche ma = @DWVi ewSchema
  28722                  A ND EX.DWVi ewName   =  @DWViewNa me
  28723                  A ND EX.Extr actBatchID  > EL.Last ExtractBat chID
  28724                     ORDER BY  EX.Extract BatchID;
  28725        
  28726                 OP EN BatchCu rsor;
  28727                 FE TCH NEXT F ROM BatchC ursor INTO  @ETLBatch ID, @Extra ctBatchID;
  28728        
  28729                 WH ILE @@FETC H_STATUS =  0
  28730                 BE GIN
  28731        
  28732                 IF  (SELECT O BJECT_ID(' tempdb..#L abChemPrep ')) IS NOT  NULL
  28733                 DR OP TABLE # LabChemPre p
  28734        
  28735                          -- t he lab res ults load  table has  duplicate  records, w hich the
  28736                 --  MERGE sta tement wil l not tole rate.  Try  and get t he latest
  28737                 --  record fo r each Lab ChemTestSI D in the b atch by so rting on
  28738                 --  specimen  date time  descending  within th at LabChem TestSID
  28739                          SELE CT [Sta3n]
  28740                        ,[LabC hemTestSID ]
  28741                        ,[LOIN CSID]
  28742                        ,[LabC hemSpecime nDateTime]
  28743                        ,[LabC hemComplet eDateTime]
  28744                        ,[ETLB atchID]
  28745                        ,[OpCo de]
  28746                        ,[Vist aCreateDat e]
  28747                        ,[Vist aEditDate]
  28748                        ,row_n umber() ov er (Partit ion by Lab ChemTestSI D
  28749                                                  or der by Lab ChemTestSI D, LabChem SpecimenDa teTime DES C) AS RN
  28750                 IN TO #LabChe mPrep
  28751                          FROM  SPV.Chem. LabChem
  28752                          WHER E ETLBatch ID = @ETLB atchID             
  28753        
  28754                          -- m erge data  into produ ction(dest ination) t able
  28755                          MERG
  28756                                   ETL.Pr odLabChem  AS D
  28757                          USIN G
  28758                                   (
  28759                                            SELECT [ Sta3n]
  28760                                 ,[LabChe mTestSID]
  28761                                 ,[LOINCS ID]
  28762                                 ,[LabChe mSpecimenD ateTime]
  28763                                 ,[LabChe mCompleteD ateTime]
  28764                                 ,[ETLBat chID]
  28765                                 ,[OpCode ]
  28766                                 ,[VistaC reateDate]
  28767                                 ,[VistaE ditDate]
  28768                                 ,RN
  28769                                            FROM #La bChemPrep
  28770                                            WHERE ET LBatchID =  @ETLBatch ID
  28771                            AN D RN = 1 - - the late st record  for a give n LabChemT estSID
  28772                                   ) AS M
  28773                          ON
  28774                                   D.LabC hemTestSID  = M.LabCh emTestSID
  28775                          WHEN  NOT MATCH ED THEN
  28776                                   INSERT
  28777                                            (
  28778                                                        [Sta3n]
  28779                                 ,[LabChe mTestSID]
  28780                                 ,[LOINCS ID]
  28781                                 ,[LabChe mSpecimenD ateTime]
  28782                                 ,[LabChe mCompleteD ateTime]
  28783                                 ,[ETLBat chID]
  28784                                 ,[OpCode ]
  28785                                 ,[VistaC reateDate]
  28786                                 ,[VistaE ditDate]
  28787                                            )
  28788                                   VALUES
  28789                                            (
  28790                                M.[Sta3n]
  28791                               ,M.[LabChe mTestSID]
  28792                               ,M.[LOINCS ID]
  28793                               ,M.[LabChe mSpecimenD ateTime]
  28794                               ,M.[LabChe mCompleteD ateTime]
  28795                               ,M.[ETLBat chID]
  28796                               ,M.[OpCode ]
  28797                               ,M.[VistaC reateDate]
  28798                               ,M.[VistaE ditDate]
  28799        
  28800                                            )
  28801                          WHEN  MATCHED T HEN
  28802                                   UPDATE  SET
  28803                                  [Sta3n]                     =  M.[Sta3n]
  28804                                                       ,[LabChe mTestSID]           =  M.[LabChe mTestSID]
  28805                                 ,[LOINCS ID]                 =  M.[LOINCS ID]
  28806                                 ,[LabChe mSpecimenD ateTime] =  M.[LabChe mSpecimenD ateTime]
  28807                                 ,[LabChe mCompleteD ateTime] =  M.[LabChe mCompleteD ateTime]
  28808                                 ,[ETLBat chID]               =  M.[ETLBat chID]
  28809                                 ,[OpCode ]                   =  M.[OpCode ]
  28810                                 ,[VistaC reateDate]          =  M.[VistaC reateDate]
  28811                                 ,[VistaE ditDate]            =  M.[VistaE ditDate]
  28812                          ;
  28813        
  28814                          -- a fter mergi ng batch t hen update  the Extra ctBatchLog  table
  28815                          UPDA TE Dflt.Ex tractBatch Log
  28816                             S ET LastExt ractBatchI D = @Extra ctBatchID,  LastExtra ctDateTime  = GETDATE ()
  28817                  W HERE DWVie wSchema =  @DWViewSch ema
  28818                     AND DWVie wName   =  @DWViewNam e;
  28819        
  28820                          -- g rab the ne xt batch f or process ing
  28821                          FETC H NEXT FRO M BatchCur sor INTO @ ETLBatchID , @Extract BatchID;
  28822                 EN D
  28823        
  28824                 --  close and  deallocat e the curs or once al l batches  for a give n table ha ve been pr ocessed
  28825                 CL OSE BatchC ursor;
  28826                 DE ALLOCATE B atchCursor ;
  28827        
  28828         --
  28829         --
  28830         --
  28831         --  Using  the increm entally up dated ETL. ProdLabChe m rather t han the fu ll
  28832         --  CDWWor k.Dim.Labc hem view,  insert new  lab tests  into [Pan elMgmt].[P MMasterLab Index] 
  28833         --
  28834         --
  28835         --
  28836            -- all  LOINC SIDS  for all s tations de fined in P MMasterCoh ortSite
  28837            IF (SEL ECT OBJECT _ID('tempd b..#TempLO INCSID'))  IS NOT NUL L
  28838            DROP TA BLE #TempL OINCSID
  28839        
  28840            select  li.LOINCSI D
  28841                    ,li.Sta3n
  28842                    ,lc.LOINC
  28843                    ,lc.TestGr oup
  28844                    ,lc.Result ForTestNum eric
  28845                    ,dateadd(y y,lc.YearS earchCrite ria,getdat e()) as Ye arSearchDa te
  28846            into #T empLOINCSI D
  28847            from [P anelMgmt]. [PMMasterC ohortLabTe stGroupsLO INCCodes]  as lc
  28848            inner j oin [CDWWo rk].[Dim]. [LOINC] as  li on lc. LOINC = li .LOINC
  28849            inner j oin [Panel Mgmt].[PMM asterCohor tSite] as  cs on li.S ta3n = cs. Sta3n;
  28850        
  28851        
  28852            -- base d on LOINC  codes, ar e there an y new lab  tests we d o NOT
  28853            -- alre ady have i n PMMaster LabIndex?
  28854            IF (SEL ECT OBJECT _ID('tempd b..#Insert TheseRecor ds')) IS N OT NULL
  28855            DROP TA BLE #Inser tTheseReco rds
  28856        
  28857            select  distinct l i.LabChemT estSID
  28858                                              ,li.St a3n
  28859                                              ,li.La bChemTestN ame
  28860                                              ,tl.Re sultForTes tNumeric
  28861                                              ,getda te() as Da teExtracte d
  28862                                              ,tl.Te stGroup
  28863                                              ,tl.LO INC
  28864                                              ,NULL  as WorkLoa dCode
  28865            into          #Ins ertTheseRe cords
  28866            from                   [ETL]. ProdLabChe m lc
  28867            inner j oin   [CDW Work].[Dim ].[LabChem Test] as l i on lc.La bChemTestS ID = li.La bChemTestS ID
  28868            inner j oin   #Tem pLOINCSID  tl on lc.S ta3n = li. Sta3n AND  lc.LabChem CompleteDa teTime > t l.YearSear chDate
  28869            where         lc.L OINCSID =  tl.LOINCSI D
  28870              and         not  exists (se lect ni.La bChemTestS ID
  28871                                                           from  [PanelMgm t].[PMMast erLabIndex ] as ni
  28872                                                                   where l i.LabChemT estSID = n i.LabChemT estSID
  28873                                                                         a nd li.Sta3 n = ni.Sta 3n);
  28874        
  28875            Insert  into [Pane lMgmt].[PM MasterLabI ndex]
  28876            (
  28877               LabC hemTestSID ,
  28878               Sta3 n,
  28879               LabC hemTestNam e,
  28880               Resu ltForTestN umeric,
  28881               Date Extracted,
  28882               Test Group,
  28883               LOIN C,
  28884               Work LoadCode
  28885            )
  28886            Select  LabChemTes tSID,
  28887                    Sta3n,
  28888                    LabChemTes tName,
  28889                    ResultForT estNumeric ,
  28890                    DateExtrac ted,
  28891                    TestGroup,
  28892                    LOINC,
  28893                    WorkLoadCo de
  28894             From # InsertThes eRecords
  28895            
  28896            Drop ta ble #Inser tTheseReco rds
  28897         --select t op 1000 *  from #Inse rtTheseRec ords
  28898         --select *  from #Ins ertTheseRe cords wher e LabChemT estSID in  (select La bChemTestS ID from [P anelMgmt]. [PMMasterL abIndex])
  28899         --select d istinct da teextracte d from #In sertTheseR ecords
  28900         --select c ount(*) fr om #Insert TheseRecor ds
  28901         --select a .*, b.* fr om #Insert TheseRecor ds a join  cdwwork.di m.labchemt est b on b .LabChemTe stSID = a. LabChemTes tSID
  28902         --select a .* from #I nsertThese Records a  join cdwwo rk.dim.lab chemtest b  on b.LabC hemTestSID  = a.LabCh emTestSID  where b.St a3n != a.S ta3n
  28903        
  28904            UPDATE  [PanelMgmt ].[PMMaste rCohortLab TestGroups LOINCCodes ]
  28905               set  LastUpdate  = cast(ge tdate() as  date);
  28906        
  28907         END]]>
  28908        </Value>
  28909                                  
  28910       </Property >
  28911                                 
  28912       <Property 
  28913        Name="IsAn siNullsOn"  
  28914        Value="Tru e" 
  28915       />
  28916                                 
  28917       <Relations hip 
  28918        Name="Body Dependenci es"
  28919       >
  28920                                           
  28921        <Entry>
  28922                                                    
  28923         <Reference
  28924          ExternalSo urce="Buil tIns" 
  28925          Name="[int ]" 
  28926         />
  28927                                            
  28928        </Entry>
  28929                                           
  28930        <Entry>
  28931                                                    
  28932         <Reference
  28933          ExternalSo urce="Buil tIns" 
  28934          Name="[int ]" 
  28935         />
  28936                                            
  28937        </Entry>
  28938                                           
  28939        <Entry>
  28940                                                    
  28941         <Reference
  28942          ExternalSo urce="Buil tIns" 
  28943          Name="[var char]" 
  28944         />
  28945                                            
  28946        </Entry>
  28947                                           
  28948        <Entry>
  28949                                                    
  28950         <Reference
  28951          ExternalSo urce="Buil tIns" 
  28952          Name="[var char]" 
  28953         />
  28954                                            
  28955        </Entry>
  28956                                           
  28957        <Entry>
  28958                                                    
  28959         <Reference
  28960          ExternalSo urce="SPV. dacpac" 
  28961          Name="[SPV ]|[EB].[Ex tractBatch ]" 
  28962         />
  28963                                            
  28964        </Entry>
  28965                                           
  28966        <Entry>
  28967                                                    
  28968         <Reference
  28969          Name="[Dfl t].[Extrac tBatchLog]
  28970         />
  28971                                            
  28972        </Entry>
  28973                                           
  28974        <Entry>
  28975                                                    
  28976         <Reference
  28977          ExternalSo urce="SPV. dacpac" 
  28978          Name="[SPV ]|[EB].[Ex tractBatch ].[DWViewS chema]" 
  28979         />
  28980                                            
  28981        </Entry>
  28982                                           
  28983        <Entry>
  28984                                                    
  28985         <Reference
  28986          Name="[Dfl t].[Extrac tBatchLog] .[DWViewSc hema]" 
  28987         />
  28988                                            
  28989        </Entry>
  28990                                           
  28991        <Entry>
  28992                                                    
  28993         <Reference
  28994          ExternalSo urce="SPV. dacpac" 
  28995          Name="[SPV ]|[EB].[Ex tractBatch ].[DWViewN ame]" 
  28996         />
  28997                                            
  28998        </Entry>
  28999                                           
  29000        <Entry>
  29001                                                    
  29002         <Reference
  29003          Name="[Dfl t].[Extrac tBatchLog] .[DWViewNa me]" 
  29004         />
  29005                                            
  29006        </Entry>
  29007                                           
  29008        <Entry>
  29009                                                    
  29010         <Reference
  29011          ExternalSo urce="SPV. dacpac" 
  29012          Name="[SPV ]|[EB].[Ex tractBatch ].[ETLBatc hID]" 
  29013         />
  29014                                            
  29015        </Entry>
  29016                                           
  29017        <Entry>
  29018                                                    
  29019         <Reference
  29020          ExternalSo urce="SPV. dacpac" 
  29021          Name="[SPV ]|[EB].[Ex tractBatch ].[Extract BatchID]" 
  29022         />
  29023                                            
  29024        </Entry>
  29025                                           
  29026        <Entry>
  29027                                                    
  29028         <Reference
  29029          Name="[Dfl t].[Extrac tBatchLog] .[LastExtr actBatchID ]" 
  29030         />
  29031                                            
  29032        </Entry>
  29033                                           
  29034        <Entry>
  29035                                                    
  29036         <Reference
  29037          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep]
  29038         />
  29039                                            
  29040        </Entry>
  29041                                           
  29042        <Entry>
  29043                                                    
  29044         <Reference
  29045          ExternalSo urce="SPV. dacpac" 
  29046          Name="[SPV ]|[Chem].[ LabChem]" 
  29047         />
  29048                                            
  29049        </Entry>
  29050                                           
  29051        <Entry>
  29052                                                    
  29053         <Reference
  29054          ExternalSo urce="SPV. dacpac" 
  29055          Name="[SPV ]|[Chem].[ LabChem].[ Sta3n]" 
  29056         />
  29057                                            
  29058        </Entry>
  29059                                           
  29060        <Entry>
  29061                                                    
  29062         <Reference
  29063          ExternalSo urce="SPV. dacpac" 
  29064          Name="[SPV ]|[Chem].[ LabChem].[ LabChemTes tSID]" 
  29065         />
  29066                                            
  29067        </Entry>
  29068                                           
  29069        <Entry>
  29070                                                    
  29071         <Reference
  29072          ExternalSo urce="SPV. dacpac" 
  29073          Name="[SPV ]|[Chem].[ LabChem].[ LOINCSID]"  
  29074         />
  29075                                            
  29076        </Entry>
  29077                                           
  29078        <Entry>
  29079                                                    
  29080         <Reference
  29081          ExternalSo urce="SPV. dacpac" 
  29082          Name="[SPV ]|[Chem].[ LabChem].[ LabChemSpe cimenDateT ime]" 
  29083         />
  29084                                            
  29085        </Entry>
  29086                                           
  29087        <Entry>
  29088                                                    
  29089         <Reference
  29090          ExternalSo urce="SPV. dacpac" 
  29091          Name="[SPV ]|[Chem].[ LabChem].[ LabChemCom pleteDateT ime]" 
  29092         />
  29093                                            
  29094        </Entry>
  29095                                           
  29096        <Entry>
  29097                                                    
  29098         <Reference
  29099          ExternalSo urce="SPV. dacpac" 
  29100          Name="[SPV ]|[Chem].[ LabChem].[ ETLBatchID ]" 
  29101         />
  29102                                            
  29103        </Entry>
  29104                                           
  29105        <Entry>
  29106                                                    
  29107         <Reference
  29108          ExternalSo urce="SPV. dacpac" 
  29109          Name="[SPV ]|[Chem].[ LabChem].[ OpCode]" 
  29110         />
  29111                                            
  29112        </Entry>
  29113                                           
  29114        <Entry>
  29115                                                    
  29116         <Reference
  29117          ExternalSo urce="SPV. dacpac" 
  29118          Name="[SPV ]|[Chem].[ LabChem].[ VistaCreat eDate]" 
  29119         />
  29120                                            
  29121        </Entry>
  29122                                           
  29123        <Entry>
  29124                                                    
  29125         <Reference
  29126          ExternalSo urce="SPV. dacpac" 
  29127          Name="[SPV ]|[Chem].[ LabChem].[ VistaEditD ate]" 
  29128         />
  29129                                            
  29130        </Entry>
  29131                                           
  29132        <Entry>
  29133                                                    
  29134         <Reference
  29135          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[Sta3n]" 
  29136         />
  29137                                            
  29138        </Entry>
  29139                                           
  29140        <Entry>
  29141                                                    
  29142         <Reference
  29143          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LabChemT estSID]" 
  29144         />
  29145                                            
  29146        </Entry>
  29147                                           
  29148        <Entry>
  29149                                                    
  29150         <Reference
  29151          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LOINCSID ]" 
  29152         />
  29153                                            
  29154        </Entry>
  29155                                           
  29156        <Entry>
  29157                                                    
  29158         <Reference
  29159          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LabChemS pecimenDat eTime]" 
  29160         />
  29161                                            
  29162        </Entry>
  29163                                           
  29164        <Entry>
  29165                                                    
  29166         <Reference
  29167          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LabChemC ompleteDat eTime]" 
  29168         />
  29169                                            
  29170        </Entry>
  29171                                           
  29172        <Entry>
  29173                                                    
  29174         <Reference
  29175          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[ETLBatch ID]" 
  29176         />
  29177                                            
  29178        </Entry>
  29179                                           
  29180        <Entry>
  29181                                                    
  29182         <Reference
  29183          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[OpCode]"  
  29184         />
  29185                                            
  29186        </Entry>
  29187                                           
  29188        <Entry>
  29189                                                    
  29190         <Reference
  29191          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[VistaCre ateDate]" 
  29192         />
  29193                                            
  29194        </Entry>
  29195                                           
  29196        <Entry>
  29197                                                    
  29198         <Reference
  29199          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[VistaEdi tDate]" 
  29200         />
  29201                                            
  29202        </Entry>
  29203                                           
  29204        <Entry>
  29205                                                    
  29206         <Reference
  29207          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[RN]" 
  29208         />
  29209                                            
  29210        </Entry>
  29211                                           
  29212        <Entry>
  29213                                                    
  29214         <Reference
  29215          Name="[ETL ].[ProdLab Chem]" 
  29216         />
  29217                                            
  29218        </Entry>
  29219                                           
  29220        <Entry>
  29221                                                    
  29222         <Reference
  29223          Name="[ETL ].[ProdLab Chem].[Lab ChemTestSI D]" 
  29224         />
  29225                                            
  29226        </Entry>
  29227                                           
  29228        <Entry>
  29229                                                    
  29230         <Reference
  29231          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LabChemT estSID]" 
  29232         />
  29233                                            
  29234        </Entry>
  29235                                           
  29236        <Entry>
  29237                                                    
  29238         <Reference
  29239          Name="[ETL ].[ProdLab Chem].[Sta 3n]" 
  29240         />
  29241                                            
  29242        </Entry>
  29243                                           
  29244        <Entry>
  29245                                                    
  29246         <Reference
  29247          Name="[ETL ].[ProdLab Chem].[Lab ChemTestSI D]" 
  29248         />
  29249                                            
  29250        </Entry>
  29251                                           
  29252        <Entry>
  29253                                                    
  29254         <Reference
  29255          Name="[ETL ].[ProdLab Chem].[LOI NCSID]" 
  29256         />
  29257                                            
  29258        </Entry>
  29259                                           
  29260        <Entry>
  29261                                                    
  29262         <Reference
  29263          Name="[ETL ].[ProdLab Chem].[Lab ChemSpecim enDateTime ]" 
  29264         />
  29265                                            
  29266        </Entry>
  29267                                           
  29268        <Entry>
  29269                                                    
  29270         <Reference
  29271          Name="[ETL ].[ProdLab Chem].[Lab ChemComple teDateTime ]" 
  29272         />
  29273                                            
  29274        </Entry>
  29275                                           
  29276        <Entry>
  29277                                                    
  29278         <Reference
  29279          Name="[ETL ].[ProdLab Chem].[ETL BatchID]" 
  29280         />
  29281                                            
  29282        </Entry>
  29283                                           
  29284        <Entry>
  29285                                                    
  29286         <Reference
  29287          Name="[ETL ].[ProdLab Chem].[OpC ode]" 
  29288         />
  29289                                            
  29290        </Entry>
  29291                                           
  29292        <Entry>
  29293                                                    
  29294         <Reference
  29295          Name="[ETL ].[ProdLab Chem].[Vis taCreateDa te]" 
  29296         />
  29297                                            
  29298        </Entry>
  29299                                           
  29300        <Entry>
  29301                                                    
  29302         <Reference
  29303          Name="[ETL ].[ProdLab Chem].[Vis taEditDate ]" 
  29304         />
  29305                                            
  29306        </Entry>
  29307                                           
  29308        <Entry>
  29309                                                    
  29310         <Reference
  29311          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[Sta3n]" 
  29312         />
  29313                                            
  29314        </Entry>
  29315                                           
  29316        <Entry>
  29317                                                    
  29318         <Reference
  29319          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LOINCSID ]" 
  29320         />
  29321                                            
  29322        </Entry>
  29323                                           
  29324        <Entry>
  29325                                                    
  29326         <Reference
  29327          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LabChemS pecimenDat eTime]" 
  29328         />
  29329                                            
  29330        </Entry>
  29331                                           
  29332        <Entry>
  29333                                                    
  29334         <Reference
  29335          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LabChemC ompleteDat eTime]" 
  29336         />
  29337                                            
  29338        </Entry>
  29339                                           
  29340        <Entry>
  29341                                                    
  29342         <Reference
  29343          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[ETLBatch ID]" 
  29344         />
  29345                                            
  29346        </Entry>
  29347                                           
  29348        <Entry>
  29349                                                    
  29350         <Reference
  29351          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[OpCode]"  
  29352         />
  29353                                            
  29354        </Entry>
  29355                                           
  29356        <Entry>
  29357                                                    
  29358         <Reference
  29359          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[VistaCre ateDate]" 
  29360         />
  29361                                            
  29362        </Entry>
  29363                                           
  29364        <Entry>
  29365                                                    
  29366         <Reference
  29367          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[VistaEdi tDate]" 
  29368         />
  29369                                            
  29370        </Entry>
  29371                                           
  29372        <Entry>
  29373                                                    
  29374         <Reference
  29375          Name="[Dfl t].[Extrac tBatchLog] .[LastExtr actBatchID ]" 
  29376         />
  29377                                            
  29378        </Entry>
  29379                                           
  29380        <Entry>
  29381                                                    
  29382         <Reference
  29383          Name="[Dfl t].[Extrac tBatchLog] .[LastExtr actDateTim e]" 
  29384         />
  29385                                            
  29386        </Entry>
  29387                                           
  29388        <Entry>
  29389                                                    
  29390         <Reference
  29391          Name="[Dfl t].[Extrac tBatchLog] .[DWViewSc hema]" 
  29392         />
  29393                                            
  29394        </Entry>
  29395                                           
  29396        <Entry>
  29397                                                    
  29398         <Reference
  29399          Name="[Dfl t].[Extrac tBatchLog] .[DWViewNa me]" 
  29400         />
  29401                                            
  29402        </Entry>
  29403                                           
  29404        <Entry>
  29405                                                    
  29406         <Reference
  29407          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ]" 
  29408         />
  29409                                            
  29410        </Entry>
  29411                                           
  29412        <Entry>
  29413                                                    
  29414         <Reference
  29415          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes]" 
  29416         />
  29417                                            
  29418        </Entry>
  29419                                           
  29420        <Entry>
  29421                                                    
  29422         <Reference
  29423          ExternalSo urce="CDWW ork.dacpac
  29424          Name="[CDW Work]|[Dim ].[LOINC]"  
  29425         />
  29426                                            
  29427        </Entry>
  29428                                           
  29429        <Entry>
  29430                                                    
  29431         <Reference
  29432          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[L OINC]" 
  29433         />
  29434                                            
  29435        </Entry>
  29436                                           
  29437        <Entry>
  29438                                                    
  29439         <Reference
  29440          ExternalSo urce="CDWW ork.dacpac
  29441          Name="[CDW Work]|[Dim ].[LOINC]. [LOINC]" 
  29442         />
  29443                                            
  29444        </Entry>
  29445                                           
  29446        <Entry>
  29447                                                    
  29448         <Reference
  29449          Name="[Pan elMgmt].[P MMasterCoh ortSite]" 
  29450         />
  29451                                            
  29452        </Entry>
  29453                                           
  29454        <Entry>
  29455                                                    
  29456         <Reference
  29457          ExternalSo urce="CDWW ork.dacpac
  29458          Name="[CDW Work]|[Dim ].[LOINC]. [Sta3n]" 
  29459         />
  29460                                            
  29461        </Entry>
  29462                                           
  29463        <Entry>
  29464                                                    
  29465         <Reference
  29466          Name="[Pan elMgmt].[P MMasterCoh ortSite].[ Sta3n]" 
  29467         />
  29468                                            
  29469        </Entry>
  29470                                           
  29471        <Entry>
  29472                                                    
  29473         <Reference
  29474          ExternalSo urce="CDWW ork.dacpac
  29475          Name="[CDW Work]|[Dim ].[LOINC]. [LOINCSID]
  29476         />
  29477                                            
  29478        </Entry>
  29479                                           
  29480        <Entry>
  29481                                                    
  29482         <Reference
  29483          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[L OINC]" 
  29484         />
  29485                                            
  29486        </Entry>
  29487                                           
  29488        <Entry>
  29489                                                    
  29490         <Reference
  29491          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[T estGroup]"  
  29492         />
  29493                                            
  29494        </Entry>
  29495                                           
  29496        <Entry>
  29497                                                    
  29498         <Reference
  29499          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[R esultForTe stNumeric]
  29500         />
  29501                                            
  29502        </Entry>
  29503                                           
  29504        <Entry>
  29505                                                    
  29506         <Reference
  29507          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[Y earSearchC riteria]" 
  29508         />
  29509                                            
  29510        </Entry>
  29511                                           
  29512        <Entry>
  29513                                                    
  29514         <Reference
  29515          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords]" 
  29516         />
  29517                                            
  29518        </Entry>
  29519                                           
  29520        <Entry>
  29521                                                    
  29522         <Reference
  29523          ExternalSo urce="CDWW ork.dacpac
  29524          Name="[CDW Work]|[Dim ].[LabChem Test]" 
  29525         />
  29526                                            
  29527        </Entry>
  29528                                           
  29529        <Entry>
  29530                                                    
  29531         <Reference
  29532          Name="[ETL ].[ProdLab Chem].[Lab ChemTestSI D]" 
  29533         />
  29534                                            
  29535        </Entry>
  29536                                           
  29537        <Entry>
  29538                                                    
  29539         <Reference
  29540          ExternalSo urce="CDWW ork.dacpac
  29541          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestSI D]" 
  29542         />
  29543                                            
  29544        </Entry>
  29545                                           
  29546        <Entry>
  29547                                                    
  29548         <Reference
  29549          Name="[ETL ].[ProdLab Chem].[Sta 3n]" 
  29550         />
  29551                                            
  29552        </Entry>
  29553                                           
  29554        <Entry>
  29555                                                    
  29556         <Reference
  29557          ExternalSo urce="CDWW ork.dacpac
  29558          Name="[CDW Work]|[Dim ].[LabChem Test].[Sta 3n]" 
  29559         />
  29560                                            
  29561        </Entry>
  29562                                           
  29563        <Entry>
  29564                                                    
  29565         <Reference
  29566          Name="[ETL ].[ProdLab Chem].[Lab ChemComple teDateTime ]" 
  29567         />
  29568                                            
  29569        </Entry>
  29570                                           
  29571        <Entry>
  29572                                                    
  29573         <Reference
  29574          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[YearSea rchDate]" 
  29575         />
  29576                                            
  29577        </Entry>
  29578                                           
  29579        <Entry>
  29580                                                    
  29581         <Reference
  29582          ExternalSo urce="CDWW ork.dacpac
  29583          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestSI D]" 
  29584         />
  29585                                            
  29586        </Entry>
  29587                                           
  29588        <Entry>
  29589                                                    
  29590         <Reference
  29591          ExternalSo urce="CDWW ork.dacpac
  29592          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestNa me]" 
  29593         />
  29594                                            
  29595        </Entry>
  29596                                           
  29597        <Entry>
  29598                                                    
  29599         <Reference
  29600          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[ResultF orTestNume ric]" 
  29601         />
  29602                                            
  29603        </Entry>
  29604                                           
  29605        <Entry>
  29606                                                    
  29607         <Reference
  29608          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[TestGro up]" 
  29609         />
  29610                                            
  29611        </Entry>
  29612                                           
  29613        <Entry>
  29614                                                    
  29615         <Reference
  29616          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[LOINC]"  
  29617         />
  29618                                            
  29619        </Entry>
  29620                                           
  29621        <Entry>
  29622                                                    
  29623         <Reference
  29624          Name="[ETL ].[ProdLab Chem].[LOI NCSID]" 
  29625         />
  29626                                            
  29627        </Entry>
  29628                                           
  29629        <Entry>
  29630                                                    
  29631         <Reference
  29632          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[LOINCSI D]" 
  29633         />
  29634                                            
  29635        </Entry>
  29636                                           
  29637        <Entry>
  29638                                                    
  29639         <Reference
  29640          Name="[Pan elMgmt].[P MMasterLab Index]" 
  29641         />
  29642                                            
  29643        </Entry>
  29644                                           
  29645        <Entry>
  29646                                                    
  29647         <Reference
  29648          Name="[Pan elMgmt].[P MMasterLab Index].[La bChemTestS ID]" 
  29649         />
  29650                                            
  29651        </Entry>
  29652                                           
  29653        <Entry>
  29654                                                    
  29655         <Reference
  29656          ExternalSo urce="CDWW ork.dacpac
  29657          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestSI D]" 
  29658         />
  29659                                            
  29660        </Entry>
  29661                                           
  29662        <Entry>
  29663                                                    
  29664         <Reference
  29665          ExternalSo urce="CDWW ork.dacpac
  29666          Name="[CDW Work]|[Dim ].[LabChem Test].[Sta 3n]" 
  29667         />
  29668                                            
  29669        </Entry>
  29670                                           
  29671        <Entry>
  29672                                                    
  29673         <Reference
  29674          Name="[Pan elMgmt].[P MMasterLab Index].[St a3n]" 
  29675         />
  29676                                            
  29677        </Entry>
  29678                                           
  29679        <Entry>
  29680                                                    
  29681         <Reference
  29682          Name="[Pan elMgmt].[P MMasterLab Index].[La bChemTestS ID]" 
  29683         />
  29684                                            
  29685        </Entry>
  29686                                           
  29687        <Entry>
  29688                                                    
  29689         <Reference
  29690          Name="[Pan elMgmt].[P MMasterLab Index].[St a3n]" 
  29691         />
  29692                                            
  29693        </Entry>
  29694                                           
  29695        <Entry>
  29696                                                    
  29697         <Reference
  29698          Name="[Pan elMgmt].[P MMasterLab Index].[La bChemTestN ame]" 
  29699         />
  29700                                            
  29701        </Entry>
  29702                                           
  29703        <Entry>
  29704                                                    
  29705         <Reference
  29706          Name="[Pan elMgmt].[P MMasterLab Index].[Re sultForTes tNumeric]"  
  29707         />
  29708                                            
  29709        </Entry>
  29710                                           
  29711        <Entry>
  29712                                                    
  29713         <Reference
  29714          Name="[Pan elMgmt].[P MMasterLab Index].[Da teExtracte d]" 
  29715         />
  29716                                            
  29717        </Entry>
  29718                                           
  29719        <Entry>
  29720                                                    
  29721         <Reference
  29722          Name="[Pan elMgmt].[P MMasterLab Index].[Te stGroup]" 
  29723         />
  29724                                            
  29725        </Entry>
  29726                                           
  29727        <Entry>
  29728                                                    
  29729         <Reference
  29730          Name="[Pan elMgmt].[P MMasterLab Index].[LO INC]" 
  29731         />
  29732                                            
  29733        </Entry>
  29734                                           
  29735        <Entry>
  29736                                                    
  29737         <Reference
  29738          Name="[Pan elMgmt].[P MMasterLab Index].[Wo rkLoadCode ]" 
  29739         />
  29740                                            
  29741        </Entry>
  29742                                           
  29743        <Entry>
  29744                                                    
  29745         <Reference
  29746          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[L abChemTest SID]" 
  29747         />
  29748                                            
  29749        </Entry>
  29750                                           
  29751        <Entry>
  29752                                                    
  29753         <Reference
  29754          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[S ta3n]" 
  29755         />
  29756                                            
  29757        </Entry>
  29758                                           
  29759        <Entry>
  29760                                                    
  29761         <Reference
  29762          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[L abChemTest Name]" 
  29763         />
  29764                                            
  29765        </Entry>
  29766                                           
  29767        <Entry>
  29768                                                    
  29769         <Reference
  29770          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[R esultForTe stNumeric]
  29771         />
  29772                                            
  29773        </Entry>
  29774                                           
  29775        <Entry>
  29776                                                    
  29777         <Reference
  29778          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[D ateExtract ed]" 
  29779         />
  29780                                            
  29781        </Entry>
  29782                                           
  29783        <Entry>
  29784                                                    
  29785         <Reference
  29786          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[T estGroup]"  
  29787         />
  29788                                            
  29789        </Entry>
  29790                                           
  29791        <Entry>
  29792                                                    
  29793         <Reference
  29794          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[L OINC]" 
  29795         />
  29796                                            
  29797        </Entry>
  29798                                           
  29799        <Entry>
  29800                                                    
  29801         <Reference
  29802          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[W orkLoadCod e]" 
  29803         />
  29804                                            
  29805        </Entry>
  29806                                           
  29807        <Entry>
  29808                                                    
  29809         <Reference
  29810          Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[L astUpdate]
  29811         />
  29812                                            
  29813        </Entry>
  29814                                           
  29815        <Entry>
  29816                                                    
  29817         <Reference
  29818          ExternalSo urce="Buil tIns" 
  29819          Name="[dat e]" 
  29820         />
  29821                                            
  29822        </Entry>
  29823                                  
  29824       </Relation ship>
  29825                                 
  29826       <Relations hip 
  29827        Name="Dyna micObjects "
  29828       >
  29829                                           
  29830        <Entry>
  29831                                                    
  29832         <Element 
  29833          Type="SqlD ynamicColu mnSource" 
  29834          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] "
  29835         >
  29836                                                              
  29837          <Relations hip 
  29838           Name="Colu mns"
  29839          >
  29840                                                                        
  29841           <Entry>
  29842                                                                                  
  29843            <Element 
  29844             Type="SqlC omputedCol umn" 
  29845             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[Sta3n]"
  29846            >
  29847                                                                                            
  29848             <Relations hip 
  29849              Name="Expr essionDepe ndencies"
  29850             >
  29851                                                                                                     
  29852              <Entry>
  29853                                                                                                               
  29854               <Reference
  29855                ExternalSo urce="SPV. dacpac" 
  29856                Name="[SPV ]|[Chem].[ LabChem].[ Sta3n]" 
  29857               />
  29858                                                                                                      
  29859              </Entry>
  29860                                                                                             
  29861             </Relation ship>
  29862                                                                                   
  29863            </Element>
  29864                                                                         
  29865           </Entry>
  29866                                                                        
  29867           <Entry>
  29868                                                                                  
  29869            <Element 
  29870             Type="SqlC omputedCol umn" 
  29871             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LabChemT estSID]"
  29872            >
  29873                                                                                            
  29874             <Relations hip 
  29875              Name="Expr essionDepe ndencies"
  29876             >
  29877                                                                                                     
  29878              <Entry>
  29879                                                                                                               
  29880               <Reference
  29881                ExternalSo urce="SPV. dacpac" 
  29882                Name="[SPV ]|[Chem].[ LabChem].[ LabChemTes tSID]" 
  29883               />
  29884                                                                                                      
  29885              </Entry>
  29886                                                                                             
  29887             </Relation ship>
  29888                                                                                   
  29889            </Element>
  29890                                                                         
  29891           </Entry>
  29892                                                                        
  29893           <Entry>
  29894                                                                                  
  29895            <Element 
  29896             Type="SqlC omputedCol umn" 
  29897             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LOINCSID ]"
  29898            >
  29899                                                                                            
  29900             <Relations hip 
  29901              Name="Expr essionDepe ndencies"
  29902             >
  29903                                                                                                     
  29904              <Entry>
  29905                                                                                                               
  29906               <Reference
  29907                ExternalSo urce="SPV. dacpac" 
  29908                Name="[SPV ]|[Chem].[ LabChem].[ LOINCSID]"  
  29909               />
  29910                                                                                                      
  29911              </Entry>
  29912                                                                                             
  29913             </Relation ship>
  29914                                                                                   
  29915            </Element>
  29916                                                                         
  29917           </Entry>
  29918                                                                        
  29919           <Entry>
  29920                                                                                  
  29921            <Element 
  29922             Type="SqlC omputedCol umn" 
  29923             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LabChemS pecimenDat eTime]"
  29924            >
  29925                                                                                            
  29926             <Relations hip 
  29927              Name="Expr essionDepe ndencies"
  29928             >
  29929                                                                                                     
  29930              <Entry>
  29931                                                                                                               
  29932               <Reference
  29933                ExternalSo urce="SPV. dacpac" 
  29934                Name="[SPV ]|[Chem].[ LabChem].[ LabChemSpe cimenDateT ime]" 
  29935               />
  29936                                                                                                      
  29937              </Entry>
  29938                                                                                             
  29939             </Relation ship>
  29940                                                                                   
  29941            </Element>
  29942                                                                         
  29943           </Entry>
  29944                                                                        
  29945           <Entry>
  29946                                                                                  
  29947            <Element 
  29948             Type="SqlC omputedCol umn" 
  29949             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[LabChemC ompleteDat eTime]"
  29950            >
  29951                                                                                            
  29952             <Relations hip 
  29953              Name="Expr essionDepe ndencies"
  29954             >
  29955                                                                                                     
  29956              <Entry>
  29957                                                                                                               
  29958               <Reference
  29959                ExternalSo urce="SPV. dacpac" 
  29960                Name="[SPV ]|[Chem].[ LabChem].[ LabChemCom pleteDateT ime]" 
  29961               />
  29962                                                                                                      
  29963              </Entry>
  29964                                                                                             
  29965             </Relation ship>
  29966                                                                                   
  29967            </Element>
  29968                                                                         
  29969           </Entry>
  29970                                                                        
  29971           <Entry>
  29972                                                                                  
  29973            <Element 
  29974             Type="SqlC omputedCol umn" 
  29975             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[ETLBatch ID]"
  29976            >
  29977                                                                                            
  29978             <Relations hip 
  29979              Name="Expr essionDepe ndencies"
  29980             >
  29981                                                                                                     
  29982              <Entry>
  29983                                                                                                               
  29984               <Reference
  29985                ExternalSo urce="SPV. dacpac" 
  29986                Name="[SPV ]|[Chem].[ LabChem].[ ETLBatchID ]" 
  29987               />
  29988                                                                                                      
  29989              </Entry>
  29990                                                                                             
  29991             </Relation ship>
  29992                                                                                   
  29993            </Element>
  29994                                                                         
  29995           </Entry>
  29996                                                                        
  29997           <Entry>
  29998                                                                                  
  29999            <Element 
  30000             Type="SqlC omputedCol umn" 
  30001             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[OpCode]"
  30002            >
  30003                                                                                            
  30004             <Relations hip 
  30005              Name="Expr essionDepe ndencies"
  30006             >
  30007                                                                                                     
  30008              <Entry>
  30009                                                                                                               
  30010               <Reference
  30011                ExternalSo urce="SPV. dacpac" 
  30012                Name="[SPV ]|[Chem].[ LabChem].[ OpCode]" 
  30013               />
  30014                                                                                                      
  30015              </Entry>
  30016                                                                                             
  30017             </Relation ship>
  30018                                                                                   
  30019            </Element>
  30020                                                                         
  30021           </Entry>
  30022                                                                        
  30023           <Entry>
  30024                                                                                  
  30025            <Element 
  30026             Type="SqlC omputedCol umn" 
  30027             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[VistaCre ateDate]"
  30028            >
  30029                                                                                            
  30030             <Relations hip 
  30031              Name="Expr essionDepe ndencies"
  30032             >
  30033                                                                                                     
  30034              <Entry>
  30035                                                                                                               
  30036               <Reference
  30037                ExternalSo urce="SPV. dacpac" 
  30038                Name="[SPV ]|[Chem].[ LabChem].[ VistaCreat eDate]" 
  30039               />
  30040                                                                                                      
  30041              </Entry>
  30042                                                                                             
  30043             </Relation ship>
  30044                                                                                   
  30045            </Element>
  30046                                                                         
  30047           </Entry>
  30048                                                                        
  30049           <Entry>
  30050                                                                                  
  30051            <Element 
  30052             Type="SqlC omputedCol umn" 
  30053             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[VistaEdi tDate]"
  30054            >
  30055                                                                                            
  30056             <Relations hip 
  30057              Name="Expr essionDepe ndencies"
  30058             >
  30059                                                                                                     
  30060              <Entry>
  30061                                                                                                               
  30062               <Reference
  30063                ExternalSo urce="SPV. dacpac" 
  30064                Name="[SPV ]|[Chem].[ LabChem].[ VistaEditD ate]" 
  30065               />
  30066                                                                                                      
  30067              </Entry>
  30068                                                                                             
  30069             </Relation ship>
  30070                                                                                   
  30071            </Element>
  30072                                                                         
  30073           </Entry>
  30074                                                                        
  30075           <Entry>
  30076                                                                                  
  30077            <Element 
  30078             Type="SqlC omputedCol umn" 
  30079             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#La bChemPrep] .[RN]" 
  30080            />
  30081                                                                         
  30082           </Entry>
  30083                                                               
  30084          </Relation ship>
  30085                                                     
  30086         </Element>
  30087                                            
  30088        </Entry>
  30089                                           
  30090        <Entry>
  30091                                                    
  30092         <Element 
  30093          Type="SqlD ynamicColu mnSource" 
  30094          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ]"
  30095         >
  30096                                                              
  30097          <Relations hip 
  30098           Name="Colu mns"
  30099          >
  30100                                                                        
  30101           <Entry>
  30102                                                                                  
  30103            <Element 
  30104             Type="SqlC omputedCol umn" 
  30105             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[LOINCSI D]"
  30106            >
  30107                                                                                            
  30108             <Relations hip 
  30109              Name="Expr essionDepe ndencies"
  30110             >
  30111                                                                                                     
  30112              <Entry>
  30113                                                                                                               
  30114               <Reference
  30115                ExternalSo urce="CDWW ork.dacpac
  30116                Name="[CDW Work]|[Dim ].[LOINC]. [LOINCSID]
  30117               />
  30118                                                                                                      
  30119              </Entry>
  30120                                                                                             
  30121             </Relation ship>
  30122                                                                                   
  30123            </Element>
  30124                                                                         
  30125           </Entry>
  30126                                                                        
  30127           <Entry>
  30128                                                                                  
  30129            <Element 
  30130             Type="SqlC omputedCol umn" 
  30131             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[Sta3n]"
  30132            >
  30133                                                                                            
  30134             <Relations hip 
  30135              Name="Expr essionDepe ndencies"
  30136             >
  30137                                                                                                     
  30138              <Entry>
  30139                                                                                                               
  30140               <Reference
  30141                ExternalSo urce="CDWW ork.dacpac
  30142                Name="[CDW Work]|[Dim ].[LOINC]. [Sta3n]" 
  30143               />
  30144                                                                                                      
  30145              </Entry>
  30146                                                                                             
  30147             </Relation ship>
  30148                                                                                   
  30149            </Element>
  30150                                                                         
  30151           </Entry>
  30152                                                                        
  30153           <Entry>
  30154                                                                                  
  30155            <Element 
  30156             Type="SqlC omputedCol umn" 
  30157             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[LOINC]"
  30158            >
  30159                                                                                            
  30160             <Relations hip 
  30161              Name="Expr essionDepe ndencies"
  30162             >
  30163                                                                                                     
  30164              <Entry>
  30165                                                                                                               
  30166               <Reference
  30167                Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[L OINC]" 
  30168               />
  30169                                                                                                      
  30170              </Entry>
  30171                                                                                             
  30172             </Relation ship>
  30173                                                                                   
  30174            </Element>
  30175                                                                         
  30176           </Entry>
  30177                                                                        
  30178           <Entry>
  30179                                                                                  
  30180            <Element 
  30181             Type="SqlC omputedCol umn" 
  30182             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[TestGro up]"
  30183            >
  30184                                                                                            
  30185             <Relations hip 
  30186              Name="Expr essionDepe ndencies"
  30187             >
  30188                                                                                                     
  30189              <Entry>
  30190                                                                                                               
  30191               <Reference
  30192                Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[T estGroup]"  
  30193               />
  30194                                                                                                      
  30195              </Entry>
  30196                                                                                             
  30197             </Relation ship>
  30198                                                                                   
  30199            </Element>
  30200                                                                         
  30201           </Entry>
  30202                                                                        
  30203           <Entry>
  30204                                                                                  
  30205            <Element 
  30206             Type="SqlC omputedCol umn" 
  30207             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[ResultF orTestNume ric]"
  30208            >
  30209                                                                                            
  30210             <Relations hip 
  30211              Name="Expr essionDepe ndencies"
  30212             >
  30213                                                                                                     
  30214              <Entry>
  30215                                                                                                               
  30216               <Reference
  30217                Name="[Pan elMgmt].[P MMasterCoh ortLabTest GroupsLOIN CCodes].[R esultForTe stNumeric]
  30218               />
  30219                                                                                                      
  30220              </Entry>
  30221                                                                                             
  30222             </Relation ship>
  30223                                                                                   
  30224            </Element>
  30225                                                                         
  30226           </Entry>
  30227                                                                        
  30228           <Entry>
  30229                                                                                  
  30230            <Element 
  30231             Type="SqlC omputedCol umn" 
  30232             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[YearSea rchDate]" 
  30233            />
  30234                                                                         
  30235           </Entry>
  30236                                                               
  30237          </Relation ship>
  30238                                                     
  30239         </Element>
  30240                                            
  30241        </Entry>
  30242                                           
  30243        <Entry>
  30244                                                    
  30245         <Element 
  30246          Type="SqlD ynamicColu mnSource" 
  30247          Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords]"
  30248         >
  30249                                                              
  30250          <Relations hip 
  30251           Name="Colu mns"
  30252          >
  30253                                                                        
  30254           <Entry>
  30255                                                                                  
  30256            <Element 
  30257             Type="SqlC omputedCol umn" 
  30258             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[L abChemTest SID]"
  30259            >
  30260                                                                                            
  30261             <Relations hip 
  30262              Name="Expr essionDepe ndencies"
  30263             >
  30264                                                                                                     
  30265              <Entry>
  30266                                                                                                               
  30267               <Reference
  30268                ExternalSo urce="CDWW ork.dacpac
  30269                Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestSI D]" 
  30270               />
  30271                                                                                                      
  30272              </Entry>
  30273                                                                                             
  30274             </Relation ship>
  30275                                                                                   
  30276            </Element>
  30277                                                                         
  30278           </Entry>
  30279                                                                        
  30280           <Entry>
  30281                                                                                  
  30282            <Element 
  30283             Type="SqlC omputedCol umn" 
  30284             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[S ta3n]"
  30285            >
  30286                                                                                            
  30287             <Relations hip 
  30288              Name="Expr essionDepe ndencies"
  30289             >
  30290                                                                                                     
  30291              <Entry>
  30292                                                                                                               
  30293               <Reference
  30294                ExternalSo urce="CDWW ork.dacpac
  30295                Name="[CDW Work]|[Dim ].[LabChem Test].[Sta 3n]" 
  30296               />
  30297                                                                                                      
  30298              </Entry>
  30299                                                                                             
  30300             </Relation ship>
  30301                                                                                   
  30302            </Element>
  30303                                                                         
  30304           </Entry>
  30305                                                                        
  30306           <Entry>
  30307                                                                                  
  30308            <Element 
  30309             Type="SqlC omputedCol umn" 
  30310             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[L abChemTest Name]"
  30311            >
  30312                                                                                            
  30313             <Relations hip 
  30314              Name="Expr essionDepe ndencies"
  30315             >
  30316                                                                                                     
  30317              <Entry>
  30318                                                                                                               
  30319               <Reference
  30320                ExternalSo urce="CDWW ork.dacpac
  30321                Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestNa me]" 
  30322               />
  30323                                                                                                      
  30324              </Entry>
  30325                                                                                             
  30326             </Relation ship>
  30327                                                                                   
  30328            </Element>
  30329                                                                         
  30330           </Entry>
  30331                                                                        
  30332           <Entry>
  30333                                                                                  
  30334            <Element 
  30335             Type="SqlC omputedCol umn" 
  30336             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[R esultForTe stNumeric] "
  30337            >
  30338                                                                                            
  30339             <Relations hip 
  30340              Name="Expr essionDepe ndencies"
  30341             >
  30342                                                                                                     
  30343              <Entry>
  30344                                                                                                               
  30345               <Reference
  30346                Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[ResultF orTestNume ric]" 
  30347               />
  30348                                                                                                      
  30349              </Entry>
  30350                                                                                             
  30351             </Relation ship>
  30352                                                                                   
  30353            </Element>
  30354                                                                         
  30355           </Entry>
  30356                                                                        
  30357           <Entry>
  30358                                                                                  
  30359            <Element 
  30360             Type="SqlC omputedCol umn" 
  30361             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[D ateExtract ed]" 
  30362            />
  30363                                                                         
  30364           </Entry>
  30365                                                                        
  30366           <Entry>
  30367                                                                                  
  30368            <Element 
  30369             Type="SqlC omputedCol umn" 
  30370             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[T estGroup]"
  30371            >
  30372                                                                                            
  30373             <Relations hip 
  30374              Name="Expr essionDepe ndencies"
  30375             >
  30376                                                                                                     
  30377              <Entry>
  30378                                                                                                               
  30379               <Reference
  30380                Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[TestGro up]" 
  30381               />
  30382                                                                                                      
  30383              </Entry>
  30384                                                                                             
  30385             </Relation ship>
  30386                                                                                   
  30387            </Element>
  30388                                                                         
  30389           </Entry>
  30390                                                                        
  30391           <Entry>
  30392                                                                                  
  30393            <Element 
  30394             Type="SqlC omputedCol umn" 
  30395             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[L OINC]"
  30396            >
  30397                                                                                            
  30398             <Relations hip 
  30399              Name="Expr essionDepe ndencies"
  30400             >
  30401                                                                                                     
  30402              <Entry>
  30403                                                                                                               
  30404               <Reference
  30405                Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#Te mpLOINCSID ].[LOINC]"  
  30406               />
  30407                                                                                                      
  30408              </Entry>
  30409                                                                                             
  30410             </Relation ship>
  30411                                                                                   
  30412            </Element>
  30413                                                                         
  30414           </Entry>
  30415                                                                        
  30416           <Entry>
  30417                                                                                  
  30418            <Element 
  30419             Type="SqlC omputedCol umn" 
  30420             Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromL OINC].[#In sertTheseR ecords].[W orkLoadCod e]" 
  30421            />
  30422                                                                         
  30423           </Entry>
  30424                                                               
  30425          </Relation ship>
  30426                                                     
  30427         </Element>
  30428                                            
  30429        </Entry>
  30430                                  
  30431       </Relation ship>
  30432                                 
  30433       <Relations hip 
  30434        Name="Sche ma"
  30435       >
  30436                                           
  30437        <Entry>
  30438                                                    
  30439         <Reference
  30440          Name="[Pan elMgmt]" 
  30441         />
  30442                                            
  30443        </Entry>
  30444                                  
  30445       </Relation ship>
  30446                                 
  30447       <Annotatio
  30448        Type="SysC ommentsObj ectAnnotat ion"
  30449       >
  30450                                           
  30451        <Property 
  30452         Name="Crea teOffset" 
  30453         Value="4" 
  30454        />
  30455                                           
  30456        <Property 
  30457         Name="Leng th" 
  30458         Value="862 7" 
  30459        />
  30460                                           
  30461        <Property 
  30462         Name="Star tLine" 
  30463         Value="1" 
  30464        />
  30465                                           
  30466        <Property 
  30467         Name="Star tColumn" 
  30468         Value="1" 
  30469        />
  30470                                           
  30471        <Property 
  30472         Name="Head erContents
  30473         Value="&#x D;&#xA;&#x D;&#xA;CRE ATE PROCED URE [Panel Mgmt].[usp _PMUpdateM asterLabIn dexFromLOI NC] &#xD;& #xA;AS" 
  30474        />
  30475                                  
  30476       </Annotati on>
  30477                        
  30478      </Element>
  30479                       
  30480      <Element 
  30481       Type="SqlP rocedure" 
  30482       Name="[Pan elMgmt].[u sp_PMUpdat eMasterLab IndexFromW orkload]"
  30483      >
  30484                                 
  30485       <Property 
  30486        Name="Body Script"
  30487       >
  30488                                           
  30489        <Value>
  30490         <![CDATA[
  30491         --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =
  30492         --Requesto r                                : Jianji Y ang
  30493         --Author                  : Stev e Schreine r
  30494         --Object/S P Name                  : [Panel Mgmt].[usp _PMUpdateM asterLabIn dexFromWor kload]
  30495         --SERVER                                   
  30496         --Data Bas e                                : CC_REFDO C
  30497         --Schema                                    :    
  30498         --Report                                    : None Yet
  30499         --Folder                                    :
  30500         --Report L oc             : 
  30501         --Job                     : None
  30502         --Job Loc                 : None
  30503         --Note                    : 
  30504         --Date Cre ated           : 08-0 4-2014
  30505         --Last Cha nged           : 08-2 4-2017  
  30506         --Last Cha nged By                 : Brian  Diggs
  30507         --Reason F or Change               : Rebuil d as an in ner join r ather than  an assemb led string  which is  exec'd
  30508         --
  30509         --Last Cha nged           : 05-1 5-2015  
  30510         --Last Cha nged By                 : Jianji  Yang
  30511         --Reason F or Change               : exclud e NON-HDL  from 668 w hich is as signed to  LDL worklo ad code                                
  30512         --Purpose                 : Upda te Panel M anagement  Master Lab  Index tab le 
  30513         --                          with  lab test  with valid ate worklo ad codes.
  30514         --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ===
  30515         BEGIN
  30516        
  30517                 in sert                    [PanelMg mt].[PMMas terLabInde x]
  30518                 se lect 
  30519                                                     li.LabChem TestSID,
  30520                                                     li.Sta3n,
  30521                                                     li.LabChem TestName,
  30522                                                     tg.ResultF orTestNume ric,
  30523                                                     getdate()  as DateExt racted,
  30524                                                     tg.TestGro up,
  30525                                                     null as LO INC,
  30526                                                     nc.Workloa dCode
  30527                 fr om                      [CDWWork ].[dim].[L abChemTest ] as li
  30528                 le ft outer j oin [CDWWo rk].[dim]. [NationalV ALabCode]  as nc on
  30529                                                     li.Nationa lVALabCode SID = nc.N ationalVAL abCodeSID
  30530                 in ner join                [PanelMg mt].[PMMas terCohortS ite] as cs  on
  30531                                                     li.Sta3n =  cs.Sta3n
  30532                 in ner join                (select  distinct
  30533                                                             Te stGroup,
  30534                                                             Re sultForTes tNumeric,
  30535                                                             Te stSearchCr iteria
  30536                                                     from [Pane lMgmt].[PM MasterCoho rtLabTestG roups]) as  tg on
  30537                                                     nc.Workloa dCode like  tg.TestSe archCriter ia
  30538                 wh ere                     not exis ts (select  ni.LabChe mTestSID
  30539                                                                                        from [Pa nelMgmt].[ PMMasterLa bIndex] as  ni
  30540                                                                                        where li .LabChemTe stSID = ni .LabChemTe stSID
  30541                                                                                                   and li.S ta3n = ni. Sta3n)
  30542                 or der by                  li.Sta3n
  30543        
  30544                 --  remove no n HDL lab  with LDL w orkload co de assigne d. working  with loca l CAC to r eassign ap propiate c ode 
  30545                 --  LabChemTe stSID        LabChemT estIEN  St a3n   LabC hemTestNam e     LabC hemPrintTe stName         NLTNat ionalVALab CodeSID Na tionalVALa bCodeSID
  30546                 --  800223162                    70 54    668    NON-HDL  CHOLESTERO L NHDL                      8005 22569                 800398429
  30547        
  30548                 de lete FROM  [PanelMgmt ].[PMMaste rLabIndex]  where Lab ChemTestNa me like '% NON-HDL%'
  30549        
  30550         END]]>
  30551        </Value>
  30552                                  
  30553       </Property >
  30554                                 
  30555       <Property 
  30556        Name="IsAn siNullsOn"  
  30557        Value="Tru e" 
  30558       />
  30559                                 
  30560       <Relations hip 
  30561        Name="Body Dependenci es"
  30562       >
  30563                                           
  30564        <Entry>
  30565                                                    
  30566         <Reference
  30567          Name="[Pan elMgmt].[P MMasterLab Index]" 
  30568         />
  30569                                            
  30570        </Entry>
  30571                                           
  30572        <Entry>
  30573                                                    
  30574         <Reference
  30575          ExternalSo urce="CDWW ork.dacpac
  30576          Name="[CDW Work]|[Dim ].[LabChem Test]" 
  30577         />
  30578                                            
  30579        </Entry>
  30580                                           
  30581        <Entry>
  30582                                                    
  30583         <Reference
  30584          ExternalSo urce="CDWW ork.dacpac
  30585          Name="[CDW Work]|[Dim ].[Nationa lVALabCode ]" 
  30586         />
  30587                                            
  30588        </Entry>
  30589                                           
  30590        <Entry>
  30591                                                    
  30592         <Reference
  30593          ExternalSo urce="CDWW ork.dacpac
  30594          Name="[CDW Work]|[Dim ].[LabChem Test].[Nat ionalVALab CodeSID]" 
  30595         />
  30596                                            
  30597        </Entry>
  30598                                           
  30599        <Entry>
  30600                                                    
  30601         <Reference
  30602          ExternalSo urce="CDWW ork.dacpac
  30603          Name="[CDW Work]|[Dim ].[Nationa lVALabCode ].[Nationa lVALabCode SID]" 
  30604         />
  30605                                            
  30606        </Entry>
  30607                                           
  30608        <Entry>
  30609                                                    
  30610         <Reference
  30611          Name="[Pan elMgmt].[P MMasterCoh ortSite]" 
  30612         />
  30613                                            
  30614        </Entry>
  30615                                           
  30616        <Entry>
  30617                                                    
  30618         <Reference
  30619          ExternalSo urce="CDWW ork.dacpac
  30620          Name="[CDW Work]|[Dim ].[LabChem Test].[Sta 3n]" 
  30621         />
  30622                                            
  30623        </Entry>
  30624                                           
  30625        <Entry>
  30626                                                    
  30627         <Reference
  30628          Name="[Pan elMgmt].[P MMasterCoh ortSite].[ Sta3n]" 
  30629         />
  30630                                            
  30631        </Entry>
  30632                                           
  30633        <Entry>
  30634                                                    
  30635         <Reference
  30636          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups]" 
  30637         />
  30638                                            
  30639        </Entry>
  30640                                           
  30641        <Entry>
  30642                                                    
  30643         <Reference
  30644          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[T estGroup]"  
  30645         />
  30646                                            
  30647        </Entry>
  30648                                           
  30649        <Entry>
  30650                                                    
  30651         <Reference
  30652          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[R esultForTe stNumeric]
  30653         />
  30654                                            
  30655        </Entry>
  30656                                           
  30657        <Entry>
  30658                                                    
  30659         <Reference
  30660          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[T estSearchC riteria]" 
  30661         />
  30662                                            
  30663        </Entry>
  30664                                           
  30665        <Entry>
  30666                                                    
  30667         <Reference
  30668          ExternalSo urce="CDWW ork.dacpac
  30669          Name="[CDW Work]|[Dim ].[Nationa lVALabCode ].[Workloa dCode]" 
  30670         />
  30671                                            
  30672        </Entry>
  30673                                           
  30674        <Entry>
  30675                                                    
  30676         <Reference
  30677          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[T estSearchC riteria]" 
  30678         />
  30679                                            
  30680        </Entry>
  30681                                           
  30682        <Entry>
  30683                                                    
  30684         <Reference
  30685          ExternalSo urce="CDWW ork.dacpac
  30686          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestSI D]" 
  30687         />
  30688                                            
  30689        </Entry>
  30690                                           
  30691        <Entry>
  30692                                                    
  30693         <Reference
  30694          ExternalSo urce="CDWW ork.dacpac
  30695          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestNa me]" 
  30696         />
  30697                                            
  30698        </Entry>
  30699                                           
  30700        <Entry>
  30701                                                    
  30702         <Reference
  30703          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[R esultForTe stNumeric]
  30704         />
  30705                                            
  30706        </Entry>
  30707                                           
  30708        <Entry>
  30709                                                    
  30710         <Reference
  30711          Name="[Pan elMgmt].[P MMasterCoh ortLabTest Groups].[T estGroup]"  
  30712         />
  30713                                            
  30714        </Entry>
  30715                                           
  30716        <Entry>
  30717                                                    
  30718         <Reference
  30719          Name="[Pan elMgmt].[P MMasterLab Index].[La bChemTestS ID]" 
  30720         />
  30721                                            
  30722        </Entry>
  30723                                           
  30724        <Entry>
  30725                                                    
  30726         <Reference
  30727          ExternalSo urce="CDWW ork.dacpac
  30728          Name="[CDW Work]|[Dim ].[LabChem Test].[Lab ChemTestSI D]" 
  30729         />
  30730                                            
  30731        </Entry>
  30732                                           
  30733        <Entry>
  30734                                                    
  30735         <Reference
  30736          ExternalSo urce="CDWW ork.dacpac
  30737          Name="[CDW Work]|[Dim ].[LabChem Test].[Sta 3n]" 
  30738         />
  30739                                            
  30740        </Entry>
  30741                                           
  30742        <Entry>
  30743                                                    
  30744         <Reference
  30745          Name="[Pan elMgmt].[P MMasterLab Index].[St a3n]" 
  30746         />
  30747                                            
  30748        </Entry>
  30749                                           
  30750        <Entry>
  30751                                                    
  30752         <Reference
  30753          Name="[Pan elMgmt].[P MMasterLab Index].[La bChemTestN ame]" 
  30754         />
  30755                                            
  30756        </Entry>
  30757                                  
  30758       </Relation ship>
  30759                                 
  30760       <Relations hip 
  30761        Name="Sche ma"
  30762       >
  30763                                           
  30764        <Entry>
  30765                                                    
  30766         <Reference
  30767          Name="[Pan elMgmt]" 
  30768         />
  30769                                            
  30770        </Entry>
  30771                                  
  30772       </Relation ship>
  30773                                 
  30774       <Annotatio
  30775        Type="SysC ommentsObj ectAnnotat ion"
  30776       >
  30777                                           
  30778        <Property 
  30779         Name="Leng th" 
  30780         Value="283 4" 
  30781        />
  30782                                           
  30783        <Property 
  30784         Name="Star tLine" 
  30785         Value="1" 
  30786        />
  30787                                           
  30788        <Property 
  30789         Name="Star tColumn" 
  30790         Value="1" 
  30791        />
  30792                                           
  30793        <Property 
  30794         Name="Head erContents
  30795         Value="CRE ATE PROCED URE [Panel Mgmt].[usp _PMUpdateM asterLabIn dexFromWor kload] &#x D;&#xA;&#x D;&#xA;--  NOTICE:&#x D;&#xA;--  Do not edi t the stor ed procedu re live on  the serve r. Code to  generate& #xD;&#xA;- - the proc edures is  stored in  the projec t reposito ry. Any ch anges made &#xD;&#xA; -- that ar e not reco rded in th e reposito ry will be  overwritt en.&#xD;&# xA;&#xD;&# xA;AS" 
  30796        />
  30797                                  
  30798       </Annotati on>
  30799                        
  30800      </Element>
  30801                       
  30802      <Element 
  30803       Type="SqlP rocedure" 
  30804       Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents]"
  30805      >
  30806                                 
  30807       <Property 
  30808        Name="Body Script"
  30809       >
  30810                                           
  30811        <Value>
  30812         <![CDATA[
  30813         --======== ========== ========== ========== ========== ========== ========== ========== ====
  30814         --Requesto r              : Non  Va Coordin ated Care  Project, b ut produce s a great
  30815         --                          gene ral use al l patient  table for  any applic ation.
  30816         --Author                  : Jerr y Kohler,  Jianji Yan g - Northw est Innova tion Cente r
  30817         --Object/S P Name         : usp_ RebuildAll CDWPatient s
  30818         --Server                  :  SERVER       
  30819         --Data Bas e              : CC_R EFDOC
  30820         --Schema                  : Pane lMgmt
  30821         --Report                  : N/A
  30822         --Folder                  : N/A
  30823         --Report L oc             : N/A
  30824         --Job                     : None
  30825         --Job Loc                 : None
  30826         --Note                    : This  table con tains ALL  patients,  including
  30827         --                          dece ased and t est.
  30828         --Date Cre ated           : 03-1 0-2016
  30829         --
  30830         --
  30831         --Purpose                 : Beca use SPatie nt does no t have an  index on P atientSSN,
  30832         --                          we c reate a ta ble to tra nslate bet ween sever al types o f
  30833         --                          pati ent identi fication f or REFDOC:
  30834         --                             -  SSN
  30835         --                             -  SID
  30836         --                             -  ICN
  30837         --                             -  Name (las t,first)
  30838         --                             -  CPRSKey ( first char acter of l ast name,  last4)
  30839         --
  30840         --Last Cha nged           : 08-1 0-2017
  30841         --Last Cha nged By                 : Brian  Diggs - NW IC
  30842         --Reason F or Change               : Proces s was stil l blocking  for way t oo long, p reventing
  30843         --                          look ups of pat ients. Ref actored ba sed on dis cussions
  30844         --                          with  Andrew Ke lly. Extra ct the bat ches outsi de the
  30845         --                          (blo cking) MER GE, then f ilter them  while
  30846         --                          flag ging if th e record i s an updat e or inser t.
  30847         --                          Do t he updates  and then  inserts an d update t he ETLBatc hID
  30848         --
  30849         --Last Cha nged           : 07-1 4-2017
  30850         --Last Cha nged By                 : Brian  Diggs - NW IC
  30851         --Reason F or Change               : Implem ented sugg estions fr om Andrew  Kelly
  30852         --
  30853         --Last Cha nged           : 06-0 9-2017
  30854         --Last Cha nged By                 : Brian  Diggs - NW IC
  30855         --Reason F or Change               : Conver ted to inc remental u pdate foll owing reco mmended CD
  30856         --                          para digm
  30857         --
  30858         --Last Cha nged           : 04-1 9-2017
  30859         --Last Cha nged By                 : Brian  Diggs - NW IC
  30860         --Reason F or Change               : Stripp ed this do wn to just  the parts  needed fo r REFDOC
  30861         --                          as p art of the  migration  to the Fi eld Report ing Enclav e.
  30862         --                          The  only colum ns needed  are Sta3n,  PatientSS N, Patient ICN,
  30863         --                          Pati entSID, an d PatientI EN.
  30864         --
  30865         --Last Cha nged           : 06-0 6-2016
  30866         --Last Cha nged By                 : Jerry  Kohler - N WIC
  30867         --Reason F or Change               : Added  Next of Ki n, and per  Microsoft  recommend ation
  30868         --                          chan ged drop/c reate tabl e to drop  indexes an d TRUNCATE .
  30869         --                          Also  added WIT H (TABLOCK ) in the i nsert.
  30870         --                          All  of this sh ould boost  the perfo rmance, an d not
  30871         --                          elim inate stor ed executi on plans o n the tabl e.
  30872         --
  30873         --Last Cha nged           : 06-0 3-2016
  30874         --Last Cha nged By                 : Jerry  Kohler - N WIC
  30875         --Reason F or Change               : Take a ll patient s from SPa tient, tes t or decea sed.
  30876         --                          Join  to PanelM gmt.PMMast erCohortDe ceasedInde xNEW
  30877         --                          to e nsure bett er accurac y.  Add de ceased fla g and
  30878         --                          date  of death.
  30879        
  30880         --Last Cha nged           : 04-0 5-2016
  30881         --Last Cha nged By                 : Jianji  Yang - NW IC
  30882         --Reason F or Change               : Add te st patient  data, dec eased pati ents, and  patient's
  30883         --                        : home  station ( based on P CP's Sta3n ).
  30884         --
  30885         --Last Cha nged           : 03-1 7-2017
  30886         --Last Cha nged By                 : Jerry  Kohler - N WIC
  30887         --Reason F or Change               : Add Pa tientIEN s o that fun ction App. udf_AllPat ientsSIDs
  30888         --                        : can  now hit Al lCDWPatien ts instead  of SPatie nt.  This
  30889         --                        : tabl e is much  smaller, a nd will be  much fast er.
  30890         --
  30891         --Last Cha nged           : 03-2 0-2017
  30892         --Last Cha nged By                 : Jerry  Kohler - N WIC
  30893         --Reason F or Change               : Change  procedure  to place  data in a  temporary  table THEN
  30894         --                        : trun cate and i nsert into  the produ ction tabl e.  This
  30895         --                        : mini mize the a mount of t ime querie s would re turn no da ta.
  30896         --======== ========== ========== ========== ========== ========== ========== ========== ====
  30897        
  30898         BEGIN
  30899        
  30900                 SE T NOCOUNT  ON;
  30901        
  30902                 -- declare ba tch variab les and cu rsor
  30903                 DE CLARE @ETL BatchID AS  INT, @Ext ractBatchI D AS INT;
  30904                 DE CLARE @DWV iewName AS  VARCHAR(1 00) = 'SPa tient';
  30905        
  30906                 -- add a TRY/ CATCH to e xit upon f ailure
  30907                 BE GIN TRY
  30908        
  30909                          SET  @ExtractBa tchID = (S ELECT EL.L astExtract BatchID FR OM Dflt.Ex tractBatch Log AS EL  WHERE EL.D WViewName  = @DWViewN ame) ;
  30910        
  30911                          DECL ARE BatchC ursor CURS OR STATIC 
  30912                          FOR
  30913                          --ge t batch id s
  30914                          SELE CT EX.ETLB atchID, EX .ExtractBa tchID
  30915                          FROM  SPV.EB.Ex tractBatch  AS EX
  30916                          WHER E EX.DWVie wName = @D WViewName
  30917                                   AND EX .ExtractBa tchID > @E xtractBatc hID
  30918                          ORDE R BY EX.Ex tractBatch ID;
  30919        
  30920                          CREA TE TABLE # spat1 (
  30921                                   Sta3n  smallint,
  30922                                   Patien tIEN varch ar(50),
  30923                                   Patien tSSN varch ar(50),
  30924                                   Patien tSID int,
  30925                                   Patien tICN varch ar(50)
  30926                          )
  30927                          DECL ARE @LastE xtractBatc hID AS INT ;
  30928        
  30929                          OPEN  BatchCurs or;
  30930                          FETC H NEXT FRO M BatchCur sor INTO @ ETLBatchID , @Extract BatchID;
  30931        
  30932                          WHIL E @@FETCH_ STATUS = 0
  30933                          BEGI N
  30934                                   INSERT  INTO #spa t1
  30935                                   SELECT  Sta3n, Pa tientIEN,  PatientSSN , PatientS ID, Patien tICN
  30936                                   FROM S PV.SPatien t.SPatient
  30937                                   WHERE  ETLBatchID  = @ETLBat chID
  30938        
  30939                                   -- Sto re to upda te trackin g table la ter
  30940                                   SET @L astExtract BatchID =  @ExtractBa tchID
  30941        
  30942                                   --merg e data fro m view int o producti on(destina tion) tabl e
  30943                                   --grab  the next  batch for  processing
  30944                                   FETCH  NEXT FROM  BatchCurso r INTO @ET LBatchID,  @ExtractBa tchID;
  30945                          END
  30946        
  30947                          --cl ose and de allocate t he cursor  once all b atches for  a given t able have  been proce ssed
  30948                          CLOS E BatchCur sor;
  30949                          DEAL LOCATE Bat chCursor;
  30950        
  30951                          SELE CT
  30952                                   S.Sta3 n,
  30953                                   S.Pati entIEN,
  30954                                   S.Pati entSSN,
  30955                                   S.Pati entSID,
  30956                                   S.Pati entICN,
  30957                                   CASE
  30958                                            WHEN A.P atientSID  IS NULL TH EN 'I'
  30959                                            ELSE 'U'
  30960                                   END AS  InsertUpd ate
  30961                          INTO  #spat2
  30962                          FROM
  30963                                   #spat1  AS S
  30964                                   LEFT J OIN App.Al lCDWPatien ts AS A WI TH (NOLOCK )
  30965                                            ON S.Pat ientSID =  A.PatientS ID
  30966                                   WHERE
  30967                                            A.Patien tSID IS NU LL 
  30968                                            OR (S.St a3n != A.S ta3n
  30969                                                     OR S.Patie ntICN != A .PatientIC N
  30970                                                     OR S.Patie ntSSN != A .PatientSS N
  30971                                                     OR S.Patie ntIEN != A .PatientIE N)
  30972        
  30973                          CREA TE CLUSTER ED INDEX [ #tmpidx] O N #spat2 ( PatientSID  ASC) WITH  (DATA_COM PRESSION =  PAGE);
  30974        
  30975                          BEGI N TRANSACT ION
  30976                                   UPDATE  A
  30977                                   SET
  30978                                            A.Sta3n  = U.Sta3n,
  30979                                            A.Patien tIEN = U.P atientIEN,
  30980                                            A.Patien tSSN = U.P atientSSN,
  30981                                            A.Patien tICN = U.P atientICN
  30982                                   FROM
  30983                                            App.AllC DWPatients  AS A
  30984                                            INNER JO IN #spat2  AS U
  30985                                                     ON A.Patie ntSID = U. PatientSID
  30986                                   WHERE
  30987                                            U.Insert Update = ' U'
  30988        
  30989                                   INSERT  INTO App. AllCDWPati ents (Sta3 n, Patient IEN, Patie ntSSN, Pat ientSID, P atientICN)
  30990                                   SELECT  Sta3n, Pa tientIEN,  PatientSSN , PatientS ID, Patien tICN
  30991                                   FROM # spat2
  30992                                   WHERE  InsertUpda te = 'I'
  30993        
  30994                                   --afte r merging  batch then  update th e ExtractB atchLog ta ble
  30995                                   UPDATE  Dflt.Extr actBatchLo g
  30996                                            SET Last ExtractBat chID = @La stExtractB atchID, La stExtractD ateTime =  GETDATE()
  30997                                   WHERE  DWViewName  = @DWView Name;
  30998        
  30999                          COMM IT TRANSAC TION
  31000        
  31001                 EN D TRY
  31002        
  31003                 -- CATCH will  report ba ck specifi c details  about fail ure; the l oop will s top
  31004                 BE GIN CATCH
  31005        
  31006                          IF @ @TRANCOUNT  > 0
  31007                                   ROLLBA CK TRANSAC TION;
  31008        
  31009                          SELE CT
  31010                          ERRO R_NUMBER()  AS ErrorN umber,
  31011                          ERRO R_SEVERITY () AS Erro rSeverity,
  31012                          ERRO R_STATE()  AS ErrorSt ate,
  31013                          ERRO R_PROCEDUR E() AS Err orProcedur e,
  31014                          ERRO R_LINE() A S ErrorLin e,
  31015                          ERRO R_MESSAGE( ) AS Error Message;
  31016                  
  31017                 EN D CATCH 
  31018        
  31019         END]]>
  31020        </Value>
  31021                                  
  31022       </Property >
  31023                                 
  31024       <Property 
  31025        Name="IsAn siNullsOn"  
  31026        Value="Tru e" 
  31027       />
  31028                                 
  31029       <Relations hip 
  31030        Name="Body Dependenci es"
  31031       >
  31032                                           
  31033        <Entry>
  31034                                                    
  31035         <Reference
  31036          ExternalSo urce="Buil tIns" 
  31037          Name="[int ]" 
  31038         />
  31039                                            
  31040        </Entry>
  31041                                           
  31042        <Entry>
  31043                                                    
  31044         <Reference
  31045          ExternalSo urce="Buil tIns" 
  31046          Name="[int ]" 
  31047         />
  31048                                            
  31049        </Entry>
  31050                                           
  31051        <Entry>
  31052                                                    
  31053         <Reference
  31054          ExternalSo urce="Buil tIns" 
  31055          Name="[var char]" 
  31056         />
  31057                                            
  31058        </Entry>
  31059                                           
  31060        <Entry>
  31061                                                    
  31062         <Reference
  31063          ExternalSo urce="Buil tIns" 
  31064          Name="[int ]" 
  31065         />
  31066                                            
  31067        </Entry>
  31068                                           
  31069        <Entry>
  31070                                                    
  31071         <Reference
  31072          Name="[Dfl t].[Extrac tBatchLog]
  31073         />
  31074                                            
  31075        </Entry>
  31076                                           
  31077        <Entry>
  31078                                                    
  31079         <Reference
  31080          Name="[Dfl t].[Extrac tBatchLog] .[LastExtr actBatchID ]" 
  31081         />
  31082                                            
  31083        </Entry>
  31084                                           
  31085        <Entry>
  31086                                                    
  31087         <Reference
  31088          Name="[Dfl t].[Extrac tBatchLog] .[DWViewNa me]" 
  31089         />
  31090                                            
  31091        </Entry>
  31092                                           
  31093        <Entry>
  31094                                                    
  31095         <Reference
  31096          ExternalSo urce="SPV. dacpac" 
  31097          Name="[SPV ]|[EB].[Ex tractBatch ]" 
  31098         />
  31099                                            
  31100        </Entry>
  31101                                           
  31102        <Entry>
  31103                                                    
  31104         <Reference
  31105          ExternalSo urce="SPV. dacpac" 
  31106          Name="[SPV ]|[EB].[Ex tractBatch ].[ETLBatc hID]" 
  31107         />
  31108                                            
  31109        </Entry>
  31110                                           
  31111        <Entry>
  31112                                                    
  31113         <Reference
  31114          ExternalSo urce="SPV. dacpac" 
  31115          Name="[SPV ]|[EB].[Ex tractBatch ].[Extract BatchID]" 
  31116         />
  31117                                            
  31118        </Entry>
  31119                                           
  31120        <Entry>
  31121                                                    
  31122         <Reference
  31123          ExternalSo urce="SPV. dacpac" 
  31124          Name="[SPV ]|[EB].[Ex tractBatch ].[DWViewN ame]" 
  31125         />
  31126                                            
  31127        </Entry>
  31128                                           
  31129        <Entry>
  31130                                                    
  31131         <Reference
  31132          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1]" 
  31133         />
  31134                                            
  31135        </Entry>
  31136                                           
  31137        <Entry>
  31138                                                    
  31139         <Reference
  31140          ExternalSo urce="SPV. dacpac" 
  31141          Name="[SPV ]|[SPatien t].[SPatie nt]" 
  31142         />
  31143                                            
  31144        </Entry>
  31145                                           
  31146        <Entry>
  31147                                                    
  31148         <Reference
  31149          ExternalSo urce="SPV. dacpac" 
  31150          Name="[SPV ]|[SPatien t].[SPatie nt].[Sta3n ]" 
  31151         />
  31152                                            
  31153        </Entry>
  31154                                           
  31155        <Entry>
  31156                                                    
  31157         <Reference
  31158          ExternalSo urce="SPV. dacpac" 
  31159          Name="[SPV ]|[SPatien t].[SPatie nt].[Patie ntIEN]" 
  31160         />
  31161                                            
  31162        </Entry>
  31163                                           
  31164        <Entry>
  31165                                                    
  31166         <Reference
  31167          ExternalSo urce="SPV. dacpac" 
  31168          Name="[SPV ]|[SPatien t].[SPatie nt].[Patie ntSSN]" 
  31169         />
  31170                                            
  31171        </Entry>
  31172                                           
  31173        <Entry>
  31174                                                    
  31175         <Reference
  31176          ExternalSo urce="SPV. dacpac" 
  31177          Name="[SPV ]|[SPatien t].[SPatie nt].[Patie ntSID]" 
  31178         />
  31179                                            
  31180        </Entry>
  31181                                           
  31182        <Entry>
  31183                                                    
  31184         <Reference
  31185          ExternalSo urce="SPV. dacpac" 
  31186          Name="[SPV ]|[SPatien t].[SPatie nt].[Patie ntICN]" 
  31187         />
  31188                                            
  31189        </Entry>
  31190                                           
  31191        <Entry>
  31192                                                    
  31193         <Reference
  31194          ExternalSo urce="SPV. dacpac" 
  31195          Name="[SPV ]|[SPatien t].[SPatie nt].[ETLBa tchID]" 
  31196         />
  31197                                            
  31198        </Entry>
  31199                                           
  31200        <Entry>
  31201                                                    
  31202         <Reference
  31203          Name="[App ].[AllCDWP atients]" 
  31204         />
  31205                                            
  31206        </Entry>
  31207                                           
  31208        <Entry>
  31209                                                    
  31210         <Reference
  31211          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entSID]" 
  31212         />
  31213                                            
  31214        </Entry>
  31215                                           
  31216        <Entry>
  31217                                                    
  31218         <Reference
  31219          Name="[App ].[AllCDWP atients].[ PatientSID ]" 
  31220         />
  31221                                            
  31222        </Entry>
  31223                                           
  31224        <Entry>
  31225                                                    
  31226         <Reference
  31227          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Sta3 n]" 
  31228         />
  31229                                            
  31230        </Entry>
  31231                                           
  31232        <Entry>
  31233                                                    
  31234         <Reference
  31235          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entIEN]" 
  31236         />
  31237                                            
  31238        </Entry>
  31239                                           
  31240        <Entry>
  31241                                                    
  31242         <Reference
  31243          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entSSN]" 
  31244         />
  31245                                            
  31246        </Entry>
  31247                                           
  31248        <Entry>
  31249                                                    
  31250         <Reference
  31251          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entICN]" 
  31252         />
  31253                                            
  31254        </Entry>
  31255                                           
  31256        <Entry>
  31257                                                    
  31258         <Reference
  31259          Name="[App ].[AllCDWP atients].[ Sta3n]" 
  31260         />
  31261                                            
  31262        </Entry>
  31263                                           
  31264        <Entry>
  31265                                                    
  31266         <Reference
  31267          Name="[App ].[AllCDWP atients].[ PatientICN ]" 
  31268         />
  31269                                            
  31270        </Entry>
  31271                                           
  31272        <Entry>
  31273                                                    
  31274         <Reference
  31275          Name="[App ].[AllCDWP atients].[ PatientSSN ]" 
  31276         />
  31277                                            
  31278        </Entry>
  31279                                           
  31280        <Entry>
  31281                                                    
  31282         <Reference
  31283          Name="[App ].[AllCDWP atients].[ PatientIEN ]" 
  31284         />
  31285                                            
  31286        </Entry>
  31287                                           
  31288        <Entry />
  31289                                           
  31290        <Entry>
  31291                                                    
  31292         <Reference
  31293          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2]" 
  31294         />
  31295                                            
  31296        </Entry>
  31297                                           
  31298        <Entry>
  31299                                                    
  31300         <Reference
  31301          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entSID]" 
  31302         />
  31303                                            
  31304        </Entry>
  31305                                           
  31306        <Entry>
  31307                                                    
  31308         <Reference
  31309          Name="[App ].[AllCDWP atients].[ PatientSID ]" 
  31310         />
  31311                                            
  31312        </Entry>
  31313                                           
  31314        <Entry>
  31315                                                    
  31316         <Reference
  31317          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entSID]" 
  31318         />
  31319                                            
  31320        </Entry>
  31321                                           
  31322        <Entry>
  31323                                                    
  31324         <Reference
  31325          Name="[App ].[AllCDWP atients].[ Sta3n]" 
  31326         />
  31327                                            
  31328        </Entry>
  31329                                           
  31330        <Entry>
  31331                                                    
  31332         <Reference
  31333          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Sta3 n]" 
  31334         />
  31335                                            
  31336        </Entry>
  31337                                           
  31338        <Entry>
  31339                                                    
  31340         <Reference
  31341          Name="[App ].[AllCDWP atients].[ PatientIEN ]" 
  31342         />
  31343                                            
  31344        </Entry>
  31345                                           
  31346        <Entry>
  31347                                                    
  31348         <Reference
  31349          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entIEN]" 
  31350         />
  31351                                            
  31352        </Entry>
  31353                                           
  31354        <Entry>
  31355                                                    
  31356         <Reference
  31357          Name="[App ].[AllCDWP atients].[ PatientSSN ]" 
  31358         />
  31359                                            
  31360        </Entry>
  31361                                           
  31362        <Entry>
  31363                                                    
  31364         <Reference
  31365          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entSSN]" 
  31366         />
  31367                                            
  31368        </Entry>
  31369                                           
  31370        <Entry>
  31371                                                    
  31372         <Reference
  31373          Name="[App ].[AllCDWP atients].[ PatientICN ]" 
  31374         />
  31375                                            
  31376        </Entry>
  31377                                           
  31378        <Entry>
  31379                                                    
  31380         <Reference
  31381          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entICN]" 
  31382         />
  31383                                            
  31384        </Entry>
  31385                                           
  31386        <Entry>
  31387                                                    
  31388         <Reference
  31389          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Inse rtUpdate]"  
  31390         />
  31391                                            
  31392        </Entry>
  31393                                           
  31394        <Entry>
  31395                                                    
  31396         <Reference
  31397          Name="[App ].[AllCDWP atients].[ Sta3n]" 
  31398         />
  31399                                            
  31400        </Entry>
  31401                                           
  31402        <Entry>
  31403                                                    
  31404         <Reference
  31405          Name="[App ].[AllCDWP atients].[ PatientIEN ]" 
  31406         />
  31407                                            
  31408        </Entry>
  31409                                           
  31410        <Entry>
  31411                                                    
  31412         <Reference
  31413          Name="[App ].[AllCDWP atients].[ PatientSSN ]" 
  31414         />
  31415                                            
  31416        </Entry>
  31417                                           
  31418        <Entry>
  31419                                                    
  31420         <Reference
  31421          Name="[App ].[AllCDWP atients].[ PatientSID ]" 
  31422         />
  31423                                            
  31424        </Entry>
  31425                                           
  31426        <Entry>
  31427                                                    
  31428         <Reference
  31429          Name="[App ].[AllCDWP atients].[ PatientICN ]" 
  31430         />
  31431                                            
  31432        </Entry>
  31433                                           
  31434        <Entry>
  31435                                                    
  31436         <Reference
  31437          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Sta3 n]" 
  31438         />
  31439                                            
  31440        </Entry>
  31441                                           
  31442        <Entry>
  31443                                                    
  31444         <Reference
  31445          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entIEN]" 
  31446         />
  31447                                            
  31448        </Entry>
  31449                                           
  31450        <Entry>
  31451                                                    
  31452         <Reference
  31453          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entSSN]" 
  31454         />
  31455                                            
  31456        </Entry>
  31457                                           
  31458        <Entry>
  31459                                                    
  31460         <Reference
  31461          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entICN]" 
  31462         />
  31463                                            
  31464        </Entry>
  31465                                           
  31466        <Entry>
  31467                                                    
  31468         <Reference
  31469          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Inse rtUpdate]"  
  31470         />
  31471                                            
  31472        </Entry>
  31473                                           
  31474        <Entry>
  31475                                                    
  31476         <Reference
  31477          Name="[Dfl t].[Extrac tBatchLog] .[LastExtr actBatchID ]" 
  31478         />
  31479                                            
  31480        </Entry>
  31481                                           
  31482        <Entry>
  31483                                                    
  31484         <Reference
  31485          Name="[Dfl t].[Extrac tBatchLog] .[LastExtr actDateTim e]" 
  31486         />
  31487                                            
  31488        </Entry>
  31489                                           
  31490        <Entry>
  31491                                                    
  31492         <Reference
  31493          Name="[Dfl t].[Extrac tBatchLog] .[DWViewNa me]" 
  31494         />
  31495                                            
  31496        </Entry>
  31497                                  
  31498       </Relation ship>
  31499                                 
  31500       <Relations hip 
  31501        Name="Dyna micObjects "
  31502       >
  31503                                           
  31504        <Entry>
  31505                                                    
  31506         <Element 
  31507          Type="SqlD ynamicColu mnSource" 
  31508          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1]"
  31509         >
  31510                                                              
  31511          <Relations hip 
  31512           Name="Colu mns"
  31513          >
  31514                                                                        
  31515           <Entry>
  31516                                                                                  
  31517            <Element 
  31518             Type="SqlS impleColum n" 
  31519             Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Sta3 n]"
  31520            >
  31521                                                                                            
  31522             <Relations hip 
  31523              Name="Type Specifier"
  31524             >
  31525                                                                                                     
  31526              <Entry>
  31527                                                                                                               
  31528               <Element 
  31529                Type="SqlT ypeSpecifi er"
  31530               >
  31531                                                                                                                         
  31532                <Relations hip 
  31533                 Name="Type "
  31534                >
  31535                                                                                                                                   
  31536                 <Entry>
  31537                                                                                                                                             
  31538                  <Reference
  31539                   ExternalSo urce="Buil tIns" 
  31540                   Name="[sma llint]" 
  31541                  />
  31542                                                                                                                                    
  31543                 </Entry>
  31544                                                                                                                          
  31545                </Relation ship>
  31546                                                                                                                
  31547               </Element>
  31548                                                                                                      
  31549              </Entry>
  31550                                                                                             
  31551             </Relation ship>
  31552                                                                                   
  31553            </Element>
  31554                                                                         
  31555           </Entry>
  31556                                                                        
  31557           <Entry>
  31558                                                                                  
  31559            <Element 
  31560             Type="SqlS impleColum n" 
  31561             Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entIEN]"
  31562            >
  31563                                                                                            
  31564             <Relations hip 
  31565              Name="Type Specifier"
  31566             >
  31567                                                                                                     
  31568              <Entry>
  31569                                                                                                               
  31570               <Element 
  31571                Type="SqlT ypeSpecifi er"
  31572               >
  31573                                                                                                                         
  31574                <Property 
  31575                 Name="Leng th" 
  31576                 Value="50"  
  31577                />
  31578                                                                                                                         
  31579                <Relations hip 
  31580                 Name="Type "
  31581                >
  31582                                                                                                                                   
  31583                 <Entry>
  31584                                                                                                                                             
  31585                  <Reference
  31586                   ExternalSo urce="Buil tIns" 
  31587                   Name="[var char]" 
  31588                  />
  31589                                                                                                                                    
  31590                 </Entry>
  31591                                                                                                                          
  31592                </Relation ship>
  31593                                                                                                                
  31594               </Element>
  31595                                                                                                      
  31596              </Entry>
  31597                                                                                             
  31598             </Relation ship>
  31599                                                                                   
  31600            </Element>
  31601                                                                         
  31602           </Entry>
  31603                                                                        
  31604           <Entry>
  31605                                                                                  
  31606            <Element 
  31607             Type="SqlS impleColum n" 
  31608             Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entSSN]"
  31609            >
  31610                                                                                            
  31611             <Relations hip 
  31612              Name="Type Specifier"
  31613             >
  31614                                                                                                     
  31615              <Entry>
  31616                                                                                                               
  31617               <Element 
  31618                Type="SqlT ypeSpecifi er"
  31619               >
  31620                                                                                                                         
  31621                <Property 
  31622                 Name="Leng th" 
  31623                 Value="50"  
  31624                />
  31625                                                                                                                         
  31626                <Relations hip 
  31627                 Name="Type "
  31628                >
  31629                                                                                                                                   
  31630                 <Entry>
  31631                                                                                                                                             
  31632                  <Reference
  31633                   ExternalSo urce="Buil tIns" 
  31634                   Name="[var char]" 
  31635                  />
  31636                                                                                                                                    
  31637                 </Entry>
  31638                                                                                                                          
  31639                </Relation ship>
  31640                                                                                                                
  31641               </Element>
  31642                                                                                                      
  31643              </Entry>
  31644                                                                                             
  31645             </Relation ship>
  31646                                                                                   
  31647            </Element>
  31648                                                                         
  31649           </Entry>
  31650                                                                        
  31651           <Entry>
  31652                                                                                  
  31653            <Element 
  31654             Type="SqlS impleColum n" 
  31655             Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entSID]"
  31656            >
  31657                                                                                            
  31658             <Relations hip 
  31659              Name="Type Specifier"
  31660             >
  31661                                                                                                     
  31662              <Entry>
  31663                                                                                                               
  31664               <Element 
  31665                Type="SqlT ypeSpecifi er"
  31666               >
  31667                                                                                                                         
  31668                <Relations hip 
  31669                 Name="Type "
  31670                >
  31671                                                                                                                                   
  31672                 <Entry>
  31673                                                                                                                                             
  31674                  <Reference
  31675                   ExternalSo urce="Buil tIns" 
  31676                   Name="[int ]" 
  31677                  />
  31678                                                                                                                                    
  31679                 </Entry>
  31680                                                                                                                          
  31681                </Relation ship>
  31682                                                                                                                
  31683               </Element>
  31684                                                                                                      
  31685              </Entry>
  31686                                                                                             
  31687             </Relation ship>
  31688                                                                                   
  31689            </Element>
  31690                                                                         
  31691           </Entry>
  31692                                                                        
  31693           <Entry>
  31694                                                                                  
  31695            <Element 
  31696             Type="SqlS impleColum n" 
  31697             Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entICN]"
  31698            >
  31699                                                                                            
  31700             <Relations hip 
  31701              Name="Type Specifier"
  31702             >
  31703                                                                                                     
  31704              <Entry>
  31705                                                                                                               
  31706               <Element 
  31707                Type="SqlT ypeSpecifi er"
  31708               >
  31709                                                                                                                         
  31710                <Property 
  31711                 Name="Leng th" 
  31712                 Value="50"  
  31713                />
  31714                                                                                                                         
  31715                <Relations hip 
  31716                 Name="Type "
  31717                >
  31718                                                                                                                                   
  31719                 <Entry>
  31720                                                                                                                                             
  31721                  <Reference
  31722                   ExternalSo urce="Buil tIns" 
  31723                   Name="[var char]" 
  31724                  />
  31725                                                                                                                                    
  31726                 </Entry>
  31727                                                                                                                          
  31728                </Relation ship>
  31729                                                                                                                
  31730               </Element>
  31731                                                                                                      
  31732              </Entry>
  31733                                                                                             
  31734             </Relation ship>
  31735                                                                                   
  31736            </Element>
  31737                                                                         
  31738           </Entry>
  31739                                                               
  31740          </Relation ship>
  31741                                                     
  31742         </Element>
  31743                                            
  31744        </Entry>
  31745                                           
  31746        <Entry>
  31747                                                    
  31748         <Element 
  31749          Type="SqlD ynamicColu mnSource" 
  31750          Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2]"
  31751         >
  31752                                                              
  31753          <Relations hip 
  31754           Name="Colu mns"
  31755          >
  31756                                                                        
  31757           <Entry>
  31758                                                                                  
  31759            <Element 
  31760             Type="SqlC omputedCol umn" 
  31761             Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Sta3 n]"
  31762            >
  31763                                                                                            
  31764             <Relations hip 
  31765              Name="Expr essionDepe ndencies"
  31766             >
  31767                                                                                                     
  31768              <Entry>
  31769                                                                                                               
  31770               <Reference
  31771                Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Sta3 n]" 
  31772               />
  31773                                                                                                      
  31774              </Entry>
  31775                                                                                             
  31776             </Relation ship>
  31777                                                                                   
  31778            </Element>
  31779                                                                         
  31780           </Entry>
  31781                                                                        
  31782           <Entry>
  31783                                                                                  
  31784            <Element 
  31785             Type="SqlC omputedCol umn" 
  31786             Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entIEN]"
  31787            >
  31788                                                                                            
  31789             <Relations hip 
  31790              Name="Expr essionDepe ndencies"
  31791             >
  31792                                                                                                     
  31793              <Entry>
  31794                                                                                                               
  31795               <Reference
  31796                Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entIEN]" 
  31797               />
  31798                                                                                                      
  31799              </Entry>
  31800                                                                                             
  31801             </Relation ship>
  31802                                                                                   
  31803            </Element>
  31804                                                                         
  31805           </Entry>
  31806                                                                        
  31807           <Entry>
  31808                                                                                  
  31809            <Element 
  31810             Type="SqlC omputedCol umn" 
  31811             Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entSSN]"
  31812            >
  31813                                                                                            
  31814             <Relations hip 
  31815              Name="Expr essionDepe ndencies"
  31816             >
  31817                                                                                                     
  31818              <Entry>
  31819                                                                                                               
  31820               <Reference
  31821                Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entSSN]" 
  31822               />
  31823                                                                                                      
  31824              </Entry>
  31825                                                                                             
  31826             </Relation ship>
  31827                                                                                   
  31828            </Element>
  31829                                                                         
  31830           </Entry>
  31831                                                                        
  31832           <Entry>
  31833                                                                                  
  31834            <Element 
  31835             Type="SqlC omputedCol umn" 
  31836             Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entSID]"
  31837            >
  31838                                                                                            
  31839             <Relations hip 
  31840              Name="Expr essionDepe ndencies"
  31841             >
  31842                                                                                                     
  31843              <Entry>
  31844                                                                                                               
  31845               <Reference
  31846                Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entSID]" 
  31847               />
  31848                                                                                                      
  31849              </Entry>
  31850                                                                                             
  31851             </Relation ship>
  31852                                                                                   
  31853            </Element>
  31854                                                                         
  31855           </Entry>
  31856                                                                        
  31857           <Entry>
  31858                                                                                  
  31859            <Element 
  31860             Type="SqlC omputedCol umn" 
  31861             Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Pati entICN]"
  31862            >
  31863                                                                                            
  31864             <Relations hip 
  31865              Name="Expr essionDepe ndencies"
  31866             >
  31867                                                                                                     
  31868              <Entry>
  31869                                                                                                               
  31870               <Reference
  31871                Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at1].[Pati entICN]" 
  31872               />
  31873                                                                                                      
  31874              </Entry>
  31875                                                                                             
  31876             </Relation ship>
  31877                                                                                   
  31878            </Element>
  31879                                                                         
  31880           </Entry>
  31881                                                                        
  31882           <Entry>
  31883                                                                                  
  31884            <Element 
  31885             Type="SqlC omputedCol umn" 
  31886             Name="[Pan elMgmt].[u sp_Rebuild AllCDWPati ents].[#sp at2].[Inse rtUpdate]"  
  31887            />
  31888                                                                         
  31889           </Entry>
  31890                                                               
  31891          </Relation ship>
  31892                                                     
  31893         </Element>
  31894                                            
  31895        </Entry>
  31896                                  
  31897       </Relation ship>
  31898                                 
  31899       <Relations hip 
  31900        Name="Sche ma"
  31901       >
  31902                                           
  31903        <Entry>
  31904                                                    
  31905         <Reference
  31906          Name="[Pan elMgmt]" 
  31907         />
  31908                                            
  31909        </Entry>
  31910                                  
  31911       </Relation ship>
  31912                                 
  31913       <Annotatio
  31914        Type="SysC ommentsObj ectAnnotat ion"
  31915       >
  31916                                           
  31917        <Property 
  31918         Name="Crea teOffset" 
  31919         Value="2" 
  31920        />
  31921                                           
  31922        <Property 
  31923         Name="Leng th" 
  31924         Value="767 2" 
  31925        />
  31926                                           
  31927        <Property 
  31928         Name="Star tLine" 
  31929         Value="1" 
  31930        />
  31931                                           
  31932        <Property 
  31933         Name="Star tColumn" 
  31934         Value="1" 
  31935        />
  31936                                           
  31937        <Property 
  31938         Name="Head erContents
  31939         Value="&#x D;&#xA;CRE ATE PROCED URE [Panel Mgmt].[usp _RebuildAl lCDWPatien ts] &#xD;& #xA;AS" 
  31940        />
  31941                                  
  31942       </Annotati on>
  31943                        
  31944      </Element>
  31945                       
  31946      <Element 
  31947       Type="SqlV iew" 
  31948       Name="[Pan elMgmt].[v ICD]"
  31949      >
  31950                                 
  31951       <Property 
  31952        Name="Quer yScript"
  31953       >
  31954                                           
  31955        <Value>
  31956         <![CDATA[
  31957         --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =
  31958         --Region                  : R01
  31959         --Visn                                      : V20
  31960         --Requesto r                                : NWIC
  31961         --Author                  : Jerr y Kohler
  31962         --Object/S P Name                  : vICD
  31963         --Server                                   
  31964         --Data Bas e                                : CC_REFDO C
  31965         --Schema                                    : PanelMgm t
  31966         --Report                                    : Any Pane l Manageme nt registr y or repor t.
  31967         --Folder                                    :
  31968         --Report L oc             : 
  31969         --Job Loc                 : None
  31970         --Note                    : THIS  VIEW RETU RNS THE CU RRENT DESC RIPTION AN D DIAGNOST IC TEXT, N OT HISTORI C ONES
  31971         --                        : BASE D ON A DAT E.  This v iew is not  supported  by CDW, B ISL or any  OI&T grou p.
  31972         --                        :
  31973         --                        : Thes e views on ly exist a t district  5.  Any c ode using  them canno t be share d beyond
  31974         --                          dist rict 5.
  31975         --                        :
  31976         --Date Cre ated           : 09-2 1-2015
  31977         --
  31978         --Last Cha nged           : 
  31979         --Last Cha nged By                 : 
  31980         --Reason F or Change               : 
  31981         --
  31982         --Purpose                 : To m inimize th e impact o f future C DW changes  of ICD-9/ 10 on our  code.
  31983         --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =
  31984         Select Sta 3n,
  31985                ICD IEN             AS IC DIEN,
  31986                ICD 9SID            AS IC DSID,
  31987                ICD 9Code           AS IC DCode, 
  31988                ICD 9Descripti on   AS IC DDescripti on,
  31989                ICD 9Diagnosis Text AS IC DDiagnosis Text,
  31990                ICD Version
  31991         From Panel Mgmt.vICD9
  31992        
  31993         UNION ALL
  31994        
  31995         Select Sta 3n,
  31996                ICD IEN              AS I CDIEN,
  31997                ICD 10SID            AS I CDSID,
  31998                ICD 10Code           AS I CDCode, 
  31999                ICD 10Descript ion   AS I CDDescript ion,
  32000                ICD 10Diagnosi sText AS I CDDiagnosi sText,
  32001                ICD Version
  32002         From Panel Mgmt.vICD1 0
  32003        
  32004         ]]>
  32005        </Value>
  32006                                  
  32007       </Property >
  32008                                 
  32009       <Property 
  32010        Name="IsAn siNullsOn"  
  32011        Value="Tru e" 
  32012       />
  32013                                 
  32014       <Relations hip 
  32015        Name="Colu mns"
  32016       >
  32017                                           
  32018        <Entry>
  32019                                                    
  32020         <Element 
  32021          Type="SqlC omputedCol umn" 
  32022          Name="[Pan elMgmt].[v ICD].[Sta3 n]"
  32023         >
  32024                                                              
  32025          <Relations hip 
  32026           Name="Expr essionDepe ndencies"
  32027          >
  32028                                                                        
  32029           <Entry>
  32030                                                                                  
  32031            <Reference
  32032             Name="[Pan elMgmt].[v ICD9].[Sta 3n]" 
  32033            />
  32034                                                                         
  32035           </Entry>
  32036                                                               
  32037          </Relation ship>
  32038                                                     
  32039         </Element>
  32040                                            
  32041        </Entry>
  32042                                           
  32043        <Entry>
  32044                                                    
  32045         <Element 
  32046          Type="SqlC omputedCol umn" 
  32047          Name="[Pan elMgmt].[v ICD].[ICDI EN]"
  32048         >
  32049                                                              
  32050          <Relations hip 
  32051           Name="Expr essionDepe ndencies"
  32052          >
  32053                                                                        
  32054           <Entry>
  32055                                                                                  
  32056            <Reference
  32057             Name="[Pan elMgmt].[v ICD9].[ICD IEN]" 
  32058            />
  32059                                                                         
  32060           </Entry>
  32061                                                               
  32062          </Relation ship>
  32063                                                     
  32064         </Element>
  32065                                            
  32066        </Entry>
  32067                                           
  32068        <Entry>
  32069                                                    
  32070         <Element 
  32071          Type="SqlC omputedCol umn" 
  32072          Name="[Pan elMgmt].[v ICD].[ICDS ID]"
  32073         >
  32074                                                              
  32075          <Relations hip 
  32076           Name="Expr essionDepe ndencies"
  32077          >
  32078                                                                        
  32079           <Entry>
  32080                                                                                  
  32081            <Reference
  32082             Name="[Pan elMgmt].[v ICD9].[ICD 9SID]" 
  32083            />
  32084                                                                         
  32085           </Entry>
  32086                                                               
  32087          </Relation ship>
  32088                                                     
  32089         </Element>
  32090                                            
  32091        </Entry>
  32092                                           
  32093        <Entry>
  32094                                                    
  32095         <Element 
  32096          Type="SqlC omputedCol umn" 
  32097          Name="[Pan elMgmt].[v ICD].[ICDC ode]"
  32098         >
  32099                                                              
  32100          <Relations hip 
  32101           Name="Expr essionDepe ndencies"
  32102          >
  32103                                                                        
  32104           <Entry>
  32105                                                                                  
  32106            <Reference
  32107             Name="[Pan elMgmt].[v ICD9].[ICD 9Code]" 
  32108            />
  32109                                                                         
  32110           </Entry>
  32111                                                               
  32112          </Relation ship>
  32113                                                     
  32114         </Element>
  32115                                            
  32116        </Entry>
  32117                                           
  32118        <Entry>
  32119                                                    
  32120         <Element 
  32121          Type="SqlC omputedCol umn" 
  32122          Name="[Pan elMgmt].[v ICD].[ICDD escription ]"
  32123         >
  32124                                                              
  32125          <Relations hip 
  32126           Name="Expr essionDepe ndencies"
  32127          >
  32128                                                                        
  32129           <Entry>
  32130                                                                                  
  32131            <Reference
  32132             Name="[Pan elMgmt].[v ICD9].[ICD 9Descripti on]" 
  32133            />
  32134                                                                         
  32135           </Entry>
  32136                                                               
  32137          </Relation ship>
  32138                                                     
  32139         </Element>
  32140                                            
  32141        </Entry>
  32142                                           
  32143        <Entry>
  32144                                                    
  32145         <Element 
  32146          Type="SqlC omputedCol umn" 
  32147          Name="[Pan elMgmt].[v ICD].[ICDD iagnosisTe xt]"
  32148         >
  32149                                                              
  32150          <Relations hip 
  32151           Name="Expr essionDepe ndencies"
  32152          >
  32153                                                                        
  32154           <Entry>
  32155                                                                                  
  32156            <Reference
  32157             Name="[Pan elMgmt].[v ICD9].[ICD 9Diagnosis Text]" 
  32158            />
  32159                                                                         
  32160           </Entry>
  32161                                                               
  32162          </Relation ship>
  32163                                                     
  32164         </Element>
  32165                                            
  32166        </Entry>
  32167                                           
  32168        <Entry>
  32169                                                    
  32170         <Element 
  32171          Type="SqlC omputedCol umn" 
  32172          Name="[Pan elMgmt].[v ICD].[ICDV ersion]"
  32173         >
  32174                                                              
  32175          <Relations hip 
  32176           Name="Expr essionDepe ndencies"
  32177          >
  32178                                                                        
  32179           <Entry>
  32180                                                                                  
  32181            <Reference
  32182             Name="[Pan elMgmt].[v ICD9].[ICD Version]" 
  32183            />
  32184                                                                         
  32185           </Entry>
  32186                                                               
  32187          </Relation ship>
  32188                                                     
  32189         </Element>
  32190                                            
  32191        </Entry>
  32192                                  
  32193       </Relation ship>
  32194                                 
  32195       <Relations hip 
  32196        Name="Quer yDependenc ies"
  32197       >
  32198                                           
  32199        <Entry>
  32200                                                    
  32201         <Reference
  32202          Name="[Pan elMgmt].[v ICD9]" 
  32203         />
  32204                                            
  32205        </Entry>
  32206                                           
  32207        <Entry>
  32208                                                    
  32209         <Reference
  32210          Name="[Pan elMgmt].[v ICD9].[Sta 3n]" 
  32211         />
  32212                                            
  32213        </Entry>
  32214                                           
  32215        <Entry>
  32216                                                    
  32217         <Reference
  32218          Name="[Pan elMgmt].[v ICD9].[ICD IEN]" 
  32219         />
  32220                                            
  32221        </Entry>
  32222                                           
  32223        <Entry>
  32224                                                    
  32225         <Reference
  32226          Name="[Pan elMgmt].[v ICD9].[ICD 9SID]" 
  32227         />
  32228                                            
  32229        </Entry>
  32230                                           
  32231        <Entry>
  32232                                                    
  32233         <Reference
  32234          Name="[Pan elMgmt].[v ICD9].[ICD 9Code]" 
  32235         />
  32236                                            
  32237        </Entry>
  32238                                           
  32239        <Entry>
  32240                                                    
  32241         <Reference
  32242          Name="[Pan elMgmt].[v ICD9].[ICD 9Descripti on]" 
  32243         />
  32244                                            
  32245        </Entry>
  32246                                           
  32247        <Entry>
  32248                                                    
  32249         <Reference
  32250          Name="[Pan elMgmt].[v ICD9].[ICD 9Diagnosis Text]" 
  32251         />
  32252                                            
  32253        </Entry>
  32254                                           
  32255        <Entry>
  32256                                                    
  32257         <Reference
  32258          Name="[Pan elMgmt].[v ICD9].[ICD Version]" 
  32259         />
  32260                                            
  32261        </Entry>
  32262                                           
  32263        <Entry>
  32264                                                    
  32265         <Reference
  32266          Name="[Pan elMgmt].[v ICD10]" 
  32267         />
  32268                                            
  32269        </Entry>
  32270                                           
  32271        <Entry>
  32272                                                    
  32273         <Reference
  32274          Name="[Pan elMgmt].[v ICD10].[St a3n]" 
  32275         />
  32276                                            
  32277        </Entry>
  32278                                           
  32279        <Entry>
  32280                                                    
  32281         <Reference
  32282          Name="[Pan elMgmt].[v ICD10].[IC DIEN]" 
  32283         />
  32284                                            
  32285        </Entry>
  32286                                           
  32287        <Entry>
  32288                                                    
  32289         <Reference
  32290          Name="[Pan elMgmt].[v ICD10].[IC D10SID]" 
  32291         />
  32292                                            
  32293        </Entry>
  32294                                           
  32295        <Entry>
  32296                                                    
  32297         <Reference
  32298          Name="[Pan elMgmt].[v ICD10].[IC D10Code]" 
  32299         />
  32300                                            
  32301        </Entry>
  32302                                           
  32303        <Entry>
  32304                                                    
  32305         <Reference
  32306          Name="[Pan elMgmt].[v ICD10].[IC D10Descrip tion]" 
  32307         />
  32308                                            
  32309        </Entry>
  32310                                           
  32311        <Entry>
  32312                                                    
  32313         <Reference
  32314          Name="[Pan elMgmt].[v ICD10].[IC D10Diagnos isText]" 
  32315         />
  32316                                            
  32317        </Entry>
  32318                                           
  32319        <Entry>
  32320                                                    
  32321         <Reference
  32322          Name="[Pan elMgmt].[v ICD10].[IC DVersion]"  
  32323         />
  32324                                            
  32325        </Entry>
  32326                                  
  32327       </Relation ship>
  32328                                 
  32329       <Relations hip 
  32330        Name="Sche ma"
  32331       >
  32332                                           
  32333        <Entry>
  32334                                                    
  32335         <Reference
  32336          Name="[Pan elMgmt]" 
  32337         />
  32338                                            
  32339        </Entry>
  32340                                  
  32341       </Relation ship>
  32342                                 
  32343       <Annotatio
  32344        Type="SysC ommentsObj ectAnnotat ion"
  32345       >
  32346                                           
  32347        <Property 
  32348         Name="Crea teOffset" 
  32349         Value="8" 
  32350        />
  32351                                           
  32352        <Property 
  32353         Name="Leng th" 
  32354         Value="178 7" 
  32355        />
  32356                                           
  32357        <Property 
  32358         Name="Star tLine" 
  32359         Value="1" 
  32360        />
  32361                                           
  32362        <Property 
  32363         Name="Star tColumn" 
  32364         Value="1" 
  32365        />
  32366                                           
  32367        <Property 
  32368         Name="Head erContents
  32369         Value="&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;CRE ATE View [ PanelMgmt] .[vICD] AS
  32370        />
  32371                                           
  32372        <Property 
  32373         Name="Foot erContents
  32374         Value=";" 
  32375        />
  32376                                  
  32377       </Annotati on>
  32378                        
  32379      </Element>
  32380                       
  32381      <Element 
  32382       Type="SqlV iew" 
  32383       Name="[Pan elMgmt].[v ICD10]"
  32384      >
  32385                                 
  32386       <Property 
  32387        Name="Quer yScript"
  32388       >
  32389                                           
  32390        <Value>
  32391         <![CDATA[
  32392         --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =
  32393         --Region                  : R01
  32394         --Visn                                      : V20
  32395         --Requesto r                                : NWIC
  32396         --Author                  : Jerr y Kohler
  32397         --Object/S P Name                  : vICD10
  32398         --Server                                   
  32399         --Data Bas e                                : CC_REFDO C
  32400         --Schema                                    : PanelMgm t
  32401         --Report                                    : Any Pane l Manageme nt registr y or repor t.
  32402         --Folder                                    :
  32403         --Report L oc             : 
  32404         --Job Loc                 : None
  32405         --Note                    : THIS  VIEW RETU RNS THE CU RRENT DESC RIPTION AN D DIAGNOST IC TEXT, N OT HISTORI C ONES
  32406         --                        : BASE D ON A DAT E.  This v iew is not  supported  by CDW, B ISL or any  OI&T grou p.
  32407         --                        : The  ICD-10 cod es do not  become eff ective unt il 10/01/2 015.
  32408         --                        :
  32409         --                        : Thes e views on ly exist a t district  5.  Any c ode using  them canno t be share d beyond
  32410         --                          dist rict 5.
  32411         --                        :
  32412         --Date Cre ated           : 09-1 0-2015
  32413         --                        :
  32414         --Last Cha nged           : 09-1 1-2015
  32415         --Last Cha nged By                 : Jerry  Kohler
  32416         --Reason F or Change               : Added  ICD10 Diag nosis
  32417         --
  32418         --Purpose                 : To m inimize th e impact o f future C DW changes  to ICD-9/ 10
  32419         --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =
  32420         Select a.S ta3n,
  32421                a.I CDIEN,
  32422                a.I CD10SID,
  32423                a.I CD10Code, 
  32424                b.I CD10Descri ption,
  32425                c.I CD10Diagno sis AS ICD 10Diagnosi sText,
  32426                CAS T(10 AS SM ALLINT) AS  ICDVersio n
  32427         from CDWWo rk.Dim.ICD 10 a
  32428         join CDWWo rk.Dim.ICD 10Descript ionVersion  b on b.IC D10SID = a .ICD10SID
  32429         and b.Curr entVersion Flag = 'Y'
  32430         join CDWWo rk.Dim.ICD 10Diagnosi sVersion c  on c.ICD1 0SID = a.I CD10SID
  32431         and c.Curr entVersion Flag = 'Y'
  32432         ]]>
  32433        </Value>
  32434                                  
  32435       </Property >
  32436                                 
  32437       <Property 
  32438        Name="IsAn siNullsOn"  
  32439        Value="Tru e" 
  32440       />
  32441                                 
  32442       <Relations hip 
  32443        Name="Colu mns"
  32444       >
  32445                                           
  32446        <Entry>
  32447                                                    
  32448         <Element 
  32449          Type="SqlC omputedCol umn" 
  32450          Name="[Pan elMgmt].[v ICD10].[St a3n]"
  32451         >
  32452                                                              
  32453          <Relations hip 
  32454           Name="Expr essionDepe ndencies"
  32455          >
  32456                                                                        
  32457           <Entry>
  32458                                                                                  
  32459            <Reference
  32460             ExternalSo urce="CDWW ork.dacpac
  32461             Name="[CDW Work]|[Dim ].[ICD10]. [Sta3n]" 
  32462            />
  32463                                                                         
  32464           </Entry>
  32465                                                               
  32466          </Relation ship>
  32467                                                     
  32468         </Element>
  32469                                            
  32470        </Entry>
  32471                                           
  32472        <Entry>
  32473                                                    
  32474         <Element 
  32475          Type="SqlC omputedCol umn" 
  32476          Name="[Pan elMgmt].[v ICD10].[IC DIEN]"
  32477         >
  32478                                                              
  32479          <Relations hip 
  32480           Name="Expr essionDepe ndencies"
  32481          >
  32482                                                                        
  32483           <Entry>
  32484                                                                                  
  32485            <Reference
  32486             ExternalSo urce="CDWW ork.dacpac
  32487             Name="[CDW Work]|[Dim ].[ICD10]. [ICDIEN]" 
  32488            />
  32489                                                                         
  32490           </Entry>
  32491                                                               
  32492          </Relation ship>
  32493                                                     
  32494         </Element>
  32495                                            
  32496        </Entry>
  32497                                           
  32498        <Entry>
  32499                                                    
  32500         <Element 
  32501          Type="SqlC omputedCol umn" 
  32502          Name="[Pan elMgmt].[v ICD10].[IC D10SID]"
  32503         >
  32504                                                              
  32505          <Relations hip 
  32506           Name="Expr essionDepe ndencies"
  32507          >
  32508                                                                        
  32509           <Entry>
  32510                                                                                  
  32511            <Reference
  32512             ExternalSo urce="CDWW ork.dacpac
  32513             Name="[CDW Work]|[Dim ].[ICD10]. [ICD10SID]
  32514            />
  32515                                                                         
  32516           </Entry>
  32517                                                               
  32518          </Relation ship>
  32519                                                     
  32520         </Element>
  32521                                            
  32522        </Entry>
  32523                                           
  32524        <Entry>
  32525                                                    
  32526         <Element 
  32527          Type="SqlC omputedCol umn" 
  32528          Name="[Pan elMgmt].[v ICD10].[IC D10Code]"
  32529         >
  32530                                                              
  32531          <Relations hip 
  32532           Name="Expr essionDepe ndencies"
  32533          >
  32534                                                                        
  32535           <Entry>
  32536                                                                                  
  32537            <Reference
  32538             ExternalSo urce="CDWW ork.dacpac
  32539             Name="[CDW Work]|[Dim ].[ICD10]. [ICD10Code ]" 
  32540            />
  32541                                                                         
  32542           </Entry>
  32543                                                               
  32544          </Relation ship>
  32545                                                     
  32546         </Element>
  32547                                            
  32548        </Entry>
  32549                                           
  32550        <Entry>
  32551                                                    
  32552         <Element 
  32553          Type="SqlC omputedCol umn" 
  32554          Name="[Pan elMgmt].[v ICD10].[IC D10Descrip tion]"
  32555         >
  32556                                                              
  32557          <Relations hip 
  32558           Name="Expr essionDepe ndencies"
  32559          >
  32560                                                                        
  32561           <Entry>
  32562                                                                                  
  32563            <Reference
  32564             ExternalSo urce="CDWW ork.dacpac
  32565             Name="[CDW Work]|[Dim ].[ICD10De scriptionV ersion].[I CD10Descri ption]" 
  32566            />
  32567                                                                         
  32568           </Entry>
  32569                                                               
  32570          </Relation ship>
  32571                                                     
  32572         </Element>
  32573                                            
  32574        </Entry>
  32575                                           
  32576        <Entry>
  32577                                                    
  32578         <Element 
  32579          Type="SqlC omputedCol umn" 
  32580          Name="[Pan elMgmt].[v ICD10].[IC D10Diagnos isText]"
  32581         >
  32582                                                              
  32583          <Relations hip 
  32584           Name="Expr essionDepe ndencies"
  32585          >
  32586                                                                        
  32587           <Entry>
  32588                                                                                  
  32589            <Reference
  32590             ExternalSo urce="CDWW ork.dacpac
  32591             Name="[CDW Work]|[Dim ].[ICD10Di agnosisVer sion].[ICD 10Diagnosi s]" 
  32592            />
  32593                                                                         
  32594           </Entry>
  32595                                                               
  32596          </Relation ship>
  32597                                                     
  32598         </Element>
  32599                                            
  32600        </Entry>
  32601                                           
  32602        <Entry>
  32603                                                    
  32604         <Element 
  32605          Type="SqlC omputedCol umn" 
  32606          Name="[Pan elMgmt].[v ICD10].[IC DVersion]"  
  32607         />
  32608                                            
  32609        </Entry>
  32610                                  
  32611       </Relation ship>
  32612                                 
  32613       <Relations hip 
  32614        Name="Quer yDependenc ies"
  32615       >
  32616                                           
  32617        <Entry>
  32618                                                    
  32619         <Reference
  32620          ExternalSo urce="CDWW ork.dacpac
  32621          Name="[CDW Work]|[Dim ].[ICD10]"  
  32622         />
  32623                                            
  32624        </Entry>
  32625                                           
  32626        <Entry>
  32627                                                    
  32628         <Reference
  32629          ExternalSo urce="CDWW ork.dacpac
  32630          Name="[CDW Work]|[Dim ].[ICD10De scriptionV ersion]" 
  32631         />
  32632                                            
  32633        </Entry>
  32634                                           
  32635        <Entry>
  32636                                                    
  32637         <Reference
  32638          ExternalSo urce="CDWW ork.dacpac
  32639          Name="[CDW Work]|[Dim ].[ICD10De scriptionV ersion].[I CD10SID]" 
  32640         />
  32641                                            
  32642        </Entry>
  32643                                           
  32644        <Entry>
  32645                                                    
  32646         <Reference
  32647          ExternalSo urce="CDWW ork.dacpac
  32648          Name="[CDW Work]|[Dim ].[ICD10]. [ICD10SID]
  32649         />
  32650                                            
  32651        </Entry>
  32652                                           
  32653        <Entry>
  32654                                                    
  32655         <Reference
  32656          ExternalSo urce="CDWW ork.dacpac
  32657          Name="[CDW Work]|[Dim ].[ICD10De scriptionV ersion].[C urrentVers ionFlag]" 
  32658         />
  32659                                            
  32660        </Entry>
  32661                                           
  32662        <Entry>
  32663                                                    
  32664         <Reference
  32665          ExternalSo urce="CDWW ork.dacpac
  32666          Name="[CDW Work]|[Dim ].[ICD10Di agnosisVer sion]" 
  32667         />
  32668                                            
  32669        </Entry>
  32670                                           
  32671        <Entry>
  32672                                                    
  32673         <Reference
  32674          ExternalSo urce="CDWW ork.dacpac
  32675          Name="[CDW Work]|[Dim ].[ICD10Di agnosisVer sion].[ICD 10SID]" 
  32676         />
  32677                                            
  32678        </Entry>
  32679                                           
  32680        <Entry>
  32681                                                    
  32682         <Reference
  32683          ExternalSo urce="CDWW ork.dacpac
  32684          Name="[CDW Work]|[Dim ].[ICD10]. [ICD10SID]
  32685         />
  32686                                            
  32687        </Entry>
  32688                                           
  32689        <Entry>
  32690                                                    
  32691         <Reference
  32692          ExternalSo urce="CDWW ork.dacpac
  32693          Name="[CDW Work]|[Dim ].[ICD10Di agnosisVer sion].[Cur rentVersio nFlag]" 
  32694         />
  32695                                            
  32696        </Entry>
  32697                                           
  32698        <Entry>
  32699                                                    
  32700         <Reference
  32701          ExternalSo urce="CDWW ork.dacpac
  32702          Name="[CDW Work]|[Dim ].[ICD10]. [Sta3n]" 
  32703         />
  32704                                            
  32705        </Entry>
  32706                                           
  32707        <Entry>
  32708                                                    
  32709         <Reference
  32710          ExternalSo urce="CDWW ork.dacpac
  32711          Name="[CDW Work]|[Dim ].[ICD10]. [ICDIEN]" 
  32712         />
  32713                                            
  32714        </Entry>
  32715                                           
  32716        <Entry>
  32717                                                    
  32718         <Reference
  32719          ExternalSo urce="CDWW ork.dacpac
  32720          Name="[CDW Work]|[Dim ].[ICD10]. [ICD10Code ]" 
  32721         />
  32722                                            
  32723        </Entry>
  32724                                           
  32725        <Entry>
  32726                                                    
  32727         <Reference
  32728          ExternalSo urce="CDWW ork.dacpac
  32729          Name="[CDW Work]|[Dim ].[ICD10De scriptionV ersion].[I CD10Descri ption]" 
  32730         />
  32731                                            
  32732        </Entry>
  32733                                           
  32734        <Entry>
  32735                                                    
  32736         <Reference
  32737          ExternalSo urce="CDWW ork.dacpac
  32738          Name="[CDW Work]|[Dim ].[ICD10Di agnosisVer sion].[ICD 10Diagnosi s]" 
  32739         />
  32740                                            
  32741        </Entry>
  32742                                           
  32743        <Entry>
  32744                                                    
  32745         <Reference
  32746          ExternalSo urce="Buil tIns" 
  32747          Name="[sma llint]" 
  32748         />
  32749                                            
  32750        </Entry>
  32751                                  
  32752       </Relation ship>
  32753                                 
  32754       <Relations hip 
  32755        Name="Sche ma"
  32756       >
  32757                                           
  32758        <Entry>
  32759                                                    
  32760         <Reference
  32761          Name="[Pan elMgmt]" 
  32762         />
  32763                                            
  32764        </Entry>
  32765                                  
  32766       </Relation ship>
  32767                                 
  32768       <Annotatio
  32769        Type="SysC ommentsObj ectAnnotat ion"
  32770       >
  32771                                           
  32772        <Property 
  32773         Name="Crea teOffset" 
  32774         Value="8" 
  32775        />
  32776                                           
  32777        <Property 
  32778         Name="Leng th" 
  32779         Value="181 1" 
  32780        />
  32781                                           
  32782        <Property 
  32783         Name="Star tLine" 
  32784         Value="1" 
  32785        />
  32786                                           
  32787        <Property 
  32788         Name="Star tColumn" 
  32789         Value="1" 
  32790        />
  32791                                           
  32792        <Property 
  32793         Name="Head erContents
  32794         Value="&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;CRE ATE VIEW [ PanelMgmt] .[vICD10]  AS" 
  32795        />
  32796                                           
  32797        <Property 
  32798         Name="Foot erContents
  32799         Value=";" 
  32800        />
  32801                                  
  32802       </Annotati on>
  32803                        
  32804      </Element>
  32805                       
  32806      <Element 
  32807       Type="SqlV iew" 
  32808       Name="[Pan elMgmt].[v ICD9]"
  32809      >
  32810                                 
  32811       <Property 
  32812        Name="Quer yScript"
  32813       >
  32814                                           
  32815        <Value>
  32816         <![CDATA[
  32817         --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =
  32818         --Region                  : R01
  32819         --Visn                                      : V20
  32820         --Requesto r                                : NWIC
  32821         --Author                  : Jerr y Kohler
  32822         --Object/S P Name                  : vICD9
  32823         --Server                                   
  32824         --Data Bas e                                : CC_REFDO C
  32825         --Schema                                    : PanelMgm t
  32826         --Report                                    : Any Pane l Manageme nt registr y or repor t.
  32827         --Folder                                    :
  32828         --Report L oc             : 
  32829         --Job Loc                 : None
  32830         --Note                    : THIS  VIEW RETU RNS THE CU RRENT DESC RIPTION AN D DIAGNOST IC TEXT, N OT HISTORI C ONES
  32831         --                        : BASE D ON A DAT E.  This v iew is not  supported  by CDW, B ISL or any  OI&T grou p.
  32832         --                        :
  32833         --                        : Thes e views on ly exist a t District  5.  Any c ode using  them canno t be share d beyond
  32834         --                          dist rict 5.
  32835         --                        :
  32836         --Date Cre ated           : 09-1 0-2015
  32837         --
  32838         --Last Cha nged           : 09-1 1-2015
  32839         --Last Cha nged By                 : Jerry  Kohler
  32840         --Reason F or Change               : Added  ICD9 Diagn osis
  32841         --
  32842         --Purpose                 : To m inimize th e impact o f future C DW changes  to ICD-9/ 10
  32843         --======== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== =
  32844         Select a.S ta3n,
  32845                a.I CDIEN,
  32846                a.I CD9SID,
  32847                a.I CD9Code, 
  32848                b.I CD9Descrip tion,
  32849                c.I CD9Diagnos is AS ICD9 DiagnosisT ext,
  32850                CAS T(9 AS SMA LLINT) AS  ICDVersion
  32851         from CDWWo rk.Dim.ICD 9 a
  32852         join CDWWo rk.Dim.ICD 9Descripti onVersion  b on b.ICD 9SID = a.I CD9SID
  32853          and b.Cur rentVersio nFlag = 'Y '
  32854         join CDWWo rk.Dim.ICD 9Diagnosis Version c  on c.ICD9S ID = a.ICD 9SID
  32855          and c.Cur rentVersio nFlag = 'Y '
  32856         ]]>
  32857        </Value>
  32858                                  
  32859       </Property >
  32860                                 
  32861       <Property 
  32862        Name="IsAn siNullsOn"  
  32863        Value="Tru e" 
  32864       />
  32865                                 
  32866       <Relations hip 
  32867        Name="Colu mns"
  32868       >
  32869                                           
  32870        <Entry>
  32871                                                    
  32872         <Element 
  32873          Type="SqlC omputedCol umn" 
  32874          Name="[Pan elMgmt].[v ICD9].[Sta 3n]"
  32875         >
  32876                                                              
  32877          <Relations hip 
  32878           Name="Expr essionDepe ndencies"
  32879          >
  32880                                                                        
  32881           <Entry>
  32882                                                                                  
  32883            <Reference
  32884             ExternalSo urce="CDWW ork.dacpac
  32885             Name="[CDW Work]|[Dim ].[ICD9].[ Sta3n]" 
  32886            />
  32887                                                                         
  32888           </Entry>
  32889                                                               
  32890          </Relation ship>
  32891                                                     
  32892         </Element>
  32893                                            
  32894        </Entry>
  32895                                           
  32896        <Entry>
  32897                                                    
  32898         <Element 
  32899          Type="SqlC omputedCol umn" 
  32900          Name="[Pan elMgmt].[v ICD9].[ICD IEN]"
  32901         >
  32902                                                              
  32903          <Relations hip 
  32904           Name="Expr essionDepe ndencies"
  32905          >
  32906                                                                        
  32907           <Entry>
  32908                                                                                  
  32909            <Reference
  32910             ExternalSo urce="CDWW ork.dacpac
  32911             Name="[CDW Work]|[Dim ].[ICD9].[ ICDIEN]" 
  32912            />
  32913                                                                         
  32914           </Entry>
  32915                                                               
  32916          </Relation ship>
  32917                                                     
  32918         </Element>
  32919                                            
  32920        </Entry>
  32921                                           
  32922        <Entry>
  32923                                                    
  32924         <Element 
  32925          Type="SqlC omputedCol umn" 
  32926          Name="[Pan elMgmt].[v ICD9].[ICD 9SID]"
  32927         >
  32928                                                              
  32929          <Relations hip 
  32930           Name="Expr essionDepe ndencies"
  32931          >
  32932                                                                        
  32933           <Entry>
  32934                                                                                  
  32935            <Reference
  32936             ExternalSo urce="CDWW ork.dacpac
  32937             Name="[CDW Work]|[Dim ].[ICD9].[ ICD9SID]" 
  32938            />
  32939                                                                         
  32940           </Entry>
  32941                                                               
  32942          </Relation ship>
  32943                                                     
  32944         </Element>
  32945                                            
  32946        </Entry>
  32947                                           
  32948        <Entry>
  32949                                                    
  32950         <Element 
  32951          Type="SqlC omputedCol umn" 
  32952          Name="[Pan elMgmt].[v ICD9].[ICD 9Code]"
  32953         >
  32954                                                              
  32955          <Relations hip 
  32956           Name="Expr essionDepe ndencies"
  32957          >
  32958                                                                        
  32959           <Entry>
  32960                                                                                  
  32961            <Reference
  32962             ExternalSo urce="CDWW ork.dacpac
  32963             Name="[CDW Work]|[Dim ].[ICD9].[ ICD9Code]"  
  32964            />
  32965                                                                         
  32966           </Entry>
  32967                                                               
  32968          </Relation ship>
  32969                                                     
  32970         </Element>
  32971                                            
  32972        </Entry>
  32973                                           
  32974        <Entry>
  32975                                                    
  32976         <Element 
  32977          Type="SqlC omputedCol umn" 
  32978          Name="[Pan elMgmt].[v ICD9].[ICD 9Descripti on]"
  32979         >
  32980                                                              
  32981          <Relations hip 
  32982           Name="Expr essionDepe ndencies"
  32983          >
  32984                                                                        
  32985           <Entry>
  32986                                                                                  
  32987            <Reference
  32988             ExternalSo urce="CDWW ork.dacpac
  32989             Name="[CDW Work]|[Dim ].[ICD9Des criptionVe rsion].[IC D9Descript ion]" 
  32990            />
  32991                                                                         
  32992           </Entry>
  32993                                                               
  32994          </Relation ship>
  32995                                                     
  32996         </Element>
  32997                                            
  32998        </Entry>
  32999                                           
  33000        <Entry>
  33001                                                    
  33002         <Element 
  33003          Type="SqlC omputedCol umn" 
  33004          Name="[Pan elMgmt].[v ICD9].[ICD 9Diagnosis Text]"
  33005         >
  33006                                                              
  33007          <Relations hip 
  33008           Name="Expr essionDepe ndencies"
  33009          >
  33010                                                                        
  33011           <Entry>
  33012                                                                                  
  33013            <Reference
  33014             ExternalSo urce="CDWW ork.dacpac
  33015             Name="[CDW Work]|[Dim ].[ICD9Dia gnosisVers ion].[ICD9 Diagnosis]
  33016            />
  33017                                                                         
  33018           </Entry>
  33019                                                               
  33020          </Relation ship>
  33021                                                     
  33022         </Element>
  33023                                            
  33024        </Entry>
  33025                                           
  33026        <Entry>
  33027                                                    
  33028         <Element 
  33029          Type="SqlC omputedCol umn" 
  33030          Name="[Pan elMgmt].[v ICD9].[ICD Version]" 
  33031         />
  33032                                            
  33033        </Entry>
  33034                                  
  33035       </Relation ship>
  33036                                 
  33037       <Relations hip 
  33038        Name="Quer yDependenc ies"
  33039       >
  33040                                           
  33041        <Entry>
  33042                                                    
  33043         <Reference
  33044          ExternalSo urce="CDWW ork.dacpac
  33045          Name="[CDW Work]|[Dim ].[ICD9]" 
  33046         />
  33047                                            
  33048        </Entry>
  33049                                           
  33050        <Entry>
  33051                                                    
  33052         <Reference
  33053          ExternalSo urce="CDWW ork.dacpac
  33054          Name="[CDW Work]|[Dim ].[ICD9Des criptionVe rsion]" 
  33055         />
  33056                                            
  33057        </Entry>
  33058                                           
  33059        <Entry>
  33060                                                    
  33061         <Reference
  33062          ExternalSo urce="CDWW ork.dacpac
  33063          Name="[CDW Work]|[Dim ].[ICD9Des criptionVe rsion].[IC D9SID]" 
  33064         />
  33065                                            
  33066        </Entry>
  33067                                           
  33068        <Entry>
  33069                                                    
  33070         <Reference
  33071          ExternalSo urce="CDWW ork.dacpac
  33072          Name="[CDW Work]|[Dim ].[ICD9].[ ICD9SID]" 
  33073         />
  33074                                            
  33075        </Entry>
  33076                                           
  33077        <Entry>
  33078                                                    
  33079         <Reference
  33080          ExternalSo urce="CDWW ork.dacpac
  33081          Name="[CDW Work]|[Dim ].[ICD9Des criptionVe rsion].[Cu rrentVersi onFlag]" 
  33082         />
  33083                                            
  33084        </Entry>
  33085                                           
  33086        <Entry>
  33087                                                    
  33088         <Reference
  33089          ExternalSo urce="CDWW ork.dacpac
  33090          Name="[CDW Work]|[Dim ].[ICD9Dia gnosisVers ion]" 
  33091         />
  33092                                            
  33093        </Entry>
  33094                                           
  33095        <Entry>
  33096                                                    
  33097         <Reference
  33098          ExternalSo urce="CDWW ork.dacpac
  33099          Name="[CDW Work]|[Dim ].[ICD9Dia gnosisVers ion].[ICD9 SID]" 
  33100         />
  33101                                            
  33102        </Entry>
  33103                                           
  33104        <Entry>
  33105                                                    
  33106         <Reference
  33107          ExternalSo urce="CDWW ork.dacpac
  33108          Name="[CDW Work]|[Dim ].[ICD9].[ ICD9SID]" 
  33109         />
  33110                                            
  33111        </Entry>
  33112                                           
  33113        <Entry>
  33114                                                    
  33115         <Reference
  33116          ExternalSo urce="CDWW ork.dacpac
  33117          Name="[CDW Work]|[Dim ].[ICD9Dia gnosisVers ion].[Curr entVersion Flag]" 
  33118         />
  33119                                            
  33120        </Entry>
  33121                                           
  33122        <Entry>
  33123                                                    
  33124         <Reference
  33125          ExternalSo urce="CDWW ork.dacpac
  33126          Name="[CDW Work]|[Dim ].[ICD9].[ Sta3n]" 
  33127         />
  33128                                            
  33129        </Entry>
  33130                                           
  33131        <Entry>
  33132                                                    
  33133         <Reference
  33134          ExternalSo urce="CDWW ork.dacpac
  33135          Name="[CDW Work]|[Dim ].[ICD9].[ ICDIEN]" 
  33136         />
  33137                                            
  33138        </Entry>
  33139                                           
  33140        <Entry>
  33141                                                    
  33142         <Reference
  33143          ExternalSo urce="CDWW ork.dacpac
  33144          Name="[CDW Work]|[Dim ].[ICD9].[ ICD9Code]"  
  33145         />
  33146                                            
  33147        </Entry>
  33148                                           
  33149        <Entry>
  33150                                                    
  33151         <Reference
  33152          ExternalSo urce="CDWW ork.dacpac
  33153          Name="[CDW Work]|[Dim ].[ICD9Des criptionVe rsion].[IC D9Descript ion]" 
  33154         />
  33155                                            
  33156        </Entry>
  33157                                           
  33158        <Entry>
  33159                                                    
  33160         <Reference
  33161          ExternalSo urce="CDWW ork.dacpac
  33162          Name="[CDW Work]|[Dim ].[ICD9Dia gnosisVers ion].[ICD9 Diagnosis]
  33163         />
  33164                                            
  33165        </Entry>
  33166                                           
  33167        <Entry>
  33168                                                    
  33169         <Reference
  33170          ExternalSo urce="Buil tIns" 
  33171          Name="[sma llint]" 
  33172         />
  33173                                            
  33174        </Entry>
  33175                                  
  33176       </Relation ship>
  33177                                 
  33178       <Relations hip 
  33179        Name="Sche ma"
  33180       >
  33181                                           
  33182        <Entry>
  33183                                                    
  33184         <Reference
  33185          Name="[Pan elMgmt]" 
  33186         />
  33187                                            
  33188        </Entry>
  33189                                  
  33190       </Relation ship>
  33191                                 
  33192       <Annotatio
  33193        Type="SysC ommentsObj ectAnnotat ion"
  33194       >
  33195                                           
  33196        <Property 
  33197         Name="Crea teOffset" 
  33198         Value="10"  
  33199        />
  33200                                           
  33201        <Property 
  33202         Name="Leng th" 
  33203         Value="169 0" 
  33204        />
  33205                                           
  33206        <Property 
  33207         Name="Star tLine" 
  33208         Value="1" 
  33209        />
  33210                                           
  33211        <Property 
  33212         Name="Star tColumn" 
  33213         Value="1" 
  33214        />
  33215                                           
  33216        <Property 
  33217         Name="Head erContents
  33218         Value="&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;&#x D;&#xA;CRE ATE View [ PanelMgmt] .[vICD9] A S" 
  33219        />
  33220                                           
  33221        <Property 
  33222         Name="Foot erContents
  33223         Value=";" 
  33224        />
  33225                                  
  33226       </Annotati on>
  33227                        
  33228      </Element>
  33229                       
  33230      <Element 
  33231       Type="SqlU ser" 
  33232       Name="[uCC _REFDOC]"
  33233      >
  33234                                 
  33235       <Property 
  33236        Name="Logi nIdentifie rScript"
  33237       >
  33238                                           
  33239        <Value>
  33240         <![CDATA[[ DO MA IN \CC_REFDOC ]]]>
  33241        </Value>
  33242                                  
  33243       </Property >
  33244                                 
  33245       <Property 
  33246        Name="Auth entication Type" 
  33247        Value="3" 
  33248       />
  33249                                 
  33250       <Relations hip 
  33251        Name="Defa ultSchema"
  33252       >
  33253                                           
  33254        <Entry>
  33255                                                    
  33256         <Reference
  33257          Name="[Dfl t]" 
  33258         />
  33259                                                    
  33260         <Annotatio
  33261          Type="Pers istedResol vableAnnot ation" 
  33262          Name="[Dfl t]"
  33263         >
  33264                                                              
  33265          <Property 
  33266           Name="Targ etTypeStor age" 
  33267           Value="Sql Schema" 
  33268          />
  33269                                                              
  33270          <Property 
  33271           Name="Leng th" 
  33272           Value="6" 
  33273          />
  33274                                                              
  33275          <Property 
  33276           Name="Offs et" 
  33277           Value="84"  
  33278          />
  33279                                                     
  33280         </Annotati on>
  33281                                            
  33282        </Entry>
  33283                                  
  33284       </Relation ship>
  33285                                 
  33286       <Relations hip 
  33287        Name="Logi n"
  33288       >
  33289                                           
  33290        <Entry />
  33291                                  
  33292       </Relation ship>
  33293                        
  33294      </Element>
  33295                       
  33296      <Element 
  33297       Type="SqlU ser" 
  33298       Name="[uCC _REFDOC_Ap p]"
  33299      >
  33300                                 
  33301       <Property 
  33302        Name="Logi nIdentifie rScript"
  33303       >
  33304                                           
  33305        <Value>
  33306         <![CDATA[[ VHAMaster\ CC_REFDOC_ App]]]>
  33307        </Value>
  33308                                  
  33309       </Property >
  33310                                 
  33311       <Property 
  33312        Name="Auth entication Type" 
  33313        Value="3" 
  33314       />
  33315                                 
  33316       <Relations hip 
  33317        Name="Defa ultSchema"
  33318       >
  33319                                           
  33320        <Entry>
  33321                                                    
  33322         <Reference
  33323          Name="[App ]" 
  33324         />
  33325                                                    
  33326         <Annotatio
  33327          Type="Pers istedResol vableAnnot ation" 
  33328          Name="[App ]"
  33329         >
  33330                                                              
  33331          <Property 
  33332           Name="Targ etTypeStor age" 
  33333           Value="Sql Schema" 
  33334          />
  33335                                                              
  33336          <Property 
  33337           Name="Leng th" 
  33338           Value="5" 
  33339          />
  33340                                                              
  33341          <Property 
  33342           Name="Offs et" 
  33343           Value="92"  
  33344          />
  33345                                                     
  33346         </Annotati on>
  33347                                            
  33348        </Entry>
  33349                                  
  33350       </Relation ship>
  33351                                 
  33352       <Relations hip 
  33353        Name="Logi n"
  33354       >
  33355                                           
  33356        <Entry />
  33357                                  
  33358       </Relation ship>
  33359                        
  33360      </Element>
  33361              
  33362     </Model>
  33363   </DataSche maModel>