diff options
author | ktomskikh <ktomskih@datamonsters.co> | 2017-09-15 16:00:06 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 16:00:06 +0700 |
commit | b9f3ab180253c346664f4f38b418dc96f54bdc31 (patch) | |
tree | 54ac3c61383ccf41ae95e60d5abbf8b2447ede8f /src/main/scala/xyz/driver/pdsuidomain/formats/json | |
parent | f1f9740b7d301c4e7cc7c5c2e38f7661ea0cfbb5 (diff) | |
parent | 44c94efb464245544191524925d6d328386543e1 (diff) | |
download | rest-query-b9f3ab180253c346664f4f38b418dc96f54bdc31.tar.gz rest-query-b9f3ab180253c346664f4f38b418dc96f54bdc31.tar.bz2 rest-query-b9f3ab180253c346664f4f38b418dc96f54bdc31.zip |
Merge pull request #25 from drivergroup/PDSUI-2273v0.3.12
PDSUI-2273 Renamed intervention.originalDescription to originalDosage
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/intervention/ApiIntervention.scala | 8 | ||||
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/intervention.scala | 20 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/intervention/ApiIntervention.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/intervention/ApiIntervention.scala index ba383b6..f306a71 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/intervention/ApiIntervention.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/intervention/ApiIntervention.scala @@ -13,7 +13,7 @@ final case class ApiIntervention(id: Long, arms: List[Long], trialId: String, originalName: String, - originalDescription: String, + originalDosage: String, originalType: Option[String]) { def toDomain = { @@ -25,7 +25,7 @@ final case class ApiIntervention(id: Long, typeId = this.typeId.map(id => LongId(id)), originalType = this.originalType.map(id => id.toString), dosage = this.dosage, - originalDescription = this.originalDescription, + originalDosage = this.originalDosage, isActive = this.isActive ) @@ -48,7 +48,7 @@ object ApiIntervention { (JsPath \ "arms").format[List[Long]] and (JsPath \ "trialId").format[String] and (JsPath \ "originalName").format[String] and - (JsPath \ "originalDescription").format[String] and + (JsPath \ "originalDosage").format[String] and (JsPath \ "originalType").formatNullable[String] )(ApiIntervention.apply, unlift(ApiIntervention.unapply)) @@ -65,7 +65,7 @@ object ApiIntervention { arms = arms.map(_.armId.id), trialId = intervention.trialId.id, originalName = intervention.originalName, - originalDescription = intervention.originalDescription, + originalDosage = intervention.originalDosage, originalType = intervention.originalType ) } diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/intervention.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/intervention.scala index 41afe6a..9314391 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/intervention.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/intervention.scala @@ -11,16 +11,16 @@ object intervention { implicit val interventionWriter: JsonWriter[InterventionWithArms] = new JsonWriter[InterventionWithArms] { override def write(obj: InterventionWithArms) = JsObject( - "id" -> obj.intervention.id.toJson, - "name" -> obj.intervention.name.toJson, - "typeId" -> obj.intervention.typeId.toJson, - "dosage" -> obj.intervention.dosage.toJson, - "isActive" -> obj.intervention.isActive.toJson, - "arms" -> obj.arms.map(_.armId).toJson, - "trialId" -> obj.intervention.trialId.toJson, - "originalName" -> obj.intervention.originalName.toJson, - "originalDescription" -> obj.intervention.originalDescription.toJson, - "originalType" -> obj.intervention.originalType.toJson + "id" -> obj.intervention.id.toJson, + "name" -> obj.intervention.name.toJson, + "typeId" -> obj.intervention.typeId.toJson, + "dosage" -> obj.intervention.dosage.toJson, + "isActive" -> obj.intervention.isActive.toJson, + "arms" -> obj.arms.map(_.armId).toJson, + "trialId" -> obj.intervention.trialId.toJson, + "originalName" -> obj.intervention.originalName.toJson, + "originalDosage" -> obj.intervention.originalDosage.toJson, + "originalType" -> obj.intervention.originalType.toJson ) } |