-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add codelist and codelist creation do files
- Loading branch information
1 parent
b7e4921
commit 9757a25
Showing
23 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
clear | ||
capture set more off | ||
|
||
global database "GOLD" | ||
global version "2018_07" | ||
|
||
if "$database" == "GOLD" { | ||
global Dictionarydir "J:\EHR Share\3 Database guidelines and info\GPRD_Gold\Medical & Product Browsers\\${version}_Browsers" | ||
global Productdic "$Dictionarydir\product" | ||
global Medicaldic "$Dictionarydir\medical" | ||
} | ||
|
||
global Projectdir "J:\EHR-Working\QRISK\qrisk_bundle\codelists\codelist_creation" | ||
|
||
global Dodir "$Projectdir\dofiles" | ||
global Logdir "$Projectdir\logfiles\\${database} ${version}" | ||
global Datadir "$Projectdir\datafiles\\${database} ${version}" | ||
global Textdir "$Projectdir\textfiles\\${database} ${version}" | ||
global Sourcedir "$Projectdir\sourcefiles\\" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import delimited using "$Medicaldic.txt", clear | ||
|
||
drop in 1 | ||
|
||
rename _05 medcode | ||
rename v2 readcode | ||
rename v3 clinev | ||
rename v4 immunev | ||
rename v5 refev | ||
rename v6 testev | ||
rename v7 readterm | ||
rename v8 build | ||
|
||
sort medcode | ||
|
||
|
||
* Make all descriptions lower case | ||
foreach var of varlist readterm { | ||
generate Z=lower(`var') | ||
drop `var' | ||
rename Z `var' | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
clear | ||
set more off | ||
set linesize 100 | ||
|
||
|
||
|
||
*rename variables | ||
import delimited using "$Productdic.txt", clear | ||
drop v2 v12 | ||
rename _05 prodcode | ||
rename v3 therapyev | ||
rename v4 productname | ||
rename v5 drugsubstance | ||
rename v6 strength | ||
rename v7 formulation | ||
rename v8 route | ||
rename v9 bnfcode | ||
rename v10 bnfchapter | ||
rename v11 build | ||
|
||
sort prodcode | ||
|
||
|
||
* Make all descriptions lower case | ||
foreach var of varlist productname drugsubstance formulation route bnfchapter { | ||
generate Z=lower(`var') | ||
drop `var' | ||
rename Z `var' | ||
} | ||
|
||
order prodcode productname drugsubstance strength formulation route bnfcode bnfchapter build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
clear | ||
set more off | ||
set linesize 100 | ||
|
||
/******************************************************************************* | ||
#1. OPEN DATA AND PREP FOR SEARCH | ||
*******************************************************************************/ | ||
|
||
*rename variables | ||
import delimited using "$Productdictionary.txt", clear | ||
drop v2 v12 | ||
rename _08 prodcode | ||
rename v3 therapyev | ||
rename v4 productname | ||
rename v5 drugsubstance | ||
rename v6 strength | ||
rename v7 formulation | ||
rename v8 route | ||
rename v9 bnfcode | ||
rename v10 bnfchapter | ||
rename v11 build | ||
|
||
sort prodcode | ||
|
||
|
||
* Make all descriptions lower case | ||
foreach var of varlist productname drugsubstance formulation route bnfchapter { | ||
generate Z=lower(`var') | ||
drop `var' | ||
rename Z `var' | ||
} | ||
|
||
order prodcode productname drugsubstance strength formulation route bnfcode bnfchapter build | ||
|