aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/formats/json/trial/ApiTrial.scala
diff options
context:
space:
mode:
authortimgushue <tim@driver.xyz>2017-09-27 11:15:59 -0700
committertimgushue <tim@driver.xyz>2017-09-27 11:15:59 -0700
commit979f4112d8aed85a445db7d8c6a19036a4137146 (patch)
tree422f76f788801dc9b45d319c502aa27fd3a741f4 /src/main/scala/xyz/driver/pdsuidomain/formats/json/trial/ApiTrial.scala
parente9d3e19f637614809aab39d9df2d1fcc6c78916e (diff)
downloadrest-query-979f4112d8aed85a445db7d8c6a19036a4137146.tar.gz
rest-query-979f4112d8aed85a445db7d8c6a19036a4137146.tar.bz2
rest-query-979f4112d8aed85a445db7d8c6a19036a4137146.zip
Removed condition from trial
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/trial/ApiTrial.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/trial/ApiTrial.scala8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/trial/ApiTrial.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/trial/ApiTrial.scala
index 1b4ac64..fbf506b 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/trial/ApiTrial.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/trial/ApiTrial.scala
@@ -16,7 +16,6 @@ final case class ApiTrial(id: String,
previousStatus: Option[String],
previousAssignee: Option[String],
lastActiveUser: Option[String],
- condition: String,
phase: String,
hypothesisId: Option[UUID],
studyDesignId: Option[Long],
@@ -37,11 +36,6 @@ final case class ApiTrial(id: String,
previousAssignee = this.previousAssignee.map(id => StringId(id)),
lastActiveUserId = this.lastActiveUser.map(id => StringId(id)),
lastUpdate = this.lastUpdate.toLocalDateTime,
- condition = Trial.Condition
- .fromString(this.condition)
- .getOrElse(
- throw new NoSuchElementException(s"unknown condition ${this.condition}")
- ),
phase = this.phase,
hypothesisId = this.hypothesisId.map(id => UuidId(id)),
studyDesignId = this.studyDesignId.map(id => LongId(id)),
@@ -67,7 +61,6 @@ object ApiTrial {
(JsPath \ "previousStatus").formatNullable[String] and
(JsPath \ "previousAssignee").formatNullable[String] and
(JsPath \ "lastActiveUser").formatNullable[String] and
- (JsPath \ "condition").format[String] and
(JsPath \ "phase").format[String] and
(JsPath \ "hypothesisId").formatNullable[UUID] and
(JsPath \ "studyDesignId").formatNullable[Long] and
@@ -89,7 +82,6 @@ object ApiTrial {
previousAssignee = trial.previousAssignee.map(_.id),
lastActiveUser = trial.lastActiveUserId.map(_.id),
lastUpdate = ZonedDateTime.of(trial.lastUpdate, ZoneId.of("Z")),
- condition = trial.condition.toString,
phase = trial.phase,
hypothesisId = trial.hypothesisId.map(_.id),
studyDesignId = trial.studyDesignId.map(_.id),