diff options
author | Marvin Bertin <marvin.bertin@gmail.com> | 2017-10-10 16:31:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-10 16:31:00 -0700 |
commit | 385a9a99e5a95c3d623cddd927c37564e32dbd2d (patch) | |
tree | 0671a39174899dce09ade3c571ef21bab6172e0e /src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala | |
parent | 0653b90dddc294fddb0e81059aef00b202113d78 (diff) | |
parent | 9c95eb7247cb0818af9a9e4afe884698360f994c (diff) | |
download | rest-query-385a9a99e5a95c3d623cddd927c37564e32dbd2d.tar.gz rest-query-385a9a99e5a95c3d623cddd927c37564e32dbd2d.tar.bz2 rest-query-385a9a99e5a95c3d623cddd927c37564e32dbd2d.zip |
Merge pull request #35 from drivergroup/trial-46-disease-entity
Trial 46 disease entity
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/fakes/entities/rep/MedicalRecordGen.scala | 31 |
1 files changed, 7 insertions, 24 deletions
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 ) } |