diff options
author | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-10-17 11:15:54 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-17 11:15:54 +0700 |
commit | c5d36593cc14bfdfb7b8f06d680ad6fc2eb6dde0 (patch) | |
tree | 485fc8a1c7ac8e7a9dd8fc8ed5308dba185fb6ca /src/main/scala/xyz/driver/pdsuidomain/fakes/entities/export.scala | |
parent | f3b809659969ee29ab7f0a62ec1cff25a3e263dc (diff) | |
parent | a0599ae4d12acafb934b40f52d4a771709b3e583 (diff) | |
download | rest-query-c5d36593cc14bfdfb7b8f06d680ad6fc2eb6dde0.tar.gz rest-query-c5d36593cc14bfdfb7b8f06d680ad6fc2eb6dde0.tar.bz2 rest-query-c5d36593cc14bfdfb7b8f06d680ad6fc2eb6dde0.zip |
Merge pull request #47 from drivergroup/PDSUI-2318v0.8.8
PDSUI-2318 Created custom swagger format for TM
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()) + ) + } + } |