diff options
author | vlad <vlad@driver.xyz> | 2017-07-14 10:38:59 -0700 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-07-14 10:38:59 -0700 |
commit | 8353cc012328744c7cdfe0436e23d5e565bea570 (patch) | |
tree | 9ece288a43f30c3bd50393dd28fe17bf54b5e717 /src/main/scala/xyz/driver/pdsuidomain/formats/json | |
parent | 93eb4829c0d11959709e18a7b489343550633e83 (diff) | |
download | rest-query-8353cc012328744c7cdfe0436e23d5e565bea570.tar.gz rest-query-8353cc012328744c7cdfe0436e23d5e565bea570.tar.bz2 rest-query-8353cc012328744c7cdfe0436e23d5e565bea570.zip |
Clean-up + New User constructor from Driver User
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/linkedpatient/ApiLinkedPatient.scala | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/linkedpatient/ApiLinkedPatient.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/linkedpatient/ApiLinkedPatient.scala deleted file mode 100644 index 327bda2..0000000 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/linkedpatient/ApiLinkedPatient.scala +++ /dev/null @@ -1,29 +0,0 @@ -package xyz.driver.pdsuidomain.formats.json.linkedpatient - -import java.util.UUID - -import play.api.libs.json.{Format, Json} -import xyz.driver.pdsuicommon.domain._ -import xyz.driver.pdsuidomain.services.LinkedPatientService.RichLinkedPatient - -final case class ApiLinkedPatient(email: String, name: String, patientId: UUID, trialId: String) { - - def toDomain = RichLinkedPatient( - email = Email(email), - name = name, - patientId = UuidId(patientId), - trialId = StringId(trialId) - ) -} - -object ApiLinkedPatient { - - implicit val format: Format[ApiLinkedPatient] = Json.format[ApiLinkedPatient] - - def fromDomain(entity: RichLinkedPatient) = ApiLinkedPatient( - email = entity.email.value, - name = entity.name, - patientId = entity.patientId.id, - trialId = entity.trialId.id - ) -} |