aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/entities/PatientHypothesis.scala
blob: 7943fb9d127ce224fc35e832f0eef55711ffd957 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package xyz.driver.pdsuidomain.entities

import eu.timepit.refined.api.Refined
import eu.timepit.refined.numeric.NonNegative
import xyz.driver.pdsuicommon.domain.UuidId
import xyz.driver.pdsuicommon.logging._

object PatientHypothesis {
  implicit def toPhiString(x: PatientHypothesis): PhiString = {
    import x._
    phi"PatientHypothesis(id=$id, patientId=$patientId, hypothesisId=$hypothesisId, " +
      phi"rationale=${Unsafe(rationale)}, matchedTrials=${Unsafe(matchedTrials)})"
  }
}

final case class PatientHypothesis(id: UuidId[PatientHypothesis],
                                   patientId: UuidId[Patient],
                                   hypothesisId: UuidId[Hypothesis],
                                   rationale: Option[String],
                                   matchedTrials: Long Refined NonNegative)