aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/services/PatientHypothesisService.scala
blob: cbfcd6c80f8233646e37b8a481cd61cd2061b8d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package xyz.driver.pdsuidomain.services

import xyz.driver.core.rest.AuthorizedServiceRequestContext
import xyz.driver.entities.users.AuthUserInfo
import xyz.driver.pdsuicommon.db.{Pagination, SearchFilterExpr, Sorting}
import xyz.driver.pdsuicommon.domain.UuidId
import xyz.driver.pdsuidomain.entities.{Hypothesis, Patient, PatientHypothesis}

import scala.concurrent.Future

trait PatientHypothesisService {

  def getAll(patientId: UuidId[Patient],
             filter: SearchFilterExpr = SearchFilterExpr.Empty,
             sorting: Option[Sorting] = None,
             pagination: Option[Pagination] = None)(
          implicit requestContext: AuthorizedServiceRequestContext[AuthUserInfo]): Future[(Seq[PatientHypothesis], Int)]

  def getById(patientId: UuidId[Patient], hypothesisId: UuidId[Hypothesis])(
          implicit requestContext: AuthorizedServiceRequestContext[AuthUserInfo]): Future[PatientHypothesis]

  def update(origPatientHypothesis: PatientHypothesis, draftPatientHypothesis: PatientHypothesis)(
          implicit requestContext: AuthorizedServiceRequestContext[AuthUserInfo]): Future[PatientHypothesis]
}