use of org.openmrs.module.coreapps.htmlformentry.EncounterDiagnosesTagHandler in project openmrs-module-coreapps by openmrs.
the class CoreAppsActivator method contextRefreshed.
/**
* @see ModuleActivator#contextRefreshed()
*/
public void contextRefreshed() {
ConceptService conceptService = Context.getConceptService();
EmrApiProperties emrApiProperties = Context.getRegisteredComponent("emrApiProperties", EmrApiProperties.class);
DispositionService dispositionService = Context.getRegisteredComponent("dispositionService", DispositionService.class);
AdtService adtService = Context.getRegisteredComponent("adtService", AdtService.class);
UiUtils uiUtils = Context.getRegisteredComponent("uiUtils", BasicUiUtils.class);
if (ModuleFactory.isModuleStarted("htmlformentry")) {
HtmlFormEntryService htmlFormEntryService = Context.getService(HtmlFormEntryService.class);
EncounterDiagnosesTagHandler encounterDiagnosesTagHandler = CoreAppsActivator.setupEncounterDiagnosesTagHandler(conceptService, adtService, emrApiProperties, uiUtils);
htmlFormEntryService.addHandler(CoreAppsConstants.HTMLFORMENTRY_ENCOUNTER_DIAGNOSES_TAG_NAME, encounterDiagnosesTagHandler);
EncounterDispositionTagHandler encounterDispositionTagHandler = CoreAppsActivator.setupEncounterDispositionTagHandler(emrApiProperties, dispositionService, adtService);
htmlFormEntryService.addHandler(CoreAppsConstants.HTMLFORMENTRY_ENCOUNTER_DISPOSITION_TAG_NAME, encounterDispositionTagHandler);
htmlFormEntryService.addHandler(CoreAppsConstants.HTMLFORMENTRY_CODED_OR_FREE_TEXT_OBS_TAG_NAME, new CodedOrFreeTextObsTagHandler());
}
log.info("Core Apps Module refreshed");
}
use of org.openmrs.module.coreapps.htmlformentry.EncounterDiagnosesTagHandler in project openmrs-module-coreapps by openmrs.
the class CoreAppsActivator method setupEncounterDiagnosesTagHandler.
/**
* Public static so it can be used in tests
* @param conceptService
* @param emrApiProperties
* @return
*/
public static EncounterDiagnosesTagHandler setupEncounterDiagnosesTagHandler(ConceptService conceptService, AdtService adtService, EmrApiProperties emrApiProperties, UiUtils uiUtils) {
EncounterDiagnosesTagHandler encounterDiagnosesTagHandler = new EncounterDiagnosesTagHandler();
encounterDiagnosesTagHandler.setEmrApiProperties(emrApiProperties);
encounterDiagnosesTagHandler.setConceptService(conceptService);
encounterDiagnosesTagHandler.setAdtService(adtService);
encounterDiagnosesTagHandler.setUiUtils(uiUtils);
return encounterDiagnosesTagHandler;
}
Aggregations