I am trying to process a hospital dataset using ICD-10 codes
For example, I have created a variable "inclusion", which is a binary variable that indicates whether a procedure fits a inclusion criteria specified by a series of ICD-10 codes by repeating the following code many times:
replace inclusion=1 if inlist(diagnosiscode1, "O00","O00.0","O00.00","O00.01","O00.1","O00.1 0"," O00.101","O00.102","O00.109")
I have to include all the relevant ICD-10 codes from:
O00-O08 Difficulties in pregnancy,
O60-O69 Difficulties in delivery,
O70-O75 Difficulties during labour
In total, there are hundreds of ICD-10 codes, and it would be very useful to me not to specify each one, and instead, use a contain expression, which would allow me to identify when diagnosiscode1 "contains "O00" for example. which hopefully would pick up all relevant sub ICD10 codes in that category.
Is this possible in STATA?
Related Posts with Using a "contain" expression instead of an equals expression
how to generate a new variable to describe "symbol"Hi, I have panel data (symbols, daily returns) with 97 symbols to describe ETFs, and all of them ha…
Lca with ordinal manifest variables -- equivalent of constraining constants?I am very new to doing LCA. I'm using Stata 15, in case that matters. I am trying to do a latent cl…
IPTW ATE and binary outcomeDear all I'm performing an IPTW on Stata 14 comparing effect of a drug on a dicotomic outcome (death…
Meta-analysis commands; Metainf and metatrim vil not runHi! I'm a medical student and brand new to Stata. To start with I was told I need the following met…
Difference-in-difference modelDear friends, if there is some literature about two-period DID model. If a policy was implemented fo…
Subscribe to:
Post Comments (Atom)
0 Response to Using a "contain" expression instead of an equals expression
Post a Comment