@Test public void toSjukfallFormat() { final IntygsData from = createIntygsData(); final List<IntygData> intygDataList = IntygstjanstConverter.toSjukfallFormat(Collections.singletonList(from)); assertThat(intygDataList).hasSize(1); final IntygData to = intygDataList.get(0); assertThat(to.getIntygId()).isEqualTo(from.getIntygsId()); assertThat(to.getPatientId()).isEqualTo(from.getPatient().getPersonId().getExtension()); assertThat(to.getPatientNamn()).isEqualTo(from.getPatient().getFullstandigtNamn()); assertThat(to.getLakareId()).isEqualTo(from.getSkapadAv().getPersonalId().getExtension()); assertThat(to.getLakareNamn()).isEqualTo(from.getSkapadAv().getFullstandigtNamn()); assertThat(to.getDiagnosKod().getOriginalCode()).isEqualTo(from.getDiagnoskod()); assertThat(to.getFormagor()).hasSize(1); assertThat(to.getFormagor().get(0).getStartdatum()).isEqualTo(from.getArbetsformaga().getFormaga().get(0).getStartdatum()); assertThat(to.getFormagor().get(0).getSlutdatum()).isEqualTo(from.getArbetsformaga().getFormaga().get(0).getSlutdatum()); assertThat(to.getFormagor().get(0).getNedsattning()).isEqualTo(from.getArbetsformaga().getFormaga().get(0).getNedsattning()); assertThat(to.isEnkeltIntyg()).isEqualTo(from.isEnkeltIntyg()); assertThat(to.getSigneringsTidpunkt()).isEqualTo(from.getSigneringsTidpunkt()); }
public static List<IntygData> toSjukfallFormat(final List<IntygsData> intygsDataList) { return toSjukfallFormat(intygsDataList.stream()); }
IntygstjanstConverter { public static List<IntygData> toSjukfallFormat(final List<IntygsData> intygsDataList) { return toSjukfallFormat(intygsDataList.stream()); } }
IntygstjanstConverter { public static List<IntygData> toSjukfallFormat(final List<IntygsData> intygsDataList) { return toSjukfallFormat(intygsDataList.stream()); } private  IntygstjanstConverter(); }
IntygstjanstConverter { public static List<IntygData> toSjukfallFormat(final List<IntygsData> intygsDataList) { return toSjukfallFormat(intygsDataList.stream()); } private  IntygstjanstConverter(); static List<IntygData> toSjukfallFormat(final List<IntygsData> intygsDataList); }
IntygstjanstConverter { public static List<IntygData> toSjukfallFormat(final List<IntygsData> intygsDataList) { return toSjukfallFormat(intygsDataList.stream()); } private  IntygstjanstConverter(); static List<IntygData> toSjukfallFormat(final List<IntygsData> intygsDataList);  }