From 642f98c2ddd8af6c83d3de5a51c643ba93b23f96 Mon Sep 17 00:00:00 2001 From: Aleksandr Date: Fri, 29 Sep 2017 13:48:22 +0700 Subject: Fixed ExportPatientGen class --- .../fakes/entities/rep/ExportPatientGen.scala | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/main/scala/xyz/driver/pdsuidomain') 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 index 7259d0c..c2909f3 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExportPatientGen.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExportPatientGen.scala @@ -2,7 +2,7 @@ package xyz.driver.pdsuidomain.fakes.entities.rep import xyz.driver.core.generators._ import xyz.driver.pdsuicommon.domain.{LongId, UuidId} -import xyz.driver.pdsuidomain.entities.{Document, ExtractedData, Label, RecordRequestId} +import xyz.driver.pdsuidomain.entities._ import xyz.driver.pdsuidomain.entities.export.patient.{ ExportPatientLabel, ExportPatientLabelEvidence, @@ -14,12 +14,26 @@ import xyz.driver.pdsuidomain.fakes.entities.common.{nextLocalDate, nextLongId} object ExportPatientGen { private val maxItemsInCollectionNumber = 3 + def nextDocumentType(documentTypeId: LongId[DocumentType] = nextLongId): DocumentType = { + DocumentType( + documentTypeId, + nextString() + ) + } + + def nextProviderType(providerTypeId: LongId[ProviderType] = nextLongId): ProviderType = { + ProviderType( + providerTypeId, + nextString() + ) + } + def nextExportPatientLabelEvidenceDocument(documentId: LongId[Document]): ExportPatientLabelEvidenceDocument = { ExportPatientLabelEvidenceDocument( documentId = documentId, requestId = RecordRequestId(nextUuid()), - documentType = nextString(), - providerType = nextString(), + documentType = nextDocumentType(), + providerType = nextProviderType(), date = nextLocalDate ) } -- cgit v1.2.3