aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/criterion.scala6
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/intervention.scala4
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/trial.scala4
3 files changed, 6 insertions, 8 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/criterion.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/criterion.scala
index 89c843f..a43e92a 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/criterion.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/criterion.scala
@@ -80,7 +80,7 @@ object criterion {
val arms = fields
.get("arms")
- .map(_.convertTo[Option[List[LongId[Arm]]]].getOrElse(List.empty[LongId[Arm]]))
+ .map(_.convertTo[Option[List[LongId[EligibilityArm]]]].getOrElse(List.empty[LongId[EligibilityArm]]))
.getOrElse(orig.armIds)
val labels = fields
@@ -143,8 +143,8 @@ object criterion {
val arms = fields
.get("arms")
- .map(_.convertTo[List[LongId[Arm]]])
- .getOrElse(List.empty[LongId[Arm]])
+ .map(_.convertTo[List[LongId[EligibilityArm]]])
+ .getOrElse(List.empty[LongId[EligibilityArm]])
val labels = fields
.get("labels")
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/intervention.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/intervention.scala
index 62cb9fa..2ced434 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/intervention.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/intervention.scala
@@ -56,7 +56,7 @@ object intervention {
val arms = fields
.get("arms")
- .map(_.convertTo[List[LongId[Arm]]].map(x => InterventionArm(armId = x, interventionId = LongId(0))))
+ .map(_.convertTo[List[LongId[SlotArm]]].map(x => InterventionArm(armId = x, interventionId = LongId(0))))
.getOrElse(List.empty[InterventionArm])
InterventionWithArms(
@@ -104,7 +104,7 @@ object intervention {
val origIntervention = orig.intervention
val arms = fields
.get("arms")
- .map(_.convertTo[List[LongId[Arm]]].map(x => InterventionArm(x, orig.intervention.id)))
+ .map(_.convertTo[List[LongId[SlotArm]]].map(x => InterventionArm(x, orig.intervention.id)))
orig.copy(
intervention = origIntervention.copy(
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/trial.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/trial.scala
index d851c2c..b25ed1d 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/trial.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/trial.scala
@@ -6,12 +6,11 @@ import spray.json._
import xyz.driver.core.json.EnumJsonFormat
import xyz.driver.pdsuicommon.domain.{LongId, UuidId}
import xyz.driver.pdsuidomain.entities._
-import xyz.driver.formats.json.patient._
object trial {
import DefaultJsonProtocol._
- import common._
import Trial._
+ import common._
implicit val trialStatusFormat = new EnumJsonFormat[Status](
"New" -> Status.New,
@@ -36,7 +35,6 @@ object trial {
"previousStatus" -> obj.previousStatus.toJson,
"previousAssignee" -> obj.previousAssignee.toJson,
"lastActiveUser" -> obj.lastActiveUserId.toJson,
- "disease" -> obj.disease.toJson,
"phase" -> obj.phase.toJson,
"hypothesisId" -> obj.hypothesisId.toJson,
"studyDesignId" -> obj.studyDesignId.toJson,