use of org.openmrs.module.emrapi.EmrApiActivator in project openmrs-module-mirebalais by PIH.
the class MirebalaisHospitalActivatorIT method beforeEachTest.
@Before
public void beforeEachTest() throws Exception {
initializeInMemoryDatabase();
executeDataSet("requiredDataTestDataset.xml");
executeDataSet("globalPropertiesTestDataset.xml");
executeDataSet("serializedReportingDataset.xml");
executeDataSet("fromMirebalaisMetadataModule.xml");
authenticate();
deployService.installBundle(conceptsFromMetadataSharing);
personAttributeTypeBundle.install();
// run the emrapi activator
EmrApiActivator emrApiActivator = new EmrApiActivator();
emrApiActivator.started();
// set up metatdata from pih core first
PihCoreActivator pihCoreActivator = new PihCoreActivator();
Config config = mock(Config.class);
when(config.getCountry()).thenReturn(ConfigDescriptor.Country.HAITI);
when(config.getSite()).thenReturn(ConfigDescriptor.Site.MIREBALAIS);
when(config.getBiometricsConfig()).thenReturn(new BiometricsConfigDescriptor());
pihCoreActivator.setConfig(config);
pihCoreActivator.started();
MirebalaisHospitalActivator activator = new MirebalaisHospitalActivator();
activator.setTestMode(true);
activator.contextRefreshed();
activator.started();
}
use of org.openmrs.module.emrapi.EmrApiActivator in project openmrs-module-mirebalais by PIH.
the class ZlEmrIdCardPrinterTest method setup.
@Before
public void setup() throws Exception {
EmrApiActivator emrApiActivator = new EmrApiActivator();
emrApiActivator.started();
PrinterModuleActivator printerModuleActivator = new PrinterModuleActivator();
// Create Location Attribute Types Needed
printerModuleActivator.started();
locationTagBundle.install();
locationAttributeTypeBundle.install();
// to install primary identifier type
haitiMetadataBundle.install();
// Install Location Metadata for distribution
mirebalaisLocationsBundle.install();
// Install Patient Identifier Types for distribution
pihHaitiPatientIdentifierTypeBundle.install();
// Install Person Attribute Types for distribution
personAttributeTypeBundle.install();
// Instal Person Attribute Types provided by Haiti Core
haitiPersonAttributeTypeBundle.install();
// Install address template needed for layout on id card
addressBundle.installAddressTemplate();
// Register print handlers
PrinterSetup.registerPrintHandlers(printerService);
Config config = mock(Config.class);
when(config.getCountry()).thenReturn(ConfigDescriptor.Country.HAITI);
when(config.getSite()).thenReturn(ConfigDescriptor.Site.MIREBALAIS);
LocationTagSetup.setupLocationTags(locationService, config);
MetadataMappingsSetup.setupPrimaryIdentifierTypeBasedOnCountry(metadataMappingService, patientService, config);
}
use of org.openmrs.module.emrapi.EmrApiActivator in project openmrs-module-mirebalais by PIH.
the class WristbandComponentTest method setup.
@Before
public void setup() throws Exception {
executeDataSet("wristbandTestDataset.xml");
EmrApiActivator emrApiActivator = new EmrApiActivator();
emrApiActivator.started();
Config config = mock(Config.class);
when(config.getCountry()).thenReturn(ConfigDescriptor.Country.HAITI);
when(config.getSite()).thenReturn(ConfigDescriptor.Site.MIREBALAIS);
MetadataMappingsSetup.setupPrimaryIdentifierTypeBasedOnCountry(metadataMappingService, patientService, config);
}
use of org.openmrs.module.emrapi.EmrApiActivator in project openmrs-module-mirebalais by PIH.
the class MirebalaisHospitalActivatorComponentTest method beforeEachTest.
@Before
public void beforeEachTest() throws Exception {
initializeInMemoryDatabase();
executeDataSet("requiredDataTestDataset.xml");
executeDataSet("globalPropertiesTestDataset.xml");
executeDataSet("mirebalaisProviderIdentifierGeneratorComponentTestDataset.xml");
executeDataSet("fromMirebalaisMetadataModule.xml");
executeDataSet("serializedReportingDataset.xml");
authenticate();
deployService.installBundle(conceptsFromMetadataSharing);
haitiPersonAttributeTypeBundle.install();
// run the emrapi activator
emrApiActivator = new EmrApiActivator();
emrApiActivator.started();
// run the appointmentschedulingui manager
appointmentSchedulingUIActivator = new AppointmentSchedulingUIActivator();
appointmentSchedulingUIActivator.started();
// set up metadata from pih core first
pihCoreActivator = new PihCoreActivator();
Config config = mock(Config.class);
when(config.getCountry()).thenReturn(ConfigDescriptor.Country.HAITI);
when(config.getSite()).thenReturn(ConfigDescriptor.Site.MIREBALAIS);
when(config.getBiometricsConfig()).thenReturn(new BiometricsConfigDescriptor());
pihCoreActivator.setConfig(config);
pihCoreActivator.started();
mirebalaisHospitalActivator = new MirebalaisHospitalActivator();
// TODO: get ReportSetup to work while testing so we no longer need this
mirebalaisHospitalActivator.setTestMode(true);
mirebalaisHospitalActivator.willRefreshContext();
mirebalaisHospitalActivator.contextRefreshed();
mirebalaisHospitalActivator.willStart();
mirebalaisHospitalActivator.started();
}
Aggregations