コード例 #1
0
ファイル: ManageReportsPage.php プロジェクト: rmurray1/RAPTOR
 /**
  * Get all the form contents for rendering
  * @return type renderable array
  */
 function getForm($form, &$form_state, $disabled, $myvalues)
 {
     $form["data_entry_area1"] = array('#prefix' => "\n<section class='user-admin raptor-dialog-table'>\n", '#suffix' => "\n</section>\n");
     $form["data_entry_area1"]['table_container'] = array('#type' => 'item', '#prefix' => '<div class="raptor-dialog-table-container">', '#suffix' => '</div>', '#tree' => TRUE);
     $oContext = \raptor\Context::getInstance();
     $userinfo = $oContext->getUserInfo();
     $userprivs = $userinfo->getSystemPrivileges();
     //Declare instances of all the reports in this array!!!
     $aReports = array(new ViewReport1Page(), new ViewReport2Page(), new ViewReportContraindicationInputs(), new ViewReportContraindicationRules(), new ViewReportRoomReservations(), new ViewReportUserActivity());
     //Construct a page with all the available reports for the user.
     $rows = "\n";
     global $base_url;
     foreach ($aReports as $oReport) {
         //Can this user run this report?
         if ($oReport->hasRequiredPrivileges($userprivs)) {
             //Yes, make the report available.
             $name = $oReport->getName();
             // . '['.$base_url.']';
             $description = $oReport->getDescription();
             $menukey = $oReport->getMenuKey();
             $rows .= "\n" . '<tr><td><a href="javascript:window.location.href=\'' . $base_url . '/' . $menukey . '\'">View ' . $name . ' Report</a></td>' . '<td>' . $description . '</td>' . '</tr>';
         }
     }
     //Finalize the markup.
     $form["data_entry_area1"]['table_container']['lists'] = array('#type' => 'item', '#markup' => '<table class="raptor-dialog-table">' . '<thead><tr><th>Action</th><th>Description</th></tr></thead>' . '<tbody>' . $rows . '</tbody>' . '</table>');
     $form['data_entry_area1']['action_buttons'] = array('#type' => 'item', '#prefix' => '<div class="raptor-action-buttons">', '#suffix' => '</div>', '#tree' => TRUE);
     $form['data_entry_area1']['action_buttons']['cancel'] = array('#type' => 'item', '#markup' => '<input class="raptor-dialog-cancel" type="button" value="Cancel" />');
     return $form;
 }
コード例 #2
0
ファイル: EditUserPage.php プロジェクト: rmurray1/RAPTOR
 function __construct($nUID)
 {
     if (!isset($nUID) || !is_numeric($nUID)) {
         die("Missing or invalid uid value = " . $nUID);
     }
     $this->m_nUID = $nUID;
     $this->m_oPageHelper = new \raptor\UserPageHelper();
     $this->m_oContext = \raptor\Context::getInstance();
 }
コード例 #3
0
 function __construct($rule_nm)
 {
     if (!isset($rule_nm) || is_numeric($rule_nm)) {
         die("Missing or invalid rule_nm value = " . $rule_nm);
     }
     $this->m_oContext = \raptor\Context::getInstance();
     $this->m_rule_nm = $rule_nm;
     $this->m_oPageHelper = new \raptor\ContraIndicationPageHelper();
 }
コード例 #4
0
ファイル: ProtocolInfoPage.php プロジェクト: rmurray1/RAPTOR
 /**
  * Create an instance of the procotol info page.
  * @param \raptor\ContraIndEngine $oCIE
  * @throws \Exception
  */
 function __construct($tid = NULL)
 {
     $loaded = module_load_include('inc', 'raptor_contraindications', 'core/ContraIndEngine');
     if (!$loaded) {
         $msg = 'Failed to load the Contraindication Engine';
         throw new \Exception($msg);
         //This is fatal, so stop everything now.
     }
     $this->m_oContext = \raptor\Context::getInstance();
     $this->m_tid = $tid;
     $this->m_oCIE = NULL;
     $this->m_oUtility = new \raptor\ProtocolInfoUtility();
 }
