aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyatcheslav Suharnikov <arz.freezy@gmail.com>2017-07-10 10:36:04 +0300
committerGitHub <noreply@github.com>2017-07-10 10:36:04 +0300
commite6eba88711979423cdda826d5cd0b433184edd45 (patch)
tree81c9befd01c283d7ed78a706deff57364ce380b2
parentcbd561e51118be6e3ecc0157f74089c560d891cb (diff)
parent9e243a42c4419461d03edbb0dbee454f51530722 (diff)
downloadrest-query-e6eba88711979423cdda826d5cd0b433184edd45.tar.gz
rest-query-e6eba88711979423cdda826d5cd0b433184edd45.tar.bz2
rest-query-e6eba88711979423cdda826d5cd0b433184edd45.zip
Merge pull request #3 from drivergroup/PDSUI-2080v0.1.20
PDSUI-2080 Disease field was exposed in ReP REST API for Medical Record entity
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/record/ApiRecord.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/record/ApiRecord.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/record/ApiRecord.scala
index dca441b..4197bc6 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/record/ApiRecord.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/record/ApiRecord.scala
@@ -11,6 +11,7 @@ import xyz.driver.pdsuicommon.json.JsonSerializer
final case class ApiRecord(id: Long,
patientId: String,
caseId: Option[String],
+ disease: String,
physician: Option[String],
lastUpdate: ZonedDateTime,
status: String,
@@ -34,6 +35,7 @@ object ApiRecord {
(JsPath \ "id").format[Long] and
(JsPath \ "patientId").format[String] and
(JsPath \ "caseId").formatNullable[String] and
+ (JsPath \ "disease").format[String] and
(JsPath \ "physician").formatNullable[String] and
(JsPath \ "lastUpdate").format[ZonedDateTime] and
(JsPath \ "status").format(statusFormat) and
@@ -50,6 +52,7 @@ object ApiRecord {
id = record.id.id,
patientId = record.patientId.toString,
caseId = record.caseId.map(_.id),
+ disease = record.disease,
physician = record.physician,
lastUpdate = ZonedDateTime.of(record.lastUpdate, ZoneId.of("Z")),
status = MedicalRecordStatus.statusToString(record.status),