diff options
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/fakes')
3 files changed, 5 insertions, 21 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/DocumentGen.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/DocumentGen.scala index 6d5330e..1ac75ab 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/DocumentGen.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/DocumentGen.scala @@ -75,12 +75,8 @@ object DocumentGen { ) } - def nextDocumentType(): DocumentType = { - DocumentType( - id = nextLongId[DocumentType], - name = nextString() - ) - } + def nextDocumentType(): DocumentType = + generators.oneOf(DocumentType.All: _*) def nextDocumentIssue(documentId: LongId[Document] = nextLongId): DocumentIssue = { val pages = nextStartAndEndPagesOption() 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 e3ef6bc..3fcc4cb 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 @@ -7,24 +7,12 @@ import xyz.driver.pdsuidomain.fakes.entities.common._ 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 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, diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala index 023dc00..2777116 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala @@ -142,6 +142,6 @@ object MedicalRecordGen { } def nextProviderType(): ProviderType = - ProviderType(id = nextLongId[ProviderType], name = nextString()) + generators.oneOf(ProviderType.All: _*) } |