/**
 * Function to prepare for sending the PMSFH_panel and PMSFH_right_panel
 * via display_PMSFH('2') and show_PMSFH_panel($PMSFH) respectively,
 * to javascript to display changes to the user.
 * @param associative array $PMSFH if it exists
 * @return json encoded string
 */
function send_json_values($PMSFH = "")
{
    global $pid;
    global $form_id;
    if (!$PMSFH) {
        build_PMSFH();
    }
    $send['PMSFH'] = $PMSFH[0];
    //actual array
    $send['PMH_panel'] = display_PMSFH('2');
    //display PMSFH next to the PMSFH Builder
    $send['right_panel'] = show_PMSFH_panel($PMSFH);
    //display PMSFH in a slidable right-sided panel
    $send['IMPPLAN_items'] = build_IMPPLAN_items($pid, $form_id);
    echo json_encode($send);
}
Beispiel #2
0
            $LENS_TREATMENTS_4 = implode("|", $_POST['LENS_TREATMENTS_4']);
            sqlQuery($query, array($encounter, $form_id, $pid, $rx_number, $_POST['ODSPH_4'], $_POST['ODCYL_4'], $_POST['ODAXIS_4'], $_POST['ODVA_4'], $_POST['ODADD_4'], $_POST['ODNEARVA_4'], $_POST['OSSPH_4'], $_POST['OSCYL_4'], $_POST['OSAXIS_4'], $_POST['OSVA_4'], $_POST['OSADD_4'], $_POST['OSNEARVA_4'], $_POST['ODMIDADD_4'], $_POST['OSMIDADD_4'], 0 + $_POST['RX_TYPE_4'], $_POST['COMMENTS_4'], $_POST['ODHPD_4'], $_POST['ODHBASE_4'], $_POST['ODVPD_4'], $_POST['ODVBASE_4'], $_POST['ODSLABOFF_4'], $_POST['ODVERTEXDIST_4'], $_POST['OSHPD_4'], $_POST['OSHBASE_4'], $_POST['OSVPD_4'], $_POST['OSVBASE_4'], $_POST['OSSLABOFF_4'], $_POST['OSVERTEXDIST_4'], $_POST['ODMPDD_4'], $_POST['ODMPDN_4'], $_POST['OSMPDD_4'], $_POST['OSMPDN_4'], $_POST['BPDD_4'], $_POST['BPDN_4'], $_POST['LENS_MATERIAL_4'], $LENS_TREATMENTS_4));
            $rx_number++;
        } else {
            $query = "DELETE FROM form_eye_mag_wearing where ENCOUNTER=? and PID=? and FORM_ID=? and RX_NUMBER=?";
            sqlQuery($query, array($encounter, $pid, $form_id, '4'));
        }
        for ($i = $rx_number; $i < 5; $i++) {
            $query = "DELETE FROM form_eye_mag_wearing where ENCOUNTER=? and PID=? and FORM_ID=? and RX_NUMBER=?";
            sqlQuery($query, array($encounter, $pid, $form_id, $i));
        }
        //now return the obj
        $send['IMPPLAN_items'] = build_IMPPLAN_items($pid, $form_id);
        $send['Clinical'] = start_your_engines($_REQUEST);
        $send['PMH_panel'] = display_PMSFH('2');
        $send['right_panel'] = show_PMSFH_panel($PMSFH);
        $send['PMSFH'] = $PMSFH[0];
        echo json_encode($send);
        exit;
    }
} elseif ($_REQUEST["mode"] == "retrieve") {
    if ($_REQUEST['PRIORS_query']) {
        echo display_PRIOR_section($_REQUEST['zone'], $_REQUEST['orig_id'], $_REQUEST['id_to_show'], $pid);
        exit;
    }
}
/**
 * Save the canvas drawings
 */
if ($_REQUEST['canvas']) {
    if (!$pid || !$encounter || !$zone || !$_POST["imgBase64"]) {
Beispiel #3
0
// We are building the panel bar with the patient medical info
// Since the "lists" table has a "subtype" field now
// each section could be customized, like SOCHx, subtype "smoking"
// However openEMR stores most of this SocHx data in the layout_options table with
// the form_id='HIS' and group_name='4Lifestyle' fields.
// So we need to conform and pull this information out of the current "History" fields.
// We do this in the eye_mag_functions.php file by creating a new array $PMSFH
// pulling in the issues, Social History, FH and ROS into one place.
// Eye Form uses $PMSFH to build two display options:
// 1. PMH_QP (square panel)
//      - function display_PRIOR_section("PMSFH",$id,$id,$pid) in php/eye_mag_functions.php
//      - creates/populates the PMSFH values to the right of the PMH zone, in the PMH_2: QP zone.
// 2. Right Panel
//      - function show_PMSFH_panel($PMSFH) in php/eye_mag_functions.php
//      - creates/populates the right panel NavBar
echo $output_PMSFH_panel = show_PMSFH_panel($PMSFH);
?>
      </div>
    </div>
    <script>
      $('#left-panel-link').panelslider({side: 'left', clickClose: false, duration: 600, easingOpen: 'easeInBack', easingClose: 'easeOutBack'});
      $('#right-panel-link').panelslider({side: 'right', clickClose: false, duration: 600, easingOpen: 'easeInBack', easingClose: 'easeOutBack'});
      $('#right-panel-link_2').panelslider({side: 'right', clickClose: false, duration: 600, easingOpen: 'easeInBack', easingClose: 'easeOutBack'});
      $('#close-panel-bt').click(function() {
      $.panelslider.close();
      });
      <?php 
if ($PANEL_RIGHT > '0') {
    ?>
        $("#right-panel-link").trigger("click");
        <?php