From 7d8712a62d30b412717e1b730c0ad267cd207aa4 Mon Sep 17 00:00:00 2001 From: vlad Date: Mon, 9 Oct 2017 12:24:59 -0700 Subject: Getting rid of the FuzzyValues, Name as a string, and condition --- .../entities/export/patient/ExportPatientWithLabels.scala | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientWithLabels.scala') diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientWithLabels.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientWithLabels.scala index bd6173b..8fb2660 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientWithLabels.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientWithLabels.scala @@ -2,9 +2,7 @@ package xyz.driver.pdsuidomain.entities.export.patient import xyz.driver.pdsuicommon.domain._ import xyz.driver.pdsuicommon.logging._ -import xyz.driver.pdsuidomain.entities.{Patient, RawPatientLabel} - -import scala.collection.breakOut +import xyz.driver.pdsuidomain.entities.Patient final case class ExportPatientWithLabels(patientId: UuidId[Patient], labelVersion: Long, @@ -16,12 +14,4 @@ object ExportPatientWithLabels { import x._ phi"ExportPatientWithLabels(patientId=$patientId, version=${Unsafe(labelVersion)}, labels=$labels)" } - - def fromRaw(patientId: UuidId[Patient], rawPatientRefs: List[RawPatientLabel]) = ExportPatientWithLabels( - patientId = patientId, - labelVersion = 1L, // TODO It is needed to replace this mock label version. - labels = rawPatientRefs - .groupBy(_.labelId) - .map(Function.tupled(ExportPatientLabel.fromRaw))(breakOut) - ) } -- cgit v1.2.3