aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala
diff options
context:
space:
mode:
authorMarvin Bertin <marvin.bertin@gmail.com>2017-10-03 13:08:00 -0700
committerMarvin Bertin <marvin.bertin@gmail.com>2017-10-03 13:08:00 -0700
commit0653b90dddc294fddb0e81059aef00b202113d78 (patch)
tree3d8abb424b0f0495f1cbb18849184dd20d6897fc /src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala
parent5750f2f3633e75f2f96d6a36264ab4b8f3fec7d2 (diff)
parenta321a978353439fc516b0f2016c28fb32ba1b7ae (diff)
downloadrest-query-0653b90dddc294fddb0e81059aef00b202113d78.tar.gz
rest-query-0653b90dddc294fddb0e81059aef00b202113d78.tar.bz2
rest-query-0653b90dddc294fddb0e81059aef00b202113d78.zip
Merge branch 'master' into add-slot-eligibility-arms
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala
deleted file mode 100644
index 0ef1c68..0000000
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-package xyz.driver.pdsuidomain.formats.json.export
-
-import play.api.libs.functional.syntax._
-import play.api.libs.json.{Format, JsPath}
-import xyz.driver.pdsuicommon.domain.LongId
-import xyz.driver.pdsuidomain.entities.export.patient.ExportPatientLabel
-
-final case class ApiExportPatientLabel(id: String, evidences: List[ApiExportPatientLabelEvidence]) {
-
- def toDomain = ExportPatientLabel(
- id = LongId(this.id.toLong),
- evidences = this.evidences.map(_.toDomain)
- )
-
-}
-
-object ApiExportPatientLabel {
-
- implicit val format: Format[ApiExportPatientLabel] = (
- (JsPath \ "labelId").format[String] and
- (JsPath \ "evidence").format[List[ApiExportPatientLabelEvidence]]
- )(ApiExportPatientLabel.apply, unlift(ApiExportPatientLabel.unapply))
-
- def fromDomain(label: ExportPatientLabel) = ApiExportPatientLabel(
- id = label.id.toString,
- evidences = label.evidences.map(ApiExportPatientLabelEvidence.fromDomain)
- )
-}