2 namespace Carecoordination
;
3 use Carecoordination\Model\CarecoordinationTable
;
4 use Carecoordination\Model\SetupTable
;
5 use Carecoordination\Model\EncounterccdadispatchTable
;
6 use Carecoordination\Model\EncountermanagerTable
;
7 use Zend\Db\ResultSet\ResultSet
;
8 use Zend\Db\TableGateway\TableGateway
;
9 use Zend\ModuleManager\ModuleManager
;
10 use Zend\View\Helper\Openemr\Emr
;
11 use Zend\View\Helper\Openemr\Menu
;
12 use Carecoordination\Model\Progressnote
;
13 use Carecoordination\Model\ProgressnoteTable
;
14 use Carecoordination\Model\Continuitycaredocument
;
15 use Carecoordination\Model\ContinuitycaredocumentTable
;
16 use Carecoordination\Model\CcdTable
;
20 public function getAutoloaderConfig()
23 'Zend\Loader\ClassMapAutoloader' => array(
24 __DIR__
. '/autoload_classmap.php',
26 'Zend\Loader\StandardAutoloader' => array(
27 'namespaces' => array(
28 __NAMESPACE__
=> __DIR__
. '/src/' . __NAMESPACE__
,
35 public function getConfig()
37 return include __DIR__
. '/config/module.config.php';
40 public function init(ModuleManager
$moduleManager)
42 $sharedEvents = $moduleManager->getEventManager()->getSharedManager();
43 $sharedEvents->attach(__NAMESPACE__
, 'dispatch', function($e) {
44 $controller = $e->getTarget();
45 $controller->layout('carecoordination/layout/layout');
46 $route = $controller->getEvent()->getRouteMatch();
47 $controller->getEvent()->getViewModel()->setVariables(array(
48 'current_controller' => $route->getParam('controller'),
49 'current_action' => $route->getParam('action'),
54 public function getServiceConfig()
58 'Carecoordination\Model\CarecoordinationTable' => function($sm) {
59 $tableGateway = $sm->get('Zend\Db\Adapter\Adapter');
60 $table = new CarecoordinationTable($tableGateway);
64 'Carecoordination\Model\EncounterccdadispatchTable' => function($sm) {
65 $tableGateway = $sm->get('Zend\Db\Adapter\Adapter');
66 $table = new EncounterccdadispatchTable($tableGateway);
70 'Carecoordination\Model\EncountermanagerTable' => function($sm) {
71 $tableGateway = $sm->get('Zend\Db\Adapter\Adapter');
72 $table = new EncountermanagerTable($tableGateway);
76 'Carecoordination\Model\SetupTable' => function($sm) {
77 $tableGateway = $sm->get('Zend\Db\Adapter\Adapter');
78 $table = new SetupTable($tableGateway);
82 'Carecoordination\Model\CcdTable' => function($sm) {
83 $tableGateway = $sm->get('Zend\Db\Adapter\Adapter');
84 $table = new CcdTable($tableGateway);
92 public function getViewHelperConfig()
96 // the array key here is the name you will call the view helper by in your view scripts
97 'emr_helper' => function($sm) {
98 $locator = $sm->getServiceLocator(); // $sm is the view helper manager, so we need to fetch the main service manager
99 return new Emr($locator->get('Request'));
101 'menu' => function($sm) {
102 $locator = $sm->getServiceLocator();