From 96d81a36286e41035ff4068859a3b0f9da924fbc Mon Sep 17 00:00:00 2001 From: vlad Date: Fri, 30 Jun 2017 19:38:37 -0700 Subject: Latest PDS UI utils including all the domain stuff --- .../scala/xyz/driver/pdsuidomain/formats/json/patient/ApiPatient.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/ApiPatient.scala') diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/ApiPatient.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/ApiPatient.scala index caa556b..68e965c 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/ApiPatient.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/ApiPatient.scala @@ -13,6 +13,7 @@ final case class ApiPatient(id: String, assignee: Option[Long], previousStatus: Option[String], previousAssignee: Option[Long], + lastActiveUser: Option[Long], lastUpdate: ZonedDateTime, condition: String) @@ -26,6 +27,7 @@ object ApiPatient { (JsPath \ "assignee").formatNullable[Long] and (JsPath \ "previousStatus").formatNullable[String] and (JsPath \ "previousAssignee").formatNullable[Long] and + (JsPath \ "lastActiveUser").formatNullable[Long] and (JsPath \ "lastUpdate").format[ZonedDateTime] and (JsPath \ "condition").format[String] )(ApiPatient.apply, unlift(ApiPatient.unapply)) @@ -38,6 +40,7 @@ object ApiPatient { assignee = patient.assignee.map(_.id), previousStatus = patient.previousStatus.map(PatientStatus.statusToString), previousAssignee = patient.previousAssignee.map(_.id), + lastActiveUser = patient.lastActiveUserId.map(_.id), lastUpdate = ZonedDateTime.of(patient.lastUpdate, ZoneId.of("Z")), condition = patient.condition ) -- cgit v1.2.3