コード例 #5
0
ファイル: ManageListsPage.php プロジェクト: rmurray1/RAPTOR
 /**
  * Get all the form contents for rendering
  * @return type renderable array
  */
 function getForm($form, &$form_state, $disabled, $myvalues)
 {
     $form["data_entry_area1"] = array('#prefix' => "\n<section class='user-admin raptor-dialog-table'>\n", '#suffix' => "\n</section>\n");
     $form["data_entry_area1"]['table_container'] = array('#type' => 'item', '#prefix' => '<div class="raptor-dialog-table-container">', '#suffix' => '</div>', '#tree' => TRUE);
     $oContext = \raptor\Context::getInstance();
     $userinfo = $oContext->getUserInfo();
     $userprivs = $userinfo->getSystemPrivileges();
     global $base_url;
     $rows = "\n";
     if ($userprivs['ELHO1'] == 1) {
         $rows .= "\n" . '<tr><td><a href="' . $base_url . '/raptor/edithydrationoptions">Edit Hydration Options</a></td>' . '<td>Hydration options are selectable during the protocol process.</td>' . '</tr>';
     }
     if ($userprivs['ELSO1'] == 1) {
         $rows .= "\n" . '<tr><td><a href="' . $base_url . '/raptor/editsedationoptions">Edit Sedation Options</a></td>' . '<td>Sedation options are selectable during the protocol process.</td>' . '</tr>';
     }
     if ($userprivs['ELCO1'] == 1) {
         $rows .= "\n" . '<tr><td><a href="' . $base_url . '/raptor/editcontrastoptions">Edit Contrast Options</a></td>' . '<td>Contrast options are selectable during the protocol process.</td>' . '</tr>';
     }
     if ($userprivs['ELRO1'] == 1) {
         $rows .= "\n" . '<tr><td><a href="' . $base_url . '/raptor/editradioisotopeoptions">Edit Radioisotope Options</a></td>' . '<td>Radioisotope options are selectable during the protocol process.</td>' . '</tr>';
     }
     if ($userprivs['EERL1'] == 1) {
         $rows .= "\n" . '<tr><td><a href="' . $base_url . '/raptor/editexamroomoptions">Edit Examination Room Options</a></td>' . '<td>Exam room options are selectable during the scheduling process.</td>' . '</tr>';
     }
     if ($userprivs['EARM1'] == 1) {
         $url = $base_url . '/raptor/editatriskmeds';
         $name = 'Edit At Risk Medications List';
         $description = 'These keywords are used to highlight medical history of a patient.';
         $rows .= $this->getRowMarkup($url, $name, $description);
         $url = $base_url . '/raptor/editatriskallergycontrast';
         $name = 'Edit Allergy Contrast List';
         $description = 'These keywords are used to detect possible contrast allergies in patient.';
         $rows .= $this->getRowMarkup($url, $name, $description);
         $url = $base_url . '/raptor/editatriskbloodthinner';
         $name = 'Edit Blood Thinner List';
         $description = 'These keywords are used to detect possible blood thinner use by patient.';
         $rows .= $this->getRowMarkup($url, $name, $description);
         $url = $base_url . '/raptor/editatriskrarecontrast';
         $name = 'Edit Rare or Expensive Contrast List';
         $description = 'These keywords are used to detect selection of a rare or expensive contrast which may require advanced procurement or special ordering process.';
         $rows .= $this->getRowMarkup($url, $name, $description);
         $url = $base_url . '/raptor/editatriskrareradioisotope';
         $name = 'Edit Rare or Expensive Radioisotope List';
         $description = 'These keywords are used to detect selection of a rare or expensive radioisotope which may require advanced procurement or special ordering process.';
         $rows .= $this->getRowMarkup($url, $name, $description);
     }
     $form["data_entry_area1"]['table_container']['lists'] = array('#type' => 'item', '#markup' => '<table class="raptor-dialog-table">' . '<thead><tr><th>Action</th><th>Description</th></tr></thead>' . '<tbody>' . $rows . '</tbody>' . '</table>');
     $form['data_entry_area1']['action_buttons'] = array('#type' => 'item', '#prefix' => '<div class="raptor-action-buttons">', '#suffix' => '</div>', '#tree' => TRUE);
     $form['data_entry_area1']['action_buttons']['cancel'] = array('#type' => 'item', '#markup' => '<input class="raptor-dialog-cancel" type="button" value="Cancel" />');
     return $form;
 }
コード例 #6
0
ファイル: SuspendTicketPage.php プロジェクト: rmurray1/RAPTOR
 /**
  * Get the values to populate the form.
  * @return type result of the queries as an array
  */
 function getFieldValues()
 {
     $tid = $this->m_oContext->getSelectedTrackingID();
     $oWL = new \raptor\WorklistData($this->m_oContext);
     $aOneRow = $oWL->getDashboardMap();
     //$tid);
     $nSiteID = $this->m_oContext->getSiteID();
     $nIEN = $tid;
     $nUID = $this->m_oContext->getUID();
     $myvalues = array();
     $myvalues['tid'] = $tid;
     $myvalues['procName'] = $aOneRow['Procedure'];
     $this->m_oContext = \raptor\Context::getInstance();
     $myvalues['tid'] = $this->m_oContext->getSelectedTrackingID();
     //TODO: Pre-populate values for display
     return $myvalues;
 }
コード例 #7
0
 function __construct()
 {
     $this->m_oContext = \raptor\Context::getInstance();
     $this->m_oTT = new \raptor\TicketTrackingData();
 }
コード例 #8
0
<?php

