Search in sources :

Example 11 with IntygsReferens

use of se.inera.intyg.webcert.persistence.fragasvar.model.IntygsReferens in project webcert by sklintyg.

the class ConvertToFKTypesTest method testToLakarUtlatande.

@Test
public void testToLakarUtlatande() {
    final String intygsId = "intygsId";
    final String patientNamn = "fullstÃĪndigt namn";
    final String patientId = "19121212-1212";
    final LocalDateTime signeringsdatum = LocalDateTime.now();
    IntygsReferens ir = new IntygsReferens();
    ir.setIntygsId(intygsId);
    ir.setPatientNamn(patientNamn);
    ir.setPatientId(createPnr(patientId));
    ir.setSigneringsDatum(signeringsdatum);
    LakarutlatandeEnkelType res = ConvertToFKTypes.toLakarUtlatande(ir);
    assertNotNull(res);
    assertEquals(intygsId, res.getLakarutlatandeId());
    assertNull(res.getPatient().getFullstandigtNamn());
    assertEquals("1.2.752.129.2.1.3.1", res.getPatient().getPersonId().getRoot());
    assertEquals(patientId, res.getPatient().getPersonId().getExtension());
    assertEquals(signeringsdatum, res.getSigneringsTidpunkt());
}
Also used : LocalDateTime(java.time.LocalDateTime) IntygsReferens(se.inera.intyg.webcert.persistence.fragasvar.model.IntygsReferens) LakarutlatandeEnkelType(se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType) Test(org.junit.Test)

Example 12 with IntygsReferens

use of se.inera.intyg.webcert.persistence.fragasvar.model.IntygsReferens in project webcert by sklintyg.

the class ArendeListItemConverterTest method testConvertEmptyVardperson.

@Test
public void testConvertEmptyVardperson() {
    FragaSvar fs = new FragaSvar();
    fs.setIntygsReferens(new IntygsReferens());
    ArendeListItem arende = ArendeListItemConverter.convert(fs);
    assertNull(arende);
}
Also used : ArendeListItem(se.inera.intyg.webcert.web.web.controller.api.dto.ArendeListItem) IntygsReferens(se.inera.intyg.webcert.persistence.fragasvar.model.IntygsReferens) FragaSvar(se.inera.intyg.webcert.persistence.fragasvar.model.FragaSvar) Test(org.junit.Test)

Aggregations

IntygsReferens (se.inera.intyg.webcert.persistence.fragasvar.model.IntygsReferens)12 FragaSvar (se.inera.intyg.webcert.persistence.fragasvar.model.FragaSvar)10 Vardperson (se.inera.intyg.webcert.persistence.fragasvar.model.Vardperson)6 LocalDateTime (java.time.LocalDateTime)4 Test (org.junit.Test)4 LakarutlatandeEnkelType (se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType)2 JsonPath (com.jayway.restassured.path.json.JsonPath)1 Response (com.jayway.restassured.response.Response)1 ArrayList (java.util.ArrayList)1 SOAPFaultException (javax.xml.ws.soap.SOAPFaultException)1 AttributedURIType (org.w3.wsaddressing10.AttributedURIType)1 QuestionToFkType (se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificatequestionresponder.v1.QuestionToFkType)1 SendMedicalCertificateQuestionResponseType (se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificatequestionresponder.v1.SendMedicalCertificateQuestionResponseType)1 SendMedicalCertificateQuestionType (se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificatequestionresponder.v1.SendMedicalCertificateQuestionType)1 HoSPersonal (se.inera.intyg.common.support.model.common.internal.HoSPersonal)1 WebCertServiceException (se.inera.intyg.webcert.common.service.exception.WebCertServiceException)1 Komplettering (se.inera.intyg.webcert.persistence.fragasvar.model.Komplettering)1 IntygContentHolder (se.inera.intyg.webcert.web.service.intyg.dto.IntygContentHolder)1 WebCertUser (se.inera.intyg.webcert.web.service.user.dto.WebCertUser)1 ArendeListItem (se.inera.intyg.webcert.web.web.controller.api.dto.ArendeListItem)1