diff options
author | Vlad Uspensky <v.uspenskiy@icloud.com> | 2017-11-02 20:40:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-02 20:40:31 -0700 |
commit | aedb5274932db81a32f9d89938636df114dc9a44 (patch) | |
tree | 13a0a8a51f477a4fce2bb8f4d5cd8248de54a73b /src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala | |
parent | 4583af5213b9f7b1e8a06f58321813556763f2d1 (diff) | |
parent | 5515c834853cbe3ce60460a4819a94805cfe24f7 (diff) | |
download | rest-query-aedb5274932db81a32f9d89938636df114dc9a44.tar.gz rest-query-aedb5274932db81a32f9d89938636df114dc9a44.tar.bz2 rest-query-aedb5274932db81a32f9d89938636df114dc9a44.zip |
Merge pull request #59 from drivergroup/common-contextsv0.13.1
Using common request contexts and user objects
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala index 9be26b9..6299ed4 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala @@ -2,12 +2,13 @@ package xyz.driver.pdsuidomain.entities import java.time.{LocalDateTime, ZoneId} +import xyz.driver.core.auth.User import xyz.driver.pdsuicommon.domain._ import xyz.driver.pdsuicommon.logging._ import xyz.driver.pdsuicommon.utils.Utils final case class UserHistory(id: LongId[UserHistory], - executor: StringId[User], + executor: xyz.driver.core.Id[User], recordId: Option[LongId[MedicalRecord]] = None, documentId: Option[LongId[Document]] = None, trialId: Option[StringId[Trial]] = None, @@ -18,7 +19,7 @@ final case class UserHistory(id: LongId[UserHistory], object UserHistory { - def forDocument(executor: StringId[User], + def forDocument(executor: xyz.driver.core.Id[User], documentId: LongId[Document], state: UserHistory.State, action: UserHistory.Action): UserHistory = UserHistory( @@ -29,7 +30,7 @@ object UserHistory { action = action ) - def forRecord(executor: StringId[User], + def forRecord(executor: xyz.driver.core.Id[User], recordId: LongId[MedicalRecord], state: UserHistory.State, action: UserHistory.Action): UserHistory = UserHistory( @@ -40,7 +41,7 @@ object UserHistory { action = action ) - def forPatient(executor: StringId[User], + def forPatient(executor: xyz.driver.core.Id[User], patientId: UuidId[Patient], state: UserHistory.State, action: UserHistory.Action): UserHistory = UserHistory( @@ -138,7 +139,7 @@ object UserHistory { implicit def toPhiString(x: UserHistory): PhiString = { import x._ - phi"UserHistory(id=$id, executor=$executor, recordId=$recordId, " + + phi"UserHistory(id=$id, executor=${Unsafe(executor)}, recordId=$recordId, " + phi"documentId=$documentId, trialId=$trialId, patientId=$patientId, " + phi"state=$state, action=$action, created=$created)" } |