diff options
author | Marvin Bertin <marvin.bertin@gmail.com> | 2017-10-10 17:17:18 -0700 |
---|---|---|
committer | Marvin Bertin <marvin.bertin@gmail.com> | 2017-10-10 17:17:18 -0700 |
commit | b124608a4faa9cb94474f27c1d4605e5cb0ab63d (patch) | |
tree | c3439f756f023facbbae4deea1972ad2f511dda3 /src/main/scala/xyz/driver/pdsuidomain/services/PatientLabelService.scala | |
parent | f55212361d6126a05075a1f00f3915484b4f334e (diff) | |
parent | 385a9a99e5a95c3d623cddd927c37564e32dbd2d (diff) | |
download | rest-query-b124608a4faa9cb94474f27c1d4605e5cb0ab63d.tar.gz rest-query-b124608a4faa9cb94474f27c1d4605e5cb0ab63d.tar.bz2 rest-query-b124608a4faa9cb94474f27c1d4605e5cb0ab63d.zip |
fix merge conflictsv0.7.5
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/services/PatientLabelService.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/services/PatientLabelService.scala | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/services/PatientLabelService.scala b/src/main/scala/xyz/driver/pdsuidomain/services/PatientLabelService.scala index 2a4d7fc..cede890 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/services/PatientLabelService.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/services/PatientLabelService.scala @@ -24,9 +24,17 @@ object PatientLabelService { def userMessage: String = "Access denied" } + final case class RichPatientLabel(patientLabel: PatientLabel, isVerified: Boolean) + + object RichPatientLabel { + implicit def toPhiString(x: RichPatientLabel): PhiString = { + phi"RichPatientLabel(patientLabel=${x.patientLabel}, isVerified=${x.isVerified})" + } + } + sealed trait GetListReply object GetListReply { - final case class EntityList(xs: Seq[(PatientLabel, Boolean)], totalFound: Int) extends GetListReply + final case class EntityList(xs: Seq[RichPatientLabel], totalFound: Int) extends GetListReply case object AuthorizationError extends GetListReply with DomainError.AuthorizationError with DefaultAccessDeniedError @@ -52,7 +60,7 @@ object PatientLabelService { sealed trait GetByLabelIdReply object GetByLabelIdReply { - final case class Entity(x: PatientLabel, isVerified: Boolean) extends GetByLabelIdReply + final case class Entity(x: RichPatientLabel) extends GetByLabelIdReply type Error = GetByLabelIdReply with DomainError @@ -68,7 +76,7 @@ object PatientLabelService { implicit def toPhiString(reply: GetByLabelIdReply): PhiString = reply match { case x: DomainError => phi"GetByIdReply.Error($x)" - case Entity(x, y) => phi"GetByIdReply.Entity($x, $y)" + case Entity(x) => phi"GetByIdReply.Entity($x)" } } @@ -76,7 +84,7 @@ object PatientLabelService { object UpdateReply { type Error = UpdateReply with DomainError - final case class Updated(updated: PatientLabel, isVerified: Boolean) extends UpdateReply + final case class Updated(updated: RichPatientLabel) extends UpdateReply case object NotFoundError extends UpdateReply with DefaultNotFoundError with DomainError.NotFoundError @@ -89,8 +97,8 @@ object PatientLabelService { final case class CommonError(userMessage: String) extends UpdateReply with DomainError implicit def toPhiString(reply: UpdateReply): PhiString = reply match { - case Updated(x, y) => phi"Updated($x, $y)" - case x: Error => DomainError.toPhiString(x) + case Updated(x) => phi"Updated($x)" + case x: Error => DomainError.toPhiString(x) } } } |