diff options
author | Aleksandr <ognelisar@gmail.com> | 2017-10-17 16:28:11 +0700 |
---|---|---|
committer | Aleksandr <ognelisar@gmail.com> | 2017-10-17 16:28:11 +0700 |
commit | f1bf26efdbc0f9546ffc7327e9932b48c1d648e4 (patch) | |
tree | 3279b5f8596f0760c0144abc32ffbebd5922bad7 /src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala | |
parent | fec0a0315ace61d63d05e1bcd71900777a229463 (diff) | |
parent | eb9a75c226b005e5989d2a6494160ebe0dd9d9e7 (diff) | |
download | rest-query-f1bf26efdbc0f9546ffc7327e9932b48c1d648e4.tar.gz rest-query-f1bf26efdbc0f9546ffc7327e9932b48c1d648e4.tar.bz2 rest-query-f1bf26efdbc0f9546ffc7327e9932b48c1d648e4.zip |
Merge branch 'master' into PDSUI-additional-formats
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala | 44 |
1 files changed, 43 insertions, 1 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 1fe7533..2c7d0e0 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala @@ -1,8 +1,15 @@ package xyz.driver.pdsuidomain.fakes.entities import xyz.driver.entities.labels.Label +import xyz.driver.fakes +import xyz.driver.pdsuidomain.entities.export.patient.{ + ExportPatientLabel, + ExportPatientLabelEvidence, + ExportPatientLabelEvidenceDocument, + ExportPatientWithLabels +} import xyz.driver.pdsuidomain.entities.export.trial._ -import xyz.driver.pdsuidomain.entities.{Criterion, EligibilityArm, Trial} +import xyz.driver.pdsuidomain.entities._ object export { import common._ @@ -33,4 +40,39 @@ object export { arms = listOf(nextExportTrialArm()), criteria = listOf(nextExportTrialLabelCriterion()) ) + + def nextExportPatientLabelEvidenceDocument(): ExportPatientLabelEvidenceDocument = { + ExportPatientLabelEvidenceDocument( + documentId = nextLongId[Document], + requestId = recordprocessing.nextRecordRequestId(), + 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()) + ) + } + } |