aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/recordprocessing.scala
diff options
context:
space:
mode:
authorKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-20 14:07:09 +0700
committerGitHub <noreply@github.com>2017-10-20 14:07:09 +0700
commit6d6e732368e97e319653f00e498189afceeb4671 (patch)
tree39cb55a90f262a1065df750b8c5692c91aa0800e /src/main/scala/xyz/driver/pdsuidomain/fakes/entities/recordprocessing.scala
parent9ca0cae09bc880ce083c2a49ae3804889cc9d4c4 (diff)
parent14a6927aad61d13e7cec5be8a0da1194e7fba026 (diff)
downloadrest-query-6d6e732368e97e319653f00e498189afceeb4671.tar.gz
rest-query-6d6e732368e97e319653f00e498189afceeb4671.tar.bz2
rest-query-6d6e732368e97e319653f00e498189afceeb4671.zip
Merge pull request #50 from drivergroup/entity-list-responsesv0.10.0
Created list response for each entity
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/fakes/entities/recordprocessing.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/fakes/entities/recordprocessing.scala40
1 files changed, 38 insertions, 2 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/recordprocessing.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/recordprocessing.scala
index 8ba1d82..86583c1 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/recordprocessing.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/recordprocessing.scala
@@ -6,6 +6,7 @@ import xyz.driver.core.generators
import xyz.driver.core.generators._
import xyz.driver.entities.labels.{Label, LabelCategory, LabelValue}
import xyz.driver.pdsuicommon.domain.{LongId, TextJson, User}
+import xyz.driver.pdsuidomain.ListResponse
import xyz.driver.pdsuidomain.entities.ExtractedData.Meta
import xyz.driver.pdsuidomain.entities._
import xyz.driver.pdsuidomain.fakes.entities.common._
@@ -187,12 +188,12 @@ object recordprocessing {
)
}
- def nextDocumentIssue(documentId: LongId[Document] = nextLongId): DocumentIssue = {
+ def nextDocumentIssue(): DocumentIssue = {
val (startPage, endPage) = nextStartAndEndPagesOption
DocumentIssue(
id = nextLongId[DocumentIssue],
userId = nextStringId[User],
- documentId = documentId,
+ documentId = nextLongId[Document],
startPage = startPage,
endPage = endPage,
lastUpdate = nextLocalDateTime,
@@ -282,4 +283,39 @@ object recordprocessing {
)
}
+ def nextMedicalRecordListResponse(): ListResponse[MedicalRecord] = {
+ val xs: Seq[MedicalRecord] = Seq.fill(3)(nextMedicalRecord())
+ nextListResponse(xs)
+ }
+
+ def nextMedicalRecordIssueListResponse(): ListResponse[MedicalRecordIssue] = {
+ val xs: Seq[MedicalRecordIssue] = Seq.fill(3)(nextMedicalRecordIssue())
+ nextListResponse(xs)
+ }
+
+ def nextMedicalRecordHistoryListResponse(): ListResponse[MedicalRecordHistory] = {
+ val xs: Seq[MedicalRecordHistory] = Seq.fill(3)(nextMedicalRecordHistory())
+ nextListResponse(xs)
+ }
+
+ def nextDocumentListResponse(): ListResponse[Document] = {
+ val xs: Seq[Document] = Seq.fill(3)(nextDocument())
+ nextListResponse(xs)
+ }
+
+ def nextDocumentIssueListResponse(): ListResponse[DocumentIssue] = {
+ val xs: Seq[DocumentIssue] = Seq.fill(3)(nextDocumentIssue())
+ nextListResponse(xs)
+ }
+
+ def nextDocumentHistoryListResponse(): ListResponse[DocumentHistory] = {
+ val xs: Seq[DocumentHistory] = Seq.fill(3)(nextDocumentHistory())
+ nextListResponse(xs)
+ }
+
+ def nextRichExtractedDataListResponse(): ListResponse[RichExtractedData] = {
+ val xs: Seq[RichExtractedData] = Seq.fill(3)(nextRichExtractedData())
+ nextListResponse(xs)
+ }
+
}