I am working on a big database and from the database have extracted key subjects that fit the cohort I am looking to study based on common characteristics.
To be more specific, I am working on a database and extracting patients that had a specific type of surgery. I generated the variables based on procedure codes which are available in the data set.
Now that I have the list of patients that have had this particular surgery, I want to now use the specific surgeon-identifier code that comes in the row of data for every patient and go back to the original data set and extract every surgery performed by that surgeon.
How do I go back to the original data set and tell it to look for only the surgeons I found after my first extraction.
In my .do file, I reference the extracted data for people who have had the surgery I am studying, then collapsed the data based on the surgeon ID code that is listed in the database.
Now that I have these unique ID codes (that are unique to the year of the surgery), I want to go back to the original data set, and pull out every surgery done by these surgeons.
Any help would be greatly appreciated.
Thank you so much for any and all help.
To be more specific, I am working on a database and extracting patients that had a specific type of surgery. I generated the variables based on procedure codes which are available in the data set.
Now that I have the list of patients that have had this particular surgery, I want to now use the specific surgeon-identifier code that comes in the row of data for every patient and go back to the original data set and extract every surgery performed by that surgeon.
How do I go back to the original data set and tell it to look for only the surgeons I found after my first extraction.
In my .do file, I reference the extracted data for people who have had the surgery I am studying, then collapsed the data based on the surgeon ID code that is listed in the database.
Now that I have these unique ID codes (that are unique to the year of the surgery), I want to go back to the original data set, and pull out every surgery done by these surgeons.
Any help would be greatly appreciated.
Thank you so much for any and all help.
Comment