diff options
author | Jakob Odersky <jakob@driver.xyz> | 2017-07-05 19:02:13 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@driver.xyz> | 2017-07-12 21:04:25 -0700 |
commit | f9ac0adf5c3bcfcde03bd3ea2bc2471b0d0f99fe (patch) | |
tree | 9e26568fe6598074a6de8815b465cbfc7ff69b7c /src/main/scala/xyz/driver/pdsuidomain/services/PatientCriterionService.scala | |
parent | 3d902b5197db861c30325c159dc10cfb211ae209 (diff) | |
download | rest-query-f9ac0adf5c3bcfcde03bd3ea2bc2471b0d0f99fe.tar.gz rest-query-f9ac0adf5c3bcfcde03bd3ea2bc2471b0d0f99fe.tar.bz2 rest-query-f9ac0adf5c3bcfcde03bd3ea2bc2471b0d0f99fe.zip |
Implement REST services for trial curation
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 } } |