Search in sources :

Example 6 with BiopsyTreatmentResponseData

use of com.hartwig.hmftools.patientdb.data.BiopsyTreatmentResponseData in project hmftools by hartwigmedical.

the class TreatmentResponseValidationTest method reportsFirstMeasurementAfterTreatmentStart.

@Test
public void reportsFirstMeasurementAfterTreatmentStart() {
    BiopsyTreatmentResponseData matchedResponseFeb2015 = ImmutableBiopsyTreatmentResponseData.builder().from(RESPONSE_FEB2015).treatmentId(TREATMENT_JAN_MAR.id()).build();
    final List<ValidationFinding> findings = PatientValidator.validateTreatmentResponses(CPCT_ID, Lists.newArrayList(TREATMENT_JAN_MAR), Lists.newArrayList(matchedResponseFeb2015));
    assertEquals(1, findings.size());
    findings.stream().map(ValidationFinding::patientId).forEach(id -> assertEquals(CPCT_ID, id));
    final List<String> findingsFields = findings.stream().map(ValidationFinding::ecrfItem).collect(Collectors.toList());
    assertTrue(findingsFields.contains(fields(FORM_TREATMENT, FORM_TUMOR_MEASUREMENT)));
}
Also used : ImmutableBiopsyTreatmentResponseData(com.hartwig.hmftools.patientdb.data.ImmutableBiopsyTreatmentResponseData) BiopsyTreatmentResponseData(com.hartwig.hmftools.patientdb.data.BiopsyTreatmentResponseData) ValidationFinding(com.hartwig.hmftools.common.ecrf.datamodel.ValidationFinding) Test(org.junit.Test)

Aggregations

BiopsyTreatmentResponseData (com.hartwig.hmftools.patientdb.data.BiopsyTreatmentResponseData)6 ValidationFinding (com.hartwig.hmftools.common.ecrf.datamodel.ValidationFinding)4 NotNull (org.jetbrains.annotations.NotNull)4 BiopsyTreatmentData (com.hartwig.hmftools.patientdb.data.BiopsyTreatmentData)3 ImmutableBiopsyTreatmentResponseData (com.hartwig.hmftools.patientdb.data.ImmutableBiopsyTreatmentResponseData)3 LocalDate (java.time.LocalDate)3 EcrfPatient (com.hartwig.hmftools.common.ecrf.datamodel.EcrfPatient)2 BaselineData (com.hartwig.hmftools.patientdb.data.BaselineData)2 BiopsyData (com.hartwig.hmftools.patientdb.data.BiopsyData)2 Patient (com.hartwig.hmftools.patientdb.data.Patient)2 PreTreatmentData (com.hartwig.hmftools.patientdb.data.PreTreatmentData)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 Lists (com.google.common.collect.Lists)1 CpctEcrfModel (com.hartwig.hmftools.common.ecrf.CpctEcrfModel)1 EcrfForm (com.hartwig.hmftools.common.ecrf.datamodel.EcrfForm)1 EcrfItemGroup (com.hartwig.hmftools.common.ecrf.datamodel.EcrfItemGroup)1 EcrfStudyEvent (com.hartwig.hmftools.common.ecrf.datamodel.EcrfStudyEvent)1 FormStatusState (com.hartwig.hmftools.common.ecrf.formstatus.FormStatusState)1 Config (com.hartwig.hmftools.patientdb.Config)1 CuratedTreatment (com.hartwig.hmftools.patientdb.data.CuratedTreatment)1