Search in sources :

Example 1 with Timestamp

use of org.openehealth.ipf.commons.ihe.xds.core.metadata.Timestamp in project ipf by oehf.

the class DateOfBirthPIDTransformerTest method testFromHL7.

@Test
public void testFromHL7() {
    var patientInfo = new PatientInfo();
    patientInfo.getHl7FieldIterator("PID-7").add("19800102030405-0100^sdf");
    var expected = ZonedDateTime.of(1980, 1, 2, 3, 4, 5, 0, ZoneId.of("-01:00"));
    assertEquals(new Timestamp(expected, Timestamp.Precision.SECOND), patientInfo.getDateOfBirth());
}
Also used : PatientInfo(org.openehealth.ipf.commons.ihe.xds.core.metadata.PatientInfo) Timestamp(org.openehealth.ipf.commons.ihe.xds.core.metadata.Timestamp) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 PatientInfo (org.openehealth.ipf.commons.ihe.xds.core.metadata.PatientInfo)1 Timestamp (org.openehealth.ipf.commons.ihe.xds.core.metadata.Timestamp)1