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)));
}
Aggregations