Information Technology Reference
In-Depth Information
DX113=substr(DX13, 1 , 3 );
DX114=substr(DX14, 1 , 3 );
DX115=substr(DX15, 1 , 3 );
The first part of this code reduces each of the 15 diagnosis columns to 3 digits. The next part reduces
each code to 4 digits and the combination of new variables is used to define the index.
DX21=substr(DX1, 1 , 4 );
DX22=substr(DX2, 1 , 4 );
DX23=substr(DX3, 1 , 4 );
DX24=substr(DX4, 1 , 4 );
DX25=substr(DX5, 1 , 4 );
DX26=substr(DX6, 1 , 4 );
DX27=substr(DX7, 1 , 4 );
DX28=substr(DX8, 1 , 4 );
DX29=substr(DX9, 1 , 4 );
DX210=substr(DX10, 1 , 4 );
DX211=substr(DX11, 1 , 4 );
DX212=substr(DX12, 1 , 4 );
DX213=substr(DX13, 1 , 4 );
DX214=substr(DX14, 1 , 4 );
DX215=substr(DX15, 1 , 4 );
ami= 0 ; chf= 0 ; pvd= 0 ; cva= 0 ; dementia= 0 ; pd= 0 ; ctd= 0 ; pu= 0 ; ld= 0 ; diabetes= 0 ; dc= 0 ; para-
plegia= 0 ;
rd= 0 ; cancer= 0 ; mc= 0 ; sld= 0 ; hiv= 0 ;
The indicator functions for each of the 17 Charlson categories is set equal to zero.
diagnoses3digits=catx(' ',dx11,dx12,dx13, dx14,dx15,dx16,dx17,dx18,dx19,dx110,
dx111,dx112,dx113,dx114,dx115);
diagnoses4digits=catx(' ', dx21,dx22, dx23,dx24,dx25, dx26,dx27,dx28,dx29,dx210,dx211,d
x212, dx213,dx214, dx215);
The 15 columns of 3 digit codes are concatenated followed by the 15 columns of 4 digit codes. The
concatenation just makes the remaining code easier to do, allowing us to examine just one column of
data instead of all 15.
if (rxmatch('410',diagnoses3digits)> 0 or rxmatch('412',diagnoses3digits)> 0 ) then ami= 1 ;
The above if…then statement defines the indicator function for an acute myocardial infarction.
if (rxmatch('428',diagnoses3digits)> 0 ) then chf= 1 ;
if (rxmatch('441',diagnoses3digits)> 0 or rxmatch('4439',diagnoses4digits)> 0 or
rxmatch('7854',diagnoses4digits)> 0 or rxmatch('V434',diagnoses4digits)> 0 ) then pvd= 1 ;
Search WWH ::




Custom Search