From 5515c834853cbe3ce60460a4819a94805cfe24f7 Mon Sep 17 00:00:00 2001 From: vlad Date: Thu, 2 Nov 2017 17:37:25 -0700 Subject: Unifying user ids --- .../fakes/entities/recordprocessing.scala | 20 ++++++++++---------- .../fakes/entities/treatmentmatching.scala | 10 +++++----- .../pdsuidomain/fakes/entities/trialcuration.scala | 10 +++++----- 3 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src/main/scala/xyz/driver/pdsuidomain/fakes') 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 199be29..5903dc8 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/recordprocessing.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/recordprocessing.scala @@ -108,9 +108,9 @@ object recordprocessing { id = nextLongId[MedicalRecord], status = nextMedicalRecordStatus(), previousStatus = nextOption(generators.oneOf[MedicalRecord.Status](MedicalRecord.Status.AllPrevious)), - assignee = nextOption(nextStringId[User]), - previousAssignee = nextOption(nextStringId[User]), - lastActiveUserId = nextOption(nextStringId[User]), + assignee = nextOption(generators.nextId[User]), + previousAssignee = nextOption(generators.nextId[User]), + lastActiveUserId = nextOption(generators.nextId[User]), patientId = nextUuidId[Patient], requestId = generators.nextId[ClinicalRecord](), disease = generators.nextString(), @@ -123,7 +123,7 @@ object recordprocessing { def nextMedicalRecordHistory(): MedicalRecordHistory = MedicalRecordHistory( id = nextLongId[MedicalRecordHistory], - executor = nextStringId[User], + executor = generators.nextId[User], recordId = nextLongId[MedicalRecord], state = nextMedicalRecordHistoryState(), action = nextMedicalRecordHistoryAction(), @@ -135,7 +135,7 @@ object recordprocessing { MedicalRecordIssue( id = nextLongId[MedicalRecordIssue], - userId = nextStringId[User], + userId = generators.nextId[User], recordId = nextLongId[MedicalRecord], startPage = startPage, endPage = endPage, @@ -171,9 +171,9 @@ object recordprocessing { id = nextLongId[Document], status = nextDocumentStatus(), previousStatus = nextOption(generators.oneOf[Document.Status](Document.Status.AllPrevious)), - assignee = nextOption(nextStringId[User]), - previousAssignee = nextOption(nextStringId[User]), - lastActiveUserId = nextOption(nextStringId[User]), + assignee = nextOption(generators.nextId[User]), + previousAssignee = nextOption(generators.nextId[User]), + lastActiveUserId = nextOption(generators.nextId[User]), recordId = nextLongId[MedicalRecord], physician = nextOption(nextString()), typeId = nextOption(nextLongId[DocumentType]), @@ -193,7 +193,7 @@ object recordprocessing { val (startPage, endPage) = nextStartAndEndPagesOption DocumentIssue( id = nextLongId[DocumentIssue], - userId = nextStringId[User], + userId = generators.nextId[User], documentId = nextLongId[Document], startPage = startPage, endPage = endPage, @@ -206,7 +206,7 @@ object recordprocessing { def nextDocumentHistory(): DocumentHistory = DocumentHistory( id = nextLongId[DocumentHistory], - executor = nextStringId[User], + executor = generators.nextId[User], documentId = nextLongId[Document], state = nextDocumentHistoryState(), action = nextDocumentHistoryAction(), diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/treatmentmatching.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/treatmentmatching.scala index b35418d..441c1db 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/treatmentmatching.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/treatmentmatching.scala @@ -47,10 +47,10 @@ object treatmentmatching { status = nextPatientStatus, name = nextFullName[Patient], dob = nextLocalDate, - assignee = generators.nextOption(nextStringId[User]), + assignee = generators.nextOption(generators.nextId[User]), previousStatus = generators.nextOption(generators.oneOf[Patient.Status](Patient.Status.AllPrevious)), - previousAssignee = generators.nextOption(nextStringId[User]), - lastActiveUserId = generators.nextOption(nextStringId[User]), + previousAssignee = generators.nextOption(generators.nextId[User]), + lastActiveUserId = generators.nextOption(generators.nextId[User]), isUpdateRequired = generators.nextBoolean(), disease = nextCancerType, orderId = generators.nextId(), @@ -171,7 +171,7 @@ object treatmentmatching { def nextPatientIssue(): PatientIssue = PatientIssue( id = nextLongId[PatientIssue], - userId = nextStringId[User], + userId = generators.nextId[User], patientId = nextUuidId[Patient], lastUpdate = nextLocalDateTime, isDraft = generators.nextBoolean(), @@ -181,7 +181,7 @@ object treatmentmatching { def nextPatientHistory(): PatientHistory = PatientHistory( id = nextLongId[PatientHistory], - executor = nextStringId[User], + executor = generators.nextId[User], patientId = nextUuidId[Patient], state = nextPatientState, action = nextPatientAction, diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala index 2bbff90..94bc27a 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala @@ -20,10 +20,10 @@ object trialcuration { id = nextStringId[Trial], externalId = nextUuidId[Trial], status = nextTrialStatus, - assignee = Option(nextStringId[User]), + assignee = Option(generators.nextId[User]), previousStatus = Option(nextPreviousTrialStatus), - previousAssignee = Option(nextStringId[User]), - lastActiveUserId = Option(nextStringId[User]), + previousAssignee = Option(generators.nextId[User]), + lastActiveUserId = Option(generators.nextId[User]), lastUpdate = nextLocalDateTime, phase = generators.nextString(), hypothesisId = Option(nextUuidId[Hypothesis]), @@ -107,7 +107,7 @@ object trialcuration { def nextTrialIssue(): TrialIssue = TrialIssue( id = nextLongId[TrialIssue], - userId = nextStringId[User], + userId = generators.nextId[User], trialId = nextStringId[Trial], lastUpdate = nextLocalDateTime, isDraft = generators.nextBoolean(), @@ -119,7 +119,7 @@ object trialcuration { def nextTrialHistory(): TrialHistory = TrialHistory( id = nextLongId[TrialHistory], - executor = nextStringId[User], + executor = generators.nextId[User], trialId = nextStringId[Trial], state = nextTrialState, action = nextTrialAction, -- cgit v1.2.3