aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/entities/eligibility.scala
diff options
context:
space:
mode:
authorMarvin Bertin <marvin.bertin@gmail.com>2017-10-03 13:08:00 -0700
committerMarvin Bertin <marvin.bertin@gmail.com>2017-10-03 13:08:00 -0700
commit0653b90dddc294fddb0e81059aef00b202113d78 (patch)
tree3d8abb424b0f0495f1cbb18849184dd20d6897fc /src/main/scala/xyz/driver/pdsuidomain/entities/eligibility.scala
parent5750f2f3633e75f2f96d6a36264ab4b8f3fec7d2 (diff)
parenta321a978353439fc516b0f2016c28fb32ba1b7ae (diff)
downloadrest-query-0653b90dddc294fddb0e81059aef00b202113d78.tar.gz
rest-query-0653b90dddc294fddb0e81059aef00b202113d78.tar.bz2
rest-query-0653b90dddc294fddb0e81059aef00b202113d78.zip
Merge branch 'master' into add-slot-eligibility-arms
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/entities/eligibility.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/entities/eligibility.scala63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/eligibility.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/eligibility.scala
new file mode 100644
index 0000000..1a900ac
--- /dev/null
+++ b/src/main/scala/xyz/driver/pdsuidomain/entities/eligibility.scala
@@ -0,0 +1,63 @@
+package xyz.driver.pdsuidomain.entities
+
+import xyz.driver.core.Id
+import xyz.driver.core.date.Date
+import xyz.driver.entities.assays.AssayType
+import xyz.driver.entities.clinic.{ClinicalRecord, TestOrder}
+import xyz.driver.entities.common.FullName
+import xyz.driver.entities.labels.{Label, LabelValue}
+import xyz.driver.entities.patient.CancerType
+import xyz.driver.entities.process.ProcessStepExecutionStatus
+import xyz.driver.entities.report.Report
+import xyz.driver.pdsuidomain.entities.export.trial.ExportTrialWithLabels
+
+object eligibility {
+
+ sealed trait EvidenceDocument {
+ val documentType: DocumentType
+ val providerType: ProviderType
+ val providerName: Option[String]
+ val date: Option[Date]
+ val isDriverDocument: Boolean
+ }
+
+ final case class MolecularEvidenceDocument(documentType: DocumentType,
+ providerType: ProviderType,
+ providerName: Option[String],
+ date: Option[Date],
+ reportId: Id[Report],
+ reportType: AssayType,
+ isDriverDocument: Boolean = true)
+ extends EvidenceDocument
+
+ final case class ClinicalEvidenceDocument(documentId: Id[ClinicalEvidenceDocument],
+ documentType: DocumentType,
+ providerType: ProviderType,
+ providerName: Option[String],
+ date: Option[Date],
+ requestId: Id[ClinicalRecord],
+ isDriverDocument: Boolean = false)
+ extends EvidenceDocument
+
+ // Some fields are optional because they are not in the backend response
+ final case class Evidence(evidenceId: Option[Id[Evidence]],
+ evidenceText: String,
+ labelValue: LabelValue,
+ document: EvidenceDocument,
+ isPrimaryValue: Option[Boolean] = None)
+
+ final case class LabelEvidence(label: Label, evidence: Seq[Evidence] = Seq.empty)
+
+ final case class LabelMismatchRank(label: Label,
+ score: Int,
+ trials: Seq[ExportTrialWithLabels],
+ evidence: Seq[Evidence])
+ final case class MismatchRankedLabels(data: Seq[LabelMismatchRank], labelVersion: Int)
+
+ final case class MatchedPatient(patientId: Id[xyz.driver.entities.patient.Patient],
+ name: FullName[xyz.driver.entities.patient.Patient],
+ birthDate: Date,
+ orderId: Id[TestOrder],
+ disease: CancerType,
+ patientDataStatus: ProcessStepExecutionStatus)
+}