From 5832f63b84d7388441d1200f2442dc1e9de0225c Mon Sep 17 00:00:00 2001 From: vlad Date: Tue, 27 Jun 2017 17:13:02 -0700 Subject: All PDS UI domain models, API case classes, service traits and necessary utils moved to pdsui-common --- .../export/patient/ExportPatientWithLabels.scala | 25 ---------------------- 1 file changed, 25 deletions(-) delete mode 100644 src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientWithLabels.scala (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 deleted file mode 100644 index 718255b..0000000 --- a/src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientWithLabels.scala +++ /dev/null @@ -1,25 +0,0 @@ -package xyz.driver.pdsuidomain.entities.export.patient - -import xyz.driver.pdsuicommon.domain.UuidId -import xyz.driver.pdsuicommon.logging._ -import xyz.driver.pdsuidomain.entities.{Patient, RawPatientLabel} - -import scala.collection.breakOut - -case class ExportPatientWithLabels(patientId: UuidId[Patient], labelVersion: Long, labels: List[ExportPatientLabel]) - -object ExportPatientWithLabels { - - implicit def toPhiString(x: ExportPatientWithLabels): PhiString = { - 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