diff options
author | ktomskikh <ktomskih@datamonsters.co> | 2017-08-03 18:33:35 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-03 18:33:35 +0700 |
commit | 5519c219e2404cb19b6116dee90b40b5e5e2a720 (patch) | |
tree | 67b85ff4f77ec779e1f6cef204d762dcbd4c25c6 /src/main/scala/xyz/driver/pdsuidomain/formats/json/patientissue/ApiPatientIssue.scala | |
parent | 40ee33a7c176895a19ee0f9066849d34c38c75fd (diff) | |
parent | 91c4944e7cbe8ad254c10d53037011989240c3ae (diff) | |
download | rest-query-5519c219e2404cb19b6116dee90b40b5e5e2a720.tar.gz rest-query-5519c219e2404cb19b6116dee90b40b5e5e2a720.tar.bz2 rest-query-5519c219e2404cb19b6116dee90b40b5e5e2a720.zip |
Merge pull request #16 from drivergroup/PDSUI-2187
PDSUI-2187 Dropped unnecessary fields from issue tables
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/patientissue/ApiPatientIssue.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/patientissue/ApiPatientIssue.scala | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/patientissue/ApiPatientIssue.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/patientissue/ApiPatientIssue.scala index 7e0b174..d1a216c 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/patientissue/ApiPatientIssue.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/patientissue/ApiPatientIssue.scala @@ -11,9 +11,7 @@ final case class ApiPatientIssue(id: Long, lastUpdate: ZonedDateTime, userId: String, isDraft: Boolean, - evidence: String, - archiveRequired: Boolean, - meta: String) + archiveRequired: Boolean) object ApiPatientIssue { implicit val format: Format[ApiPatientIssue] = ( @@ -22,11 +20,7 @@ object ApiPatientIssue { (JsPath \ "lastUpdate").format[ZonedDateTime] and (JsPath \ "userId").format[String] and (JsPath \ "isDraft").format[Boolean] and - (JsPath \ "evidence").format[String] and - (JsPath \ "archiveRequired").format[Boolean] and - (JsPath \ "meta").format[String](Format(Reads { x => - JsSuccess(Json.stringify(x)) - }, Writes[String](Json.parse))) + (JsPath \ "archiveRequired").format[Boolean] )(ApiPatientIssue.apply, unlift(ApiPatientIssue.unapply)) def fromDomain(x: PatientIssue) = ApiPatientIssue( @@ -35,8 +29,6 @@ object ApiPatientIssue { lastUpdate = ZonedDateTime.of(x.lastUpdate, ZoneId.of("Z")), userId = x.userId.id, isDraft = x.isDraft, - evidence = x.evidence, - archiveRequired = x.archiveRequired, - meta = x.meta + archiveRequired = x.archiveRequired ) } |