public function indexAction()
 {
     $enumAr = Enumeration::getEnumArray('Gender', 'key');
     var_dump($enumAr);
     exit;
     $this->render();
 }
 public function editAction()
 {
     $personId = (int) $this->_getParam('personId');
     if (isset($this->_session->messages)) {
         $this->view->messages = $this->_session->messages;
     }
     $this->_form = new WebVista_Form(array('name' => 'provider-detail'));
     $this->_form->setAction(Zend_Registry::get('baseUrl') . "admin-providers.raw/edit-process");
     $this->_provider = new Provider();
     $this->_provider->person_id = $personId;
     if (!$this->_provider->populate()) {
         if ($personId > 0) {
             //handle case where person exists but no provider record
             $this->view->noProvider = true;
         }
         //do nothing if personId is 0, no person selected yet
     }
     $this->_form->loadORM($this->_provider, 'provider');
     //var_dump($this->_form);
     $this->view->form = $this->_form;
     $this->view->person = $this->_provider;
     $stations = Enumeration::getEnumArray(Routing::ENUM_PARENT_NAME);
     $stations = array_merge(array('' => ''), $stations);
     $this->view->stations = $stations;
     $specialties = array('' => '');
     $listSpecialties = Provider::getListSpecialties();
     // temporarily use AM = American Medical Association
     foreach ($listSpecialties['AM'] as $specialty) {
         $specialties[$specialty['code']] = $specialty['description'];
     }
     $this->view->specialties = $specialties;
     $this->view->colors = Room::getColorList();
     $this->render('edit');
 }
 public function indexAction()
 {
     $enumAr = Enumeration::getEnumArray("Gender", "key", "name");
     var_dump($enumAr);
     exit;
     $this->render();
 }
 public function ajaxGetMenuAction()
 {
     $menus = array();
     $menus[] = array('text' => __('Add Column'), 'id' => 'add_column');
     $menus[] = array('text' => __('Remove This Column'), 'id' => 'remove_column');
     $menus[] = array('text' => __('Select Date'), 'id' => 'select_date');
     $menus[] = array('text' => __('Edit This Appointment'), 'id' => 'edit_appointment');
     $menus[] = array('text' => __('Create Visit'), 'id' => 'create_visit');
     $menus[] = array('text' => __('Add Payment'), 'id' => 'add_payment');
     $menus[] = array('text' => __('Cancel Move'), 'id' => 'cancel_move');
     $menus[] = array('text' => __('Find First'), 'id' => 'find_first');
     $menus[] = array('text' => __('Time Search'), 'id' => 'timeSearch');
     $this->view->menus = $menus;
     $this->view->stations = Enumeration::getEnumArray(Routing::ENUM_PARENT_NAME);
     header('Content-Type: application/xml;');
     $this->render('ajax-get-menu');
 }
