(C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011 (C) OpenEyes Foundation, 2011-2013 This file is part of OpenEyes. OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see .
Author: OpenEyes (info@openeyes.org.uk)
Beispiel #1
0
 /**
  * Appends information about the submission of the application to the $record.
  *
  * @param array $record
  * @param int   $event_id
  */
 protected function appendSubmissionValues(&$record, $event_id)
 {
     if (@$_GET['submission']) {
         $event = Event::model()->findByPk($event_id);
         $svc = new OphCoTherapyapplication_Processor($event);
         $record['submission_status'] = $svc->getApplicationStatus();
         if ($record['submission_status'] == OphCoTherapyapplication_Processor::STATUS_SENT) {
             $most_recent = OphCoTherapyapplication_Email::model()->forEvent($event)->unarchived()->findAll(array('limit' => 1));
             $record['submission_date'] = Helper::convertDate2NHS($most_recent[0]->created_date);
         } else {
             $record['submission_date'] = 'N/A';
         }
     }
 }
Beispiel #2
0
 * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <*****@*****.**>
 * @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust
 * @copyright Copyright (c) 2011-2013, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<?php 
$this->beginContent('//patient/event_container');
$form = $this->beginWidget('BaseEventTypeCActiveForm', array('id' => 'clinical-create', 'enableAjaxValidation' => false, 'focus' => '#procedure_id', 'layoutColumns' => array('label' => 2, 'field' => 10)));
$this->event_actions[] = EventAction::button('Save', 'save', array('level' => 'save'), array('form' => 'clinical-create'));
$service = new OphCoTherapyapplication_Processor($this->event);
if ($service->getApplicationStatus() == $service::STATUS_SENT) {
    ?>
		<div class="alertBox">
			<strong>WARNING: This application has already been sent.  Editing it will allow it to be re-sent.</strong>
		</div>
	<?php 
}
?>
	<?php 
$this->displayErrors($errors);
?>
	<?php 
$this->renderOpenElements($this->action->id, $form);
?>
	<?php 
Beispiel #3
0
 * This file is part of OpenEyes.
 * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <*****@*****.**>
 * @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust
 * @copyright Copyright (c) 2011-2012, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<?php 
$service = new OphCoTherapyapplication_Processor($this->event);
$status = $service->getApplicationStatus();
$warnings = $service->getProcessWarnings();
if (!$warnings && !$this->event->isLocked()) {
    if ($status != $service::STATUS_SENT) {
        $nonCompliant = $service->isEventNonCompliant();
        if ($nonCompliant) {
            $preview_button = EventAction::link('Preview Application', $this->createUrl('previewApplication', array('event_id' => $this->event->id)), null, array('id' => 'application-preview', 'class' => 'button small'));
            $submit_button_text = 'Submit Application';
        } else {
            $preview_button = EventAction::button('Preview Application', null, array('disabled' => true), array('title' => 'Preview unavailable for NICE compliant applications', 'class' => 'button small'));
            $submit_button_text = 'Submit Notification';
        }
        if ($this->checkPrintAccess()) {
            $this->event_actions[] = $preview_button;
        }
 /**
  * Set the event info text to the current status.
  *
  * @return string
  */
 public function getInfotext()
 {
     if ($this->event) {
         $service = new OphCoTherapyapplication_Processor($this->event);
         return $service->getApplicationStatus();
     } else {
         return OphCoTherapyapplication_Processor::STATUS_PENDING;
     }
 }
 public function actionView($id)
 {
     $service = new OphCoTherapyapplication_Processor($this->event);
     $status = $service->getApplicationStatus();
     $this->title = $this->event_type->name . ' (' . $status . ')';
     return parent::actionView($id);
 }