diff options
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/entities/PatientLabel.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/entities/PatientLabel.scala | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/PatientLabel.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/PatientLabel.scala new file mode 100644 index 0000000..633a347 --- /dev/null +++ b/src/main/scala/xyz/driver/pdsuidomain/entities/PatientLabel.scala @@ -0,0 +1,38 @@ +package xyz.driver.pdsuidomain.entities + +import xyz.driver.pdsuicommon.domain.{FuzzyValue, LongId, UuidId} +import xyz.driver.pdsuicommon.logging._ + +object PatientLabel { + implicit def toPhiString(x: PatientLabel): PhiString = { + import x._ + phi"PatientLabel(id=$id, patientId=$patientId, labelId=$labelId, " + + phi"score=${Unsafe(score)}, primaryValue=${Unsafe(primaryValue)}, " + + phi"verifiedPrimaryValue=${Unsafe(verifiedPrimaryValue)})" + } +} + +final case class PatientLabel(id: LongId[PatientLabel], + patientId: UuidId[Patient], + labelId: LongId[Label], + score: Int, + primaryValue: Option[FuzzyValue], + verifiedPrimaryValue: Option[FuzzyValue], + isImplicitMatch: Boolean, + isVisible: Boolean) + +object PatientLabelEvidence { + implicit def toPhiString(x: PatientLabelEvidence): PhiString = { + import x._ + phi"PatientLabelEvidence(id=$id, patientLabelId=$patientLabelId, value=${Unsafe(value)}, " + + phi"documentId=$documentId, evidenceId=$evidenceId, reportId=$reportId)" + } +} + +final case class PatientLabelEvidence(id: LongId[PatientLabelEvidence], + patientLabelId: LongId[PatientLabel], + value: FuzzyValue, + evidenceText: String, + reportId: Option[UuidId[DirectReport]], + documentId: Option[LongId[Document]], + evidenceId: Option[LongId[ExtractedData]]) |