public function processMarkActiveAction() { $id = (int) $this->_getParam('id'); $active = (int) $this->_getParam('active'); $patientAllergy = new PatientAllergy(); $patientAllergy->patientAllergyId = $id; $ret = false; if ($patientAllergy->populate()) { $patientAllergy->active = $active; $patientAllergy->persist(); $ret = true; } $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json'); $json->suppressExit = true; $json->direct($ret); }
public function processMarkEnteredInErrorAction() { $id = (int) $this->_getParam('id'); $patientAllergy = new PatientAllergy(); $patientAllergy->patientAllergyId = $id; $patientAllergy->populate(); if ($patientAllergy->patientId > 0) { $patientAllergy->enteredInError = 1; $patientAllergy->persist(); } $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json'); $json->suppressExit = true; $json->direct(true); }