Search in sources :

Example 6 with LakarutlatandeEnkelType

use of se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType in project webcert by sklintyg.

the class ConvertToFKTypesTest method testToLakarUtlatandeSamordningsnummer.

@Test
public void testToLakarUtlatandeSamordningsnummer() {
    final String intygsId = "intygsId";
    final String patientNamn = "fullständigt namn";
    final String patientId = "999999-9999";
    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.3", res.getPatient().getPersonId().getRoot());
    assertEquals("19999999-9999", 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 7 with LakarutlatandeEnkelType

use of se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType 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)

Aggregations

LakarutlatandeEnkelType (se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType)7 Test (org.junit.Test)3 PatientType (se.inera.ifv.insuranceprocess.healthreporting.v2.PatientType)3 LocalDateTime (java.time.LocalDateTime)2 ArrayList (java.util.ArrayList)2 HosPersonalType (se.inera.ifv.insuranceprocess.healthreporting.v2.HosPersonalType)2 IntygsReferens (se.inera.intyg.webcert.persistence.fragasvar.model.IntygsReferens)2 VardAdresseringsType (se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.VardAdresseringsType)1 SendType (se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificateresponder.v1.SendType)1