Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Patient patient = new Patient();
- patient.setPersonId(501);
- Assert.assertNotNull("The patient is null",patient);
- PatientIdentifierType pit = new PatientIdentifierType(2);
- Location location = new Location(1);
- PatientIdentifier pi = new PatientIdentifier("234", pit, location);
- patient.addIdentifier(pi);
- PatientService ps = Context.getPatientService();
- Patient savedPatient =ps.savePatient(patient);
- MohNamesRule mohNamesRule = new MohNamesRule();
- /*given_name="Bruno" middle_name="" family_name="Otterbourg"*/
- /*Result(givenname + " " + middlename + " " + lastname);*/
- Result expected =new Result("Bruno Otterbourg");
- Result actual = mohNamesRule.evaluate(null,savedPatient.getId(),null);
- Assert.assertNotNull("No name was found for the patient",actual);
- //Assert.assertEquals("Given_name does not match","Bruno",patient.getGivenName());
- Assert.assertEquals("A wrong patient name was returned",expected,actual);
Advertisement
Add Comment
Please, Sign In to add comment