aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/fakes
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/fakes')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala11
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala3
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala8
3 files changed, 11 insertions, 11 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala
index a3ba562..1fe7533 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala
@@ -1,22 +1,24 @@
package xyz.driver.pdsuidomain.fakes.entities
import xyz.driver.entities.labels.Label
-import xyz.driver.pdsuidomain.entities.{Arm, Criterion, Trial}
import xyz.driver.pdsuidomain.entities.export.trial._
+import xyz.driver.pdsuidomain.entities.{Criterion, EligibilityArm, Trial}
object export {
- import xyz.driver.core.generators._
import common._
+ import xyz.driver.core.generators._
def nextExportTrialArm(): ExportTrialArm =
- ExportTrialArm(armId = nextLongId[Arm], armName = nextString(100))
+ ExportTrialArm(armId = nextLongId[EligibilityArm],
+ armName = nextString(100),
+ diseaseList = listOf(nextString(100)))
def nextExportTrialLabelCriterion(): ExportTrialLabelCriterion =
ExportTrialLabelCriterion(
criterionId = nextLongId[Criterion],
value = nextOption[Boolean](nextBoolean()),
labelId = nextLongId[Label],
- armIds = setOf(nextLongId[Arm]),
+ armIds = setOf(nextLongId[EligibilityArm]),
criteria = nextString(100),
isCompound = nextBoolean(),
isDefining = nextBoolean()
@@ -26,7 +28,6 @@ object export {
ExportTrialWithLabels(
nctId = nextStringId[Trial],
trialId = nextUuidId[Trial],
- disease = nextString(100),
lastReviewed = nextLocalDateTime,
labelVersion = nextInt(100).toLong,
arms = listOf(nextExportTrialArm()),
diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala
index 254968a..eb475b4 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala
@@ -93,7 +93,8 @@ object MedicalRecordGen {
caseId = nextOption(CaseId(generators.nextString())),
physician = nextOption(generators.nextString()),
meta = nextOption(nextMedicalRecordMetasJson()),
- lastUpdate = nextLocalDateTime
+ lastUpdate = nextLocalDateTime,
+ totalPages = nextInt(1, 10)
)
}
diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala
index 069d1f1..ade0115 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala
@@ -1,14 +1,13 @@
package xyz.driver.pdsuidomain.fakes.entities
import xyz.driver.entities.labels.{Label, LabelCategory}
-import xyz.driver.entities.patient.CancerType
import xyz.driver.pdsuicommon.domain.{LongId, User}
import xyz.driver.pdsuidomain.entities._
import xyz.driver.pdsuidomain.services.CriterionService.RichCriterion
object trialcuration {
- import xyz.driver.core.generators
import common._
+ import xyz.driver.core.generators
import xyz.driver.pdsuidomain.entities.InterventionType._
def nextTrial(): Trial = Trial(
@@ -20,7 +19,6 @@ object trialcuration {
previousAssignee = Option(nextStringId[User]),
lastActiveUserId = Option(nextStringId[User]),
lastUpdate = nextLocalDateTime,
- disease = generators.oneOf[CancerType](CancerType.Breast, CancerType.Lung, CancerType.Prostate),
phase = generators.nextString(),
hypothesisId = Option(nextUuidId[Hypothesis]),
studyDesignId = Option(nextLongId[StudyDesign]),
@@ -63,7 +61,7 @@ object trialcuration {
val criterion = nextCriterion()
RichCriterion(
criterion = criterion,
- armIds = Seq(nextLongId[Arm], nextLongId[Arm]),
+ armIds = Seq(nextLongId[EligibilityArm], nextLongId[EligibilityArm]),
labels = Seq(
nextCriterionLabel(criterion.id),
nextCriterionLabel(criterion.id)
@@ -86,7 +84,7 @@ object trialcuration {
def nextInterventionArm(interventionId: LongId[Intervention]): InterventionArm = InterventionArm(
interventionId = interventionId,
- armId = nextLongId[Arm]
+ armId = nextLongId[SlotArm]
)
def nextInterventionWithArms(): InterventionWithArms = {