From eeeb6d90f1c6882f0b3d765022b114d97e4dba40 Mon Sep 17 00:00:00 2001 From: vlad Date: Mon, 9 Oct 2017 12:49:02 -0700 Subject: Getting rid of the FuzzyValues, Name as a string, and condition --- .../pdsuidomain/formats/json/sprayformats/ExportFormatSuite.scala | 2 +- .../formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala | 3 ++- .../pdsuidomain/formats/json/sprayformats/PatientFormatSuite.scala | 4 ++-- .../pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json') diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/ExportFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/ExportFormatSuite.scala index 05f5863..402e893 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/ExportFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/ExportFormatSuite.scala @@ -107,7 +107,7 @@ class ExportFormatSuite extends FlatSpec with Matchers { val trialWithLabels = ExportTrialWithLabels( nctId = StringId("NCT000001"), trialId = UuidId("40892a07-c638-49d2-9795-1edfefbbcc7c"), - condition = "Breast", + disease = "Breast", lastReviewed = LocalDateTime.parse("2017-08-10T18:00:00"), labelVersion = 1L, arms = arms, diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala index f48625c..31f541f 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientEligibleTrialFormatSuite.scala @@ -5,6 +5,7 @@ import java.time.LocalDateTime import spray.json._ import org.scalatest.{FlatSpec, Matchers} import xyz.driver.entities.labels.LabelValue +import xyz.driver.entities.patient.CancerType import xyz.driver.pdsuicommon.domain.{LongId, StringId, UuidId} import xyz.driver.pdsuidomain.entities.{PatientCriterionArm, PatientTrialArmGroupView, Trial} import xyz.driver.pdsuidomain.services.PatientEligibleTrialService.RichPatientEligibleTrial @@ -22,7 +23,7 @@ class PatientEligibleTrialFormatSuite extends FlatSpec with Matchers { previousAssignee = None, lastActiveUserId = None, lastUpdate = LocalDateTime.parse("2017-08-10T18:16:19"), - condition = Trial.Condition.Breast, + disease = CancerType.Breast, phase = "", hypothesisId = Some(UuidId("e76e2fc4-a29c-44fb-a81b-8856d06bb1d4")), studyDesignId = Some(LongId(321)), diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientFormatSuite.scala index 443c8e8..ad12b3b 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientFormatSuite.scala @@ -23,7 +23,7 @@ class PatientFormatSuite extends FlatSpec with Matchers { previousAssignee = None, lastActiveUserId = None, isUpdateRequired = false, - cancerType = CancerType.Breast, + disease = CancerType.Breast, orderId = PatientOrderId("7b54a75d-4197-4b27-9045-b9b6cb131be9"), lastUpdate = LocalDateTime.parse("2017-08-10T18:00:00") ) @@ -33,7 +33,7 @@ class PatientFormatSuite extends FlatSpec with Matchers { """{"id":"748b5884-3528-4cb9-904b-7a8151d6e343","dob":"1980-06-30", "name":{"firstName":"John","middleName":"","lastName":"Doe"},"status":"New","assignee":null, "previousStatus":null,"previousAssignee":null,"lastActiveUser":null,"lastUpdate":"2017-08-10T18:00Z", - "orderId":"7b54a75d-4197-4b27-9045-b9b6cb131be9","condition":"Breast"}""".parseJson) + "orderId":"7b54a75d-4197-4b27-9045-b9b6cb131be9","disease":"Breast"}""".parseJson) } } diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala index 59cf779..beb69c4 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/TrialFormatSuite.scala @@ -4,6 +4,7 @@ import java.time.LocalDateTime import spray.json._ import org.scalatest.{FlatSpec, Matchers} +import xyz.driver.entities.patient.CancerType import xyz.driver.pdsuicommon.domain.{LongId, StringId, UuidId} import xyz.driver.pdsuidomain.entities.Trial @@ -20,7 +21,7 @@ class TrialFormatSuite extends FlatSpec with Matchers { previousAssignee = None, lastActiveUserId = None, lastUpdate = LocalDateTime.parse("2017-08-10T18:16:19"), - condition = Trial.Condition.Breast, + disease = CancerType.Breast, phase = "", hypothesisId = Some(UuidId("3b80b2e2-5372-4cf5-a342-6e4ebe10fafd")), studyDesignId = Some(LongId(321)), @@ -39,7 +40,7 @@ class TrialFormatSuite extends FlatSpec with Matchers { "isUpdated":false,"overviewTemplate":"","phase":"","originalStudyDesignId":null, "hypothesisId":"3b80b2e2-5372-4cf5-a342-6e4ebe10fafd","originalTitle":"orig trial title", "studyDesignId":321,"lastActiveUser":null,"externalid":"40892a07-c638-49d2-9795-1edfefbbcc7c", - "id":"NCT000001","condition":"Breast","status":"New","overview":null,"previousAssignee":null,"title":"trial title"}""".parseJson) + "id":"NCT000001","disease":"Breast","status":"New","overview":null,"previousAssignee":null,"title":"trial title"}""".parseJson) val updateTrialJson = """{"hypothesisId":null,"overview":"new overview"}""".parseJson val expectedUpdatedTrial = orig.copy(hypothesisId = None, overview = Some("new overview")) -- cgit v1.2.3