Commit 1b744a7
Rupert Westenthaler
MORE-Platform#202: Required Database Update for the ObservationGroup support in the DataGateway.
* The auth_routing_info now includes information about the observation groups
In addition, this adds functionality to the StudyManager that is related to the `ObservationGroup` support in the Gateway. The reason for this additions and changes is that it is currently not possible to write database level component tests in the Gateway as the database initialization scripts are not present in the Gateway repository. For sure this could be changed, but the mid-term goal must be to move all repository related functionality over to this repository and use this functionality in the Gateway as a library. As this repository already publishes libs in Artifactory this is mainly a refactoring task.
Changes:
* Observation- and InterventionRepository:
* changed the `LIST_**_FOR_GROUP` methods so that parsing `NULL` as `observation_group_ids` now deactivates the filter for ObservationGroups all together. Parsing an empty array as `observation_group_ids` will now only include global Observations/Interventions. Removed methods with only the `studyGroupId` id from the Repository APIs.
* added `LIST_**_WITH_STUDY_GROUP` and `LIST_**_WITH_OBSERVATION_GROUP`. Those allow to retrieve all observations/interventions that are assigned to the parsed group ids.
* ParticipantRepository
* Changed the `LIST_PARTICIPANTS` by study and group so that
* parsing NULL as `observation_group_ids` is a wildcard and deactivates the filter based on ObservationGroups
* parsing an empty list of `observation_group_ids` will only select participants that do not have any ObservationGroups assigned
* parsing `observation_group_ids` will select participants with no observation group or any match with the parsed observation groups
* added functionality to getting RoutingInfo for a participant as it is currently used by the DataGateway. Mainly to validate this functionality with component tests before copying it to the StudyRepository of the Gateway
* CalendarService: if NULL is parsed as participantId AND NULL is parsed as obxervationGroupIds, then the returned Timeline will include ALL observations and interventions regardless of ObservationGroups. Parsing NULL as participantId and an empty Set as obxervationGroupIds will only consider global Observations and Interventions.
* Extended the ParticipantService with functionality to list Interventions and Observations for the parsed Participant. This is a shortcut of retrieving the participant from the ParticipantService and than calling Methods present in the ObservationService and InterventionService.
As mentioned above, this also adds a lot of additional tests to validate changes and extended functionality1 parent 7161160 commit 1b744a7
12 files changed
Lines changed: 505 additions & 55 deletions
File tree
- studymanager-services/src
- main
- java/io/redlink/more/studymanager
- model/gateway
- repository
- service
- resources/db/migration
- test/java/io/redlink/more/studymanager/repository
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
Lines changed: 36 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
41 | 57 | | |
42 | 58 | | |
43 | 59 | | |
| |||
88 | 104 | | |
89 | 105 | | |
90 | 106 | | |
91 | | - | |
92 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
93 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
94 | 123 | | |
95 | 124 | | |
96 | 125 | | |
97 | 126 | | |
98 | | - | |
| 127 | + | |
99 | 128 | | |
100 | 129 | | |
101 | 130 | | |
| |||
241 | 270 | | |
242 | 271 | | |
243 | 272 | | |
244 | | - | |
| 273 | + | |
245 | 274 | | |
246 | 275 | | |
247 | | - | |
| 276 | + | |
248 | 277 | | |
249 | 278 | | |
Lines changed: 41 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
45 | 60 | | |
46 | 61 | | |
47 | 62 | | |
| |||
120 | 135 | | |
121 | 136 | | |
122 | 137 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
131 | 152 | | |
132 | 153 | | |
133 | 154 | | |
134 | | - | |
| 155 | + | |
| 156 | + | |
135 | 157 | | |
136 | | - | |
137 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
138 | 161 | | |
139 | 162 | | |
140 | 163 | | |
141 | 164 | | |
142 | 165 | | |
143 | 166 | | |
144 | 167 | | |
145 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
146 | 171 | | |
147 | 172 | | |
148 | 173 | | |
| |||
215 | 240 | | |
216 | 241 | | |
217 | 242 | | |
218 | | - | |
| 243 | + | |
219 | 244 | | |
220 | 245 | | |
221 | 246 | | |
222 | 247 | | |
223 | 248 | | |
224 | 249 | | |
225 | | - | |
| 250 | + | |
226 | 251 | | |
227 | 252 | | |
Lines changed: 61 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
60 | 80 | | |
61 | 81 | | |
62 | 82 | | |
| |||
89 | 109 | | |
90 | 110 | | |
91 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
92 | 123 | | |
93 | 124 | | |
94 | 125 | | |
| |||
134 | 165 | | |
135 | 166 | | |
136 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
137 | 178 | | |
138 | 179 | | |
139 | 180 | | |
| |||
226 | 267 | | |
227 | 268 | | |
228 | 269 | | |
229 | | - | |
| 270 | + | |
230 | 271 | | |
231 | 272 | | |
232 | 273 | | |
| |||
243 | 284 | | |
244 | 285 | | |
245 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
246 | 304 | | |
247 | 305 | | |
0 commit comments