Search in sources :

Example 1 with DbUtlatande

use of se.inera.intyg.common.db.model.internal.DbUtlatande in project webcert by sklintyg.

the class CreateUtkastFromTemplateBuilderTest method createIntygContentHolder.

private IntygContentHolder createIntygContentHolder() throws Exception {
    List<Status> status = new ArrayList<>();
    status.add(new Status(CertificateState.RECEIVED, "HSVARD", LocalDateTime.now()));
    status.add(new Status(CertificateState.SENT, "SKV", LocalDateTime.now()));
    DbUtlatande utlatande = new CustomObjectMapper().readValue(new ClassPathResource("IntygDraftServiceImplTest/db-utlatande.json").getFile(), DbUtlatande.class);
    return IntygContentHolder.builder().setContents("<external-json/>").setUtlatande(utlatande).setStatuses(status).setRevoked(false).setRelations(new Relations()).setDeceased(false).setSekretessmarkering(false).setPatientNameChangedInPU(false).setPatientAddressChangedInPU(false).build();
}
Also used : Status(se.inera.intyg.common.support.model.Status) ValidationStatus(se.inera.intyg.common.support.modules.support.api.dto.ValidationStatus) DbUtlatande(se.inera.intyg.common.db.model.internal.DbUtlatande) CustomObjectMapper(se.inera.intyg.common.util.integration.json.CustomObjectMapper) ArrayList(java.util.ArrayList) Relations(se.inera.intyg.webcert.web.web.controller.api.dto.Relations) ClassPathResource(org.springframework.core.io.ClassPathResource)

Aggregations

ArrayList (java.util.ArrayList)1 ClassPathResource (org.springframework.core.io.ClassPathResource)1 DbUtlatande (se.inera.intyg.common.db.model.internal.DbUtlatande)1 Status (se.inera.intyg.common.support.model.Status)1 ValidationStatus (se.inera.intyg.common.support.modules.support.api.dto.ValidationStatus)1 CustomObjectMapper (se.inera.intyg.common.util.integration.json.CustomObjectMapper)1 Relations (se.inera.intyg.webcert.web.web.controller.api.dto.Relations)1