aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala
diff options
context:
space:
mode:
authorvlad <vlad@driver.xyz>2017-09-28 13:12:32 -0700
committervlad <vlad@driver.xyz>2017-09-28 13:12:32 -0700
commitdeba20326e3269fee3ef51f8e6841f17453b4155 (patch)
tree29aac6bf4d0cd679a39ab1e1b84aef8ce1328b3f /src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala
parentc24679f1ae7d7ccc4e6693535b0aa3ac0e1ca225 (diff)
downloadrest-query-deba20326e3269fee3ef51f8e6841f17453b4155.tar.gz
rest-query-deba20326e3269fee3ef51f8e6841f17453b4155.tar.bz2
rest-query-deba20326e3269fee3ef51f8e6841f17453b4155.zip
Simplified Export entities for EVLSv0.4.1
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)
- )
-}