aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/entities/RawPatientLabel.scala
blob: 6114661742cda28b1bec2bd85dfb55900dded00a (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
package xyz.driver.pdsuidomain.entities

import java.time.LocalDate

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

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

object RawPatientLabel {

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