psc 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +13 -0
- data/.rvmrc +2 -0
- data/.yardopts +4 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +20 -0
- data/LICENSE +20 -0
- data/README.md +163 -0
- data/Rakefile +69 -0
- data/cucumber.yml +13 -0
- data/features/step_definitions/eval_steps.rb +14 -0
- data/features/step_definitions/setup_steps.rb +7 -0
- data/features/studies.feature +21 -0
- data/features/support/env.rb +33 -0
- data/features/support/int_psc.rb +165 -0
- data/int-psc/README-int-psc.md +57 -0
- data/int-psc/hsqldb/baseline.log +197 -0
- data/int-psc/hsqldb/baseline.properties +17 -0
- data/int-psc/hsqldb/baseline.script +295 -0
- data/int-psc/hsqldb/datasource.properties +18 -0
- data/int-psc/hsqldb/datasource.script +2205 -0
- data/int-psc/jetty/jetty-runner-7.4.0.v20110414.jar +0 -0
- data/int-psc/state/ABC 1200.xml +115 -0
- data/int-psc/state/int-psc-state.xml +64 -0
- data/lib/psc.rb +47 -0
- data/lib/psc/client.rb +35 -0
- data/lib/psc/connection.rb +96 -0
- data/lib/psc/faraday.rb +11 -0
- data/lib/psc/faraday/http_basic.rb +35 -0
- data/lib/psc/faraday/psc_token.rb +42 -0
- data/lib/psc/faraday/string_is_xml.rb +25 -0
- data/lib/psc/version.rb +3 -0
- data/meta.rakefile +30 -0
- data/psc.gemspec +33 -0
- data/spec/fixtures/studies-json.http +37 -0
- data/spec/middleware_helper.rb +18 -0
- data/spec/psc/client_spec.rb +39 -0
- data/spec/psc/connection_spec.rb +156 -0
- data/spec/psc/faraday/http_basic_spec.rb +15 -0
- data/spec/psc/faraday/psc_token_spec.rb +38 -0
- data/spec/psc/faraday/string_is_xml_spec.rb +49 -0
- data/spec/psc/version_spec.rb +11 -0
- data/spec/psc_spec.rb +16 -0
- data/spec/spec_helper.rb +15 -0
- data/tasks/int-psc.rake +84 -0
- data/tasks/psc/TODO +3 -0
- data/tasks/psc/state.rb +393 -0
- metadata +311 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
# Integration test PSC
|
2
|
+
|
3
|
+
This directory contains artifacts related to the PSC instance that
|
4
|
+
psc.rb deploys to run its integration tests. Highlights below.
|
5
|
+
|
6
|
+
## bin/
|
7
|
+
|
8
|
+
The integrated test infrastructure looks in this directory for a file
|
9
|
+
named `psc.war` to deploy. If you don't want to provide your own, you
|
10
|
+
can download the latest nightly by running `rake int-psc:war`.
|
11
|
+
|
12
|
+
This means you can run the integration tests against different
|
13
|
+
versions of PSC by swapping out `psc.war`.
|
14
|
+
|
15
|
+
## hsqldb/
|
16
|
+
|
17
|
+
The PSC instance is backed by HSQLDB. There are rake tasks to assist
|
18
|
+
in bootstrapping this database instance (which is mostly done via PSC
|
19
|
+
itself) in `tasks/int-psc.rake`. Process overview:
|
20
|
+
|
21
|
+
* Create a "baseline" configuration
|
22
|
+
* Deploy PSC against this configuration. PSC automatically creates its
|
23
|
+
schema and lookup data.
|
24
|
+
* Interactively (i.e., this part is not scripted) walk through PSC's
|
25
|
+
setup flow. Create a user named "superuser/superuser" that has all
|
26
|
+
privileges.
|
27
|
+
* Shut down the "baseline" PSC. The HSQLDB database named "baseline"
|
28
|
+
now contains the minimum set of data needed to deploy PSC and use
|
29
|
+
its API.
|
30
|
+
* Copy the "baseline" database to a database named "datasource".
|
31
|
+
* Deploy PSC using the "datasource" database.
|
32
|
+
* Use PSC's dev demo-creator infrastructure to apply a consistent set
|
33
|
+
of data (defined in `int-psc/state`) to this instance.
|
34
|
+
* Shut down the "datasource" instance of PSC.
|
35
|
+
* Mark the "datasource" database as read-only.
|
36
|
+
|
37
|
+
("baseline" and "datasource" are separate so that re-applying the
|
38
|
+
state data can be entirely scripted; baseline will (hopefully) never
|
39
|
+
need to be recreated.)
|
40
|
+
|
41
|
+
After this process is finished, each time you start up the integration
|
42
|
+
PSC instance it will be in the same state -- i.e., it will not persist
|
43
|
+
any data across restarts.
|
44
|
+
|
45
|
+
## state/
|
46
|
+
|
47
|
+
The desired contents of the integration test PSC instance on
|
48
|
+
startup. The key file is `int-psc-state.xml`, which is full of
|
49
|
+
comments describing its format.
|
50
|
+
|
51
|
+
Whenever you change the data this directory, you should run `rake
|
52
|
+
int-psc:rebuild` and then commit the changed versions of
|
53
|
+
`hsqldb/datasource.*` along with your data changes.
|
54
|
+
|
55
|
+
## deploy-base/logs/
|
56
|
+
|
57
|
+
The logs from the integration test PSC can be found here.
|
@@ -0,0 +1,197 @@
|
|
1
|
+
/*C1*/SET SCHEMA PUBLIC
|
2
|
+
CONNECT USER SA
|
3
|
+
/*C2*/SET SCHEMA PUBLIC
|
4
|
+
CONNECT USER SA
|
5
|
+
SET AUTOCOMMIT FALSE
|
6
|
+
/*C1*/SET AUTOCOMMIT FALSE
|
7
|
+
SET AUTOCOMMIT TRUE
|
8
|
+
SET AUTOCOMMIT FALSE
|
9
|
+
SET AUTOCOMMIT TRUE
|
10
|
+
SET AUTOCOMMIT FALSE
|
11
|
+
SET AUTOCOMMIT TRUE
|
12
|
+
SET AUTOCOMMIT FALSE
|
13
|
+
INSERT INTO OSGI_CM_PROPERTIES VALUES(1,0,'edu.northwestern.bioinformatics.studycalendar.security.psc-authentication-socket','service.pid','SINGLE','String')
|
14
|
+
INSERT INTO OSGI_CM_PROPERTIES VALUES(2,0,'edu.northwestern.bioinformatics.studycalendar.security.psc-authentication-socket','_felix_.cm.newConfiguration','SINGLE','Boolean')
|
15
|
+
INSERT INTO OSGI_CM_PROPERTY_VALUES VALUES(0,1,'edu.northwestern.bioinformatics.studycalendar.security.psc-authentication-socket')
|
16
|
+
INSERT INTO OSGI_CM_PROPERTY_VALUES VALUES(0,2,'true')
|
17
|
+
COMMIT
|
18
|
+
SET AUTOCOMMIT TRUE
|
19
|
+
SET AUTOCOMMIT FALSE
|
20
|
+
DELETE FROM OSGI_CM_PROPERTIES WHERE ID=1
|
21
|
+
INSERT INTO OSGI_CM_PROPERTIES VALUES(1,1,'edu.northwestern.bioinformatics.studycalendar.security.psc-authentication-socket','service.pid','SINGLE','String')
|
22
|
+
DELETE FROM OSGI_CM_PROPERTY_VALUES WHERE LIST_INDEX=0 AND PROPERTY_ID=2 AND VALUE='true'
|
23
|
+
DELETE FROM OSGI_CM_PROPERTIES WHERE ID=2
|
24
|
+
COMMIT
|
25
|
+
SET AUTOCOMMIT TRUE
|
26
|
+
/*C3*/SET SCHEMA PUBLIC
|
27
|
+
CONNECT USER SA
|
28
|
+
/*C4*/SET SCHEMA PUBLIC
|
29
|
+
CONNECT USER SA
|
30
|
+
DISCONNECT
|
31
|
+
/*C3*/SET AUTOCOMMIT FALSE
|
32
|
+
SET AUTOCOMMIT TRUE
|
33
|
+
SET AUTOCOMMIT FALSE
|
34
|
+
SET AUTOCOMMIT TRUE
|
35
|
+
SET AUTOCOMMIT FALSE
|
36
|
+
SET AUTOCOMMIT TRUE
|
37
|
+
/*C5*/SET SCHEMA PUBLIC
|
38
|
+
CONNECT USER SA
|
39
|
+
/*C6*/SET SCHEMA PUBLIC
|
40
|
+
CONNECT USER SA
|
41
|
+
DISCONNECT
|
42
|
+
/*C3*/DISCONNECT
|
43
|
+
/*C7*/SET SCHEMA PUBLIC
|
44
|
+
CONNECT USER SA
|
45
|
+
/*C5*/DISCONNECT
|
46
|
+
/*C1*/SET AUTOCOMMIT FALSE
|
47
|
+
SET AUTOCOMMIT TRUE
|
48
|
+
SET AUTOCOMMIT FALSE
|
49
|
+
INSERT INTO OSGI_CM_PROPERTIES VALUES(3,0,'edu.northwestern.bioinformatics.studycalendar.security.psc-authentication-socket','authenticationSystem','SINGLE','String')
|
50
|
+
DELETE FROM OSGI_CM_PROPERTIES WHERE ID=1
|
51
|
+
INSERT INTO OSGI_CM_PROPERTIES VALUES(1,2,'edu.northwestern.bioinformatics.studycalendar.security.psc-authentication-socket','service.pid','SINGLE','String')
|
52
|
+
INSERT INTO OSGI_CM_PROPERTY_VALUES VALUES(0,3,'edu.northwestern.bioinformatics.psc-authentication-local-plugin')
|
53
|
+
COMMIT
|
54
|
+
SET AUTOCOMMIT TRUE
|
55
|
+
SET AUTOCOMMIT FALSE
|
56
|
+
INSERT INTO AUTHENTICATION_SYSTEM_CONF VALUES('authenticationSystem','edu.northwestern.bioinformatics.psc-authentication-local-plugin',0)
|
57
|
+
COMMIT
|
58
|
+
SET AUTOCOMMIT TRUE
|
59
|
+
/*C2*/INSERT INTO CSM_USER VALUES(0,'superuser','Sue','User','','','','','sAybp9IVe7feRIv4iO8hcA==','sue@nihil.it',NULL,NULL,'2011-05-12 00:00:00.000000000',0,'')
|
60
|
+
COMMIT
|
61
|
+
INSERT INTO CSM_USER_GROUP VALUES(0,0,1)
|
62
|
+
COMMIT
|
63
|
+
/*C8*/SET SCHEMA PUBLIC
|
64
|
+
CONNECT USER SA
|
65
|
+
DISCONNECT
|
66
|
+
/*C7*/SET AUTOCOMMIT FALSE
|
67
|
+
INSERT INTO SITES VALUES(1,'Northwestern University',0,'31b8f213-f049-4c63-8aaf-227a124de4f4','IL036',NULL,NULL)
|
68
|
+
INSERT INTO AUDIT_EVENTS VALUES(1,'0:0:0:0:0:0:0:1%0','<not logged in>','2011-05-12 12:56:35.147000000','edu.northwestern.bioinformatics.studycalendar.domain.Site','CREATE','/setup/k/_cA52DC72E-7679-040C-6463-D92F80B7D5E9_k01508079-D87D-F4C5-5CFB-741D8301D804',0,1,NULL,NULL)
|
69
|
+
INSERT INTO AUDIT_EVENT_VALUES VALUES(1,1,'gridId',NULL,'31b8f213-f049-4c63-8aaf-227a124de4f4',0,NULL)
|
70
|
+
INSERT INTO AUDIT_EVENT_VALUES VALUES(2,1,'version',NULL,'0',0,NULL)
|
71
|
+
INSERT INTO AUDIT_EVENT_VALUES VALUES(3,1,'assignedIdentifier',NULL,'IL036',0,NULL)
|
72
|
+
INSERT INTO AUDIT_EVENT_VALUES VALUES(4,1,'name',NULL,'Northwestern University',0,NULL)
|
73
|
+
COMMIT
|
74
|
+
SET AUTOCOMMIT TRUE
|
75
|
+
SET AUTOCOMMIT FALSE
|
76
|
+
INSERT INTO SOURCES VALUES(2,'psc.rb manual',0,'d5c363e4-1db8-43b1-b386-080a14e7cc15',TRUE)
|
77
|
+
INSERT INTO AUDIT_EVENTS VALUES(2,'0:0:0:0:0:0:0:1%0','<not logged in>','2011-05-12 12:56:46.564000000','edu.northwestern.bioinformatics.studycalendar.domain.Source','CREATE','/setup/k/_cA52DC72E-7679-040C-6463-D92F80B7D5E9_k01508079-D87D-F4C5-5CFB-741D8301D804',0,2,NULL,NULL)
|
78
|
+
INSERT INTO AUDIT_EVENT_VALUES VALUES(5,2,'gridId',NULL,'d5c363e4-1db8-43b1-b386-080a14e7cc15',0,NULL)
|
79
|
+
INSERT INTO AUDIT_EVENT_VALUES VALUES(6,2,'version',NULL,'0',0,NULL)
|
80
|
+
INSERT INTO AUDIT_EVENT_VALUES VALUES(7,2,'manualFlag',NULL,'true',0,NULL)
|
81
|
+
INSERT INTO AUDIT_EVENT_VALUES VALUES(8,2,'name',NULL,'psc.rb manual',0,NULL)
|
82
|
+
COMMIT
|
83
|
+
SET AUTOCOMMIT TRUE
|
84
|
+
SET AUTOCOMMIT FALSE
|
85
|
+
SET AUTOCOMMIT TRUE
|
86
|
+
SET AUTOCOMMIT FALSE
|
87
|
+
SET AUTOCOMMIT TRUE
|
88
|
+
/*C9*/SET SCHEMA PUBLIC
|
89
|
+
CONNECT USER SA
|
90
|
+
/*C7*/DISCONNECT
|
91
|
+
/*C10*/SET SCHEMA PUBLIC
|
92
|
+
CONNECT USER SA
|
93
|
+
/*C11*/SET SCHEMA PUBLIC
|
94
|
+
CONNECT USER SA
|
95
|
+
/*C1*/DISCONNECT
|
96
|
+
/*C10*/DISCONNECT
|
97
|
+
/*C12*/SET SCHEMA PUBLIC
|
98
|
+
CONNECT USER SA
|
99
|
+
/*C13*/SET SCHEMA PUBLIC
|
100
|
+
CONNECT USER SA
|
101
|
+
/*C9*/DISCONNECT
|
102
|
+
/*C12*/DISCONNECT
|
103
|
+
/*C2*/DELETE FROM CSM_USER WHERE USER_ID=0
|
104
|
+
INSERT INTO CSM_USER VALUES(0,'superuser','Sue','User','','','','','sAybp9IVe7feRIv4iO8hcA==','sue@nihil.it',NULL,NULL,'2011-05-12 00:00:00.000000000',0,'')
|
105
|
+
COMMIT
|
106
|
+
INSERT INTO CSM_USER_GROUP VALUES(1,0,5)
|
107
|
+
COMMIT
|
108
|
+
INSERT INTO CSM_PROTECTION_ELEMENT VALUES(0,'HealthcareSite','','HealthcareSite','','','',2,'2011-05-12')
|
109
|
+
COMMIT
|
110
|
+
INSERT INTO CSM_PROTECTION_GROUP VALUES(0,'HealthcareSite','',2,0,'2011-05-12',NULL)
|
111
|
+
COMMIT
|
112
|
+
INSERT INTO CSM_PG_PE VALUES(0,0,0,'2011-05-12')
|
113
|
+
COMMIT
|
114
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(0,0,NULL,5,0,'2011-05-12')
|
115
|
+
COMMIT
|
116
|
+
/*C14*/SET SCHEMA PUBLIC
|
117
|
+
CONNECT USER SA
|
118
|
+
/*C15*/SET SCHEMA PUBLIC
|
119
|
+
CONNECT USER SA
|
120
|
+
DISCONNECT
|
121
|
+
/*C14*/DISCONNECT
|
122
|
+
/*C16*/SET SCHEMA PUBLIC
|
123
|
+
CONNECT USER SA
|
124
|
+
DISCONNECT
|
125
|
+
/*C2*/DELETE FROM CSM_USER WHERE USER_ID=0
|
126
|
+
INSERT INTO CSM_USER VALUES(0,'superuser','Sue','User','','','','','sAybp9IVe7feRIv4iO8hcA==','sue@nihil.it',NULL,NULL,'2011-05-12 00:00:00.000000000',0,'')
|
127
|
+
COMMIT
|
128
|
+
INSERT INTO CSM_USER_GROUP VALUES(2,0,7)
|
129
|
+
COMMIT
|
130
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(1,0,NULL,7,0,'2011-05-12')
|
131
|
+
COMMIT
|
132
|
+
INSERT INTO CSM_USER_GROUP VALUES(3,0,12)
|
133
|
+
COMMIT
|
134
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(2,0,NULL,12,0,'2011-05-12')
|
135
|
+
COMMIT
|
136
|
+
INSERT INTO CSM_USER_GROUP VALUES(4,0,6)
|
137
|
+
COMMIT
|
138
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(3,0,NULL,6,0,'2011-05-12')
|
139
|
+
COMMIT
|
140
|
+
INSERT INTO CSM_USER_GROUP VALUES(5,0,10)
|
141
|
+
COMMIT
|
142
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(4,0,NULL,10,0,'2011-05-12')
|
143
|
+
COMMIT
|
144
|
+
INSERT INTO CSM_USER_GROUP VALUES(6,0,9)
|
145
|
+
COMMIT
|
146
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(5,0,NULL,9,0,'2011-05-12')
|
147
|
+
COMMIT
|
148
|
+
INSERT INTO CSM_USER_GROUP VALUES(7,0,14)
|
149
|
+
COMMIT
|
150
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(6,0,NULL,14,0,'2011-05-12')
|
151
|
+
COMMIT
|
152
|
+
INSERT INTO CSM_USER_GROUP VALUES(8,0,15)
|
153
|
+
COMMIT
|
154
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(7,0,NULL,15,0,'2011-05-12')
|
155
|
+
COMMIT
|
156
|
+
INSERT INTO CSM_USER_GROUP VALUES(9,0,22)
|
157
|
+
COMMIT
|
158
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(8,0,NULL,22,0,'2011-05-12')
|
159
|
+
COMMIT
|
160
|
+
INSERT INTO CSM_USER_GROUP VALUES(10,0,3)
|
161
|
+
COMMIT
|
162
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(9,0,NULL,3,0,'2011-05-12')
|
163
|
+
COMMIT
|
164
|
+
INSERT INTO CSM_USER_GROUP VALUES(11,0,17)
|
165
|
+
COMMIT
|
166
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(10,0,NULL,17,0,'2011-05-12')
|
167
|
+
COMMIT
|
168
|
+
INSERT INTO CSM_USER_GROUP VALUES(12,0,21)
|
169
|
+
COMMIT
|
170
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(11,0,NULL,21,0,'2011-05-12')
|
171
|
+
COMMIT
|
172
|
+
INSERT INTO CSM_USER_GROUP VALUES(13,0,16)
|
173
|
+
COMMIT
|
174
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(12,0,NULL,16,0,'2011-05-12')
|
175
|
+
COMMIT
|
176
|
+
INSERT INTO CSM_PROTECTION_ELEMENT VALUES(1,'Study','','Study','','','',2,'2011-05-12')
|
177
|
+
COMMIT
|
178
|
+
INSERT INTO CSM_PROTECTION_GROUP VALUES(1,'Study','',2,0,'2011-05-12',NULL)
|
179
|
+
COMMIT
|
180
|
+
INSERT INTO CSM_PG_PE VALUES(1,1,1,'2011-05-12')
|
181
|
+
COMMIT
|
182
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(13,0,NULL,12,1,'2011-05-12')
|
183
|
+
COMMIT
|
184
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(14,0,NULL,15,1,'2011-05-12')
|
185
|
+
COMMIT
|
186
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(15,0,NULL,22,1,'2011-05-12')
|
187
|
+
COMMIT
|
188
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(16,0,NULL,17,1,'2011-05-12')
|
189
|
+
COMMIT
|
190
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(17,0,NULL,21,1,'2011-05-12')
|
191
|
+
COMMIT
|
192
|
+
INSERT INTO CSM_USER_GROUP_ROLE_PG VALUES(18,0,NULL,16,1,'2011-05-12')
|
193
|
+
COMMIT
|
194
|
+
INSERT INTO CSM_USER_GROUP VALUES(14,0,4)
|
195
|
+
COMMIT
|
196
|
+
INSERT INTO CSM_USER_GROUP VALUES(15,0,2)
|
197
|
+
COMMIT
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#HSQL Database Engine 1.8.0.9
|
2
|
+
#Thu May 12 12:54:52 CDT 2011
|
3
|
+
hsqldb.script_format=0
|
4
|
+
runtime.gc_interval=0
|
5
|
+
sql.enforce_strict_size=false
|
6
|
+
hsqldb.cache_size_scale=8
|
7
|
+
readonly=false
|
8
|
+
hsqldb.nio_data_file=true
|
9
|
+
hsqldb.cache_scale=14
|
10
|
+
version=1.8.0
|
11
|
+
hsqldb.default_table_type=memory
|
12
|
+
hsqldb.cache_file_scale=1
|
13
|
+
hsqldb.log_size=200
|
14
|
+
modified=yes
|
15
|
+
hsqldb.cache_version=1.7.0
|
16
|
+
hsqldb.original_version=1.8.0
|
17
|
+
hsqldb.compatible_version=1.8.0
|
@@ -0,0 +1,295 @@
|
|
1
|
+
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
|
2
|
+
CREATE SEQUENCE CSM_MAPPING_MAPPING_SEQ AS INTEGER START WITH 0
|
3
|
+
CREATE SEQUENCE CSM_GROUP_GROUP_ID_SEQ AS INTEGER START WITH 0
|
4
|
+
CREATE SEQUENCE CSM_PRIVILEGE_PRIVILEGE_ID_SEQ AS INTEGER START WITH 0
|
5
|
+
CREATE SEQUENCE CSM_PROTECTIO_PROTECTION_E_SEQ AS INTEGER START WITH 0
|
6
|
+
CREATE SEQUENCE CSM_PROTECTIO_PROTECTION_G_SEQ AS INTEGER START WITH 0
|
7
|
+
CREATE SEQUENCE CSM_PG_PE_PG_PE_ID_SEQ AS INTEGER START WITH 0
|
8
|
+
CREATE SEQUENCE CSM_ROLE_ROLE_ID_SEQ AS INTEGER START WITH 0
|
9
|
+
CREATE SEQUENCE CSM_ROLE_PRIV_ROLE_PRIVILE_SEQ AS INTEGER START WITH 0
|
10
|
+
CREATE SEQUENCE CSM_USER_GROU_USER_GROUP_I_SEQ AS INTEGER START WITH 0
|
11
|
+
CREATE SEQUENCE CSM_USER_GROU_USER_GROUP_R_SEQ AS INTEGER START WITH 0
|
12
|
+
CREATE SEQUENCE CSM_USER_PE_USER_PROTECTIO_SEQ AS INTEGER START WITH 0
|
13
|
+
CREATE MEMORY TABLE BERING_VERSION(RELEASE INTEGER,MIGRATION INTEGER)
|
14
|
+
CREATE MEMORY TABLE STUDIES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255),ASSIGNED_IDENTIFIER VARCHAR(900),AMENDMENT_ID INTEGER,DEV_AMENDMENT_ID INTEGER,LOAD_STATUS INTEGER DEFAULT 1 NOT NULL,LONG_TITLE VARCHAR(2147483647),PROVIDER VARCHAR(255),LAST_REFRESH TIMESTAMP,CONSTRAINT UN_STUDY_ASSIGNED_ID UNIQUE(ASSIGNED_IDENTIFIER),CONSTRAINT UN_STUDY_GRID_ID UNIQUE(GRID_ID))
|
15
|
+
CREATE MEMORY TABLE STUDY_SEGMENTS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,NAME VARCHAR(2147483647) NOT NULL,EPOCH_ID INTEGER,LIST_INDEX INTEGER DEFAULT 0,GRID_ID VARCHAR(255),CYCLE_LENGTH INTEGER,CONSTRAINT UN_SEGMENT_GRID_ID UNIQUE(GRID_ID),CONSTRAINT CHECK_CYCLE_LENGTH CHECK(STUDY_SEGMENTS.CYCLE_LENGTH>0))
|
16
|
+
CREATE MEMORY TABLE ACTIVITIES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,NAME VARCHAR(255) NOT NULL,DESCRIPTION VARCHAR(2147483647),ACTIVITY_TYPE_ID INTEGER NOT NULL,GRID_ID VARCHAR(255),SOURCE_ID INTEGER,CODE VARCHAR(255),CONSTRAINT UN_ACTIVITY_CODE UNIQUE(CODE,SOURCE_ID),CONSTRAINT UN_ACTIVITY_NAME UNIQUE(NAME,SOURCE_ID),CONSTRAINT UN_ACTIVITY_GRID_ID UNIQUE(GRID_ID))
|
17
|
+
CREATE MEMORY TABLE ACTIVITY_TYPES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,NAME VARCHAR(2147483647) NOT NULL,GRID_ID VARCHAR(255),CONSTRAINT UN_ACTIVITY_TYPES_GRID_ID UNIQUE(GRID_ID),CONSTRAINT UN_TYPE_NAME UNIQUE(NAME))
|
18
|
+
CREATE MEMORY TABLE PERIODS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,NAME VARCHAR(2147483647),STUDY_SEGMENT_ID INTEGER,START_DAY INTEGER DEFAULT 1 NOT NULL,DURATION_QUANTITY INTEGER NOT NULL,DURATION_UNIT VARCHAR(2147483647) DEFAULT 'day' NOT NULL,REPETITIONS INTEGER DEFAULT 1 NOT NULL,VERSION INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255),CONSTRAINT UN_PERIOD_GRID_ID UNIQUE(GRID_ID))
|
19
|
+
CREATE MEMORY TABLE PLANNED_ACTIVITIES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,ACTIVITY_ID INTEGER NOT NULL,PERIOD_ID INTEGER,DAY INTEGER NOT NULL,DETAILS VARCHAR(2147483647),GRID_ID VARCHAR(255),CONDITION VARCHAR(2147483647),POPULATION_ID INTEGER,WEIGHT INTEGER,CONSTRAINT FK_EVENT_ACTIVITY FOREIGN KEY(ACTIVITY_ID) REFERENCES ACTIVITIES(ID),CONSTRAINT FK_EVENT_PERIOD FOREIGN KEY(PERIOD_ID) REFERENCES PERIODS(ID),CONSTRAINT UN_PLND_ACT_GRID_ID UNIQUE(GRID_ID))
|
20
|
+
CREATE MEMORY TABLE SUBJECTS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,FIRST_NAME VARCHAR(255),LAST_NAME VARCHAR(255),BIRTH_DATE DATE,GENDER VARCHAR(2147483647) NOT NULL,PERSON_ID VARCHAR(255),VERSION INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255),LOAD_STATUS INTEGER DEFAULT 1 NOT NULL,CONSTRAINT UN_SUBJECT_GRID_ID UNIQUE(GRID_ID),CONSTRAINT CK_IDENTIFIERS CHECK((SUBJECTS.PERSON_ID IS NOT NULL) OR ((((SUBJECTS.PERSON_ID IS NULL) AND (SUBJECTS.FIRST_NAME IS NOT NULL)) AND (SUBJECTS.LAST_NAME IS NOT NULL)) AND (SUBJECTS.BIRTH_DATE IS NOT NULL))))
|
21
|
+
CREATE MEMORY TABLE SITES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,NAME VARCHAR(255) NOT NULL,VERSION INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255),ASSIGNED_IDENTIFIER VARCHAR(900) NOT NULL,PROVIDER VARCHAR(255),LAST_REFRESH TIMESTAMP,CONSTRAINT UN_SITE_NAME UNIQUE(NAME),CONSTRAINT UN_SITE_ASSIGNED_ID UNIQUE(ASSIGNED_IDENTIFIER),CONSTRAINT UN_SITE_GRID_ID UNIQUE(GRID_ID))
|
22
|
+
CREATE MEMORY TABLE STUDY_SITES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,SITE_ID INTEGER NOT NULL,STUDY_ID INTEGER NOT NULL,VERSION INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255),PROVIDER VARCHAR(255),LAST_REFRESH TIMESTAMP,CONSTRAINT UN_STUDY_SITE_COMPONENTS UNIQUE(STUDY_ID,SITE_ID),CONSTRAINT UN_STUDY_SITE_GRID_ID UNIQUE(GRID_ID))
|
23
|
+
CREATE MEMORY TABLE SUBJECT_ASSIGNMENTS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,STUDY_SITE_ID INTEGER NOT NULL,SUBJECT_ID INTEGER NOT NULL,START_DATE DATE NOT NULL,VERSION INTEGER DEFAULT 0 NOT NULL,STUDY_SUBJECT_ID VARCHAR(2147483647),GRID_ID VARCHAR(255),END_DATE DATE,CURRENT_AMENDMENT_ID INTEGER NOT NULL,MANAGER_CSM_USER_ID INTEGER,CONSTRAINT UN_SUBJ_ASSIGN_GRID_ID UNIQUE(GRID_ID),CONSTRAINT FK_SUBJECTASSIGN_SUBJECT FOREIGN KEY(SUBJECT_ID) REFERENCES SUBJECTS(ID))
|
24
|
+
CREATE MEMORY TABLE PLANNED_CALENDARS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,STUDY_ID INTEGER NOT NULL,VERSION INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255),CONSTRAINT FK_PLAN_SCHED_STUDY FOREIGN KEY(STUDY_ID) REFERENCES STUDIES(ID),CONSTRAINT UN_PLND_CAL_GRID_ID UNIQUE(GRID_ID))
|
25
|
+
CREATE MEMORY TABLE EPOCHS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,NAME VARCHAR(2147483647) NOT NULL,PLANNED_CALENDAR_ID INTEGER,LIST_INDEX INTEGER DEFAULT 0,GRID_ID VARCHAR(255),CONSTRAINT FK_EPOCH_SCHED FOREIGN KEY(PLANNED_CALENDAR_ID) REFERENCES PLANNED_CALENDARS(ID),CONSTRAINT UN_EPOCH_GRID_ID UNIQUE(GRID_ID))
|
26
|
+
CREATE MEMORY TABLE CSM_APPLICATION(APPLICATION_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,APPLICATION_NAME VARCHAR(255) NOT NULL,APPLICATION_DESCRIPTION VARCHAR(200) NOT NULL,DECLARATIVE_FLAG INTEGER DEFAULT 0,ACTIVE_FLAG INTEGER DEFAULT 0 NOT NULL,UPDATE_DATE TIMESTAMP DEFAULT CURRENT_DATE,DATABASE_URL VARCHAR(100),DATABASE_USER_NAME VARCHAR(100),DATABASE_PASSWORD VARCHAR(100),DATABASE_DIALECT VARCHAR(100),DATABASE_DRIVER VARCHAR(100),CSM_VERSION VARCHAR(20),CONSTRAINT UQ_APPLICATION_NAME UNIQUE(APPLICATION_NAME))
|
27
|
+
CREATE MEMORY TABLE CSM_USER(USER_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,LOGIN_NAME VARCHAR(100) NOT NULL,FIRST_NAME VARCHAR(100) NOT NULL,LAST_NAME VARCHAR(100) NOT NULL,ORGANIZATION VARCHAR(100),DEPARTMENT VARCHAR(100),TITLE VARCHAR(100),PHONE_NUMBER VARCHAR(15),PASSWORD VARCHAR(100),EMAIL_ID VARCHAR(100),START_DATE TIMESTAMP,END_DATE TIMESTAMP,UPDATE_DATE TIMESTAMP DEFAULT CURRENT_DATE,MIGRATED_FLAG INTEGER DEFAULT 0,PREMGRT_LOGIN_NAME VARCHAR(100),CONSTRAINT UQ_LOGIN_NAME UNIQUE(LOGIN_NAME))
|
28
|
+
CREATE MEMORY TABLE CONFIGURATION(PROP VARCHAR(255) NOT NULL PRIMARY KEY,VALUE VARCHAR(2147483647),VERSION INTEGER DEFAULT 0 NOT NULL)
|
29
|
+
CREATE MEMORY TABLE SCHEDULED_CALENDARS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,ASSIGNMENT_ID INTEGER NOT NULL,GRID_ID VARCHAR(255),CONSTRAINT FK_SCHED_CAL_ASSIGN FOREIGN KEY(ASSIGNMENT_ID) REFERENCES SUBJECT_ASSIGNMENTS(ID),CONSTRAINT UN_SCHED_CAL_GRID_ID UNIQUE(GRID_ID))
|
30
|
+
CREATE MEMORY TABLE SCHEDULED_ACTIVITY_MODES(ID INTEGER NOT NULL PRIMARY KEY,NAME VARCHAR(2147483647) NOT NULL)
|
31
|
+
CREATE MEMORY TABLE SCHEDULED_ACTIVITIES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,PLANNED_ACTIVITY_ID INTEGER,IDEAL_DATE DATE NOT NULL,CURRENT_STATE_MODE_ID INTEGER DEFAULT 1 NOT NULL,CURRENT_STATE_DATE DATE NOT NULL,NOTES VARCHAR(2147483647),SCHEDULED_STUDY_SEGMENT_ID INTEGER NOT NULL,CURRENT_STATE_REASON VARCHAR(2147483647),GRID_ID VARCHAR(255),ACTIVITY_ID INTEGER,DETAILS VARCHAR(2147483647),SOURCE_AMENDMENT_ID INTEGER NOT NULL,REPETITION_NUMBER INTEGER,CONSTRAINT FK_SCHED_EVT_EVT FOREIGN KEY(PLANNED_ACTIVITY_ID) REFERENCES PLANNED_ACTIVITIES(ID),CONSTRAINT FK_SCHED_EVT_STATE FOREIGN KEY(CURRENT_STATE_MODE_ID) REFERENCES SCHEDULED_ACTIVITY_MODES(ID),CONSTRAINT UN_SCHED_ACT_GRID_ID UNIQUE(GRID_ID))
|
32
|
+
CREATE MEMORY TABLE SCHEDULED_STUDY_SEGMENTS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,SCHEDULED_CALENDAR_ID INTEGER NOT NULL,STUDY_SEGMENT_ID INTEGER NOT NULL,LIST_INDEX INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255),START_DATE DATE NOT NULL,START_DAY INTEGER NOT NULL,CONSTRAINT FK_SCHED_ARM_CAL FOREIGN KEY(SCHEDULED_CALENDAR_ID) REFERENCES SCHEDULED_CALENDARS(ID),CONSTRAINT FK_SCHED_ARM_ARM FOREIGN KEY(STUDY_SEGMENT_ID) REFERENCES STUDY_SEGMENTS(ID),CONSTRAINT UN_SCHED_SEGMT_GRID_ID UNIQUE(GRID_ID))
|
33
|
+
CREATE MEMORY TABLE SCHEDULED_ACTIVITY_STATES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,SCHEDULED_ACTIVITY_ID INTEGER NOT NULL,MODE_ID INTEGER DEFAULT 1 NOT NULL,ACTUAL_DATE DATE NOT NULL,REASON VARCHAR(2147483647),LIST_INDEX INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255),CONSTRAINT FK_SCHED_EVT_STATE_EVT FOREIGN KEY(SCHEDULED_ACTIVITY_ID) REFERENCES SCHEDULED_ACTIVITIES(ID),CONSTRAINT FK_SCHED_EVT_STATE_MODE FOREIGN KEY(MODE_ID) REFERENCES SCHEDULED_ACTIVITY_MODES(ID),CONSTRAINT UN_SCHED_ACT_STATE_GRID_ID UNIQUE(GRID_ID))
|
34
|
+
CREATE MEMORY TABLE LOGIN_AUDITS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,IP_ADDRESS VARCHAR(2147483647) NOT NULL,LOGIN_STATUS VARCHAR(2147483647) NOT NULL,TIME TIMESTAMP,USER_NAME VARCHAR(2147483647) NOT NULL,VERSION INTEGER NOT NULL,GRID_ID VARCHAR(255))
|
35
|
+
CREATE MEMORY TABLE AUDIT_EVENTS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,IP_ADDRESS VARCHAR(2147483647) NOT NULL,USER_NAME VARCHAR(2147483647) NOT NULL,TIME TIMESTAMP NOT NULL,CLASS_NAME VARCHAR(2147483647) NOT NULL,OPERATION VARCHAR(2147483647) NOT NULL,URL VARCHAR(2147483647) NOT NULL,VERSION INTEGER DEFAULT 0 NOT NULL,OBJECT_ID INTEGER NOT NULL,GRID_ID VARCHAR(255),USER_ACTION_ID VARCHAR(255))
|
36
|
+
CREATE MEMORY TABLE AUDIT_EVENT_VALUES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,AUDIT_EVENT_ID INTEGER NOT NULL,ATTRIBUTE_NAME VARCHAR(2147483647) NOT NULL,PREVIOUS_VALUE VARCHAR(2147483647),NEW_VALUE VARCHAR(2147483647),VERSION INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255))
|
37
|
+
CREATE MEMORY TABLE ADVERSE_EVENTS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,DETECTION_DATE DATE,DESCRIPTION VARCHAR(2147483647) NOT NULL,GRID_ID VARCHAR(255),CONSTRAINT UN_AE_GRID_ID UNIQUE(GRID_ID))
|
38
|
+
CREATE MEMORY TABLE NOTIFICATIONS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,ASSIGNMENT_ID INTEGER NOT NULL,DISMISSED BOOLEAN NOT NULL,GRID_ID VARCHAR(255),ACTION_REQUIRED BOOLEAN,MESSAGE VARCHAR(2147483647),TITLE VARCHAR(2147483647),CONSTRAINT UN_AE_NOTICE_GRID_ID UNIQUE(GRID_ID))
|
39
|
+
CREATE MEMORY TABLE HOLIDAYS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,DISCRIMINATOR_ID INTEGER NOT NULL,SITE_ID INTEGER NOT NULL,DAY INTEGER,MONTH INTEGER,YEAR INTEGER,DAY_OF_THE_WEEK VARCHAR(2147483647),DESCRIPTION VARCHAR(2147483647) NOT NULL,WEEK_NUMBER INTEGER,GRID_ID VARCHAR(255),CONSTRAINT UN_BLACKOUT_GRID_ID UNIQUE(GRID_ID))
|
40
|
+
CREATE MEMORY TABLE USERS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,NAME VARCHAR(255) NOT NULL,CSM_USER_ID INTEGER NOT NULL,ACTIVE_FLAG BOOLEAN DEFAULT FALSE NOT NULL,GRID_ID VARCHAR(255),FIRST_NAME VARCHAR(255),MIDDLE_NAME VARCHAR(255),LAST_NAME VARCHAR(255),CONSTRAINT UN_USER_NAME UNIQUE(NAME),CONSTRAINT UN_USER_CSM_USER UNIQUE(CSM_USER_ID),CONSTRAINT UN_USER_GRID_ID UNIQUE(GRID_ID))
|
41
|
+
CREATE MEMORY TABLE AMENDMENTS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255),PREVIOUS_AMENDMENT_ID INTEGER,NAME VARCHAR(2147483647),AMENDMENT_DATE DATE NOT NULL,MANDATORY BOOLEAN DEFAULT FALSE,RELEASED_DATE TIMESTAMP,CONSTRAINT FK_AMENDMENT_PREV FOREIGN KEY(PREVIOUS_AMENDMENT_ID) REFERENCES AMENDMENTS(ID) ON DELETE CASCADE,CONSTRAINT UN_AMENDMENT_GRID_ID UNIQUE(GRID_ID))
|
42
|
+
CREATE MEMORY TABLE CHANGES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,ACTION VARCHAR(8) NOT NULL,NEW_VALUE VARCHAR(2147483647),OLD_VALUE VARCHAR(2147483647),ATTRIBUTE VARCHAR(2147483647),DELTA_ID INTEGER NOT NULL,GRID_ID VARCHAR(255),UPDATED_DATE TIMESTAMP,CONSTRAINT UN_CHANGE_GRID_ID UNIQUE(GRID_ID))
|
43
|
+
CREATE MEMORY TABLE DELTAS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,NODE_ID INTEGER NOT NULL,AMENDMENT_ID INTEGER NOT NULL,GRID_ID VARCHAR(255),NODE_TYPE VARCHAR(6) NOT NULL,CONSTRAINT UN_DELTA_GRID_ID UNIQUE(GRID_ID))
|
44
|
+
CREATE MEMORY TABLE DELTA_NODE_TYPES(NODE_TYPE VARCHAR(6) NOT NULL PRIMARY KEY,NODE_TABLE VARCHAR(2147483647) NOT NULL)
|
45
|
+
CREATE MEMORY TABLE CHANGE_ACTIONS(ACTION VARCHAR(8) NOT NULL PRIMARY KEY)
|
46
|
+
CREATE MEMORY TABLE USER_ROLES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,USER_ID INTEGER NOT NULL,CSM_GROUP_NAME VARCHAR(2147483647) NOT NULL,GRID_ID VARCHAR(255),CONSTRAINT FK_USER_ROLE_USER FOREIGN KEY(USER_ID) REFERENCES USERS(ID))
|
47
|
+
CREATE MEMORY TABLE USER_ROLE_SITES(USER_ROLE_ID INTEGER NOT NULL,SITE_ID INTEGER NOT NULL,PRIMARY KEY(USER_ROLE_ID,SITE_ID),CONSTRAINT FK_USER_ROLE_SITE_ROLE FOREIGN KEY(USER_ROLE_ID) REFERENCES USER_ROLES(ID),CONSTRAINT FK_USER_ROLE_SITE_SITE FOREIGN KEY(SITE_ID) REFERENCES SITES(ID))
|
48
|
+
CREATE MEMORY TABLE USER_ROLE_STUDY_SITES(USER_ROLE_ID INTEGER NOT NULL,STUDY_SITE_ID INTEGER NOT NULL,CONSTRAINT FK_USER_ROLE_STUDY_SITE_ROLE FOREIGN KEY(USER_ROLE_ID) REFERENCES USER_ROLES(ID),CONSTRAINT FK_USER_ROLE_STUDY_SITE_STUDY FOREIGN KEY(STUDY_SITE_ID) REFERENCES STUDY_SITES(ID))
|
49
|
+
CREATE MEMORY TABLE SOURCES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,NAME VARCHAR(255) NOT NULL,VERSION INTEGER NOT NULL,GRID_ID VARCHAR(255),MANUAL_FLAG BOOLEAN,CONSTRAINT UN_SOURCE_NAME UNIQUE(NAME),CONSTRAINT UN_SOURCE_GRID_ID UNIQUE(GRID_ID),CONSTRAINT UN_ONE_MANUAL_SOURCE UNIQUE(MANUAL_FLAG))
|
50
|
+
CREATE MEMORY TABLE AMENDMENT_APPROVALS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255),AMENDMENT_ID INTEGER NOT NULL,STUDY_SITE_ID INTEGER NOT NULL,APPROVAL_DATE DATE,CONSTRAINT FK_APPRV_AMENDT FOREIGN KEY(AMENDMENT_ID) REFERENCES AMENDMENTS(ID),CONSTRAINT FK_APPRV_STUDY_SITE FOREIGN KEY(STUDY_SITE_ID) REFERENCES STUDY_SITES(ID),CONSTRAINT UN_AMENDT_APPRV_GRID_ID UNIQUE(GRID_ID))
|
51
|
+
CREATE MEMORY TABLE POPULATIONS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,NAME VARCHAR(2147483647) NOT NULL,ABBREVIATION VARCHAR(5) NOT NULL,STUDY_ID INTEGER,GRID_ID VARCHAR(255),CONSTRAINT FK_POPULATIONS_STUDIES FOREIGN KEY(STUDY_ID) REFERENCES STUDIES(ID),CONSTRAINT UN_POP_ABBREV_STUDY UNIQUE(ABBREVIATION,STUDY_ID),CONSTRAINT UN_POP_GRID_ID UNIQUE(GRID_ID))
|
52
|
+
CREATE MEMORY TABLE SUBJECT_POPULATIONS(ASSIGNMENT_ID INTEGER,POPULATION_ID INTEGER,CONSTRAINT FK_SUBJECT_POPULATIONS_SUBJECT_ASSIGNMENTS FOREIGN KEY(ASSIGNMENT_ID) REFERENCES SUBJECT_ASSIGNMENTS(ID),CONSTRAINT FK_SUBJECT_POPULATIONS_POPULATIONS FOREIGN KEY(POPULATION_ID) REFERENCES POPULATIONS(ID))
|
53
|
+
CREATE MEMORY TABLE AUTHENTICATION_SYSTEM_CONF(PROP VARCHAR(255) NOT NULL PRIMARY KEY,VALUE VARCHAR(2147483647),VERSION INTEGER DEFAULT 0 NOT NULL)
|
54
|
+
CREATE MEMORY TABLE PLANNED_ACTIVITY_LABELS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,PLANNED_ACTIVITY_ID INTEGER,REP_NUM INTEGER,GRID_ID VARCHAR(255),LABEL VARCHAR(255),CONSTRAINT UN_LABEL_PA_REP_NUM UNIQUE(PLANNED_ACTIVITY_ID,LABEL,REP_NUM))
|
55
|
+
CREATE MEMORY TABLE SCHEDULED_ACTIVITY_LABELS(SCHEDULED_ACTIVITY_ID INTEGER NOT NULL,LABEL VARCHAR(255) NOT NULL,CONSTRAINT PK_SCHED_ACT_LABEL PRIMARY KEY(SCHEDULED_ACTIVITY_ID,LABEL),CONSTRAINT FK_SCHED_ACT_LABEL_SCHED_ACT FOREIGN KEY(SCHEDULED_ACTIVITY_ID) REFERENCES SCHEDULED_ACTIVITIES(ID))
|
56
|
+
CREATE MEMORY TABLE ACTIVITY_PROPERTIES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,ACTIVITY_ID INTEGER NOT NULL,NAMESPACE VARCHAR(1024) NOT NULL,NAME VARCHAR(512) NOT NULL,VALUE VARCHAR(2147483647),GRID_ID VARCHAR(255),CONSTRAINT UN_NAMESPACE_NAME_ACTIVITY UNIQUE(ACTIVITY_ID,NAMESPACE,NAME),CONSTRAINT FK_ACT_PROPERTY_ACT FOREIGN KEY(ACTIVITY_ID) REFERENCES ACTIVITIES(ID))
|
57
|
+
CREATE MEMORY TABLE STUDY_SECONDARY_IDENTS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,GRID_ID VARCHAR(255),STUDY_ID INTEGER NOT NULL,IDENTIFIER_TYPE VARCHAR(255) NOT NULL,VALUE VARCHAR(255) NOT NULL,CONSTRAINT FK_STUDY_SEC_IDENT FOREIGN KEY(STUDY_ID) REFERENCES STUDIES(ID))
|
58
|
+
CREATE MEMORY TABLE OSGI_CM_PROPERTIES(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,SERVICE_PID VARCHAR(1024),NAME VARCHAR(1024),COLLECTION_KIND VARCHAR(10),KIND VARCHAR(10))
|
59
|
+
CREATE MEMORY TABLE OSGI_CM_PROPERTY_VALUES(LIST_INDEX INTEGER DEFAULT 0 NOT NULL,PROPERTY_ID INTEGER NOT NULL,VALUE VARCHAR(1024),CONSTRAINT FK_OSGI_CM_PROP_VALUE FOREIGN KEY(PROPERTY_ID) REFERENCES OSGI_CM_PROPERTIES(ID))
|
60
|
+
CREATE MEMORY TABLE CSM_FILTER_CLAUSE(FILTER_CLAUSE_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,CLASS_NAME VARCHAR(100) NOT NULL,FILTER_CHAIN VARCHAR(2000) NOT NULL,TARGET_CLASS_NAME VARCHAR(100) NOT NULL,TARGET_CLASS_ATTRIBUTE_NAME VARCHAR(100) NOT NULL,TARGET_CLASS_ATTRIBUTE_TYPE VARCHAR(100) NOT NULL,TARGET_CLASS_ALIAS VARCHAR(100),TARGET_CLASS_ATTRIBUTE_ALIAS VARCHAR(100),GENERATED_SQL_USER VARCHAR(4000) NOT NULL,GENERATED_SQL_GROUP VARCHAR(4000) NOT NULL,APPLICATION_ID INTEGER NOT NULL,UPDATE_DATE DATE DEFAULT CURRENT_DATE NOT NULL,CONSTRAINT FK_APPLICATION_FILTER_CLAUSE FOREIGN KEY(APPLICATION_ID) REFERENCES CSM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE)
|
61
|
+
CREATE MEMORY TABLE CSM_MAPPING(MAPPING_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,APPLICATION_ID INTEGER NOT NULL,OBJECT_NAME VARCHAR(100) NOT NULL,ATTRIBUTE_NAME VARCHAR(100) NOT NULL,OBJECT_PACKAGE_NAME VARCHAR(100),TABLE_NAME VARCHAR(100),TABLE_NAME_GROUP VARCHAR(100),TABLE_NAME_USER VARCHAR(100),VIEW_NAME_GROUP VARCHAR(100),VIEW_NAME_USER VARCHAR(100),ACTIVE_FLAG SMALLINT DEFAULT 0 NOT NULL,MAINTAINED_FLAG SMALLINT DEFAULT 0 NOT NULL,UPDATE_DATE DATE DEFAULT CURRENT_DATE NOT NULL,CONSTRAINT FK_MAP_APPLICATION FOREIGN KEY(APPLICATION_ID) REFERENCES CSM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE,CONSTRAINT UQ_MP_OBJ_NAME_ATTRI_NAME_APP_ID UNIQUE(OBJECT_NAME,ATTRIBUTE_NAME,APPLICATION_ID))
|
62
|
+
CREATE MEMORY TABLE CSM_GROUP(GROUP_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,GROUP_NAME VARCHAR(255) NOT NULL,GROUP_DESC VARCHAR(200),UPDATE_DATE DATE DEFAULT CURRENT_DATE NOT NULL,APPLICATION_ID INTEGER NOT NULL,CONSTRAINT UQ_GROUP_GROUP_NAME UNIQUE(APPLICATION_ID,GROUP_NAME),CONSTRAINT FK_APPLICATION_GROUP FOREIGN KEY(APPLICATION_ID) REFERENCES CSM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE)
|
63
|
+
CREATE INDEX IDX_APPLICATION_ID ON CSM_GROUP(APPLICATION_ID)
|
64
|
+
CREATE MEMORY TABLE CSM_PRIVILEGE(PRIVILEGE_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,PRIVILEGE_NAME VARCHAR(100) NOT NULL,PRIVILEGE_DESCRIPTION VARCHAR(200),UPDATE_DATE DATE DEFAULT CURRENT_DATE NOT NULL,CONSTRAINT UQ_PRIVILEGE_NAME UNIQUE(PRIVILEGE_NAME))
|
65
|
+
CREATE MEMORY TABLE CSM_PROTECTION_ELEMENT(PROTECTION_ELEMENT_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,PROTECTION_ELEMENT_NAME VARCHAR(100) NOT NULL,PROTECTION_ELEMENT_DESCRIPTION VARCHAR(200),OBJECT_ID VARCHAR(100) NOT NULL,ATTRIBUTE VARCHAR(100),ATTRIBUTE_VALUE VARCHAR(100),PROTECTION_ELEMENT_TYPE VARCHAR(100),APPLICATION_ID INTEGER NOT NULL,UPDATE_DATE DATE DEFAULT CURRENT_DATE NOT NULL,CONSTRAINT UQ_PE_PE_NAME_ATTRIBUTE_VALUE_APP_ID UNIQUE(OBJECT_ID,ATTRIBUTE,ATTRIBUTE_VALUE,APPLICATION_ID),CONSTRAINT FK_PE_APPLICATION FOREIGN KEY(APPLICATION_ID) REFERENCES CSM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE)
|
66
|
+
CREATE INDEX IDX_APPLICATION_ID_PE ON CSM_PROTECTION_ELEMENT(APPLICATION_ID)
|
67
|
+
CREATE INDEX IDX_OBJ_ATTR_APP ON CSM_PROTECTION_ELEMENT(OBJECT_ID,ATTRIBUTE,APPLICATION_ID)
|
68
|
+
CREATE MEMORY TABLE CSM_PROTECTION_GROUP(PROTECTION_GROUP_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,PROTECTION_GROUP_NAME VARCHAR(100) NOT NULL,PROTECTION_GROUP_DESCRIPTION VARCHAR(200),APPLICATION_ID INTEGER NOT NULL,LARGE_ELEMENT_COUNT_FLAG SMALLINT NOT NULL,UPDATE_DATE DATE DEFAULT CURRENT_DATE NOT NULL,PARENT_PROTECTION_GROUP_ID INTEGER,CONSTRAINT UQ_PROTECTION_GROUP_PROTECTION_GROUP_NAME UNIQUE(APPLICATION_ID,PROTECTION_GROUP_NAME),CONSTRAINT FK_PG_APPLICATION FOREIGN KEY(APPLICATION_ID) REFERENCES CSM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE,CONSTRAINT FK_PROTECTION_GROUP FOREIGN KEY(PARENT_PROTECTION_GROUP_ID) REFERENCES CSM_PROTECTION_GROUP(PROTECTION_GROUP_ID))
|
69
|
+
CREATE INDEX IDX_APPLICATION_ID_PG ON CSM_PROTECTION_GROUP(APPLICATION_ID)
|
70
|
+
CREATE INDEX IDX_PARENT_PROTECTION_GROUP_ID ON CSM_PROTECTION_GROUP(PARENT_PROTECTION_GROUP_ID)
|
71
|
+
CREATE MEMORY TABLE CSM_PG_PE(PG_PE_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,PROTECTION_GROUP_ID INTEGER NOT NULL,PROTECTION_ELEMENT_ID INTEGER NOT NULL,UPDATE_DATE DATE DEFAULT CURRENT_DATE,CONSTRAINT UQ_PROTECTION_GROUP_PROTECTION_ELEMENT_PROTECTION_GROUP_ID UNIQUE(PROTECTION_ELEMENT_ID,PROTECTION_GROUP_ID),CONSTRAINT FK_PROTECTION_ELEMENT_PROTECTION_GROUP FOREIGN KEY(PROTECTION_ELEMENT_ID) REFERENCES CSM_PROTECTION_ELEMENT(PROTECTION_ELEMENT_ID) ON DELETE CASCADE,CONSTRAINT FK_PROTECTION_GROUP_PROTECTION_ELEMENT FOREIGN KEY(PROTECTION_GROUP_ID) REFERENCES CSM_PROTECTION_GROUP(PROTECTION_GROUP_ID) ON DELETE CASCADE)
|
72
|
+
CREATE INDEX IDX_PROTECTION_ELEMENT_ID ON CSM_PG_PE(PROTECTION_ELEMENT_ID)
|
73
|
+
CREATE INDEX IDX_PROTECTION_GROUP_ID_PGPE ON CSM_PG_PE(PROTECTION_GROUP_ID)
|
74
|
+
CREATE MEMORY TABLE CSM_ROLE(ROLE_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,ROLE_NAME VARCHAR(100) NOT NULL,ROLE_DESCRIPTION VARCHAR(200),APPLICATION_ID INTEGER NOT NULL,ACTIVE_FLAG SMALLINT NOT NULL,UPDATE_DATE DATE DEFAULT CURRENT_DATE NOT NULL,CONSTRAINT UQ_ROLE_ROLE_NAME UNIQUE(APPLICATION_ID,ROLE_NAME),CONSTRAINT FK_APPLICATION_ROLE FOREIGN KEY(APPLICATION_ID) REFERENCES CSM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE)
|
75
|
+
CREATE INDEX IDX_APPLICATION_ID_R ON CSM_ROLE(APPLICATION_ID)
|
76
|
+
CREATE MEMORY TABLE CSM_ROLE_PRIVILEGE(ROLE_PRIVILEGE_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,ROLE_ID INTEGER NOT NULL,PRIVILEGE_ID INTEGER NOT NULL,CONSTRAINT UQ_ROLE_PRIVILEGE_ROLE_ID UNIQUE(PRIVILEGE_ID,ROLE_ID),CONSTRAINT FK_PRIVILEGE_ROLE FOREIGN KEY(PRIVILEGE_ID) REFERENCES CSM_PRIVILEGE(PRIVILEGE_ID) ON DELETE CASCADE,CONSTRAINT FK_ROLE FOREIGN KEY(ROLE_ID) REFERENCES CSM_ROLE(ROLE_ID) ON DELETE CASCADE)
|
77
|
+
CREATE INDEX IDX_PRIVILEGE_ID ON CSM_ROLE_PRIVILEGE(PRIVILEGE_ID)
|
78
|
+
CREATE INDEX IDX_ROLE_ID ON CSM_ROLE_PRIVILEGE(ROLE_ID)
|
79
|
+
CREATE MEMORY TABLE CSM_USER_GROUP(USER_GROUP_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,USER_ID INTEGER NOT NULL,GROUP_ID INTEGER NOT NULL,CONSTRAINT FK_USER_GROUP FOREIGN KEY(USER_ID) REFERENCES CSM_USER(USER_ID) ON DELETE CASCADE,CONSTRAINT FK_UG_GROUP FOREIGN KEY(GROUP_ID) REFERENCES CSM_GROUP(GROUP_ID) ON DELETE CASCADE)
|
80
|
+
CREATE INDEX IDX_USER_ID ON CSM_USER_GROUP(USER_ID)
|
81
|
+
CREATE INDEX IDX_GROUP_ID ON CSM_USER_GROUP(GROUP_ID)
|
82
|
+
CREATE MEMORY TABLE CSM_USER_GROUP_ROLE_PG(USER_GROUP_ROLE_PG_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,USER_ID INTEGER,GROUP_ID INTEGER,ROLE_ID INTEGER NOT NULL,PROTECTION_GROUP_ID INTEGER NOT NULL,UPDATE_DATE DATE DEFAULT CURRENT_DATE NOT NULL,CONSTRAINT FK_USER_GROUP_ROLE_PROTECTION_GROUP_GROUPS FOREIGN KEY(GROUP_ID) REFERENCES CSM_GROUP(GROUP_ID) ON DELETE CASCADE,CONSTRAINT FK_USER_GROUP_ROLE_PROTECTION_GROUP_ROLE FOREIGN KEY(ROLE_ID) REFERENCES CSM_ROLE(ROLE_ID) ON DELETE CASCADE,CONSTRAINT FK_USER_GROUP_ROLE_PROTECTION_GROUP_PROTECTION_GROUP FOREIGN KEY(PROTECTION_GROUP_ID) REFERENCES CSM_PROTECTION_GROUP(PROTECTION_GROUP_ID) ON DELETE CASCADE,CONSTRAINT FK_USER_GROUP_ROLE_PROTECTION_GROUP_USER FOREIGN KEY(USER_ID) REFERENCES CSM_USER(USER_ID) ON DELETE CASCADE)
|
83
|
+
CREATE INDEX IDX_GROUP_ID_UGRPG ON CSM_USER_GROUP_ROLE_PG(GROUP_ID)
|
84
|
+
CREATE INDEX IDX_ROLE_ID_UGRPG ON CSM_USER_GROUP_ROLE_PG(ROLE_ID)
|
85
|
+
CREATE INDEX IDX_PROTECTION_GROUP_ID_UGRPG ON CSM_USER_GROUP_ROLE_PG(PROTECTION_GROUP_ID)
|
86
|
+
CREATE INDEX IDX_USER_ID_UGRPG ON CSM_USER_GROUP_ROLE_PG(USER_ID)
|
87
|
+
CREATE MEMORY TABLE CSM_USER_PE(USER_PROTECTION_ELEMENT_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,PROTECTION_ELEMENT_ID INTEGER NOT NULL,USER_ID INTEGER NOT NULL,CONSTRAINT UQ_USER_PROTECTION_ELEMENT_PROTECTION_ELEMENT_ID UNIQUE(USER_ID,PROTECTION_ELEMENT_ID),CONSTRAINT FK_PE_USER FOREIGN KEY(USER_ID) REFERENCES CSM_USER(USER_ID) ON DELETE CASCADE,CONSTRAINT FK_PROTECTION_ELEMENT_USER FOREIGN KEY(PROTECTION_ELEMENT_ID) REFERENCES CSM_PROTECTION_ELEMENT(PROTECTION_ELEMENT_ID) ON DELETE CASCADE)
|
88
|
+
CREATE INDEX IDX_USER_ID_UPE ON CSM_USER_PE(USER_ID)
|
89
|
+
CREATE INDEX IDX_PROTECTION_ELEMENT_ID_UPE ON CSM_USER_PE(PROTECTION_ELEMENT_ID)
|
90
|
+
CREATE MEMORY TABLE MANAGING_SITES(STUDY_ID INTEGER NOT NULL,SITE_ID INTEGER NOT NULL,CONSTRAINT FK_STUDY_MGSITE_STUDY FOREIGN KEY(STUDY_ID) REFERENCES STUDIES(ID),CONSTRAINT FK_STUDY_MGSITE_SITE FOREIGN KEY(SITE_ID) REFERENCES SITES(ID))
|
91
|
+
CREATE MEMORY TABLE USER_ACTIONS(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER DEFAULT 0 NOT NULL,CSM_USER_ID INTEGER NOT NULL,CONTEXT VARCHAR(2147483647) NOT NULL,DESCRIPTION VARCHAR(2147483647) NOT NULL,ACTION_TYPE VARCHAR(2147483647) NOT NULL,UNDONE BOOLEAN DEFAULT FALSE,GRID_ID VARCHAR(255),CONSTRAINT UN_USER_ACTION_GRID_ID UNIQUE(GRID_ID))
|
92
|
+
CREATE MEMORY TABLE SUBJECT_PROPERTIES(SUBJECT_ID INTEGER NOT NULL,LIST_INDEX INTEGER DEFAULT 0 NOT NULL,NAME VARCHAR(2147483647) NOT NULL,VALUE VARCHAR(2147483647),CONSTRAINT PK_SUBJECT_PROPERTY PRIMARY KEY(SUBJECT_ID,LIST_INDEX),CONSTRAINT FK_SUBJECT_PROP_SUBJECT FOREIGN KEY(SUBJECT_ID) REFERENCES SUBJECTS(ID))
|
93
|
+
ALTER TABLE STUDIES ADD CONSTRAINT FK_STUDY_CUR_AMENDMENT FOREIGN KEY(AMENDMENT_ID) REFERENCES AMENDMENTS(ID)
|
94
|
+
ALTER TABLE STUDIES ADD CONSTRAINT FK_STUDY_DEV_AMENDMENT FOREIGN KEY(DEV_AMENDMENT_ID) REFERENCES AMENDMENTS(ID)
|
95
|
+
ALTER TABLE STUDY_SEGMENTS ADD CONSTRAINT FK_ARM_EPOCH FOREIGN KEY(EPOCH_ID) REFERENCES EPOCHS(ID)
|
96
|
+
ALTER TABLE ACTIVITIES ADD CONSTRAINT FK_ACTIV_TYPE_ID FOREIGN KEY(ACTIVITY_TYPE_ID) REFERENCES ACTIVITY_TYPES(ID)
|
97
|
+
ALTER TABLE ACTIVITIES ADD CONSTRAINT FK_SOURCE_ID FOREIGN KEY(SOURCE_ID) REFERENCES SOURCES(ID)
|
98
|
+
ALTER TABLE PLANNED_ACTIVITIES ADD CONSTRAINT FK_PLANNED_ACTIVITIES_POPULATIONS FOREIGN KEY(POPULATION_ID) REFERENCES POPULATIONS(ID)
|
99
|
+
ALTER TABLE SUBJECT_ASSIGNMENTS ADD CONSTRAINT FK_SCHEDULE_AMENDMENT FOREIGN KEY(CURRENT_AMENDMENT_ID) REFERENCES AMENDMENTS(ID)
|
100
|
+
ALTER TABLE SCHEDULED_ACTIVITIES ADD CONSTRAINT FK_SCHED_EVT_ARM FOREIGN KEY(SCHEDULED_STUDY_SEGMENT_ID) REFERENCES SCHEDULED_STUDY_SEGMENTS(ID)
|
101
|
+
ALTER TABLE SCHEDULED_ACTIVITIES ADD CONSTRAINT FK_SCHED_EVT_AMENDMENT FOREIGN KEY(SOURCE_AMENDMENT_ID) REFERENCES AMENDMENTS(ID)
|
102
|
+
ALTER TABLE AUDIT_EVENTS ADD CONSTRAINT FK_AUDIT_EVENT_USER_ACTION FOREIGN KEY(USER_ACTION_ID) REFERENCES USER_ACTIONS(GRID_ID)
|
103
|
+
ALTER TABLE CHANGES ADD CONSTRAINT FK_CHANGE_ACTION FOREIGN KEY(ACTION) REFERENCES CHANGE_ACTIONS(ACTION)
|
104
|
+
ALTER TABLE DELTAS ADD CONSTRAINT FK_DELTA_NODE_TYPE FOREIGN KEY(NODE_TYPE) REFERENCES DELTA_NODE_TYPES(NODE_TYPE)
|
105
|
+
ALTER TABLE STUDIES ALTER COLUMN ID RESTART WITH 1
|
106
|
+
ALTER TABLE STUDY_SEGMENTS ALTER COLUMN ID RESTART WITH 1
|
107
|
+
ALTER TABLE ACTIVITIES ALTER COLUMN ID RESTART WITH 2
|
108
|
+
ALTER TABLE ACTIVITY_TYPES ALTER COLUMN ID RESTART WITH 6
|
109
|
+
ALTER TABLE PERIODS ALTER COLUMN ID RESTART WITH 1
|
110
|
+
ALTER TABLE PLANNED_ACTIVITIES ALTER COLUMN ID RESTART WITH 1
|
111
|
+
ALTER TABLE SUBJECTS ALTER COLUMN ID RESTART WITH 1
|
112
|
+
ALTER TABLE SITES ALTER COLUMN ID RESTART WITH 1
|
113
|
+
ALTER TABLE STUDY_SITES ALTER COLUMN ID RESTART WITH 1
|
114
|
+
ALTER TABLE SUBJECT_ASSIGNMENTS ALTER COLUMN ID RESTART WITH 1
|
115
|
+
ALTER TABLE PLANNED_CALENDARS ALTER COLUMN ID RESTART WITH 1
|
116
|
+
ALTER TABLE EPOCHS ALTER COLUMN ID RESTART WITH 1
|
117
|
+
ALTER TABLE CSM_APPLICATION ALTER COLUMN APPLICATION_ID RESTART WITH 3
|
118
|
+
ALTER TABLE CSM_USER ALTER COLUMN USER_ID RESTART WITH 0
|
119
|
+
ALTER TABLE SCHEDULED_CALENDARS ALTER COLUMN ID RESTART WITH 1
|
120
|
+
ALTER TABLE SCHEDULED_ACTIVITIES ALTER COLUMN ID RESTART WITH 1
|
121
|
+
ALTER TABLE SCHEDULED_STUDY_SEGMENTS ALTER COLUMN ID RESTART WITH 1
|
122
|
+
ALTER TABLE SCHEDULED_ACTIVITY_STATES ALTER COLUMN ID RESTART WITH 1
|
123
|
+
ALTER TABLE LOGIN_AUDITS ALTER COLUMN ID RESTART WITH 1
|
124
|
+
ALTER TABLE AUDIT_EVENTS ALTER COLUMN ID RESTART WITH 1
|
125
|
+
ALTER TABLE AUDIT_EVENT_VALUES ALTER COLUMN ID RESTART WITH 1
|
126
|
+
ALTER TABLE ADVERSE_EVENTS ALTER COLUMN ID RESTART WITH 1
|
127
|
+
ALTER TABLE NOTIFICATIONS ALTER COLUMN ID RESTART WITH 1
|
128
|
+
ALTER TABLE HOLIDAYS ALTER COLUMN ID RESTART WITH 1
|
129
|
+
ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 1
|
130
|
+
ALTER TABLE AMENDMENTS ALTER COLUMN ID RESTART WITH 1
|
131
|
+
ALTER TABLE CHANGES ALTER COLUMN ID RESTART WITH 1
|
132
|
+
ALTER TABLE DELTAS ALTER COLUMN ID RESTART WITH 1
|
133
|
+
ALTER TABLE USER_ROLES ALTER COLUMN ID RESTART WITH 1
|
134
|
+
ALTER TABLE SOURCES ALTER COLUMN ID RESTART WITH 2
|
135
|
+
ALTER TABLE AMENDMENT_APPROVALS ALTER COLUMN ID RESTART WITH 1
|
136
|
+
ALTER TABLE POPULATIONS ALTER COLUMN ID RESTART WITH 1
|
137
|
+
ALTER TABLE PLANNED_ACTIVITY_LABELS ALTER COLUMN ID RESTART WITH 1
|
138
|
+
ALTER TABLE ACTIVITY_PROPERTIES ALTER COLUMN ID RESTART WITH 1
|
139
|
+
ALTER TABLE STUDY_SECONDARY_IDENTS ALTER COLUMN ID RESTART WITH 1
|
140
|
+
ALTER TABLE OSGI_CM_PROPERTIES ALTER COLUMN ID RESTART WITH 1
|
141
|
+
ALTER TABLE CSM_FILTER_CLAUSE ALTER COLUMN FILTER_CLAUSE_ID RESTART WITH 0
|
142
|
+
ALTER TABLE CSM_MAPPING ALTER COLUMN MAPPING_ID RESTART WITH 0
|
143
|
+
ALTER TABLE CSM_GROUP ALTER COLUMN GROUP_ID RESTART WITH 24
|
144
|
+
ALTER TABLE CSM_PRIVILEGE ALTER COLUMN PRIVILEGE_ID RESTART WITH 24
|
145
|
+
ALTER TABLE CSM_PROTECTION_ELEMENT ALTER COLUMN PROTECTION_ELEMENT_ID RESTART WITH 0
|
146
|
+
ALTER TABLE CSM_PROTECTION_GROUP ALTER COLUMN PROTECTION_GROUP_ID RESTART WITH 0
|
147
|
+
ALTER TABLE CSM_PG_PE ALTER COLUMN PG_PE_ID RESTART WITH 0
|
148
|
+
ALTER TABLE CSM_ROLE ALTER COLUMN ROLE_ID RESTART WITH 24
|
149
|
+
ALTER TABLE CSM_ROLE_PRIVILEGE ALTER COLUMN ROLE_PRIVILEGE_ID RESTART WITH 24
|
150
|
+
ALTER TABLE CSM_USER_GROUP ALTER COLUMN USER_GROUP_ID RESTART WITH 0
|
151
|
+
ALTER TABLE CSM_USER_GROUP_ROLE_PG ALTER COLUMN USER_GROUP_ROLE_PG_ID RESTART WITH 0
|
152
|
+
ALTER TABLE CSM_USER_PE ALTER COLUMN USER_PROTECTION_ELEMENT_ID RESTART WITH 0
|
153
|
+
ALTER TABLE USER_ACTIONS ALTER COLUMN ID RESTART WITH 1
|
154
|
+
CREATE USER SA PASSWORD ""
|
155
|
+
GRANT DBA TO SA
|
156
|
+
SET WRITE_DELAY 10
|
157
|
+
SET SCHEMA PUBLIC
|
158
|
+
INSERT INTO BERING_VERSION VALUES(1,8)
|
159
|
+
INSERT INTO BERING_VERSION VALUES(2,14)
|
160
|
+
INSERT INTO BERING_VERSION VALUES(3,11)
|
161
|
+
INSERT INTO BERING_VERSION VALUES(4,6)
|
162
|
+
INSERT INTO BERING_VERSION VALUES(5,4)
|
163
|
+
INSERT INTO BERING_VERSION VALUES(6,15)
|
164
|
+
INSERT INTO BERING_VERSION VALUES(7,22)
|
165
|
+
INSERT INTO BERING_VERSION VALUES(8,10)
|
166
|
+
INSERT INTO BERING_VERSION VALUES(9,22)
|
167
|
+
INSERT INTO BERING_VERSION VALUES(10,4)
|
168
|
+
INSERT INTO BERING_VERSION VALUES(11,5)
|
169
|
+
INSERT INTO BERING_VERSION VALUES(12,3)
|
170
|
+
INSERT INTO BERING_VERSION VALUES(13,3)
|
171
|
+
INSERT INTO BERING_VERSION VALUES(14,6)
|
172
|
+
INSERT INTO BERING_VERSION VALUES(15,10)
|
173
|
+
INSERT INTO BERING_VERSION VALUES(16,4)
|
174
|
+
INSERT INTO BERING_VERSION VALUES(17,6)
|
175
|
+
INSERT INTO BERING_VERSION VALUES(18,3)
|
176
|
+
INSERT INTO BERING_VERSION VALUES(19,11)
|
177
|
+
INSERT INTO BERING_VERSION VALUES(20,5)
|
178
|
+
INSERT INTO ACTIVITIES VALUES(1,0,'Reconsent',NULL,5,NULL,NULL,'Reconsent')
|
179
|
+
INSERT INTO ACTIVITY_TYPES VALUES(1,0,'Disease Measure','1')
|
180
|
+
INSERT INTO ACTIVITY_TYPES VALUES(2,0,'Intervention','2')
|
181
|
+
INSERT INTO ACTIVITY_TYPES VALUES(3,0,'Lab Test','3')
|
182
|
+
INSERT INTO ACTIVITY_TYPES VALUES(4,0,'Procedure','4')
|
183
|
+
INSERT INTO ACTIVITY_TYPES VALUES(5,0,'Other','5')
|
184
|
+
INSERT INTO CSM_APPLICATION VALUES(1,'csm_upt','UPT Super Admin Application',0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL)
|
185
|
+
INSERT INTO CSM_APPLICATION VALUES(2,'study_calendar','study calendar',0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL)
|
186
|
+
INSERT INTO SCHEDULED_ACTIVITY_MODES VALUES(1,'scheduled')
|
187
|
+
INSERT INTO SCHEDULED_ACTIVITY_MODES VALUES(2,'occurred')
|
188
|
+
INSERT INTO SCHEDULED_ACTIVITY_MODES VALUES(3,'canceled')
|
189
|
+
INSERT INTO SCHEDULED_ACTIVITY_MODES VALUES(4,'conditional')
|
190
|
+
INSERT INTO SCHEDULED_ACTIVITY_MODES VALUES(5,'NA')
|
191
|
+
INSERT INTO SCHEDULED_ACTIVITY_MODES VALUES(6,'missed')
|
192
|
+
INSERT INTO DELTA_NODE_TYPES VALUES('cal','planned_calendars')
|
193
|
+
INSERT INTO DELTA_NODE_TYPES VALUES('epoch','epochs')
|
194
|
+
INSERT INTO DELTA_NODE_TYPES VALUES('event','planned_events')
|
195
|
+
INSERT INTO DELTA_NODE_TYPES VALUES('period','periods')
|
196
|
+
INSERT INTO DELTA_NODE_TYPES VALUES('popltn','populations')
|
197
|
+
INSERT INTO DELTA_NODE_TYPES VALUES('segmnt','study_segments')
|
198
|
+
INSERT INTO DELTA_NODE_TYPES VALUES('study','populations')
|
199
|
+
INSERT INTO CHANGE_ACTIONS VALUES('add')
|
200
|
+
INSERT INTO CHANGE_ACTIONS VALUES('property')
|
201
|
+
INSERT INTO CHANGE_ACTIONS VALUES('remove')
|
202
|
+
INSERT INTO CHANGE_ACTIONS VALUES('reorder')
|
203
|
+
INSERT INTO AUTHENTICATION_SYSTEM_CONF VALUES('authenticationSystemPre25',NULL,0)
|
204
|
+
INSERT INTO CSM_GROUP VALUES(1,'system_administrator','Configures the technical system level properties and behavior of the applications (i.e. the password policy, email setup, ESB, etc).','2011-05-12',2)
|
205
|
+
INSERT INTO CSM_GROUP VALUES(2,'business_administrator','Manages the domain related application wide properties and behavior (i.e. label names, reference data lists, etc)','2011-05-12',2)
|
206
|
+
INSERT INTO CSM_GROUP VALUES(3,'person_and_organization_information_manager','Manages organizations and rosters / Creates and updates person info including contact info, degrees/certifications, rosters they?re associated with','2011-05-12',2)
|
207
|
+
INSERT INTO CSM_GROUP VALUES(4,'data_importer','Identifies studies defined by Coordinating Center and imports as a consumer that data defined elsewhere','2011-05-12',2)
|
208
|
+
INSERT INTO CSM_GROUP VALUES(5,'user_administrator','Ability to read system personnel (research staff and investigators) and create/manage user accounts/application roles, defines Custom Combination Roles','2011-05-12',2)
|
209
|
+
INSERT INTO CSM_GROUP VALUES(6,'study_qa_manager','Updates core study info after saving / opening study.(e.g. PI, title, phase, epochs/arms, basic study design) Read-only review of study calendar template / releases templates to participating sites','2011-05-12',2)
|
210
|
+
INSERT INTO CSM_GROUP VALUES(7,'study_creator','Creates the core study info (e.g. PI, title, description, phase, epochs/arms & basic study design, etc.) NOTE: some sites may want to combine the supplemental study info roles into this role','2011-05-12',2)
|
211
|
+
INSERT INTO CSM_GROUP VALUES(8,'supplemental_study_information_manager','Adds treatment assignment, drugs, adEERS-specific diseases, adEERs reporting criteria, CTC/MedDRA version, etc. Update/manage registration metadata (e.g. stratifications, eligibility criteria, notifi','2011-05-12',2)
|
212
|
+
INSERT INTO CSM_GROUP VALUES(9,'study_team_administrator','Connects study level people to study and internal staff to study. Assigns internal staff to protocol, determines study artifact accessiblity for staff (e.g. study calendar templates, CRFs, etc.)','2011-05-12',2)
|
213
|
+
INSERT INTO CSM_GROUP VALUES(10,'study_site_participation_administrator','Connects participating sites to a protocol','2011-05-12',2)
|
214
|
+
INSERT INTO CSM_GROUP VALUES(11,'ae_rule_and_report_manager','Creates, manages, imports AE rules / Creates, manages, imports AE report definitions','2011-05-12',2)
|
215
|
+
INSERT INTO CSM_GROUP VALUES(12,'study_calendar_template_builder','Creates and updates study calendar templates','2011-05-12',2)
|
216
|
+
INSERT INTO CSM_GROUP VALUES(13,'registration_qa_manager','Updates registration information (study subject ID, Date of consent) after enrollment. Can waive the eligibility criteria for certain study subjects.','2011-05-12',2)
|
217
|
+
INSERT INTO CSM_GROUP VALUES(14,'subject_manager','Defines patient to system (remaining subject data managed by other roles which are not defined)','2011-05-12',2)
|
218
|
+
INSERT INTO CSM_GROUP VALUES(15,'study_subject_calendar_manager','Creates and updates a subject-specific study calendar based on a study calendar template','2011-05-12',2)
|
219
|
+
INSERT INTO CSM_GROUP VALUES(16,'registrar','Accepts and approves/denies subject registration requests. Requests subject registration on a particular study','2011-05-12',2)
|
220
|
+
INSERT INTO CSM_GROUP VALUES(17,'ae_reporter','Creates / updates info about AE that needs reported / submits report to appropriate parties per report definition. Enters set of required AEs to be assessed and any other AEs that patient experienced.','2011-05-12',2)
|
221
|
+
INSERT INTO CSM_GROUP VALUES(18,'ae_expedited_report_reviewer','Read-only: reviews, provides comments, and routes expedited reports through the review workflow','2011-05-12',2)
|
222
|
+
INSERT INTO CSM_GROUP VALUES(19,'ae_study_data_reviewer','Read-only: reviews, provides comments, and adverse event data through a review workflow','2011-05-12',2)
|
223
|
+
INSERT INTO CSM_GROUP VALUES(20,'lab_impact_calendar_notifier','Creates a calendar notification for a potential lab-based treatment modification','2011-05-12',2)
|
224
|
+
INSERT INTO CSM_GROUP VALUES(21,'lab_data_user','Enters, edits, and imports labs from LIMS, viewing labs, selecting and sending labs to CDMS and caAERS','2011-05-12',2)
|
225
|
+
INSERT INTO CSM_GROUP VALUES(22,'data_reader','Read-only: typically not part of org being audited, granted temporary access (no updates) to whole study or specific study/subjects, or any data entered by site for study/subject, crosses all apps.','2011-05-12',2)
|
226
|
+
INSERT INTO CSM_GROUP VALUES(23,'data_analyst','Read-only: searches for data, uses built-in analysis tools, exports data to third party tools','2011-05-12',2)
|
227
|
+
INSERT INTO CSM_PRIVILEGE VALUES(1,'system_administrator','Configures the technical system level properties and behavior of the applications (i.e. the password policy, email setup, ESB, etc).','2011-05-12')
|
228
|
+
INSERT INTO CSM_PRIVILEGE VALUES(2,'business_administrator','Manages the domain related application wide properties and behavior (i.e. label names, reference data lists, etc)','2011-05-12')
|
229
|
+
INSERT INTO CSM_PRIVILEGE VALUES(3,'person_and_organization_information_manager','Manages organizations and rosters / Creates and updates person info including contact info, degrees/certifications, rosters they?re associated with','2011-05-12')
|
230
|
+
INSERT INTO CSM_PRIVILEGE VALUES(4,'data_importer','Identifies studies defined by Coordinating Center and imports as a consumer that data defined elsewhere','2011-05-12')
|
231
|
+
INSERT INTO CSM_PRIVILEGE VALUES(5,'user_administrator','Ability to read system personnel (research staff and investigators) and create/manage user accounts/application roles, defines Custom Combination Roles','2011-05-12')
|
232
|
+
INSERT INTO CSM_PRIVILEGE VALUES(6,'study_qa_manager','Updates core study info after saving / opening study.(e.g. PI, title, phase, epochs/arms, basic study design) Read-only review of study calendar template / releases templates to participating sites','2011-05-12')
|
233
|
+
INSERT INTO CSM_PRIVILEGE VALUES(7,'study_creator','Creates the core study info (e.g. PI, title, description, phase, epochs/arms & basic study design, etc.) NOTE: some sites may want to combine the supplemental study info roles into this role','2011-05-12')
|
234
|
+
INSERT INTO CSM_PRIVILEGE VALUES(8,'supplemental_study_information_manager','Adds treatment assignment, drugs, adEERS-specific diseases, adEERs reporting criteria, CTC/MedDRA version, etc. Update/manage registration metadata (e.g. stratifications, eligibility criteria, notifi','2011-05-12')
|
235
|
+
INSERT INTO CSM_PRIVILEGE VALUES(9,'study_team_administrator','Connects study level people to study and internal staff to study. Assigns internal staff to protocol, determines study artifact accessiblity for staff (e.g. study calendar templates, CRFs, etc.)','2011-05-12')
|
236
|
+
INSERT INTO CSM_PRIVILEGE VALUES(10,'study_site_participation_administrator','Connects participating sites to a protocol','2011-05-12')
|
237
|
+
INSERT INTO CSM_PRIVILEGE VALUES(11,'ae_rule_and_report_manager','Creates, manages, imports AE rules / Creates, manages, imports AE report definitions','2011-05-12')
|
238
|
+
INSERT INTO CSM_PRIVILEGE VALUES(12,'study_calendar_template_builder','Creates and updates study calendar templates','2011-05-12')
|
239
|
+
INSERT INTO CSM_PRIVILEGE VALUES(13,'registration_qa_manager','Updates registration information (study subject ID, Date of consent) after enrollment. Can waive the eligibility criteria for certain study subjects.','2011-05-12')
|
240
|
+
INSERT INTO CSM_PRIVILEGE VALUES(14,'subject_manager','Defines patient to system (remaining subject data managed by other roles which are not defined)','2011-05-12')
|
241
|
+
INSERT INTO CSM_PRIVILEGE VALUES(15,'study_subject_calendar_manager','Creates and updates a subject-specific study calendar based on a study calendar template','2011-05-12')
|
242
|
+
INSERT INTO CSM_PRIVILEGE VALUES(16,'registrar','Accepts and approves/denies subject registration requests. Requests subject registration on a particular study','2011-05-12')
|
243
|
+
INSERT INTO CSM_PRIVILEGE VALUES(17,'ae_reporter','Creates / updates info about AE that needs reported / submits report to appropriate parties per report definition. Enters set of required AEs to be assessed and any other AEs that patient experienced.','2011-05-12')
|
244
|
+
INSERT INTO CSM_PRIVILEGE VALUES(18,'ae_expedited_report_reviewer','Read-only: reviews, provides comments, and routes expedited reports through the review workflow','2011-05-12')
|
245
|
+
INSERT INTO CSM_PRIVILEGE VALUES(19,'ae_study_data_reviewer','Read-only: reviews, provides comments, and adverse event data through a review workflow','2011-05-12')
|
246
|
+
INSERT INTO CSM_PRIVILEGE VALUES(20,'lab_impact_calendar_notifier','Creates a calendar notification for a potential lab-based treatment modification','2011-05-12')
|
247
|
+
INSERT INTO CSM_PRIVILEGE VALUES(21,'lab_data_user','Enters, edits, and imports labs from LIMS, viewing labs, selecting and sending labs to CDMS and caAERS','2011-05-12')
|
248
|
+
INSERT INTO CSM_PRIVILEGE VALUES(22,'data_reader','Read-only: typically not part of org being audited, granted temporary access (no updates) to whole study or specific study/subjects, or any data entered by site for study/subject, crosses all apps.','2011-05-12')
|
249
|
+
INSERT INTO CSM_PRIVILEGE VALUES(23,'data_analyst','Read-only: searches for data, uses built-in analysis tools, exports data to third party tools','2011-05-12')
|
250
|
+
INSERT INTO CSM_ROLE VALUES(1,'system_administrator','Configures the technical system level properties and behavior of the applications (i.e. the password policy, email setup, ESB, etc).',2,1,'2011-05-12')
|
251
|
+
INSERT INTO CSM_ROLE VALUES(2,'business_administrator','Manages the domain related application wide properties and behavior (i.e. label names, reference data lists, etc)',2,1,'2011-05-12')
|
252
|
+
INSERT INTO CSM_ROLE VALUES(3,'person_and_organization_information_manager','Manages organizations and rosters / Creates and updates person info including contact info, degrees/certifications, rosters they?re associated with',2,1,'2011-05-12')
|
253
|
+
INSERT INTO CSM_ROLE VALUES(4,'data_importer','Identifies studies defined by Coordinating Center and imports as a consumer that data defined elsewhere',2,1,'2011-05-12')
|
254
|
+
INSERT INTO CSM_ROLE VALUES(5,'user_administrator','Ability to read system personnel (research staff and investigators) and create/manage user accounts/application roles, defines Custom Combination Roles',2,1,'2011-05-12')
|
255
|
+
INSERT INTO CSM_ROLE VALUES(6,'study_qa_manager','Updates core study info after saving / opening study.(e.g. PI, title, phase, epochs/arms, basic study design) Read-only review of study calendar template / releases templates to participating sites',2,1,'2011-05-12')
|
256
|
+
INSERT INTO CSM_ROLE VALUES(7,'study_creator','Creates the core study info (e.g. PI, title, description, phase, epochs/arms & basic study design, etc.) NOTE: some sites may want to combine the supplemental study info roles into this role',2,1,'2011-05-12')
|
257
|
+
INSERT INTO CSM_ROLE VALUES(8,'supplemental_study_information_manager','Adds treatment assignment, drugs, adEERS-specific diseases, adEERs reporting criteria, CTC/MedDRA version, etc. Update/manage registration metadata (e.g. stratifications, eligibility criteria, notifi',2,1,'2011-05-12')
|
258
|
+
INSERT INTO CSM_ROLE VALUES(9,'study_team_administrator','Connects study level people to study and internal staff to study. Assigns internal staff to protocol, determines study artifact accessiblity for staff (e.g. study calendar templates, CRFs, etc.)',2,1,'2011-05-12')
|
259
|
+
INSERT INTO CSM_ROLE VALUES(10,'study_site_participation_administrator','Connects participating sites to a protocol',2,1,'2011-05-12')
|
260
|
+
INSERT INTO CSM_ROLE VALUES(11,'ae_rule_and_report_manager','Creates, manages, imports AE rules / Creates, manages, imports AE report definitions',2,1,'2011-05-12')
|
261
|
+
INSERT INTO CSM_ROLE VALUES(12,'study_calendar_template_builder','Creates and updates study calendar templates',2,1,'2011-05-12')
|
262
|
+
INSERT INTO CSM_ROLE VALUES(13,'registration_qa_manager','Updates registration information (study subject ID, Date of consent) after enrollment. Can waive the eligibility criteria for certain study subjects.',2,1,'2011-05-12')
|
263
|
+
INSERT INTO CSM_ROLE VALUES(14,'subject_manager','Defines patient to system (remaining subject data managed by other roles which are not defined)',2,1,'2011-05-12')
|
264
|
+
INSERT INTO CSM_ROLE VALUES(15,'study_subject_calendar_manager','Creates and updates a subject-specific study calendar based on a study calendar template',2,1,'2011-05-12')
|
265
|
+
INSERT INTO CSM_ROLE VALUES(16,'registrar','Accepts and approves/denies subject registration requests. Requests subject registration on a particular study',2,1,'2011-05-12')
|
266
|
+
INSERT INTO CSM_ROLE VALUES(17,'ae_reporter','Creates / updates info about AE that needs reported / submits report to appropriate parties per report definition. Enters set of required AEs to be assessed and any other AEs that patient experienced.',2,1,'2011-05-12')
|
267
|
+
INSERT INTO CSM_ROLE VALUES(18,'ae_expedited_report_reviewer','Read-only: reviews, provides comments, and routes expedited reports through the review workflow',2,1,'2011-05-12')
|
268
|
+
INSERT INTO CSM_ROLE VALUES(19,'ae_study_data_reviewer','Read-only: reviews, provides comments, and adverse event data through a review workflow',2,1,'2011-05-12')
|
269
|
+
INSERT INTO CSM_ROLE VALUES(20,'lab_impact_calendar_notifier','Creates a calendar notification for a potential lab-based treatment modification',2,1,'2011-05-12')
|
270
|
+
INSERT INTO CSM_ROLE VALUES(21,'lab_data_user','Enters, edits, and imports labs from LIMS, viewing labs, selecting and sending labs to CDMS and caAERS',2,1,'2011-05-12')
|
271
|
+
INSERT INTO CSM_ROLE VALUES(22,'data_reader','Read-only: typically not part of org being audited, granted temporary access (no updates) to whole study or specific study/subjects, or any data entered by site for study/subject, crosses all apps.',2,1,'2011-05-12')
|
272
|
+
INSERT INTO CSM_ROLE VALUES(23,'data_analyst','Read-only: searches for data, uses built-in analysis tools, exports data to third party tools',2,1,'2011-05-12')
|
273
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(1,1,1)
|
274
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(2,2,2)
|
275
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(3,3,3)
|
276
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(4,4,4)
|
277
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(5,5,5)
|
278
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(6,6,6)
|
279
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(7,7,7)
|
280
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(8,8,8)
|
281
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(9,9,9)
|
282
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(10,10,10)
|
283
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(11,11,11)
|
284
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(12,12,12)
|
285
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(13,13,13)
|
286
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(14,14,14)
|
287
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(15,15,15)
|
288
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(16,16,16)
|
289
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(17,17,17)
|
290
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(18,18,18)
|
291
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(19,19,19)
|
292
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(20,20,20)
|
293
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(21,21,21)
|
294
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(22,22,22)
|
295
|
+
INSERT INTO CSM_ROLE_PRIVILEGE VALUES(23,23,23)
|