public function processDeleteAction()
 {
     $enumerationId = (int) $this->_getParam("enumerationId");
     $enumerationsClosure = new EnumerationsClosure();
     $enumerationsClosure->deleteEnumeration($enumerationId);
     $data = array();
     $data['msg'] = __("Record deleted successfully");
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct($data);
 }
Esempio n. 2
0
 public static function generateFacilitiesEnum($force = false)
 {
     $ret = false;
     do {
         $name = 'Facilities';
         $key = 'facilities';
         $enumeration = new self();
         $enumeration->populateByEnumerationName($name);
         // check for key existence
         if (strlen($enumeration->key) > 0 && $enumeration->key == $key) {
             if (!$force) {
                 break;
             }
             $enumerationClosure = new EnumerationsClosure();
             $enumerationClosure->deleteEnumeration($enumeration->enumerationId);
         }
         $level0 = array();
         $level0['key'] = $key;
         $level0['name'] = $name;
         $level0['category'] = 'System';
         $level0['active'] = 1;
         $data = array($level0);
         self::_saveEnumeration($data);
         $ret = true;
     } while (false);
     return $ret;
 }
Esempio n. 3
0
 public static function generateChargeTypesEnum($force = false)
 {
     $ret = false;
     do {
         $name = 'Charge Types';
         $key = 'CHG_TYPES';
         $enumeration = new Enumeration();
         $enumeration->populateByUniqueName($name);
         // check for key existence
         if (strlen($enumeration->key) > 0 && $enumeration->key == $key) {
             if (!$force) {
                 break;
             }
             $enumerationClosure = new EnumerationsClosure();
             $enumerationClosure->deleteEnumeration($enumeration->enumerationId);
         }
         $enums = array(array('key' => 'CORRCHARGE', 'name' => 'Correction Charge', 'active' => 1, 'guid' => '46c4a502-01d5-4de6-93fa-443d53b7b33d'), array('key' => 'LABCHARGE', 'name' => 'Labs Charge', 'active' => 1, 'guid' => '427b5de7-8e77-4019-8152-09d7edbe63c6'), array('key' => 'MEDCHARGE', 'name' => 'Medication Charge', 'active' => 1, 'guid' => '1a0b97d2-5a8f-471b-bb90-2ec2d1aacc7b'), array('key' => 'VISITCHG', 'name' => 'Visit Charge', 'active' => 1, 'guid' => 'b73106f0-fbd4-435f-94f3-2e2e02293aae'), array('key' => 'OTHER', 'name' => 'Other', 'active' => 1, 'guid' => 'b309495a-8f4c-4eb0-b558-a81cf79acf13'));
         $level = array();
         $level['guid'] = '5ca94c8c-5198-4461-957b-fa568be9c79e';
         $level['key'] = $key;
         $level['name'] = $name;
         $level['category'] = 'System';
         $level['active'] = 1;
         $level['data'] = $enums;
         $data = array($level);
         self::_saveEnumeration($data);
         $ret = true;
     } while (false);
     return $ret;
 }