BaselineReader { @NotNull BaselineData read(@NotNull EcrfPatient patient) { ImmutableBaselineData.Builder baselineBuilder = ImmutableBaselineData.builder() .demographyStatus(FormStatus.undefined()) .primaryTumorStatus(FormStatus.undefined()) .curatedTumorLocation(ImmutableCuratedTumorLocation.of(null, null, null)) .eligibilityStatus(FormStatus.undefined()) .selectionCriteriaStatus(FormStatus.undefined()) .informedConsentStatus(FormStatus.undefined()) .deathStatus(FormStatus.undefined()) .hospital(getHospital(patient, hospitals)); for (EcrfStudyEvent studyEvent : patient.studyEventsPerOID(STUDY_BASELINE)) { setDemographyData(baselineBuilder, studyEvent); setPrimaryTumorData(baselineBuilder, studyEvent, patient.patientId()); setRegistrationAndBirthData(baselineBuilder, studyEvent); setInformedConsent(baselineBuilder, studyEvent); } setDeathData(baselineBuilder, patient); return baselineBuilder.build(); } BaselineReader(@NotNull TumorLocationCurator tumorLocationCurator, @NotNull Map<Integer, String> hospitals);   }
@Test public void canReadEmptyBaselineInfo() { Map<Integer, String> hospitals = Maps.newHashMap(); BaselineReader baselineReader = new BaselineReader(TestCuratorFactory.tumorLocationCurator(), hospitals); EcrfPatient cpctPatient = new EcrfPatient("patient", Maps.newHashMap(), Lists.newArrayList()); BaselineData baselineData = baselineReader.read(cpctPatient); assertNotNull(baselineData); }