From a0877d81ca2844d75dc361b5ce7c99afacd6e25f Mon Sep 17 00:00:00 2001 From: vlad Date: Thu, 25 Jan 2018 14:12:31 -0800 Subject: Extracting query library --- .../driver/pdsuidomain/fakes/entities/export.scala | 76 ---------------------- 1 file changed, 76 deletions(-) delete mode 100644 src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala (limited to 'src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala') diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala deleted file mode 100644 index 12eff61..0000000 --- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala +++ /dev/null @@ -1,76 +0,0 @@ -package xyz.driver.pdsuidomain.fakes.entities - -import xyz.driver.core.generators -import xyz.driver.entities.clinic.ClinicalRecord -import xyz.driver.entities.labels.Label -import xyz.driver.fakes -import xyz.driver.pdsuidomain.entities.export.patient._ -import xyz.driver.pdsuidomain.entities.export.trial._ -import xyz.driver.pdsuidomain.entities._ - -object export { - import common._ - import xyz.driver.core.generators._ - - def nextExportTrialArm(): ExportTrialArm = - 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[EligibilityArm]), - criteria = nextString(100), - isCompound = nextBoolean(), - isDefining = nextBoolean(), - inclusion = nextOption(nextBoolean()) - ) - - def nextExportTrialWithLabels(): ExportTrialWithLabels = - ExportTrialWithLabels( - nctId = nextStringId[Trial], - trialId = nextUuidId[Trial], - lastReviewed = nextLocalDateTime, - labelVersion = nextInt(100).toLong, - arms = listOf(nextExportTrialArm()), - criteria = listOf(nextExportTrialLabelCriterion()) - ) - - def nextExportPatientLabelEvidenceDocument(): ExportPatientLabelEvidenceDocument = { - ExportPatientLabelEvidenceDocument( - documentId = nextLongId[Document], - requestId = generators.nextId[ClinicalRecord](), - documentType = nextDocumentType(), - providerType = nextProviderType(), - date = nextLocalDate - ) - } - - def nextExportPatientLabelEvidence(): ExportPatientLabelEvidence = { - ExportPatientLabelEvidence( - id = nextLongId[ExtractedData], - value = fakes.entities.labels.nextLabelValue(), - evidenceText = nextString(), - document = nextExportPatientLabelEvidenceDocument() - ) - } - - def nextExportPatientLabel(): ExportPatientLabel = { - ExportPatientLabel( - id = nextLongId[Label], - evidences = List.fill(nextInt(10))(nextExportPatientLabelEvidence()) - ) - } - - def nextExportPatientWithLabels(): ExportPatientWithLabels = { - ExportPatientWithLabels( - patientId = nextUuidId[Patient], - labelVersion = nextInt(Int.MaxValue).toLong, - labels = List.fill(nextInt(10))(nextExportPatientLabel()) - ) - } - -} -- cgit v1.2.3