-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from MORE-Platform/263_study_timeline_interve…
…ntions Study-Timeline: Interventions
- Loading branch information
Showing
9 changed files
with
141 additions
and
26 deletions.
There are no files selected for viewing
18 changes: 15 additions & 3 deletions
18
.../src/main/java/io/redlink/more/studymanager/model/timeline/InterventionTimelineEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
package io.redlink.more.studymanager.model.timeline; | ||
|
||
import io.redlink.more.studymanager.model.Intervention; | ||
import io.redlink.more.studymanager.model.Trigger; | ||
|
||
import java.time.Instant; | ||
|
||
public record InterventionTimelineEvent( | ||
Integer interventionId, | ||
Integer studyGroupId, | ||
String title, | ||
String purpose, | ||
String type, | ||
Instant start, | ||
Instant end, | ||
String scheduleType | ||
) {} | ||
) { | ||
public static InterventionTimelineEvent fromInterventionAndTrigger(Intervention intervention, Trigger trigger, Instant start) { | ||
return new InterventionTimelineEvent( | ||
intervention.getInterventionId(), | ||
intervention.getStudyGroupId(), | ||
intervention.getTitle(), | ||
intervention.getPurpose(), | ||
start, | ||
trigger.getType() | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters