aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/entities/RawPatientLabel.scala
blob: e0cf06bdaaa48f8baf160fc18bda147421252431 (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
25
26
27
28
29
30
31
32
33
package xyz.driver.pdsuidomain.entities

import java.time.LocalDateTime

import xyz.driver.pdsuicommon.domain.{FuzzyValue, LongId, UuidId}
import xyz.driver.pdsuicommon.logging._

case class RawPatientLabel(patientId: UuidId[Patient],
                           labelId: LongId[Label],
                           label: String,
                           value: FuzzyValue,
                           evidenceId: LongId[ExtractedData],
                           evidenceText: String,
                           disease: String,
                           documentId: LongId[Document],
                           requestId: RecordRequestId,
                           documentType: String,
                           providerType: String,
                           startDate: LocalDateTime,
                           endDate: Option[LocalDateTime])

object RawPatientLabel {

  implicit def toPhiString(x: RawPatientLabel): PhiString = {
    import x._
    phi"RawPatientLabel(patientId=$patientId, labelId=$labelId, label=${Unsafe(label)}, value=$value," +
      phi"evidenceId=${Unsafe(evidenceId)}, " +
      phi"evidenceText=${Unsafe(evidenceText)}, documentId=$documentId, requestId=${Unsafe(requestId)}, " +
      phi"documentType=${Unsafe(documentType)}, providerType=${Unsafe(providerType)}, " +
      phi"startDate=$startDate, endDate=$endDate)"
  }

}