diff options
author | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-10-02 18:37:52 +0700 |
---|---|---|
committer | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-10-02 18:37:52 +0700 |
commit | d0e3c6f37347142a3ef5eab871dde47ea70af304 (patch) | |
tree | a87d24b1b5d6489576f00fe446f05b5110d62cc0 /src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala | |
parent | 283ca02360949143ffe7ee8ad87d51902426b450 (diff) | |
parent | 1913870abec9e31d080f6858d0fc296445852cc6 (diff) | |
download | rest-query-d0e3c6f37347142a3ef5eab871dde47ea70af304.tar.gz rest-query-d0e3c6f37347142a3ef5eab871dde47ea70af304.tar.bz2 rest-query-d0e3c6f37347142a3ef5eab871dde47ea70af304.zip |
Merge branch 'master' into synch-refactor
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.scala | 28 |
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) - ) -} |