//global $user;
global $raptor_context;
global $raptor_worklist_rows;
if (isset($raptor_worklist_rows["DataRows"])) {
    $data_rows = $raptor_worklist_rows["DataRows"];
    if ($data_rows === null || !is_array($data_rows)) {
        $data_rows = array();
        //Just assign an empty array.
    }
} else {
    $data_rows = array();
    //Just assign an empty array.
}
$m_oContext = \raptor\Context::getInstance();
$m_oUserinfo = $raptor_context->getUserInfo();
$m_aHiddenCols = $m_oUserinfo->getPrefWorklistColsHidden();
//These are the columns we should hide by default.
/*
if($data_rows === null || !is_array($data_rows))
{
   //Work around issue with no data for now. FJF 20140323
   $data_rows = array(
       array("NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA","NO_DATA"),
   );
}
*/
function get_raptor_workflow_status($code, $assignmentdetails = NULL)
{
    $workflowStatusCodes = array("AC" => "Active", "AP" => "Approved", "CO" => "Collaborative", "RV" => "Ready for Review", "PA" => "Protocol Acknowledged", "IA" => "Inactive", "EC" => "Exam Complete", "QA" => "QA");
コード例 #9
0
 function getPageActionButtonsArea(&$form_state, $disabled, $myvalues, $has_uncommitted_data = FALSE, $commited_dt = NULL)
 {
     $oContext = \raptor\Context::getInstance();
     $userinfo = $oContext->getUserInfo();
     $userprivs = $userinfo->getSystemPrivileges();
     $nSiteID = $this->m_oContext->getSiteID();
     $nIEN = $myvalues['tid'];
     $sCWFS = $this->getCurrentWorkflowState($nSiteID, $nIEN);
     $acknowledgeTip = 'Acknowledge the presented protocol so the exam can begin.';
     $examcompletionTip = 'Save all current settings and mark the examination as completed.';
     $interpretationTip = 'Save interpretation notes.';
     $qaTip = 'Save QA notes.';
     if ($oContext->hasPersonalBatchStack()) {
         $sRequestApproveTip = 'Save this order as ready for review and continue with next available personal batch selection.';
         $releaseTip = 'Release this order without saving changes and continue with next available personal batch selection.';
         $reserveTip = 'Assign this order to yourself with current edits saved and continue with the next available personal batch selection.';
         $collaborateTip = 'Assign this order a specialist with current edits saved and continue with the next available personal batch selection.';
         $approveTip = 'Save this order as approved and continue with the next available personal batch selection.';
         $suspendTip = 'Suspend this order without saving edits and continue with the next available personal batch selection.';
         $cancelOrderTip = 'Cancel this order in VISTA and continue with the next available personal batch selection.';
         $sUnsuspendTip = 'Restore this order back to the worklist and continue with next available personal batch selection.';
     } else {
         $sRequestApproveTip = 'Save this order as ready for review and return to the worklist.';
         $releaseTip = 'Release this order without saving changes and return to the worklist.';
         $reserveTip = 'Assign this order to yourself with current edits saved and return to the worklist.';
         $collaborateTip = 'Assign this order to a specialist with current edits saved and return to the worklist.';
         $approveTip = 'Save this order as approved and return to the worklist.';
         $cancelOrderTip = 'Cancel this order in VISTA and return to the worklist.';
         $suspendTip = 'Suspend this order without saving changes and return to the worklist.';
         $sUnsuspendTip = 'Restore this order back to the worklist.';
     }
     $feedback = NULL;
     $form['page_action_buttons_area'] = array('#type' => 'container', '#attributes' => array('class' => array('form-action')));
     if ($sCWFS == 'AP') {
         $form['page_action_buttons_area']['acknowledge_button'] = array('#type' => 'submit', '#value' => t('Acknowledge Protocol'), '#attributes' => array('title' => $acknowledgeTip));
     } else {
         if ($sCWFS == 'PA') {
             $form['page_action_buttons_area']['examcompleted_button'] = array('#type' => 'submit', '#value' => t('Exam Completed'), '#attributes' => array('title' => $examcompletionTip));
         } else {
             if ($sCWFS == 'EC') {
                 $form['page_action_buttons_area']['interpret_button'] = array('#type' => 'submit', '#value' => t('Interpretation Complete'), '#attributes' => array('title' => $interpretationTip));
                 if ($has_uncommitted_data) {
                     $form['page_action_buttons_area']['interpret_button_and_commit'] = array('#type' => 'submit', '#value' => t('Interpretation Complete and Commit Details to Vista'), '#attributes' => array('title' => $interpretationTip), '#disabled' => FALSE);
                 } else {
                     $feedback = 'All procedure data has been committed to Vista';
                     if ($commited_dt != NULL) {
                         $feedback .= ' as of ' . $commited_dt;
                     }
                 }
             } else {
                 if ($sCWFS == 'QA') {
                     $form['page_action_buttons_area']['qa_button'] = array('#type' => 'submit', '#value' => t('QA Complete'), '#attributes' => array('title' => $qaTip));
                     if ($has_uncommitted_data) {
                         $form['page_action_buttons_area']['qa_button_and_commit'] = array('#type' => 'submit', '#value' => t('QA Complete and Commit Details to Vista'), '#attributes' => array('title' => $qaTip), '#disabled' => FALSE);
                     } else {
                         $feedback = 'All procedure data has been committed to Vista';
                         if ($commited_dt != NULL) {
                             $feedback .= ' as of ' . $commited_dt;
                         }
                     }
                 }
             }
         }
     }
     if ($sCWFS == 'AC' || $sCWFS == 'CO' || $sCWFS == 'AP' || $sCWFS == 'RV') {
         if ($userprivs['PWI1'] == 1) {
             if ($sCWFS == 'AC' || $sCWFS == 'CO' || $sCWFS == 'RV') {
                 if ($userprivs['APWI1'] == 1) {
                     $form['page_action_buttons_area']['approve_button'] = array('#type' => 'submit', '#value' => t('Approve'), '#attributes' => array('title' => $approveTip));
                 } else {
                     $form['page_action_buttons_area']['request_approve_button'] = array('#type' => 'submit', '#value' => t('Request Approval'), '#attributes' => array('title' => $sRequestApproveTip));
                 }
                 $form['page_action_buttons_area']['collaborate_button'] = array('#markup' => '<input id="raptor-protocol-collaborate" type="button" value="Collaborate" title="' . $collaborateTip . '">');
             }
         }
     }
     global $base_url;
     $form['page_action_buttons_area']['release_button'] = array('#type' => 'button', '#value' => t('Release back to Worklist without Saving'), '#attributes' => array('onclick' => 'javascript:window.location.href="/drupal/protocol?pbatch=CONTINUE&releasedticket=TRUE";return false;', 'title' => $releaseTip));
     /*
             $form['page_action_buttons_area']['release_button'] = array(
        '#type' => 'link'
      , '#title' => t('Release back to Worklist without Saving')
      , '#href' => $base_url.'/protocol?pbatch=CONTINUE&releasedticket=TRUE'
      , '#attributes' => array('title' => $releaseTip,)
             );
     */
     $form['page_action_buttons_area']['release_button']['#attributes']['class'][] = 'action-button';
     if ($sCWFS == 'AC' || $sCWFS == 'CO' || $sCWFS == 'RV') {
         if ($sCWFS == 'CO') {
             $query = db_select('raptor_ticket_collaboration', 'n');
             $query->join('raptor_user_profile', 'u', 'n.collaborator_uid = u.uid');
             $query->fields('n', array('collaborator_uid', 'requested_dt', 'requester_notes_tx', 'active_yn'));
             $query->fields('u', array('username', 'usernametitle', 'firstname', 'lastname', 'suffix'));
             $query->condition('n.siteid', $nSiteID, '=');
             $query->condition('n.IEN', $nIEN, '=');
             $query->condition('n.active_yn', 1, '=');
             $result = $query->execute();
             $record = $result->fetchAssoc();
             if ($record != NULL) {
                 $fullname = trim($record['usernametitle'] . ' ' . $record['firstname'] . ' ' . $record['lastname'] . ' ' . $record['suffix']);
                 $assignmentBlurb = 'already assigned to ' . $fullname;
             } else {
                 //This should not happen but if it does leave a clue
                 $errMsg = 'Did NOT find name of user assigned for collaboration on ticket ' . $nSiteID . '-' . $nIEN;
                 error_log($errMsg);
                 drupal_set_message($errMsg, 'error');
                 $assignmentBlurb = 'already assigned';
             }
             $form['page_action_buttons_area']['reserve_button'] = array('#type' => 'submit', '#value' => t('Reserve (' . $assignmentBlurb . ')'), '#attributes' => array('title' => $reserveTip));
         } else {
             $form['page_action_buttons_area']['reserve_button'] = array('#type' => 'submit', '#value' => t('Reserve'), '#attributes' => array('title' => $reserveTip));
         }
     }
     if ($userprivs['SUWI1'] == 1 && ($sCWFS != 'EC' && $sCWFS != 'QA')) {
         if ($sCWFS == 'IA') {
             $form['page_action_buttons_area']['unsuspend_button'] = array('#type' => 'submit', '#value' => t('Unsuspend'), '#attributes' => array('title' => $sUnsuspendTip));
         } else {
             /*
                             $form['page_action_buttons_area']['suspend_button'] = array('#type' => 'submit'
                , '#value' => t('Suspend')
                , '#attributes' => array('title' => $suspendTip)
                //, '#submit' => array('raptor_datalayer_protocolinfo_form_builder_customsubmit')
                );
             */
             $form['page_action_buttons_area']['cancelorder_button'] = array('#type' => 'submit', '#value' => t('Cancel Order'), '#attributes' => array('title' => $cancelOrderTip));
         }
     }
     if ($feedback != NULL) {
         $form['page_action_buttons_area']['feedback'] = array('#markup' => ' <span class="action-area-feedback">' . t($feedback) . '</span>');
     }
     $form['page_action_buttons_area']['bottom_filler'] = array('#markup' => '<br><br><br><!-- Bottom gap -->');
     return $form;
 }
コード例 #10
0
 function __construct()
 {
     $this->m_oContext = \raptor\Context::getInstance();
 }
コード例 #11
0
ファイル: UserPageHelper.php プロジェクト: rmurray1/RAPTOR
 /**
  * Get all the form contents for rendering
  * @return type renderable array
  */
 public function getForm($form, &$form_state, $disabled, $myvalues)
 {
     $aOptions = $this->getAllOptions();
     $aFormattedKeywordText = $this->formatKeywordText($myvalues);
     $jsTFtxt = $disabled ? 'true' : 'false';
     drupal_add_js('jQuery(document).ready(function () { initializePrivilegeControls(document.getElementsByName("role_nm")[0].value,all_role_rights,' . $jsTFtxt . '); });', array('type' => 'inline', 'scope' => 'footer', 'weight' => 5));
     $form['data_entry_area1'] = array('#prefix' => "\n<section class='user-profile-dataentry'>\n", '#suffix' => "\n</section>\n", '#disabled' => $disabled);
     $form['#attached']['js'] = array(drupal_get_path('module', 'raptor_glue') . '/js/userPageHelper.js');
     $form['#attributes'] = array('autocomplete' => 'off');
     $form["data_script_area1"]['mydata'] = array('#type' => 'item', '#markup' => "\n<script>\nvar all_role_rights=" . json_encode($aOptions['role_rights']) . "\n</script>\n");
     //The form  mode is carried as a hidden field value.
     $form['data_entry_area1']['formmode'] = array('#type' => 'hidden', '#title' => t('formmode'), '#value' => $myvalues['formmode'], '#required' => TRUE, '#disabled' => FALSE);
     if (isset($myvalues['uid'])) {
         $nUID = $myvalues['uid'];
     } else {
         $nUID = -1;
         //When we are adding a new user.
     }
     $form['data_entry_area1']['uid'] = array('#type' => 'hidden', '#title' => t('uid'), '#value' => $nUID, '#required' => TRUE, '#disabled' => FALSE);
     $form['data_entry_area1']['leftpart'] = array('#type' => 'fieldset', '#attributes' => array('class' => array('data-entry1-area')), '#disabled' => $disabled);
     $oContext = \raptor\Context::getInstance();
     $userinfo = $oContext->getUserInfo();
     $userprivs = $userinfo->getSystemPrivileges();
     if (!isset($userprivs['CEUA1'])) {
         $userprivs['CEUA1'] = 0;
     }
     if ($nUID == 1 && $userprivs['CEUA1'] !== 1) {
         $form['data_entry_area1']['leftpart']['role_nm'] = array('#type' => 'select', '#title' => t('Role'), '#options' => $aOptions['role_nm'], '#default_value' => $myvalues['role_nm'], '#description' => t('The role or this user cannot be changed by your account.'), '#required' => TRUE, '#disabled' => TRUE, '#attributes' => array('onchange' => "initializePrivilegeControls(document.getElementsByName('role_nm')[0].value,all_role_rights,{$jsTFtxt})"));
     } else {
         $form['data_entry_area1']['leftpart']['role_nm'] = array('#type' => 'select', '#title' => t('Role'), '#options' => $aOptions['role_nm'], '#default_value' => $myvalues['role_nm'], '#description' => t('The role of the user.'), '#required' => TRUE, '#disabled' => $disabled, '#attributes' => array('onchange' => "initializePrivilegeControls(document.getElementsByName('role_nm')[0].value,all_role_rights,{$jsTFtxt})"));
     }
     $form['data_entry_area1']['leftpart']['username'] = array('#type' => 'textfield', '#title' => t('Login Name'), '#default_value' => $myvalues['username'], '#size' => 40, '#maxlength' => 128, '#required' => TRUE, '#description' => t('The login name of the user.  This must match their VISTA login name.'), '#disabled' => $disabled, '#attributes' => array('autocomplete' => 'off'));
     $form['data_entry_area1']['leftpart']['password'] = array('#type' => 'password_confirm', '#prefix' => '<div id="edit-password">', '#suffix' => '</div>', '#size' => 40, '#required' => TRUE, '#description' => t('The password for this account.  Pick a strong password and do not share it.'), '#disabled' => $disabled, '#attributes' => array('autocomplete' => 'off'));
     $form['data_entry_area1']['leftpart']['usernametitle'] = array('#type' => 'textfield', '#title' => t('Title'), '#default_value' => $myvalues['usernametitle'], '#size' => 16, '#maxlength' => 16, '#required' => FALSE, '#description' => t('Title for this user (e.g., Mr, Ms, Dr, etc)'), '#disabled' => $disabled);
     $form['data_entry_area1']['leftpart']['firstname'] = array('#type' => 'textfield', '#title' => t('First name'), '#default_value' => $myvalues['firstname'], '#size' => 50, '#maxlength' => 50, '#required' => TRUE, '#description' => t('First name for this user'), '#disabled' => $disabled);
     $form['data_entry_area1']['leftpart']['lastname'] = array('#type' => 'textfield', '#title' => t('Last name'), '#default_value' => $myvalues['lastname'], '#size' => 50, '#maxlength' => 50, '#required' => TRUE, '#description' => t('Last name for this user'), '#disabled' => $disabled);
     $form['data_entry_area1']['leftpart']['suffix'] = array('#type' => 'textfield', '#title' => t('Suffix'), '#default_value' => $myvalues['suffix'], '#size' => 20, '#maxlength' => 20, '#required' => FALSE, '#description' => t('Suffix for this user (e.g., PhD)'), '#disabled' => $disabled);
     $form['data_entry_area1']['rightpart'] = array('#type' => 'fieldset', '#attributes' => array('class' => array('data-entry1-area')), '#disabled' => $disabled);
     $form['data_entry_area1']['rightpart']['prefemail'] = array('#type' => 'textfield', '#title' => t('Preferred email'), '#default_value' => $myvalues['prefemail'], '#size' => 60, '#maxlength' => 128, '#required' => FALSE, '#description' => t('Preferred email for this user'), '#disabled' => $disabled);
     $form['data_entry_area1']['rightpart']['prefphone'] = array('#type' => 'textfield', '#title' => t('Preferred phone'), '#default_value' => $myvalues['prefphone'], '#size' => 50, '#maxlength' => 50, '#required' => FALSE, '#description' => t('Preferred phone number for this user'), '#disabled' => $disabled);
     //The main site admin record CANNOT be disabled.
     if ($nUID != 1) {
         $form['data_entry_area1']['rightpart']['accountactive_yn'] = array('#type' => 'checkbox', '#title' => t('Account active (Y/N)'), '#default_value' => $myvalues['accountactive_yn'], '#description' => t('User is blocked from RAPTOR if account is not active'), '#disabled' => $disabled);
     }
     $form['data_entry_area1']['ticketmgtprivileges'] = array('#type' => 'fieldset', '#title' => t('Ticket Managment Privileges'), '#attributes' => array('class' => array('data-entry1-area')), '#disabled' => $disabled);
     $form['data_entry_area1']['ticketmgtprivileges']['SWI1'] = array('#type' => 'checkbox', '#title' => t('Select worklist items'), '#default_value' => $myvalues['SWI1'], '#disabled' => $disabled);
     $form['data_entry_area1']['ticketmgtprivileges']['PWI1'] = array('#type' => 'checkbox', '#title' => t('Can protocol a ticket'), '#default_value' => $myvalues['PWI1'], '#disabled' => $disabled);
     $form['data_entry_area1']['ticketmgtprivileges']['APWI1'] = array('#type' => 'checkbox', '#title' => t('Can approve a protocol'), '#default_value' => $myvalues['APWI1'], '#disabled' => $disabled);
     $form['data_entry_area1']['ticketmgtprivileges']['SUWI1'] = array('#type' => 'checkbox', '#title' => t('Can suspend a ticket'), '#default_value' => $myvalues['SUWI1'], '#disabled' => $disabled);
     $form['data_entry_area1']['ticketmgtprivileges']['CE1'] = array('#type' => 'checkbox', '#title' => t('Can complete an exam'), '#default_value' => $myvalues['CE1'], '#disabled' => $disabled);
     $form['data_entry_area1']['ticketmgtprivileges']['QA1'] = array('#type' => 'checkbox', '#title' => t('Can QA an exam'), '#default_value' => $myvalues['QA1'], '#disabled' => $disabled);
     $form['data_entry_area1']['ticketmgtprivileges']['SP1'] = array('#type' => 'checkbox', '#title' => t('Can schedule a procedure'), '#default_value' => $myvalues['SP1'], '#disabled' => $disabled);
     $form['data_entry_area1']['accountmgtprivileges'] = array('#type' => 'fieldset', '#title' => t('Account Management Privileges'), '#attributes' => array('class' => array('data-entry1-area')), '#disabled' => $disabled);
     $form['data_entry_area1']['accountmgtprivileges']['CEUA1'] = array('#type' => 'checkbox', '#title' => t('Add/Edit Any User Accounts'), '#default_value' => $myvalues['CEUA1'], '#disabled' => $disabled);
     $form['data_entry_area1']['accountmgtprivileges']['LACE1'] = array('#type' => 'checkbox', '#title' => t('Add/Edit Resident User Accounts'), '#default_value' => $myvalues['LACE1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig'] = array('#type' => 'fieldset', '#title' => t('Sitewide Configuration Privileges'), '#attributes' => array('class' => array('data-entry1-area')), '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['VREP1'] = array('#type' => 'checkbox', '#title' => t('Can view department activity reports'), '#default_value' => $myvalues['VREP1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['VREP2'] = array('#type' => 'checkbox', '#title' => t('Can view user activity reports'), '#default_value' => $myvalues['VREP2'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['EBO1'] = array('#type' => 'checkbox', '#title' => t('Can edit boilerplate text'), '#default_value' => $myvalues['EBO1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['UNP1'] = array('#type' => 'checkbox', '#title' => t('Can upload protocols'), '#default_value' => $myvalues['UNP1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['REP1'] = array('#type' => 'checkbox', '#title' => t('Can retire protocols'), '#default_value' => $myvalues['REP1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['DRA1'] = array('#type' => 'checkbox', '#title' => t('Can define default attributes of roles'), '#default_value' => $myvalues['DRA1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['ELCO1'] = array('#type' => 'checkbox', '#title' => t('Can edit contrast options'), '#default_value' => $myvalues['ELCO1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['ELHO1'] = array('#type' => 'checkbox', '#title' => t('Can edit hydration options'), '#default_value' => $myvalues['ELHO1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['ELSO1'] = array('#type' => 'checkbox', '#title' => t('Can edit list of sedation options'), '#default_value' => $myvalues['ELSO1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['ELSVO1'] = array('#type' => 'checkbox', '#title' => t('Can edit list of service options'), '#default_value' => $myvalues['ELSVO1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['ELRO1'] = array('#type' => 'checkbox', '#title' => t('Can edit radioisotope options'), '#default_value' => $myvalues['ELRO1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['ECIR1'] = array('#type' => 'checkbox', '#title' => t('Can edit contraindication results'), '#default_value' => $myvalues['ECIR1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['EECC1'] = array('#type' => 'checkbox', '#title' => t('Can edit excluded CPRS metadata'), '#default_value' => $myvalues['EECC1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['EERL1'] = array('#type' => 'checkbox', '#title' => t('Can edit examination room list'), '#default_value' => $myvalues['EERL1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['EARM1'] = array('#type' => 'checkbox', '#title' => t('Can edit the list of at risk medication keywords'), '#default_value' => $myvalues['EARM1'], '#disabled' => $disabled);
     $form['data_entry_area1']['sitewideconfig']['CUT1'] = array('#type' => 'checkbox', '#title' => t('Can edit umbrella terms'), '#default_value' => $myvalues['CUT1'], '#disabled' => $disabled);
     $form['data_entry_area1']['worklistpref'] = array('#type' => 'fieldset', '#title' => t('Worklist Preferences'), '#attributes' => array('class' => array('data-entry1-area')), '#disabled' => $disabled);
     $form['data_entry_area1']['worklistpref']['userpref_modality'] = array('#type' => 'checkboxes', '#options' => $aOptions['modality'], '#default_value' => $myvalues['userpref_modality'], '#title' => t('Modalities'), '#description' => t('The modalites for this user'), '#disabled' => $disabled);
     $form['data_entry_area1']['worklistpref']['keywords'] = array('#type' => 'fieldset', '#title' => t('Keywords'), '#attributes' => array('class' => array('data-entry1-area')), '#disabled' => $disabled);
     $form['data_entry_area1']['worklistpref']['keywords']['userpref_keywords1'] = array('#type' => 'textfield', '#title' => t('Most Significant'), '#default_value' => $aFormattedKeywordText['userpref_keywords1'], '#size' => 100, '#maxlength' => 128, '#description' => t('Comma delimited list of most significant keywords'), '#disabled' => $disabled);
     $form['data_entry_area1']['worklistpref']['keywords']['userpref_keywords2'] = array('#type' => 'textfield', '#title' => t('Moderately Significant'), '#default_value' => $aFormattedKeywordText['userpref_keywords2'], '#size' => 100, '#maxlength' => 128, '#description' => t('Comma delimited list of moderately significant keywords'), '#disabled' => $disabled);
     $form['data_entry_area1']['worklistpref']['keywords']['userpref_keywords3'] = array('#type' => 'textfield', '#title' => t('Least Significant'), '#default_value' => $aFormattedKeywordText['userpref_keywords3'], '#size' => 100, '#maxlength' => 128, '#description' => t('Comma delimited list of least significant keywords'), '#disabled' => $disabled);
     $form['data_entry_area1']['collaborationpref'] = array('#type' => 'fieldset', '#title' => t('Collaboration Settings'), '#attributes' => array('class' => array('data-entry1-area')), '#disabled' => $disabled);
     $form['data_entry_area1']['collaborationpref']['specialist_modality'] = array('#type' => 'checkboxes', '#options' => $aOptions['modality'], '#default_value' => $myvalues['specialist_modality'], '#title' => t('Modalities'), '#description' => t('The modalites for this user'), '#disabled' => $disabled);
     $form['data_entry_area1']['collaborationpref']['keywords'] = array('#type' => 'fieldset', '#title' => t('Keywords'), '#attributes' => array('class' => array('data-entry1-area')), '#disabled' => $disabled);
     $form['data_entry_area1']['collaborationpref']['keywords']['specialist_keywords1'] = array('#type' => 'textfield', '#title' => t('Most Significant'), '#default_value' => $aFormattedKeywordText['specialist_keywords1'], '#size' => 100, '#maxlength' => 128, '#description' => t('Comma delimited list of most significant keywords'), '#disabled' => $disabled);
     $form['data_entry_area1']['collaborationpref']['keywords']['specialist_keywords2'] = array('#type' => 'textfield', '#title' => t('Moderately Significant'), '#default_value' => $aFormattedKeywordText['specialist_keywords2'], '#size' => 100, '#maxlength' => 128, '#description' => t('Comma delimited list of moderately significant keywords'), '#disabled' => $disabled);
     $form['data_entry_area1']['collaborationpref']['keywords']['specialist_keywords3'] = array('#type' => 'textfield', '#title' => t('Least Significant'), '#default_value' => $aFormattedKeywordText['specialist_keywords3'], '#size' => 100, '#maxlength' => 128, '#description' => t('Comma delimited list of least significant keywords'), '#disabled' => $disabled);
     return $form;
 }
コード例 #12
0
ファイル: CancelOrdersPage.php プロジェクト: rmurray1/RAPTOR
 /**
  * Get all the form contents for rendering
  * @return type renderable array
  */
 function getForm($form, &$form_state, $disabled, $myvalues)
 {
     $form["data_entry_area1"] = array('#prefix' => "\n<section class='raptor-dialog'>\n", '#suffix' => "\n</section>\n");
     $oContext = \raptor\Context::getInstance();
     $oWL = new \raptor\WorklistData($oContext);
     $raptor_worklist_rows = $oWL->getWorklistRows();
     //$oContext);
     $data_rows = $raptor_worklist_rows["DataRows"];
     $mdwsDao = $oContext->getMdwsClient();
     $aCancelOptions = MdwsUtils::getRadiologyCancellationReasons($mdwsDao);
     $form["data_entry_area1"]['metadata']['cancelreason'] = array('#type' => 'select', '#required' => TRUE, '#empty_value' => '', '#title' => t('Reason for Canceling Selected Orders'), '#options' => $aCancelOptions, '#default_value' => $myvalues['cancelreason'], '#description' => t('Select the reason for canceling the selected orders.'));
     $form["data_entry_area1"]['metadata']['cancelcomment'] = array('#type' => 'textarea', '#required' => FALSE, '#title' => t('Additional Cancellation Reason Comment'), '#default_value' => $myvalues['cancelcomment'], '#description' => t('Additional reason for the cancellation.'));
     $form["data_entry_area1"]['table_container'] = array('#type' => 'item', '#prefix' => '<div class="raptor-dialog-table-container"><p>Each of the rows with a checkmark in the table below is an order that is selected for cancellation.  Only place a checkmark on the orders you intend to cancel.</p>', '#suffix' => '</div>', '#tree' => TRUE);
     $rows = "\n";
     $rowcount = 0;
     foreach ($data_rows as $data_row) {
         $rowcount++;
         if ($rowcount > 100) {
             break;
         }
         if (!is_array($data_row) || count($data_row) == 0) {
             continue;
         }
         $aRankScoreDetails = $data_row[18];
         $score = $aRankScoreDetails[0];
         $aRSComment = $aRankScoreDetails[1];
         $rscomment = '';
         foreach ($aRSComment as $key => $value) {
             $rscomment .= "<br>{$key}={$value}";
         }
         //$rsurl = getRankScoreIcon($score);
         // Change row background color if it is assigned to the current user
         $extra_row_class = is_array($data_row[12]) && $data_row[12]['uid'] == $m_oContext->getUID() ? "special-row" : "";
         $assignmentinfo = is_array($data_row[12]) ? '<span title="' . $data_row[12]['requester_notes_tx'] . '">' . $data_row[12]['fullname'] . '</span>' : $data_row[12];
         $ticketid = $data_row[0];
         $options[$data_row[0]] = array('ticketid' => $ticketid, 'patientname' => $data_row[WorklistData::WLIDX_PATIENTNAME], 'targetdate' => $data_row[3], 'ordereddate' => $data_row[4], 'modality' => $data_row[WorklistData::WLIDX_MODALITY], 'imagetype' => $data_row[17], 'study' => $data_row[WorklistData::WLIDX_STUDY], 'urgency' => $data_row[7], 'transport' => $data_row[WorklistData::WLIDX_TRANSPORT], 'patientlocation' => $data_row[WorklistData::WLIDX_PATIENTCATEGORYLOCATION], 'workflowstatus' => $data_row[WorklistData::WLIDX_WORKFLOWSTATUS], 'assignment' => $assignmentinfo, 'numpending' => $data_row[WorklistData::WLIDX_PENDINGORDERSSAMEPATIENT], 'scheduled' => $data_row[WorklistData::WLIDX_SCHEDINFO]['ShowTx'], 'seemore' => '<a href="#" title="click to see more info" onclick="alert(\'todo show data for ' . $ticketid . '\');return false;">see more</a>');
     }
     $header = array('ticketid' => t('Ticket'), 'patientname' => t('Patient'), 'targetdate' => t('Date Desired'), 'ordereddate' => t('Date Order'), 'modality' => t('Modality'), 'imagetype' => t('Image Type'), 'study' => t('Study'), 'urgency' => t('Urgency'), 'transport' => t('Transport'), 'patientlocation' => t('Patient Category / Location'), 'workflowstatus' => t('Workflow Status'), 'assignment' => t('Assignment'), 'numpending' => t('#P'), 'scheduled' => t('Scheduled'), 'seemore' => t('More Info'));
     $form["data_entry_area1"]['table_container']['orders'] = array('#title' => 'Select Orders to Cancel', '#type' => 'tableselect', '#header' => $header, '#options' => $options, '#empty' => t('No content available.'));
     $form["data_entry_area1"]['table_container']['orders']['#attributes']['class']['dataTable'] = 'dataTable';
     $form['data_entry_area1']['action_buttons'] = array('#type' => 'item', '#prefix' => '<div class="raptor-action-buttons">', '#suffix' => '</div>', '#tree' => TRUE);
     $form['data_entry_area1']['action_buttons']['cancelorder'] = array('#type' => 'submit', '#value' => t('Cancel the Selected Orders'));
     $form['data_entry_area1']['action_buttons']['cancel'] = array('#type' => 'item', '#markup' => '<input class="raptor-dialog-cancel" type="button" value="Exit without Canceling any Orders" />');
     return $form;
 }
コード例 #13
0
ファイル: CancelOrderPage.php プロジェクト: rmurray1/RAPTOR
 /**
  * Perform the change
  */
 function updateDatabase($form, $myvalues)
 {
     //Try to cancel the record now
     $nSiteID = $this->m_oContext->getSiteID();
     $nIEN = $myvalues['tid'];
     $nUID = $this->m_oContext->getUID();
     $sCWFS = $this->m_oTT->getTicketWorkflowState($nSiteID . '-' . $nIEN);
     $updated_dt = date("Y-m-d H:i:s", time());
     $is_okay = TRUE;
     $orderIEN = $nIEN;
     $reasonCode = $myvalues['reason'];
     $cancelcomment = $myvalues['notes_tx'];
     try {
         $oContext = \raptor\Context::getInstance();
         $userinfo = $oContext->getUserInfo();
         //Write a suspend record locally
         //TODO
         //Now cancel the record in VISTA
         $mdwsDao = $oContext->getMdwsClient();
         MdwsUtils::cancelRadiologyOrder($mdwsDao, $reasonCode, $orderIEN);
     } catch (\Exception $ex) {
         $msg = 'Failed to cancel Radiology Order because ' . $ex->getMessage();
         drupal_set_message($msg, 'error');
         error_log($msg . '\\n\\tParams were reasoncode=[' . $reasonCode . '] and IEN=[' . $orderIEN . ']');
         throw $ex;
     }
     //Write success message
     drupal_set_message('Cancelled Order ' . $myvalues['tid'] . ' (' . $myvalues['procName'] . ')');
     return $is_okay;
 }