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:09:49 -0700
committerMarvin Bertin <marvin.bertin@gmail.com>2017-10-03 13:09:49 -0700
commit98d6f3d136a16310300e23b12e6b730ac7ade6b6 (patch)
tree34ef97bc59f3c34d20a18cd65107655d319097fc /src/main/scala/xyz/driver/pdsuidomain/entities/eligibility.scala
parent1d0202a3964637ffb93180a1c89617633ab5ab18 (diff)
parent0653b90dddc294fddb0e81059aef00b202113d78 (diff)
downloadrest-query-98d6f3d136a16310300e23b12e6b730ac7ade6b6.tar.gz
rest-query-98d6f3d136a16310300e23b12e6b730ac7ade6b6.tar.bz2
rest-query-98d6f3d136a16310300e23b12e6b730ac7ade6b6.zip
Merge branch 'add-slot-eligibility-arms' into trial-46-disease-entity
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)
+}