diff options
author | Marvin Bertin <marvin.bertin@gmail.com> | 2017-10-10 16:31:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-10 16:31:00 -0700 |
commit | 385a9a99e5a95c3d623cddd927c37564e32dbd2d (patch) | |
tree | 0671a39174899dce09ade3c571ef21bab6172e0e /src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientWithLabels.scala | |
parent | 0653b90dddc294fddb0e81059aef00b202113d78 (diff) | |
parent | 9c95eb7247cb0818af9a9e4afe884698360f994c (diff) | |
download | rest-query-385a9a99e5a95c3d623cddd927c37564e32dbd2d.tar.gz rest-query-385a9a99e5a95c3d623cddd927c37564e32dbd2d.tar.bz2 rest-query-385a9a99e5a95c3d623cddd927c37564e32dbd2d.zip |
Merge pull request #35 from drivergroup/trial-46-disease-entity
Trial 46 disease entity
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientWithLabels.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/entities/export/patient/ExportPatientWithLabels.scala | 12 |
1 files changed, 1 insertions, 11 deletions
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) - ) } |