aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/entities/export/trial/ExportTrialWithLabels.scala
blob: 3681945ba67fbb57dcbc94910bd9125feae01af5 (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
package xyz.driver.pdsuidomain.entities.export.trial

import java.time.LocalDateTime

import xyz.driver.pdsuicommon.domain._
import xyz.driver.pdsuicommon.logging._
import xyz.driver.pdsuidomain.entities.Trial

final case class ExportTrialWithLabels(nctId: StringId[Trial],
                                       trialId: UuidId[Trial],
                                       lastReviewed: LocalDateTime,
                                       labelVersion: Long,
                                       arms: List[ExportTrialArm],
                                       criteria: List[ExportTrialLabelCriterion])

object ExportTrialWithLabels {

  implicit def toPhiString(x: ExportTrialWithLabels): PhiString = {
    import x._
    phi"TrialWithLabels(nctId=$nctId, trialId=$trialId}, " +
      phi"lastReviewed=$lastReviewed, labelVersion=${Unsafe(labelVersion)}, arms=$arms, criteria=$criteria)"
  }
}