diff options
author | Jakob Odersky <jakob@odersky.com> | 2017-07-14 15:25:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-14 15:25:38 -0700 |
commit | dd9e22ac2e085505e2b6a1ca476fe1dcdc7e8618 (patch) | |
tree | da106c15b9402f3f6f9f19f92fe2a2258d5cf7d3 /src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala | |
parent | 3d902b5197db861c30325c159dc10cfb211ae209 (diff) | |
parent | d733294cb16fa83be014ce1efccbf364aa309d25 (diff) | |
download | rest-query-dd9e22ac2e085505e2b6a1ca476fe1dcdc7e8618.tar.gz rest-query-dd9e22ac2e085505e2b6a1ca476fe1dcdc7e8618.tar.bz2 rest-query-dd9e22ac2e085505e2b6a1ca476fe1dcdc7e8618.zip |
Merge pull request #7 from drivergroup/restification-tcv0.2.0
Implement trial curation rest services
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala b/src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala index c2f7b50..9ff3879 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala @@ -13,9 +13,9 @@ import scala.concurrent.Future object PatientCriterionService { - case class DraftPatientCriterion(id: LongId[PatientCriterion], - eligibilityStatus: Option[FuzzyValue], - isVerified: Option[Boolean]) { + final case class DraftPatientCriterion(id: LongId[PatientCriterion], + eligibilityStatus: Option[FuzzyValue], + isVerified: Option[Boolean]) { def applyTo(orig: PatientCriterion) = { orig.copy( eligibilityStatus = eligibilityStatus.orElse(orig.eligibilityStatus), @@ -40,9 +40,9 @@ object PatientCriterionService { object GetListReply { type Error = GetListReply with DomainError - case class EntityList(xs: Seq[(PatientCriterion, LongId[Label], List[PatientCriterionArm])], - totalFound: Int, - lastUpdate: Option[LocalDateTime]) + final case class EntityList(xs: Seq[(PatientCriterion, LongId[Label], List[PatientCriterionArm])], + totalFound: Int, + lastUpdate: Option[LocalDateTime]) extends GetListReply case object AuthorizationError @@ -51,7 +51,7 @@ object PatientCriterionService { case object PatientNotFoundError extends GetListReply with DomainError.NotFoundError with DefaultPatientNotFoundError - case class CommonError(userMessage: String) extends GetListReply with DomainError + final case class CommonError(userMessage: String) extends GetListReply with DomainError } @@ -59,7 +59,7 @@ object PatientCriterionService { object GetByIdReply { type Error = GetByIdReply with DomainError - case class Entity(x: PatientCriterion, labelId: LongId[Label], armList: List[PatientCriterionArm]) + final case class Entity(x: PatientCriterion, labelId: LongId[Label], armList: List[PatientCriterionArm]) extends GetByIdReply case object AuthorizationError @@ -70,7 +70,7 @@ object PatientCriterionService { case object PatientNotFoundError extends GetByIdReply with DomainError.NotFoundError with DefaultPatientNotFoundError - case class CommonError(userMessage: String) extends GetByIdReply with DomainError + final case class CommonError(userMessage: String) extends GetByIdReply with DomainError implicit def toPhiString(reply: GetByIdReply): PhiString = reply match { case x: DomainError => phi"GetByIdReply.Error($x)" @@ -82,7 +82,7 @@ object PatientCriterionService { object UpdateReply { type Error = UpdateReply with DomainError - case class Updated(x: PatientCriterion, labelId: LongId[Label], armList: List[PatientCriterionArm]) + final case class Updated(x: PatientCriterion, labelId: LongId[Label], armList: List[PatientCriterionArm]) extends UpdateReply case object UpdatedList extends UpdateReply @@ -93,7 +93,7 @@ object PatientCriterionService { case object PatientNotFoundError extends UpdateReply with DomainError.NotFoundError with DefaultPatientNotFoundError - case class CommonError(userMessage: String) extends UpdateReply with DomainError + final case class CommonError(userMessage: String) extends UpdateReply with DomainError } } |