diff options
author | Aleksandr <ognelisar@gmail.com> | 2017-09-29 13:48:22 +0700 |
---|---|---|
committer | Aleksandr <ognelisar@gmail.com> | 2017-09-29 13:48:22 +0700 |
commit | 642f98c2ddd8af6c83d3de5a51c643ba93b23f96 (patch) | |
tree | 20e9a10e87f0859c5c0342f3eee45d04aa214c64 | |
parent | d4d7a173ba57e9fc9756b47223ee70fbc03a23b9 (diff) | |
download | rest-query-642f98c2ddd8af6c83d3de5a51c643ba93b23f96.tar.gz rest-query-642f98c2ddd8af6c83d3de5a51c643ba93b23f96.tar.bz2 rest-query-642f98c2ddd8af6c83d3de5a51c643ba93b23f96.zip |
Fixed ExportPatientGen class
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExportPatientGen.scala | 20 |
1 files changed, 17 insertions, 3 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 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 ) } |