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());
}