diff options
author | Marvin Bertin <marvin.bertin@gmail.com> | 2017-10-10 17:17:18 -0700 |
---|---|---|
committer | Marvin Bertin <marvin.bertin@gmail.com> | 2017-10-10 17:17:18 -0700 |
commit | b124608a4faa9cb94474f27c1d4605e5cb0ab63d (patch) | |
tree | c3439f756f023facbbae4deea1972ad2f511dda3 /src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep | |
parent | f55212361d6126a05075a1f00f3915484b4f334e (diff) | |
parent | 385a9a99e5a95c3d623cddd927c37564e32dbd2d (diff) | |
download | rest-query-b124608a4faa9cb94474f27c1d4605e5cb0ab63d.tar.gz rest-query-b124608a4faa9cb94474f27c1d4605e5cb0ab63d.tar.bz2 rest-query-b124608a4faa9cb94474f27c1d4605e5cb0ab63d.zip |
fix merge conflictsv0.7.5
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep')
4 files changed, 15 insertions, 35 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 1ac75ab..0dadc41 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 @@ -40,12 +40,7 @@ object DocumentGen { def nextDocumentMeta(): Document.Meta = { val (startPage, endPage) = nextStartAndEndPage() - - Document.Meta( - nextOption(nextBoolean()), - startPage, - endPage - ) + Document.Meta(startPage, endPage) } def nextDocumentMetaJson(): TextJson[Document.Meta] = { @@ -68,6 +63,7 @@ object DocumentGen { providerName = nextOption(nextString()), providerTypeId = nextOption(nextLongId[ProviderType]), requiredType = nextOption(nextDocumentRequiredType()), + institutionName = nextOption(nextString()), meta = nextOption(nextDocumentMetaJson()), startDate = dates._1, endDate = dates._2, 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 3fcc4cb..85bab8c 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 @@ -1,9 +1,9 @@ package xyz.driver.pdsuidomain.fakes.entities.rep +import xyz.driver.core.generators import xyz.driver.core.generators._ -import xyz.driver.entities.labels.Label +import xyz.driver.entities.labels.{Label, LabelValue} import xyz.driver.pdsuicommon.domain.{LongId, UuidId} -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} @@ -26,7 +26,7 @@ object ExportPatientGen { def nextExportPatientLabelEvidence(documentId: LongId[Document]): ExportPatientLabelEvidence = { ExportPatientLabelEvidence( id = nextLongId[ExtractedData], - value = nextFuzzyValue(), + value = generators.oneOf[LabelValue](LabelValue.Yes, LabelValue.No, LabelValue.Maybe), evidenceText = nextString(), document = nextExportPatientLabelEvidenceDocument(documentId) ) diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExtractedDataGen.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExtractedDataGen.scala index 8e77445..70ddd10 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExtractedDataGen.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/ExtractedDataGen.scala @@ -1,7 +1,8 @@ package xyz.driver.pdsuidomain.fakes.entities.rep +import xyz.driver.core.generators import xyz.driver.core.generators._ -import xyz.driver.entities.labels.{Label, LabelCategory} +import xyz.driver.entities.labels.{Label, LabelCategory, LabelValue} import xyz.driver.pdsuicommon.domain.{LongId, TextJson} import xyz.driver.pdsuidomain.entities._ import xyz.driver.pdsuidomain.entities.ExtractedData.Meta @@ -85,7 +86,7 @@ object ExtractedDataGen { dataId = nextLongId[ExtractedData], labelId = nextOption(nextLongId[Label]), categoryId = nextOption(nextLongId[LabelCategory]), - value = nextOption(nextFuzzyValue()) + value = nextOption(generators.oneOf[LabelValue](LabelValue.Yes, LabelValue.No, LabelValue.Maybe)) ) } 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 2777116..254968a 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 @@ -49,15 +49,10 @@ object MedicalRecordGen { generators.oneOf[MedicalRecordHistory.Action](MedicalRecordHistory.Action.All) def nextMedicalRecordMetaReorder(): MedicalRecord.Meta.Reorder = { - val itemsNumber = - maxItemsInCollectionNumber - val items = scala.util.Random - .shuffle(Seq.tabulate(itemsNumber)(identity)) - - MedicalRecord.Meta.Reorder( - predicted = nextOption(nextBoolean), - items = items - ) + val itemsNumber = maxItemsInCollectionNumber + val items = scala.util.Random.shuffle(Seq.tabulate(itemsNumber)(identity)) + + MedicalRecord.Meta.Reorder(items) } def nextMedicalRecordMetaDuplicate(): MedicalRecord.Meta.Duplicate = { @@ -67,7 +62,6 @@ object MedicalRecordGen { nextInt(pageMaxNumber, startPageGen) MedicalRecord.Meta.Duplicate( - predicted = nextOption(nextBoolean), startPage = startPageGen.toDouble, endPage = endPageGen.toDouble, startOriginalPage = startPageGen.toDouble, @@ -76,17 +70,9 @@ object MedicalRecordGen { } def nextMedicalRecordMetaRotation(): MedicalRecord.Meta.Rotation = { - val items = - Array - .tabulate(maxItemsInCollectionNumber)( - index => nextString() -> index - ) - .toMap - - MedicalRecord.Meta.Rotation( - predicted = nextOption(nextBoolean()), - items = items - ) + val items = Array.tabulate(maxItemsInCollectionNumber)(index => nextString() -> index).toMap + + MedicalRecord.Meta.Rotation(items = items) } def nextMedicalRecordMeta(): MedicalRecord.Meta = { @@ -94,7 +80,6 @@ object MedicalRecordGen { } def nextMedicalRecord(): MedicalRecord = { - val id = nextLongId[MedicalRecord] MedicalRecord( id = nextLongId[MedicalRecord], status = nextMedicalRecordStatus(), @@ -108,8 +93,6 @@ object MedicalRecordGen { caseId = nextOption(CaseId(generators.nextString())), physician = nextOption(generators.nextString()), meta = nextOption(nextMedicalRecordMetasJson()), - predictedMeta = nextOption(nextMedicalRecordMetasJson()), - predictedDocuments = nextOption(nextDocuments(id)), lastUpdate = nextLocalDateTime ) } |