1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
package xyz.driver.pdsuidomain.fakes.entities
import xyz.driver.core.generators
import xyz.driver.entities.clinic.{ClinicalRecord, TestOrder}
import xyz.driver.entities.patient.CancerType
import xyz.driver.entities.report.Report
import xyz.driver.fakes
import xyz.driver.pdsuidomain.entities.eligibility._
object eligibility {
import xyz.driver.core.generators._
def nextMolecularEvidenceDocument(): MolecularEvidenceDocument =
MolecularEvidenceDocument(
documentType = xyz.driver.pdsuidomain.fakes.entities.rep.DocumentGen.nextDocumentType(),
providerType = xyz.driver.pdsuidomain.fakes.entities.rep.MedicalRecordGen.nextProviderType(),
providerName = nextOption(nextString(100)),
date = nextOption(nextDate()),
reportId = nextId[Report](),
reportType = fakes.entities.assays.nextAssayType(),
isDriverDocument = nextBoolean()
)
def nextClinicalEvidenceDocument(): ClinicalEvidenceDocument =
ClinicalEvidenceDocument(
documentType = xyz.driver.pdsuidomain.fakes.entities.rep.DocumentGen.nextDocumentType(),
providerType = xyz.driver.pdsuidomain.fakes.entities.rep.MedicalRecordGen.nextProviderType(),
providerName = nextOption(nextString(100)),
date = nextOption(nextDate()),
documentId = nextId[ClinicalEvidenceDocument](),
requestId = nextId[ClinicalRecord](),
isDriverDocument = nextBoolean()
)
def nextEvidenceDocument(): EvidenceDocument =
oneOf[EvidenceDocument](nextMolecularEvidenceDocument(),
nextClinicalEvidenceDocument(),
nextClinicalEvidenceDocument()) // For more clinical documents
def nextEvidence(): Evidence =
Evidence(
evidenceId = Option(nextId[Evidence]()),
evidenceText = nextString(100),
labelValue = xyz.driver.fakes.entities.labels.nextLabelValue(),
nextEvidenceDocument(),
isPrimaryValue = nextOption(nextBoolean())
)
def nextLabelWithEvidence(): LabelWithEvidence =
LabelWithEvidence(label = fakes.entities.labels.nextLabel(), evidence = Seq.empty)
def nextLabelMismatchRank(): LabelMismatchRank =
LabelMismatchRank(
label = fakes.entities.labels.nextLabel(),
score = nextInt(100),
trials = seqOf(xyz.driver.pdsuidomain.fakes.entities.export.nextExportTrialWithLabels()),
evidence = seqOf(nextEvidence())
)
def nextMismatchRankedLabels(): MismatchRankedLabels =
MismatchRankedLabels(data = seqOf(nextLabelMismatchRank()), labelVersion = nextInt(100))
def nextMatchedPatient(): MatchedPatient =
MatchedPatient(
patientId = nextId[MatchedPatient](),
name = fakes.entities.common.nextFullName[MatchedPatient](),
birthDate = nextDate(),
orderId = nextId[TestOrder](),
disease = generators.oneOf[CancerType](CancerType.Breast, CancerType.Lung, CancerType.Prostate),
patientDataStatus = fakes.entities.process.nextProcessStepExecutionStatus()
)
}
|