diff options
author | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-10-20 16:25:04 +0700 |
---|---|---|
committer | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-10-20 16:25:04 +0700 |
commit | 54b15dae509212f6661dc1f1bc4ca248cb487443 (patch) | |
tree | 85b1ceafd9a56da511513797bd263977f52b556c /src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/patienteligibletrial.scala | |
parent | 6d6e732368e97e319653f00e498189afceeb4671 (diff) | |
download | rest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.tar.gz rest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.tar.bz2 rest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.zip |
PDSUI-2336 Deleted api classes of play format, userhistory and message services
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/patienteligibletrial.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/patienteligibletrial.scala | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/patienteligibletrial.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/patienteligibletrial.scala deleted file mode 100644 index 342d3a8..0000000 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/patienteligibletrial.scala +++ /dev/null @@ -1,40 +0,0 @@ -package xyz.driver.pdsuidomain.formats.json.sprayformats - -import spray.json._ -import xyz.driver.pdsuidomain.entities._ -import xyz.driver.pdsuidomain.services.PatientEligibleTrialService.RichPatientEligibleTrial -import xyz.driver.formats.json.labels._ - -object patienteligibletrial { - import DefaultJsonProtocol._ - import common._ - - def applyUpdateToTrialArmGroup(json: JsValue, orig: PatientTrialArmGroupView): PatientTrialArmGroupView = - json match { - case JsObject(fields) => - val isVerified = fields - .get("isVerified") - .map(_.convertTo[Boolean]) - .getOrElse(orig.isVerified) - - orig.copy(isVerified = isVerified) - - case _ => deserializationError(s"Expected Json Object as partial PatientTrialArmGroupView, but got $json") - } - - implicit val patientEligibleTrialWriter: RootJsonWriter[RichPatientEligibleTrial] = - new RootJsonWriter[RichPatientEligibleTrial] { - override def write(obj: RichPatientEligibleTrial) = - JsObject( - "id" -> obj.group.id.toJson, - "patientId" -> obj.group.patientId.toJson, - "trialId" -> obj.group.trialId.toJson, - "trialTitle" -> obj.trial.title.toJson, - "arms" -> obj.arms.map(_.armName).toJson, - "hypothesisId" -> obj.trial.hypothesisId.toJson, - "verifiedEligibilityStatus" -> obj.group.verifiedEligibilityStatus.toJson, - "isVerified" -> obj.group.isVerified.toJson - ) - } - -} |