|
1 |
| -Merge clinical drug mapping to create clinical drug RDF graph. Each clinical drug entity include attributes FDA preferred name, Rxcui, DrOn Id, OMOP concept Id. |
2 |
| - |
3 |
| -############################################################# |
4 |
| -update clinical drug entity graph |
5 |
| -############################################################# |
| 1 | +################################################################################ |
| 2 | +OVERVIEW |
| 3 | +################################################################################ |
6 | 4 |
|
7 |
| -<STEP1> update clinical drug mappings |
| 5 | +Merge clinical drug mapping to create clinical drug RDF graph. Each clinical drug entity include attributes FDA preferred name, Rxcui, DrOn Id, OMOP concept Id. |
8 | 6 |
|
9 |
| -mappings folder keep all orginal mappings from linkedSPLs |
| 7 | +################################################################################ |
| 8 | +PRE-CONDITIONS: |
| 9 | +################################################################################ |
10 | 10 |
|
11 |
| ----------------------------------------------------------- |
12 |
| -mappings of omopid and rxcui |
13 |
| ----------------------------------------------------------- |
14 |
| -OMOP concept Id and Rxcui mapping download from "https://github.com/OHDSI/KnowledgeBase/tree/master/LAERTES/terminology-mappings/StandardVocabToRxNorm/imeds_drugids_to_rxcuis.csv" |
| 11 | +------------------------------------------------------------------------ |
| 12 | +Mappings from linkedSPLs core update |
| 13 | +------------------------------------------------------------------------ |
15 | 14 |
|
16 |
| -OR |
| 15 | +(1) Dron to rxcui: linkedSPLs/LinkedSPLs-update/mappings/DrOn-to-RxNorm/cleaned-dron-to-rxcui-drug-<DATE>.txt |
17 | 16 |
|
18 |
| -query OMOP CDM V5 (GeriOMOP) by SQL query below: |
| 17 | +(2) Dailymed setid and rxcui: LinkedSPLs-update/mappings/RxNORM-mapping/converted_rxnorm_mappings_<DATE>.txt converted_rxnorm_mappings.txt |
19 | 18 |
|
20 |
| -SELECT cpt.CONCEPT_ID as omopid, cpt.CONCEPT_CODE as rxcui FROM |
21 |
| -CONCEPT cpt |
22 |
| -WHERE |
23 |
| -cpt.CONCEPT_CLASS = 'Clinical Drug'; |
24 |
| - |
25 |
| -09/04/2015: 120561 results |
26 |
| - |
27 |
| -right click result table and export to csv ('|' delimited) |
28 |
| - |
29 |
| ----------------------------------------------------------- |
30 |
| -cleaned-dron-to-rxcui-drug-<DATE>.txt |
31 |
| ----------------------------------------------------------- |
32 |
| -mappings of DrOn Id and Rxcui available from "linkedSPLs/LinkedSPLs-update/mappings/DrOn-to-RxNorm/cleaned-dron-to-rxcui-drug-<DATE>.txt" |
| 19 | +$ cat converted_rxnorm_mappings.txt | cut -f1,2 -d\| | sort | uniq > setid_rxcui.txt |
33 | 20 |
|
34 |
| ----------------------------------------------------------- |
35 |
| -converted_rxnorm_mappings_<DATE>.txt |
36 |
| ----------------------------------------------------------- |
| 21 | +(3) Dailymed setid and drug fullname |
37 | 22 |
|
38 |
| -Dailymed product label indexing mapping from "linkedSPLs/LinkedSPLs-update/mappings/RxNORM-mapping/converted_rxnorm_mappings_<DATE>" |
| 23 | +$ mysql -u <username> -p |
| 24 | +$ use linkedSPLs; |
39 | 25 |
|
40 |
| -$ cd mappings |
| 26 | +SELECT setId, fullName FROM linkedSPLs.structuredProductLabelMetadata INTO OUTFILE '/tmp/setid_fullname.txt' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'; |
41 | 27 |
|
42 |
| -$ cp ../../LinkedSPLs-update/mappings/RxNORM-mapping/converted_rxnorm_mappings_10132015.txt converted_rxnorm_mappings.txt |
| 28 | +$ cp /tmp/setid_fullname.txt ../linkedSPLs/LinkedSPLs-clinicalDrug/mappings/ |
43 | 29 |
|
44 |
| -$ cat converted_rxnorm_mappings.txt | cut -f1,2 -d\| | sort | uniq > setid_rxcui.txt |
| 30 | +(4) mappings of omopid and rxcui |
45 | 31 |
|
46 |
| ----------------------------------------------------------- |
47 |
| -mappings of FDA preferred term and setId |
48 |
| ----------------------------------------------------------- |
| 32 | +query OMOP CDM V5 (GeriOMOP) by SQL query below: |
49 | 33 |
|
50 |
| -$ mysql -u <username> -p |
| 34 | +SELECT cpt.CONCEPT_ID as omopid, cpt.CONCEPT_CODE as rxcui FROM |
| 35 | +CONCEPT cpt |
| 36 | +WHERE |
| 37 | +cpt.CONCEPT_CLASS = 'Clinical Drug'; |
51 | 38 |
|
52 |
| -$ use linkedSPLs; |
| 39 | +01/18/2017: 120561 results |
53 | 40 |
|
54 |
| -SELECT setId, fullName FROM linkedSPLs.structuredProductLabelMetadata INTO OUTFILE '/tmp/setid_fullname.txt' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'; |
| 41 | +right click result table and export to delimited ('|' delimited, none Left or Right Enclosure) |
| 42 | +save name as: clinical-drug-omopid-rxcui-<DATE>.dsv |
| 43 | +to dir: LinkedSPLs-clinicalDrug/mappings/ |
55 | 44 |
|
56 |
| -$ cp /tmp/setid_fullname.txt ../linkedSPLs/LinkedSPLs-clinicalDrug/mappings/ |
| 45 | +################################################################################ |
| 46 | +Procedures to get clinical drug RDF graph |
| 47 | +################################################################################ |
57 | 48 |
|
58 |
| -<STEP 2> merge clinical drug mappings |
| 49 | +(1) merge clinical drug mappings |
59 | 50 |
|
60 | 51 | $ python mergeToClinicalDrug.py
|
61 | 52 |
|
62 | 53 | output: mergedClinicalDrug.tsv
|
63 | 54 |
|
64 |
| -<STEP 3> create clinical drug entity graph |
| 55 | +(2) create clinical drug entity graph |
65 | 56 |
|
66 | 57 | $ python createClinicalDrugSubInRDF.py
|
67 | 58 |
|
|
0 commit comments