Search in sources :

Example 1 with NameList

use of com.ibm.streamsx.health.vines.model.NameList in project streamsx.health by IBMStreams.

the class Tests method testPatient.

@Test
public void testPatient() {
    Vines vines = VinesMessageParser.fromJson(simpleMessage);
    Patient patient = vines.getData().getPatient();
    Assert.assertEquals("537e1f98db23c810388ae214", patient.get_id());
    Assert.assertEquals("HO60002", patient.getMRN());
    Assert.assertEquals("VinesIHEAddin", patient.getMRNSource());
    Assert.assertEquals("M", patient.getSex());
    NameList nameList = patient.getNameList();
    Assert.assertTrue(nameList.size() > 0);
    Name name = nameList.get(0);
    Assert.assertEquals("Charles", name.getFirstName());
    Assert.assertEquals("Darwin", name.getLastName());
    Assert.assertEquals("Robert", name.getMiddleName());
    Assert.assertEquals("Mr.", name.getPrefix());
    Assert.assertEquals("I", name.getSuffix());
}
Also used : NameList(com.ibm.streamsx.health.vines.model.NameList) Vines(com.ibm.streamsx.health.vines.model.Vines) Patient(com.ibm.streamsx.health.vines.model.Patient) Name(com.ibm.streamsx.health.vines.model.Name) Test(org.junit.Test)

Aggregations

Name (com.ibm.streamsx.health.vines.model.Name)1 NameList (com.ibm.streamsx.health.vines.model.NameList)1 Patient (com.ibm.streamsx.health.vines.model.Patient)1 Vines (com.ibm.streamsx.health.vines.model.Vines)1 Test (org.junit.Test)1