Hello,
I am working on a dataset with almost 450,000 cases with several columns of diagnostic codes(DX), labeled DX1-DX30. Each row of Dx per case represents clinical diagnostic codes per patient. A case may have up to 30 obs/visits with different or similar diagnostic codes written in ICD-9 format (International Classification of Disease codes); these codes are string variables in the form "415.11". A patient could have 30 rows of different codes representing different or the same diagnoses.
I want to be able to count the number of specific diagnoses (for instance number of code 415.11 or 415.13) per patient for all the Dx and create a new variable containing these numbers.
I am not using the right commands as the results are not similar to what I am getting on SPSS (I am very familiar with the process, using SPSS). Please I need guidance in the right direction.
Thanks.
Olowu
Related Posts with Creating a new variable by count of specific disease IC9 code across multiple diagnosis
Averages depending on dummy-value (RESHAPE?)Hi everyone, I have panel data in long format, grouped by ID & Age (in days). Additionally, I ha…
Selecting a sub-sample of a survival dataset, such that the mortality rate (-strate-) in the selected sub-sample achieves a certain targetStata MP 14.2, OSX 10.15.4 I am looking for an approach, be it by simulation or other, that will he…
ivreg2 exogeneity test vs. biprobit exogeneity test, contradictory resultsHello Stata Listers, I am using Stata 15.1. My dependent variable is nonreceipt of a measles, mumps…
graph constant variablesHi, for example i have 3 variables with constans and i want to graph a line that follows each consta…
Graph displaying part years and part quarters on the y axisHi all, I am trying to create a graph like the one below, but I would like to show one density for 2…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a new variable by count of specific disease IC9 code across multiple diagnosis
Post a Comment