Esempio n. 5
0
 public function getDisplayMaritalStatus()
 {
     static $maritalStatuses = null;
     if ($maritalStatuses === null) {
         $maritalStatuses = Enumeration::getEnumArray('Marital Status', 'key');
     }
     $maritalStatus = $this->marital_status;
     if (isset($maritalStatuses[$maritalStatus])) {
         $maritalStatus = $maritalStatuses[$maritalStatus];
     }
     return $maritalStatus;
 }
 function listMenuXmlAction()
 {
     header('Content-Type: application/xml;');
     $this->view->flags = Enumeration::getEnumArray('Problem List Flags');
     $this->render('list-menu-xml');
 }
 public function editRoomAction()
 {
     $id = (int) $this->_getParam('id');
     $enumerationId = (int) $this->_getParam('enumerationId');
     $enumerationsClosure = new EnumerationsClosure();
     $parentId = $enumerationsClosure->getParentById($enumerationId);
     $enumeration = new Enumeration();
     $enumeration->enumerationId = $parentId;
     $enumeration->populate();
     $orm = new Room();
     if ($id > 0) {
         $orm->roomId = $id;
         $orm->populate();
     }
     $orm->buildingId = $enumeration->ormId;
     $form = new WebVista_Form(array('name' => 'edit-room'));
     $form->setAction(Zend_Registry::get('baseUrl') . 'facilities.raw/process-edit-room');
     $form->loadORM($orm, 'Room');
     $form->setWindow('windowEditRoomId');
     $this->view->form = $form;
     $routingStations = Enumeration::getEnumArray(Routing::ENUM_PARENT_NAME);
     $routingStations = array_merge(array('' => ''), $routingStations);
     $this->view->colors = Room::getColorList();
     $this->view->routingStations = $routingStations;
     $this->view->enumerationId = $enumerationId;
     $this->render('edit-room');
 }
 public function editAction()
 {
     $personId = (int) $this->_getParam('personId');
     if (isset($this->_session->messages)) {
         $this->view->messages = $this->_session->messages;
     }
     $this->_form = new WebVista_Form(array('name' => 'person-detail'));
     $this->_form->setAction(Zend_Registry::get('baseUrl') . "admin-persons.raw/edit-process");
     $this->_person = new Person();
     $this->_person->person_id = $personId;
     $this->_person->populate();
     $this->_form->loadORM($this->_person, "Person");
     //var_dump($this->_form);
     $this->view->form = $this->_form;
     $this->view->person = $this->_person;
     $practices = array('' => '');
     $facilityIterator = new FacilityIterator();
     $facilityIterator->setFilter(array('Practice'));
     foreach ($facilityIterator as $practice) {
         $practices[$practice->id] = $practice->name;
     }
     $this->view->practices = $practices;
     $genders = array('' => '');
     $gender = Enumeration::getEnumArray('Gender', 'key');
     foreach ($gender as $key => $value) {
         $genders[$key] = $value;
     }
     $this->view->genders = $genders;
     $maritalStatuses = array('' => '');
     $maritalStatus = Enumeration::getEnumArray('Marital Status', 'key');
     foreach ($maritalStatus as $key => $value) {
         $maritalStatuses[$key] = $value;
     }
     $this->view->maritalStatuses = $maritalStatuses;
     $this->view->statesList = Address::getStatesList();
     $this->view->phoneTypes = PhoneNumber::getListPhoneTypes();
     $this->view->addressTypes = Address::getListAddressTypes();
     $identifierTypes = array('' => '');
     $identifierType = Enumeration::getEnumArray('Identifier Type', 'key');
     foreach ($identifierType as $key => $value) {
         $identifierTypes[$key] = $value;
     }
     $this->view->identifierTypes = $identifierTypes;
     //Person::getListIdentifierTypes();
     $this->render('edit-person');
 }
 public function appointmentsGridContextMenuAction()
 {
     header('Content-Type: application/xml;');
     $this->view->xmlHeader = '<?xml version="1.0" ?>';
     $this->view->stations = Enumeration::getEnumArray(Routing::ENUM_PARENT_NAME);
     $this->render();
 }
 public function filterDemographicsAction()
 {
     $psd = new PatientStatisticsDefinition();
     $psdIterator = $psd->getAllActive();
     $demographics = array('age' => array('name' => 'Age', 'type' => ''), 'gender' => array('name' => 'Gender', 'type' => PatientStatisticsDefinition::TYPE_ENUM, 'options' => Enumeration::getEnumArray('Gender', 'key')), 'marital_status' => array('name' => 'Marital Status', 'type' => PatientStatisticsDefinition::TYPE_ENUM, 'options' => Enumeration::getEnumArray('Marital Status', 'key')));
     foreach ($psdIterator as $row) {
         $tmp = array();
         $tmp['name'] = GrowthChartBase::prettyName($row->name);
         $options = array();
         if ($row->type == PatientStatisticsDefinition::TYPE_ENUM) {
             $enumerationClosure = new EnumerationClosure();
             $options = $enumerationClosure->generatePathsKeyName($row->value);
         }
         $tmp['type'] = $row->type;
         asort($options);
         $tmp['options'] = $options;
         $demographics[$row->name] = $tmp;
     }
     $this->view->demographics = $demographics;
     $this->view->filters = $this->_session->filters['demographics'];
     $operators = array('' => '');
     foreach (Claim::balanceOperators() as $key => $value) {
         $operators[$key] = $value;
     }
     $this->view->operators = $operators;
     $this->render();
 }
 function _buildForm($template)
 {
     foreach ($template as $vital) {
         $elements = array();
         $element = $this->_form->createElement("checkbox", "unavailable");
         $element->setBelongsTo('vitalSignGroup[vitalSignValues][' . (string) $vital->attributes()->label . ']');
         $this->_form->addElement($element);
         $elements[] = "unavailable";
         $element = $this->_form->createElement("checkbox", "refused");
         $element->setBelongsTo('vitalSignGroup[vitalSignValues][' . (string) $vital->attributes()->label . ']');
         $this->_form->addElement($element);
         $elements[] = "refused";
         $elementName = preg_replace('/\\./', '_', (string) $vital->attributes()->title);
         $element = $this->_form->createElement('hidden', 'vital', array('value' => $elementName));
         $element->setBelongsTo('vitalSignGroup[vitalSignValues][' . (string) $vital->attributes()->label . ']');
         $this->_form->addElement($element);
         $elements[] = 'vital';
         $element = $this->_form->createElement((string) $vital->attributes()->type, 'value', array('label' => (string) $vital->attributes()->label));
         $element->setBelongsTo('vitalSignGroup[vitalSignValues][' . (string) $vital->attributes()->label . ']');
         $element->clearDecorators();
         $element->addDecorator('ViewHelper');
         $element->addDecorator('Label', array('tag' => 'dt'));
         if ((string) $vital->script) {
             $element->addDecorator('ScriptTag', array('placement' => 'APPEND', 'tag' => 'script', 'innerHTML' => (string) $vital->script, 'noAttribs' => true));
         }
         $this->_form->addElement($element);
         $elements[] = 'value';
         if ((string) $vital->attributes()->units) {
             $element = $this->_form->createElement("select", "units");
             $element->addMultiOptions(Enumeration::getEnumArray((string) $vital->attributes()->units, "key", "name"));
             $element->setBelongsTo('vitalSignGroup[vitalSignValues][' . (string) $vital->attributes()->label . ']');
             $this->_form->addElement($element);
             $elements[] = "units";
         }
         $this->_form->addDisplayGroup($elements, (string) $vital->attributes()->label);
     }
 }
Esempio n. 12
0
 public function getTIN()
 {
     static $tin = null;
     if ($tin !== null) {
         return $tin;
     }
     $providerTIN = Enumeration::getEnumArray('Provider TIN', 'key');
     if (isset($providerTIN[$this->person_id])) {
         $tin = $providerTIN[$this->person_id];
     }
     return $tin;
 }