aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/services
diff options
context:
space:
mode:
authorVyatcheslav Suharnikov <arz.freezy@gmail.com>2017-07-12 09:55:39 +0300
committerGitHub <noreply@github.com>2017-07-12 09:55:39 +0300
commit7ab16021fe2b7e1f7d9d7800458e737d015e7630 (patch)
treedfb35a72bc4f655e46cea2e89d3279085904785f /src/main/scala/xyz/driver/pdsuidomain/services
parent64b1565004ff530c34484dd80bff268e46c864ca (diff)
parent01170a92bec7e09be89727143b442e4fb78446e7 (diff)
downloadrest-query-7ab16021fe2b7e1f7d9d7800458e737d015e7630.tar.gz
rest-query-7ab16021fe2b7e1f7d9d7800458e737d015e7630.tar.bz2
rest-query-7ab16021fe2b7e1f7d9d7800458e737d015e7630.zip
Merge pull request #1 from drivergroup/PDSUI-2003v0.1.23
PDSUI-2003 Created PatientCriterionArm table
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/services')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala10
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/services/PatientEligibleTrialService.scala6
2 files changed, 7 insertions, 9 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala b/src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala
index e23dfc5..5c9aa19 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala
@@ -40,7 +40,7 @@ object PatientCriterionService {
object GetListReply {
type Error = GetListReply with DomainError
- case class EntityList(xs: Seq[(PatientCriterion, LongId[Label], List[Arm], Boolean)],
+ case class EntityList(xs: Seq[(PatientCriterion, LongId[Label], List[PatientCriterionArm])],
totalFound: Int,
lastUpdate: Option[LocalDateTime])
extends GetListReply
@@ -59,7 +59,7 @@ object PatientCriterionService {
object GetByIdReply {
type Error = GetByIdReply with DomainError
- case class Entity(x: PatientCriterion, labelId: LongId[Label], armList: List[Arm], criterionIsCompound: Boolean)
+ case class Entity(x: PatientCriterion, labelId: LongId[Label], armList: List[PatientCriterionArm])
extends GetByIdReply
case object AuthorizationError
@@ -74,9 +74,7 @@ object PatientCriterionService {
implicit def toPhiString(reply: GetByIdReply): PhiString = reply match {
case x: DomainError => phi"GetByIdReply.Error($x)"
- case Entity(x, labelId, armList, criterionIsCompound) =>
- phi"GetByIdReply.Entity(entity=$x, labelId=$labelId, " +
- phi"armList=$armList, criterionIsCompound=$criterionIsCompound)"
+ case Entity(x, labelId, armList) => phi"GetByIdReply.Entity(entity=$x, labelId=$labelId, armList=$armList)"
}
}
@@ -84,7 +82,7 @@ object PatientCriterionService {
object UpdateReply {
type Error = UpdateReply with DomainError
- case class Updated(x: PatientCriterion, labelId: LongId[Label], armList: List[Arm], criterionIsCompound: Boolean)
+ case class Updated(x: PatientCriterion, labelId: LongId[Label], armList: List[PatientCriterionArm])
extends UpdateReply
case object UpdatedList extends UpdateReply
diff --git a/src/main/scala/xyz/driver/pdsuidomain/services/PatientEligibleTrialService.scala b/src/main/scala/xyz/driver/pdsuidomain/services/PatientEligibleTrialService.scala
index d322fdd..12cd4f3 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/services/PatientEligibleTrialService.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/services/PatientEligibleTrialService.scala
@@ -5,7 +5,7 @@ import xyz.driver.pdsuicommon.db.{Pagination, SearchFilterExpr, Sorting}
import xyz.driver.pdsuicommon.domain.{LongId, UuidId}
import xyz.driver.pdsuicommon.error.DomainError
import xyz.driver.pdsuicommon.logging._
-import xyz.driver.pdsuidomain.entities.{Arm, Trial, _}
+import xyz.driver.pdsuidomain.entities.{Trial, _}
import scala.concurrent.Future
@@ -23,7 +23,7 @@ object PatientEligibleTrialService {
def userMessage: String = "Access denied"
}
- case class RichPatientEligibleTrial(trial: Trial, group: PatientTrialArmGroupView, arms: List[Arm])
+ case class RichPatientEligibleTrial(trial: Trial, group: PatientTrialArmGroupView, arms: List[PatientCriterionArm])
object RichPatientEligibleTrial {
implicit def toPhiString(x: RichPatientEligibleTrial): PhiString = {
phi"RichPatientEligibleTrial(group=${x.group}, trial=${x.trial}, arms=${x.arms})"
@@ -67,7 +67,7 @@ object PatientEligibleTrialService {
sealed trait GetCriterionListOfGroupReply
object GetCriterionListOfGroupReply {
- case class EntityList(xs: Seq[(PatientCriterion, LongId[Label], List[Arm], Boolean)], totalFound: Int)
+ case class EntityList(xs: Seq[(PatientCriterion, LongId[Label], List[PatientCriterionArm])], totalFound: Int)
extends GetCriterionListOfGroupReply
type Error = GetCriterionListOfGroupReply with DomainError