private void prepareConceptOfDeath() throws ConceptNameAlreadyInUseException { OpenMRSConcept concept = new OpenMRSConcept(); OpenMRSConceptName conceptName = new OpenMRSConceptName("FooConceptOne"); concept.setNames(Arrays.asList(conceptName)); concept.setDataType("TEXT"); concept.setConceptClass("Test"); String uuid = conceptAdapter.createConcept(concept).getUuid(); causeOfDeath = conceptAdapter.getConceptByUuid(uuid); }
@After public void tearDown() throws InterruptedException, PatientNotFoundException { String uuid = patient.getFacility().getFacilityId(); deletePatient(patient); if (uuid != null) { facilityAdapter.deleteFacility(uuid); } conceptAdapter.deleteConcept(causeOfDeath.getUuid()); eventListenerRegistry.clearListenersForBean("mrsTestListener"); }