aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/entities/Trial.scala
diff options
context:
space:
mode:
authorVlad Uspensky <v.uspenskiy@icloud.com>2018-01-23 17:37:35 -0800
committerGitHub <noreply@github.com>2018-01-23 17:37:35 -0800
commitcf397367e2d8e0da371aae22a2d41578b8f48e44 (patch)
tree7440d630fea2205102ac7d40995b5588f0cdd3f9 /src/main/scala/xyz/driver/pdsuidomain/entities/Trial.scala
parent1fa8b54fee10c09485a2d098ddb5e0013f4205b2 (diff)
parent61bb1951da84446b7c81ea56884476fa1237a91e (diff)
downloadrest-query-cf397367e2d8e0da371aae22a2d41578b8f48e44.tar.gz
rest-query-cf397367e2d8e0da371aae22a2d41578b8f48e44.tar.bz2
rest-query-cf397367e2d8e0da371aae22a2d41578b8f48e44.zip
Merge pull request #77 from drivergroup/TRIAL-192v0.15.2
TRIAL-192, TRIAL-159 Trial model simplification to support Trial Sync…
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/entities/Trial.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/entities/Trial.scala16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/Trial.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/Trial.scala
index cb75803..55c0e96 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/entities/Trial.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/entities/Trial.scala
@@ -49,6 +49,18 @@ object StudyDesign {
}
}
+object TrialCreationRequest {
+
+ implicit def toPhiString(x: TrialCreationRequest): PhiString = phi"${Unsafe(x.toString)}"
+}
+
+final case class TrialCreationRequest(id: UuidId[Trial],
+ nctId: String,
+ title: Option[String],
+ phase: String,
+ studyDesign: Option[String],
+ lastReviewed: LocalDateTime)
+
object Trial {
sealed trait Status {
@@ -67,7 +79,7 @@ object Trial {
case object Flagged extends Status
case object Archived extends Status
- val All = Set[Status](
+ val All: Set[Status] = Set[Status](
New,
ReviewSummary,
Summarized,
@@ -79,7 +91,7 @@ object Trial {
Archived
)
- val AllPrevious = Set[Status](New, ReviewSummary, Summarized, ReviewCriteria)
+ val AllPrevious: Set[Status] = Set[Status](New, ReviewSummary, Summarized, ReviewCriteria)
implicit def toPhiString(x: Status): PhiString = Unsafe(Utils.getClassSimpleName(x.getClass))
}