You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: studymanager-observation/src/main/java/io/redlink/more/studymanager/component/observation/lime/LimeSurveyObservation.java
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ public LimeSurveyObservation(MoreObservationSDK sdk, C properties, LimeSurveyReq
34
34
}
35
35
36
36
@Override
37
-
publicvoidactivate(){
37
+
publicvoidactivate(){
38
38
StringsurveyId = checkAndGetSurveyId();
39
39
40
40
//FIXME: This creates a LIME survey user for every participant, regardless if the Observation is relevant to the participant
@@ -46,6 +48,7 @@ public class ObservationRepository {
46
48
privatestaticfinalStringDELETE_ALL = "DELETE FROM observations";
47
49
privatestaticfinalStringSET_OBSERVATION_PROPERTIES_FOR_PARTICIPANT = "INSERT INTO participant_observation_properties(study_id,participant_id,observation_id,properties) VALUES (:study_id,:participant_id,:observation_id,:properties::jsonb) ON CONFLICT (study_id, participant_id, observation_id) DO UPDATE SET properties = EXCLUDED.properties";
48
50
privatestaticfinalStringGET_OBSERVATION_PROPERTIES_FOR_PARTICIPANT = "SELECT properties FROM participant_observation_properties WHERE study_id = ? AND participant_id = ? AND observation_id = ?";
51
+
privatestaticfinalStringGET_ALL_OBSERVATION_PROPERTIES_FOR_PARTICIPANT = "SELECT * FROM participant_observation_properties WHERE study_id = ?";
49
52
privatestaticfinalStringDELETE_OBSERVATION_PROPERTIES_FOR_PARTICIPANT = "DELETE FROM participant_observation_properties WHERE study_id = ? AND participant_id = ? AND observation_id = ?";
50
53
51
54
privatefinalJdbcTemplatetemplate;
@@ -61,10 +64,10 @@ public Observation insert(Observation observation) {
privatestaticfinalStringGET_PARTICIPANT_OBSERVATION_PROPERTIES = "SELECT properties FROM participant_observation_properties WHERE participant_id = :participant_id AND study_id = :study_id AND observation_id = :observation_id";
107
-
108
103
privatestaticfinalStringDELETE_ALL = "DELETE FROM participants";
0 commit comments