-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTable_scripts_mysql_rxn.sql
163 lines (153 loc) · 4.1 KB
/
Table_scripts_mysql_rxn.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
DROP TABLE IF EXISTS RXNATOMARCHIVE;
CREATE TABLE RXNATOMARCHIVE
(
RXAUI varchar(8) NOT NULL,
AUI varchar(10),
STR varchar(4000) NOT NULL,
ARCHIVE_TIMESTAMP varchar(280) NOT NULL,
CREATED_TIMESTAMP varchar(280) NOT NULL,
UPDATED_TIMESTAMP varchar(280) NOT NULL,
CODE varchar(50),
IS_BRAND varchar(1),
LAT varchar(3),
LAST_RELEASED varchar(30),
SAUI varchar(50),
VSAB varchar(40),
RXCUI varchar(8),
SAB varchar(20),
TTY varchar(20),
MERGED_TO_RXCUI varchar(8)
)
;
DROP TABLE IF EXISTS RXNCONSO;
CREATE TABLE RXNCONSO
(
RXCUI varchar(8) NOT NULL,
LAT varchar (3) DEFAULT 'ENG' NOT NULL,
TS varchar (1),
LUI varchar(8),
STT varchar (3),
SUI varchar (8),
ISPREF varchar (1),
RXAUI varchar(8) NOT NULL,
SAUI varchar (50),
SCUI varchar (50),
SDUI varchar (50),
SAB varchar (20) NOT NULL,
TTY varchar (20) NOT NULL,
CODE varchar (50),
STR varchar (3000) NOT NULL,
SRL varchar (10),
SUPPRESS varchar (1),
CVF varchar(50)
)
;
DROP TABLE IF EXISTS RXNREL;
CREATE TABLE RXNREL
(
RXCUI1 varchar(8) ,
RXAUI1 varchar(8),
STYPE1 varchar(50),
REL varchar(4) ,
RXCUI2 varchar(8) ,
RXAUI2 varchar(8),
STYPE2 varchar(50),
RELA varchar(100) ,
RUI varchar(10),
SRUI varchar(50),
SAB varchar(20) NOT NULL,
SL varchar(1000),
DIR varchar(1),
RG varchar(10),
SUPPRESS varchar(1),
CVF varchar(50)
)
;
DROP TABLE IF EXISTS RXNSAB;
CREATE TABLE RXNSAB
(
VCUI varchar (8),
RCUI varchar (8),
VSAB varchar (40),
RSAB varchar (20) NOT NULL,
SON varchar (3000),
SF varchar (20),
SVER varchar (20),
VSTART varchar (10),
VEND varchar (10),
IMETA varchar (10),
RMETA varchar (10),
SLC varchar (1000),
SCC varchar (1000),
SRL integer,
TFR integer,
CFR integer,
CXTY varchar (50),
TTYL varchar (300),
ATNL varchar (1000),
LAT varchar (3),
CENC varchar (20),
CURVER varchar (1),
SABIN varchar (1),
SSN varchar (3000),
SCIT varchar (4000)
)
;
DROP TABLE IF EXISTS RXNSAT;
CREATE TABLE RXNSAT
(
RXCUI varchar(8) ,
LUI varchar(8),
SUI varchar(8),
RXAUI varchar(9),
STYPE varchar (50),
CODE varchar (50),
ATUI varchar(11),
SATUI varchar (50),
ATN varchar (1000) NOT NULL,
SAB varchar (20) NOT NULL,
ATV varchar (4000),
SUPPRESS varchar (1),
CVF varchar (50)
)
;
DROP TABLE IF EXISTS RXNSTY;
CREATE TABLE RXNSTY
(
RXCUI varchar(8) NOT NULL,
TUI varchar (4),
STN varchar (100),
STY varchar (50),
ATUI varchar (11),
CVF varchar (50)
)
;
DROP TABLE IF EXISTS RXNDOC;
CREATE TABLE RXNDOC (
DOCKEY varchar(50) NOT NULL,
VALUE varchar(1000),
TYPE varchar(50) NOT NULL,
EXPL varchar(1000)
)
;
DROP TABLE IF EXISTS RXNCUICHANGES;
CREATE TABLE RXNCUICHANGES
(
RXAUI varchar(8),
CODE varchar(50),
SAB varchar(20),
TTY varchar(20),
STR varchar(3000),
OLD_RXCUI varchar(8) NOT NULL,
NEW_RXCUI varchar(8) NOT NULL
)
;
DROP TABLE IF EXISTS RXNCUI;
CREATE TABLE RXNCUI (
cui1 VARCHAR(8),
ver_start VARCHAR(40),
ver_end VARCHAR(40),
cardinality VARCHAR(8),
cui2 VARCHAR(8)
)
;