aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/formats
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala2
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabelEvidence.scala2
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabelEvidenceDocument.scala3
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientWithLabels.scala2
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrial.scala2
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialArm.scala2
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialLabelCriterion.scala10
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialWithLabels.scala2
8 files changed, 13 insertions, 12 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala
index 78a73a6..3deccbf 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabel.scala
@@ -12,7 +12,7 @@ object ApiExportPatientLabel {
(JsPath \ "labelId").format[String] and
(JsPath \ "labelName").format[String] and
(JsPath \ "evidence").format[List[ApiExportPatientLabelEvidence]]
- ) (ApiExportPatientLabel.apply, unlift(ApiExportPatientLabel.unapply))
+ )(ApiExportPatientLabel.apply, unlift(ApiExportPatientLabel.unapply))
def fromDomain(label: ExportPatientLabel) = ApiExportPatientLabel(
id = label.id.toString,
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabelEvidence.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabelEvidence.scala
index b38c2a0..9ce281e 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabelEvidence.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabelEvidence.scala
@@ -17,7 +17,7 @@ object ApiExportPatientLabelEvidence {
(JsPath \ "labelValue").format[String](Writes[String](x => JsString(x.toUpperCase))) and
(JsPath \ "evidenceText").format[String] and
(JsPath \ "document").format[ApiExportPatientLabelEvidenceDocument]
- ) (ApiExportPatientLabelEvidence.apply, unlift(ApiExportPatientLabelEvidence.unapply))
+ )(ApiExportPatientLabelEvidence.apply, unlift(ApiExportPatientLabelEvidence.unapply))
def fromDomain(evidence: ExportPatientLabelEvidence) = ApiExportPatientLabelEvidence(
evidenceId = evidence.id.toString,
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabelEvidenceDocument.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabelEvidenceDocument.scala
index d094014..99bb2cf 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabelEvidenceDocument.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientLabelEvidenceDocument.scala
@@ -12,7 +12,6 @@ final case class ApiExportPatientLabelEvidenceDocument(documentId: String,
providerType: String,
date: LocalDate)
-
object ApiExportPatientLabelEvidenceDocument {
implicit val format: Format[ApiExportPatientLabelEvidenceDocument] = (
@@ -21,7 +20,7 @@ object ApiExportPatientLabelEvidenceDocument {
(JsPath \ "documentType").format[String] and
(JsPath \ "providerType").format[String] and
(JsPath \ "date").format[LocalDate]
- ) (ApiExportPatientLabelEvidenceDocument.apply, unlift(ApiExportPatientLabelEvidenceDocument.unapply))
+ )(ApiExportPatientLabelEvidenceDocument.apply, unlift(ApiExportPatientLabelEvidenceDocument.unapply))
def fromDomain(document: ExportPatientLabelEvidenceDocument) =
ApiExportPatientLabelEvidenceDocument(
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientWithLabels.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientWithLabels.scala
index d5b9eb3..8ce970b 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientWithLabels.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportPatientWithLabels.scala
@@ -12,7 +12,7 @@ object ApiExportPatientWithLabels {
(JsPath \ "patientId").format[String] and
(JsPath \ "labelVersion").format[Long] and
(JsPath \ "labels").format[List[ApiExportPatientLabel]]
- ) (ApiExportPatientWithLabels.apply, unlift(ApiExportPatientWithLabels.unapply))
+ )(ApiExportPatientWithLabels.apply, unlift(ApiExportPatientWithLabels.unapply))
def fromDomain(patient: ExportPatientWithLabels) = ApiExportPatientWithLabels(
patientId = patient.patientId.toString,
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrial.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrial.scala
index b12cb93..0c9cb71 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrial.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrial.scala
@@ -15,7 +15,7 @@ object ApiExportTrial {
(JsPath \ "trialId").format[String] and
(JsPath \ "disease").format[String] and
(JsPath \ "lastReviewed").format[Long]
- ) (ApiExportTrial.apply, unlift(ApiExportTrial.unapply))
+ )(ApiExportTrial.apply, unlift(ApiExportTrial.unapply))
def fromDomain(trial: ExportTrial): ApiExportTrial = ApiExportTrial(
nctId = trial.nctId.id,
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialArm.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialArm.scala
index 0b77832..b2b02eb 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialArm.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialArm.scala
@@ -11,7 +11,7 @@ object ApiExportTrialArm {
implicit val format: Format[ApiExportTrialArm] = (
(JsPath \ "armId").format[String] and
(JsPath \ "armName").format[String]
- ) (ApiExportTrialArm.apply, unlift(ApiExportTrialArm.unapply))
+ )(ApiExportTrialArm.apply, unlift(ApiExportTrialArm.unapply))
def fromDomain(arm: ExportTrialArm) = ApiExportTrialArm(
armId = arm.armId.toString,
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialLabelCriterion.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialLabelCriterion.scala
index 09935c0..2564efe 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialLabelCriterion.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialLabelCriterion.scala
@@ -23,12 +23,14 @@ object ApiExportTrialLabelCriterion {
(JsPath \ "armIds").format[List[String]] and
(JsPath \ "isCompound").format[Boolean] and
(JsPath \ "isDefining").format[Boolean]
- ) (ApiExportTrialLabelCriterion.apply, unlift(ApiExportTrialLabelCriterion.unapply))
+ )(ApiExportTrialLabelCriterion.apply, unlift(ApiExportTrialLabelCriterion.unapply))
def fromDomain(x: ExportTrialLabelCriterion) = ApiExportTrialLabelCriterion(
- value = x.value.map { x =>
- FuzzyValue.valueToString(FuzzyValue.fromBoolean(x))
- }.getOrElse("Unknown"),
+ value = x.value
+ .map { x =>
+ FuzzyValue.valueToString(FuzzyValue.fromBoolean(x))
+ }
+ .getOrElse("Unknown"),
labelId = x.labelId.toString,
criterionId = x.criterionId.toString,
criterionText = x.criteria,
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialWithLabels.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialWithLabels.scala
index dd855f7..de76ac0 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialWithLabels.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/export/ApiExportTrialWithLabels.scala
@@ -24,7 +24,7 @@ object ApiExportTrialWithLabels {
(JsPath \ "labelVersion").format[Long] and
(JsPath \ "arms").format[List[ApiExportTrialArm]] and
(JsPath \ "criteria").format[List[ApiExportTrialLabelCriterion]]
- ) (ApiExportTrialWithLabels.apply, unlift(ApiExportTrialWithLabels.unapply))
+ )(ApiExportTrialWithLabels.apply, unlift(ApiExportTrialWithLabels.unapply))
def fromDomain(x: ExportTrialWithLabels) = ApiExportTrialWithLabels(
nctId = x.nctId.id,