diff options
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/services/PatientService.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/services/PatientService.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/services/PatientService.scala b/src/main/scala/xyz/driver/pdsuidomain/services/PatientService.scala index ce70934..b2a140c 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/services/PatientService.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/services/PatientService.scala @@ -8,6 +8,7 @@ import xyz.driver.pdsuicommon.domain._ 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 @@ -50,6 +51,17 @@ object PatientService { } } + sealed trait GetPatientWithLabelsReply + object GetPatientWithLabelsReply { + type Error = GetPatientWithLabelsReply with DomainError + + final case class Entity(x: ExportPatientWithLabels) extends GetPatientWithLabelsReply + + case object NotFoundError extends GetPatientWithLabelsReply with DomainError.NotFoundError { + def userMessage: String = "Patient not found" + } + } + sealed trait UpdateReply object UpdateReply { type Error = UpdateReply with DomainError @@ -76,6 +88,9 @@ trait PatientService { def getById(id: UuidId[Patient])(implicit requestContext: AuthenticatedRequestContext): Future[GetByIdReply] + def getExportPatient(id: UuidId[Patient])( + implicit requestContext: AuthenticatedRequestContext): Future[GetPatientWithLabelsReply] + def getAll(filter: SearchFilterExpr = SearchFilterExpr.Empty, sorting: Option[Sorting] = None, pagination: Option[Pagination] = None)( |