aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExportPatientGen.scala
diff options
context:
space:
mode:
authorAleksandr <ognelisar@gmail.com>2017-10-17 16:28:11 +0700
committerAleksandr <ognelisar@gmail.com>2017-10-17 16:28:11 +0700
commitf1bf26efdbc0f9546ffc7327e9932b48c1d648e4 (patch)
tree3279b5f8596f0760c0144abc32ffbebd5922bad7 /src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExportPatientGen.scala
parentfec0a0315ace61d63d05e1bcd71900777a229463 (diff)
parenteb9a75c226b005e5989d2a6494160ebe0dd9d9e7 (diff)
downloadrest-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/rep/ExportPatientGen.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExportPatientGen.scala54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExportPatientGen.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExportPatientGen.scala
deleted file mode 100644
index 85bab8c..0000000
--- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExportPatientGen.scala
+++ /dev/null
@@ -1,54 +0,0 @@
-package xyz.driver.pdsuidomain.fakes.entities.rep
-
-import xyz.driver.core.generators
-import xyz.driver.core.generators._
-import xyz.driver.entities.labels.{Label, LabelValue}
-import xyz.driver.pdsuicommon.domain.{LongId, UuidId}
-import xyz.driver.pdsuidomain.entities._
-import xyz.driver.pdsuidomain.entities.export.patient._
-import xyz.driver.pdsuidomain.fakes.entities.common.{nextLocalDate, nextLongId}
-import xyz.driver.pdsuidomain.fakes.entities.rep.DocumentGen._
-import xyz.driver.pdsuidomain.fakes.entities.rep.MedicalRecordGen._
-
-object ExportPatientGen {
- private val maxItemsInCollectionNumber = 3
-
- def nextExportPatientLabelEvidenceDocument(documentId: LongId[Document]): ExportPatientLabelEvidenceDocument = {
- ExportPatientLabelEvidenceDocument(
- documentId = documentId,
- requestId = RecordRequestId(nextUuid()),
- documentType = nextDocumentType(),
- providerType = nextProviderType(),
- date = nextLocalDate
- )
- }
-
- def nextExportPatientLabelEvidence(documentId: LongId[Document]): ExportPatientLabelEvidence = {
- ExportPatientLabelEvidence(
- id = nextLongId[ExtractedData],
- value = generators.oneOf[LabelValue](LabelValue.Yes, LabelValue.No, LabelValue.Maybe),
- evidenceText = nextString(),
- document = nextExportPatientLabelEvidenceDocument(documentId)
- )
- }
-
- def nextExportPatientLabel(documentId: LongId[Document]): ExportPatientLabel = {
- ExportPatientLabel(
- id = nextLongId[Label],
- evidences = List.fill(
- nextInt(maxItemsInCollectionNumber, minValue = 0)
- )(nextExportPatientLabelEvidence(documentId))
- )
- }
-
- def nextExportPatientWithLabels(documentId: LongId[Document]): ExportPatientWithLabels = {
- ExportPatientWithLabels(
- patientId = UuidId[xyz.driver.pdsuidomain.entities.Patient](nextUuid()),
- labelVersion = scala.util.Random.nextLong(),
- labels = List.fill(
- nextInt(maxItemsInCollectionNumber, minValue = 0)
- )(nextExportPatientLabel(documentId))
- )
- }
-
-}