aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/services/ExtractedDataService.scala
diff options
context:
space:
mode:
authorVlad Uspensky <v.uspenskiy@icloud.com>2017-07-21 19:14:02 -0700
committerGitHub <noreply@github.com>2017-07-21 19:14:02 -0700
commita835eef22830ab86a9f65194a6645f4f474ae0cc (patch)
tree13c14e33e346560a8db587b589b6a9464f3e6616 /src/main/scala/xyz/driver/pdsuidomain/services/ExtractedDataService.scala
parent525ef428d950a6c9ddb58247101aeb1cb1f42d80 (diff)
parent92f503ce18e90c9955bed8b0a8c6ec2e30f0304e (diff)
downloadrest-query-a835eef22830ab86a9f65194a6645f4f474ae0cc.tar.gz
rest-query-a835eef22830ab86a9f65194a6645f4f474ae0cc.tar.bz2
rest-query-a835eef22830ab86a9f65194a6645f4f474ae0cc.zip
Merge pull request #9 from drivergroup/export-service-separationv0.2.4
Export service separation
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/services/ExtractedDataService.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/services/ExtractedDataService.scala17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/services/ExtractedDataService.scala b/src/main/scala/xyz/driver/pdsuidomain/services/ExtractedDataService.scala
index afb994e..9bcd921 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/services/ExtractedDataService.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/services/ExtractedDataService.scala
@@ -2,10 +2,11 @@ package xyz.driver.pdsuidomain.services
import xyz.driver.pdsuicommon.auth.AuthenticatedRequestContext
import xyz.driver.pdsuicommon.db.{Pagination, SearchFilterExpr, Sorting}
-import xyz.driver.pdsuicommon.domain.LongId
+import xyz.driver.pdsuicommon.domain.{LongId, UuidId}
import xyz.driver.pdsuicommon.error.DomainError
import xyz.driver.pdsuicommon.logging._
import xyz.driver.pdsuidomain.entities._
+import xyz.driver.pdsuidomain.entities.export.patient.ExportPatientWithLabels
import scala.concurrent.Future
@@ -49,6 +50,17 @@ object ExtractedDataService {
extends GetListReply with DomainError.AuthorizationError with DefaultAccessDeniedError
}
+ sealed trait GetPatientLabelsReply
+ object GetPatientLabelsReply {
+ type Error = GetPatientLabelsReply with DomainError
+
+ final case class Entity(x: ExportPatientWithLabels) extends GetPatientLabelsReply
+
+ case object NotFoundError extends GetPatientLabelsReply with DomainError.NotFoundError {
+ def userMessage: String = "Patient not found"
+ }
+ }
+
sealed trait CreateReply
object CreateReply {
type Error = CreateReply with DomainError
@@ -93,6 +105,9 @@ trait ExtractedDataService {
def getById(id: LongId[ExtractedData])(implicit requestContext: AuthenticatedRequestContext): Future[GetByIdReply]
+ def getPatientLabels(id: UuidId[Patient])(
+ implicit requestContext: AuthenticatedRequestContext): Future[GetPatientLabelsReply]
+
def getAll(filter: SearchFilterExpr = SearchFilterExpr.Empty,
sorting: Option[Sorting] = None,
pagination: Option[Pagination] = None)(