diff options
author | Vyatcheslav Suharnikov <arz.freezy@gmail.com> | 2017-07-12 09:55:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-12 09:55:39 +0300 |
commit | 7ab16021fe2b7e1f7d9d7800458e737d015e7630 (patch) | |
tree | dfb35a72bc4f655e46cea2e89d3279085904785f /src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/trial/ApiPatientCriterion.scala | |
parent | 64b1565004ff530c34484dd80bff268e46c864ca (diff) | |
parent | 01170a92bec7e09be89727143b442e4fb78446e7 (diff) | |
download | rest-query-7ab16021fe2b7e1f7d9d7800458e737d015e7630.tar.gz rest-query-7ab16021fe2b7e1f7d9d7800458e737d015e7630.tar.bz2 rest-query-7ab16021fe2b7e1f7d9d7800458e737d015e7630.zip |
Merge pull request #1 from drivergroup/PDSUI-2003v0.1.23
PDSUI-2003 Created PatientCriterionArm table
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/trial/ApiPatientCriterion.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/trial/ApiPatientCriterion.scala | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/trial/ApiPatientCriterion.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/trial/ApiPatientCriterion.scala index 7ac55f6..75347f4 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/trial/ApiPatientCriterion.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/trial/ApiPatientCriterion.scala @@ -3,7 +3,7 @@ package xyz.driver.pdsuidomain.formats.json.patient.trial import java.time.{ZoneId, ZonedDateTime} import xyz.driver.pdsuicommon.domain.{FuzzyValue, LongId} -import xyz.driver.pdsuidomain.entities.{Arm, Label, PatientCriterion} +import xyz.driver.pdsuidomain.entities.{Label, PatientCriterion, PatientCriterionArm} import play.api.data.validation.ValidationError import play.api.libs.functional.syntax._ import play.api.libs.json.{Format, JsPath, Reads, Writes} @@ -53,8 +53,7 @@ object ApiPatientCriterion { def fromDomain(patientCriterion: PatientCriterion, labelId: LongId[Label], - arms: List[Arm], - criterionIsCompound: Boolean) = ApiPatientCriterion( + arms: List[PatientCriterionArm]) = ApiPatientCriterion( id = patientCriterion.id.id, labelId = labelId.id, nctId = patientCriterion.nctId.id, @@ -64,8 +63,8 @@ object ApiPatientCriterion { FuzzyValue.valueToString(FuzzyValue.fromBoolean(x)) }, criterionIsDefining = patientCriterion.criterionIsDefining, - criterionIsCompound = criterionIsCompound, - arms = arms.map(_.name), + criterionIsCompound = patientCriterion.criterionValue.isEmpty, + arms = arms.map(_.armName), eligibilityStatus = patientCriterion.eligibilityStatus.map(FuzzyValue.valueToString), verifiedEligibilityStatus = patientCriterion.verifiedEligibilityStatus.map(FuzzyValue.valueToString), isVerified = patientCriterion.isVerified, |