Example #1
0
<?php

include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = add_escape_custom($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_individual_treatment_plan", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Individual Treatment Plan", $newid, "individual_treatment_plan", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_individual_treatment_plan set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), \ndate_of_referal ='" . $_POST["date_of_referal"] . "',\ndcn ='" . $_POST["dcn"] . "',\nicd9 ='" . $_POST["icd9"] . "',\nprognosis ='" . $_POST["prognosis"] . "',\ndiagnosis_description ='" . $_POST["diagnosis_description"] . "',\npresenting_problem ='" . $_POST["presenting_problem"] . "',\nfrequency ='" . $_POST["frequency"] . "',\nduration ='" . $_POST["duration"] . "',\nscope ='" . $_POST["scope"] . "',\nshort_term_goals_1 ='" . $_POST["short_term_goals_1"] . "',\ntime_frame_1 ='" . $_POST["time_frame_1"] . "',\nshort_term_goals_2 ='" . $_POST["short_term_goals_2"] . "',\ntime_frame_2 ='" . $_POST["time_frame_2"] . "',\nshort_term_goals_3 ='" . $_POST["short_term_goals_3"] . "',\ntime_frame_3 ='" . $_POST["time_frame_3"] . "',\nlong_term_goals ='" . $_POST["long_term_goals"] . "',\ndischarge_criteria ='" . $_POST["discharge_criteria"] . "',\nindividual_family_therapy ='" . $_POST["individual_family_therapy"] . "',\nsubstance_abuse ='" . $_POST["substance_abuse"] . "',\ngroup_therapy ='" . $_POST["group_therapy"] . "',\nparenting ='" . $_POST["parenting"] . "',\naction_steps_by_supports ='" . $_POST["action_steps_by_supports"] . "',\nother_supports_name_1 ='" . $_POST["other_supports_name_1"] . "',\nother_supports_name_2 ='" . $_POST["other_supports_name_2"] . "',\nother_supports_contact_1 ='" . $_POST["other_supports_contact_1"] . "',\nother_supports_contact_2 ='" . $_POST["other_supports_contact_2"] . "',\nmedications_1 ='" . $_POST["medications_1"] . "',\nmedications_2 ='" . $_POST["medications_2"] . "',\nreferrals_1 ='" . $_POST["referrals_1"] . "',\nreferrals_2 ='" . $_POST["referrals_2"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #2
0
    $data[$fld] = '';
}
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    if ($k != 'pname' && $k != 'pbdate' && $k != 'md_pid') {
        $data[$k] = $_POST[$k];
        if ($data[$k] == "YYYY-MM-DD") {
            $data[$k] = '';
        }
    }
    //echo "$var\n";
}
if ($_GET["mode"] == "new") {
    if ($encounter == "") {
        $encounter = date("Ymd");
    }
    $newid = formSubmit("form_medical_decision", $data, $_GET["id"], $userauthorized);
    addForm($encounter, "Medical decision", $newid, "medical_decision", $pid, $userauthorized);
    $_SESSION["encounter"] = $encounter;
} elseif ($_GET["mode"] == "update") {
    $q1 = '';
    foreach ($data as $key => $val) {
        $q1 .= "{$key}='{$val}', ";
    }
    sqlInsert("update form_medical_decision set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, {$q1}  date = NOW() where id={$id}");
}
sqlInsert("update patient_data set DOB='" . $_POST['pbdate'] . "' where  id={$pid}");
//$_SESSION["pid"] = $pid;
formHeader("Redirecting....");
formJump();
formFooter();
Example #3
0
<?php

//------------Forms generated from formsWiz
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_dictation", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Speech Dictation", $newid, "dictation", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_dictation set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), dictation='" . $_POST["dictation"] . "', additional_notes='" . $_POST["additional_notes"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #4
0
            sqlQuery($query, array('1', $_REQUEST['LOCKEDBY'], $form_id));
            //go on to save what we want...
        }
    } elseif (!$lock['LOCKED']) {
        // it is not locked yet
        $_REQUEST['LOCKED'] = '1';
        $query = "update " . $table_name . " set LOCKED=?,LOCKEDBY=? where id=?";
        sqlQuery($query, array('1', $_REQUEST['LOCKEDBY'], $form_id));
        //go on to save what we want...
    }
    if (!$_REQUEST['LOCKEDBY']) {
        $_REQUEST['LOCKEDBY'] = rand();
    }
}
if ($_REQUEST["mode"] == "new") {
    $newid = formSubmit($table_name, $_POST, $id, $userauthorized);
    addForm($encounter, $form_name, $newid, $form_folder, $pid, $userauthorized);
} elseif ($_REQUEST["mode"] == "update") {
    // The user has write privileges to work with...
    if ($_REQUEST['action'] == "store_PDF") {
        /*
         * We want to store/overwrite the current PDF version of this encounter's f
         * Currently this is only called 'beforeunload', ie. when you finish the form
         * In this current paradigm, anytime the form is opened, then closed, the PDF
         * is overwritten.  With esign implemented, the PDF should be locked.  I suppose
         * with esign the form can't even be opened so the only way to get to the PDF
         * is through the Documents->Encounters links.
         */
        $query = "select id from categories where name = 'Encounters'";
        $result = sqlStatement($query);
        $ID = sqlFetchArray($result);
Example #5
0
* 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 this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
*
* @package OpenEMR
* @author  Roberto Vasquez <*****@*****.**>
* @link    http://www.open-emr.org 
*/
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    echo attr($var);
    echo "\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_reviewofs", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Review of Systems Checks", $newid, "reviewofs", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_reviewofs set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), fever='" . $_POST["fever"] . "', chills='" . $_POST["chills"] . "', night_sweats='" . $_POST["night_sweats"] . "', weight_loss='" . $_POST["weight_loss"] . "', poor_appetite='" . $_POST["poor_appetite"] . "', insomnia='" . $_POST["insomnia"] . "', fatigued='" . $_POST["fatigued"] . "', depressed='" . $_POST["depressed"] . "', hyperactive='" . $_POST["hyperactive"] . "', exposure_to_foreign_countries='" . $_POST["exposure_to_foreign_countries"] . "', cataracts='" . $_POST["cataracts"] . "', cataract_surgery='" . $_POST["cataract_surgery"] . "', glaucoma='" . $_POST["glaucoma"] . "', double_vision='" . $_POST["double_vision"] . "', blurred_vision='" . $_POST["blurred_vision"] . "', poor_hearing='" . $_POST["poor_hearing"] . "', headaches='" . $_POST["headaches"] . "', ringing_in_ears='" . $_POST["ringing_in_ears"] . "', bloody_nose='" . $_POST["bloody_nose"] . "', sinusitis='" . $_POST["sinusitis"] . "', sinus_surgery='" . $_POST["sinus_surgery"] . "', dry_mouth='" . $_POST["dry_mouth"] . "', strep_throat='" . $_POST["strep_throat"] . "', tonsillectomy='" . $_POST["tonsillectomy"] . "', swollen_lymph_nodes='" . $_POST["swollen_lymph_nodes"] . "', throat_cancer='" . $_POST["throat_cancer"] . "', throat_cancer_surgery='" . $_POST["throat_cancer_surgery"] . "', heart_attack='" . $_POST["heart_attack"] . "', irregular_heart_beat='" . $_POST["irregular_heart_beat"] . "', chest_pains='" . $_POST["chest_pains"] . "', shortness_of_breath='" . $_POST["shortness_of_breath"] . "', high_blood_pressure='" . $_POST["high_blood_pressure"] . "', heart_failure='" . $_POST["heart_failure"] . "', poor_circulation='" . $_POST["poor_circulation"] . "', vascular_surgery='" . $_POST["vascular_surgery"] . "', cardiac_catheterization='" . $_POST["cardiac_catheterization"] . "', coronary_artery_bypass='******', heart_transplant='" . $_POST["heart_transplant"] . "', stress_test='" . $_POST["stress_test"] . "', emphysema='" . $_POST["emphysema"] . "', chronic_bronchitis='" . $_POST["chronic_bronchitis"] . "', interstitial_lung_disease='" . $_POST["interstitial_lung_disease"] . "', shortness_of_breath_2='" . $_POST["shortness_of_breath_2"] . "', lung_cancer='" . $_POST["lung_cancer"] . "', lung_cancer_surgery='" . $_POST["lung_cancer_surgery"] . "', pheumothorax='" . $_POST["pheumothorax"] . "', stomach_pains='" . $_POST["stomach_pains"] . "', peptic_ulcer_disease='" . $_POST["peptic_ulcer_disease"] . "', gastritis='" . $_POST["gastritis"] . "', endoscopy='" . $_POST["endoscopy"] . "', polyps='" . $_POST["polyps"] . "', colonoscopy='" . $_POST["colonoscopy"] . "', colon_cancer='" . $_POST["colon_cancer"] . "', colon_cancer_surgery='" . $_POST["colon_cancer_surgery"] . "', ulcerative_colitis='" . $_POST["ulcerative_colitis"] . "', crohns_disease='" . $_POST["crohns_disease"] . "', appendectomy='" . $_POST["appendectomy"] . "', divirticulitis='" . $_POST["divirticulitis"] . "', divirticulitis_surgery='" . $_POST["divirticulitis_surgery"] . "', gall_stones='" . $_POST["gall_stones"] . "', cholecystectomy='" . $_POST["cholecystectomy"] . "', hepatitis='" . $_POST["hepatitis"] . "', cirrhosis_of_the_liver='" . $_POST["cirrhosis_of_the_liver"] . "', splenectomy='" . $_POST["splenectomy"] . "', kidney_failure='" . $_POST["kidney_failure"] . "', kidney_stones='" . $_POST["kidney_stones"] . "', kidney_cancer='" . $_POST["kidney_cancer"] . "', kidney_infections='" . $_POST["kidney_infections"] . "', bladder_infections='" . $_POST["bladder_infections"] . "', bladder_cancer='" . $_POST["bladder_cancer"] . "', prostate_problems='" . $_POST["prostate_problems"] . "', prostate_cancer='" . $_POST["prostate_cancer"] . "', kidney_transplant='" . $_POST["kidney_transplant"] . "', sexually_transmitted_disease='" . $_POST["sexually_transmitted_disease"] . "', burning_with_urination='" . $_POST["burning_with_urination"] . "', discharge_from_urethra='" . $_POST["discharge_from_urethra"] . "', rashes='" . $_POST["rashes"] . "', infections='" . $_POST["infections"] . "', ulcerations='" . $_POST["ulcerations"] . "', pemphigus='" . $_POST["pemphigus"] . "', herpes='" . $_POST["herpes"] . "', osetoarthritis='" . $_POST["osetoarthritis"] . "', rheumotoid_arthritis='" . $_POST["rheumotoid_arthritis"] . "', lupus='" . $_POST["lupus"] . "', ankylosing_sondlilitis='" . $_POST["ankylosing_sondlilitis"] . "', swollen_joints='" . $_POST["swollen_joints"] . "', stiff_joints='" . $_POST["stiff_joints"] . "', broken_bones='" . $_POST["broken_bones"] . "', neck_problems='" . $_POST["neck_problems"] . "', back_problems='" . $_POST["back_problems"] . "', back_surgery='" . $_POST["back_surgery"] . "', scoliosis='" . $_POST["scoliosis"] . "', herniated_disc='" . $_POST["herniated_disc"] . "', shoulder_problems='" . $_POST["shoulder_problems"] . "', elbow_problems='" . $_POST["elbow_problems"] . "', wrist_problems='" . $_POST["wrist_problems"] . "', hand_problems='" . $_POST["hand_problems"] . "', hip_problems='" . $_POST["hip_problems"] . "', knee_problems='" . $_POST["knee_problems"] . "', ankle_problems='" . $_POST["ankle_problems"] . "', foot_problems='" . $_POST["foot_problems"] . "', insulin_dependent_diabetes='" . $_POST["insulin_dependent_diabetes"] . "', noninsulin_dependent_diabetes='" . $_POST["noninsulin_dependent_diabetes"] . "', hypothyroidism='" . $_POST["hypothyroidism"] . "', hyperthyroidism='" . $_POST["hyperthyroidism"] . "', cushing_syndrom='" . $_POST["cushing_syndrom"] . "', addison_syndrom='" . $_POST["addison_syndrom"] . "', additional_notes='" . $_POST["additional_notes"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #6
0
<?php

//------------Forms generated from formsWiz
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_neurologicalreview", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Neurological Review", $newid, "neurologicalreview", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_neurologicalreview set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), burning='" . $_POST["burning"] . "', confusion='" . $_POST["confusion"] . "', dizziness='" . $_POST["dizziness"] . "', dysphasia='" . $_POST["dysphasia"] . "', facial_tic='" . $_POST["facial_tic"] . "', focal_weakness='" . $_POST["focal_weakness"] . "', forgetfulness='" . $_POST["forgetfulness"] . "', headache='" . $_POST["headache"] . "', hyperesthesia='" . $_POST["hyperesthesia"] . "', lightheadedness='" . $_POST["lightheadedness"] . "', numbness='" . $_POST["numbness"] . "', paralysis='" . $_POST["paralysis"] . "', paresthesia='" . $_POST["paresthesia"] . "', symptoms_of_problems='" . $_POST["symptoms_of_problems"] . "', additional_notes='" . $_POST["additional_notes"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #7
0
<?php

#######################################################
# Progress Notes Form created by Kam Sharifi	      #
# kam@sharmen.com				      #
#######################################################
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_progressnotes", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Progress Notes", $newid, "progressnotes", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_progressnotes set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), prog_p='" . $_POST["prog_p"] . "', prog_r='" . $_POST["prog_r"] . "', prog_bp='" . $_POST["prog_bp"] . "', prog_ht='" . $_POST["prog_ht"] . "', prog_wt='" . $_POST["prog_wt"] . "', prog_temp='" . $_POST["prog_temp"] . "', prog_lmp='" . $_POST["prog_lmp"] . "', prog_last_pap_smear='" . $_POST["prog_last_pap_smear"] . "', prog_last_td_booster='" . $_POST["prog_last_td_booster"] . "', prog_allergies='" . $_POST["prog_allergies"] . "', prog_last_mammogram='" . $_POST["prog_last_mammogram"] . "', prog_present_complaint='" . $_POST["prog_present_complaint"] . "', prog_skin_abn='" . $_POST["prog_skin_abn"] . "', prog_skin_ne='" . $_POST["prog_skin_ne"] . "', prog_head_abn='" . $_POST["prog_head_abn"] . "', prog_head_ne='" . $_POST["prog_head_ne"] . "', prog_eyes_abn='" . $_POST["prog_eyes_abn"] . "', prog_eyes_ne='" . $_POST["prog_eyes_ne"] . "', prog_ears_abn='" . $_POST["prog_ears_abn"] . "', prog_ears_ne='" . $_POST["prog_ears_ne"] . "', prog_nose_abn='" . $_POST["prog_nose_abn"] . "', prog_nose_ne='" . $_POST["prog_nose_ne"] . "', prog_throat_abn='" . $_POST["prog_throat_abn"] . "', prog_throat_ne='" . $_POST["prog_throat_ne"] . "', prog_teeth_abn='" . $_POST["prog_teeth_abn"] . "', prog_teeth_ne='" . $_POST["prog_teeth_ne"] . "', prog_neck_abn='" . $_POST["prog_neck_abn"] . "', prog_neck_ne='" . $_POST["prog_neck_ne"] . "', prog_chest_abn='" . $_POST["prog_chest_abn"] . "', prog_chest_ne='" . $_POST["prog_chest_ne"] . "', prog_breast_abn='" . $_POST["prog_breast_abn"] . "', prog_breast_ne='" . $_POST["prog_breast_ne"] . "', prog_lungs_abn='" . $_POST["prog_lungs_abn"] . "', prog_lungs_ne='" . $_POST["prog_lungs_ne"] . "', prog_heart_abn='" . $_POST["prog_heart_abn"] . "', prog_heart_ne='" . $_POST["prog_heart_ne"] . "', prog_abdomen_abn='" . $_POST["prog_abdomen_abn"] . "', prog_abdomen_ne='" . $_POST["prog_abdomen_ne"] . "', prog_spine_abn='" . $_POST["prog_spine_abn"] . "', prog_spine_ne='" . $_POST["prog_spine_ne"] . "', prog_extremeities_abn='" . $_POST["prog_extremeities_abn"] . "', prog_extremeities_ne='" . $_POST["prog_extremeities_ne"] . "', prog_lowback_abn='" . $_POST["prog_lowback_abn"] . "', prog_lowback_ne='" . $_POST["prog_lowback_ne"] . "', prog_neuro_abn='" . $_POST["prog_neuro_abn"] . "', prog_neuro_ne='" . $_POST["prog_neuro_ne"] . "', prog_rectal_abn='" . $_POST["prog_rectal_abn"] . "', prog_rectal_ne='" . $_POST["prog_rectal_ne"] . "', prog_pelvic_abn='" . $_POST["prog_pelvic_abn"] . "', prog_pelvic_ne='" . $_POST["prog_pelvic_ne"] . "', prog_assessment='" . $_POST["prog_assessment"] . "', prog_plan='" . $_POST["prog_plan"] . "', prog_breast_se='" . $_POST["prog_breast_se"] . "', prog_dental_h='" . $_POST["prog_dental_h"] . "', prog_diagnosis='" . $_POST["prog_diagnosis"] . "', prog_injur_p='" . $_POST["prog_injur_p"] . "', prog_new_treat='" . $_POST["prog_new_treat"] . "', prog_nutrition_e='" . $_POST["prog_nutrition_e"] . "', prog_sexual_p='" . $_POST["prog_sexual_p"] . "', prog_substance_a='" . $_POST["prog_substance_a"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #8
0
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
// escape the strings
foreach ($_POST as $k => $var) {
    $_POST[$k] = add_escape_custom($var);
    // echo "$var\n";
}
/////////////////
// here we check to se if there was an autosave version prior to the real save
$vectAutosave = sqlQuery("SELECT id, autosave_flag, autosave_datetime FROM form_psychiatrisch_onderzoek\n                            WHERE pid = " . $_SESSION["pid"] . " AND groupname='" . $_SESSION["authProvider"] . "' AND user='******' AND\n                            authorized={$userauthorized} AND activity=1\n                            AND autosave_flag=1 \n                            ORDER by id DESC limit 1");
// if yes then update this else insert
if ($vectAutosave['autosave_flag'] == 1 || $_POST["mode"] == "update") {
    if ($_POST["mode"] == "update") {
        $newid = $_POST["id"];
    } else {
        $newid = $vectAutosave['id'];
    }
    $strSql = "UPDATE form_psychiatrisch_onderzoek\n                SET pid = " . $_SESSION["pid"] . ", groupname='" . $_SESSION["authProvider"] . "', user='******', \n                authorized={$userauthorized}, activity=1, date = NOW(), \n                datum_onderzoek='" . $_POST["datum_onderzoek"] . "',\n                reden_van_aanmelding='" . $_POST["reden_van_aanmelding"] . "', \n                conclusie_van_intake='" . $_POST["conclusie_van_intake"] . "',\n                medicatie='" . $_POST["medicatie"] . "',\n                anamnese='" . $_POST["anamnese"] . "',\n                psychiatrisch_onderzoek='" . $_POST["psychiatrisch_onderzoek"] . "',\n                beschrijvende_conclusie='" . $_POST["beschrijvende_conclusie"] . "',\n                behandelvoorstel='" . $_POST["behandelvoorstel"] . "',\n                autosave_flag=1, \n                autosave_datetime=NOW() \n                  WHERE id = " . $newid . ";";
    sqlQuery($strSql);
    //echo "DEBUG :: id=$newid, sql=$strSql<br>";
} else {
    $newid = formSubmit("form_psychiatrisch_onderzoek", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Psychiatric Examination", $newid, "psychiatrisch_onderzoek", $pid, $userauthorized);
    //echo "Debug :: insert<br>";
}
//get timestamp
$result = sqlQuery("SELECT autosave_datetime FROM form_psychiatrisch_onderzoek\n                            WHERE pid = " . $_SESSION["pid"] . " AND groupname='" . $_SESSION["authProvider"] . "' AND user='******' AND\n                            authorized={$userauthorized} AND activity=1 AND id={$newid}\n                            AND autosave_flag=1 \n                            ORDER by id DESC limit 1");
//$timestamp = mysql_result($result, 0);
//output timestamp
echo xl('Last Saved') . ': ' . $result['autosave_datetime'];
Example #9
0
        }
        $field_names[$key] = $pos . $neg;
    } else {
        $field_names[$key] = $_POST[$key];
    }
    if ($field_names[$key] != '') {
        //          $field_names[$key] .= '.';
        $field_names[$key] = preg_replace('/\\s*,\\s*([^,]+)\\./', ' and $1.', $field_names[$key]);
        // replace last comma with 'and' and ending period
    }
}
//end special processing
foreach ($field_names as $k => $var) {
    #if (strtolower($k) == strtolower($var)) {unset($field_names[$k]);}
    $field_names[$k] = formDataCore($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    reset($field_names);
    $newid = formSubmit("form_Initial_New_Patient_Physical_Exam", $field_names, $_GET["id"], $userauthorized);
    addForm($encounter, "Initial New Patient Physical Exam", $newid, "Initial_New_Patient_Physical_Exam", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_Initial_New_Patient_Physical_Exam set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), sweeter='" . $field_names["sweeter"] . "',bloater='" . $field_names["bloater"] . "',grazer='" . $field_names["grazer"] . "',general='" . $field_names["general"] . "',head='" . $field_names["head"] . "',eyes='" . $field_names["eyes"] . "',ears='" . $field_names["ears"] . "',nose='" . $field_names["nose"] . "',throat='" . $field_names["throat"] . "',oral_cavity='" . $field_names["oral_cavity"] . "',dentition='" . $field_names["dentition"] . "',neck='" . $field_names["neck"] . "',heart='" . $field_names["heart"] . "',lung='" . $field_names["lung"] . "',chest='" . $field_names["chest"] . "',breast='" . $field_names["breast"] . "',male='" . $field_names["male"] . "',female='" . $field_names["female"] . "',note='" . $field_names["note"] . "',abdomen='" . $field_names["abdomen"] . "',scar='" . $field_names["scar"] . "',umbilius='" . $field_names["umbilius"] . "',groins='" . $field_names["groins"] . "',extremities='" . $field_names["extremities"] . "',peripheral_pulses='" . $field_names["peripheral_pulses"] . "',right_peripheral_pulses='" . $field_names["right_peripheral_pulses"] . "',left_peripheral_pulses='" . $field_names["left_peripheral_pulses"] . "',neurological='" . $field_names["neurological"] . "',right_neurological='" . $field_names["right_neurological"] . "',left_neurological='" . $field_names["left_neurological"] . "',rectum='" . $field_names["rectum"] . "',pelvic='" . $field_names["pelvic"] . "',assessment='" . $field_names["assessment"] . "',note2='" . $field_names["note2"] . "',recommendations='" . $field_names["recommendations"] . "',note3='" . $field_names["note3"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #10
0
                ), ''
);
print formHint('Note: leave empty to generate a random password automatically');
print formFieldsetClose();
// -------------------------------------------------------------------------------
print formFieldsetOpen('', array(
  'id' => '-x-field-do_not_email_password'
));

print formCheckbox('do_not_email_password', '1', false);
print formLabel(__('Do not email the password'));
print formHint('Note: by default the password will be emailed, but you can prevent this by unchecking this option');
print formFieldsetClose();
// -------------------------------------------------------------------------------
print formFieldsetOpen('', array(
  'id' => '-x-field-is_enabled'
));

print formCheckbox('is_enabled', '1', true);
print formLabel(__('Activate this user?'));
print formFieldsetClose();
// -------------------------------------------------------------------------------
// Print submit
print formSubmit(array(
                   'class' => '-b-button',
                   'name'  => 'submit',
                   'value' => __('Create user')
                 ));
// Close form
print formClose();
?>
Example #11
0
    if ($field_names[$key] != '') {
        //          $field_names[$key] .= '.';
        $field_names[$key] = preg_replace('/\\s*,\\s*([^,]+)\\./', ' and $1.', $field_names[$key]);
        // replace last comma with 'and' and ending period
    }
}
//end special processing
if (get_magic_quotes_gpc()) {
    foreach ($field_names as $k => $var) {
        $field_names[$k] = stripslashes($var);
    }
}
foreach ($field_names as $k => $var) {
    #if (strtolower($k) == strtolower($var)) {unset($field_names[$k]);}
    $field_names[$k] = mysql_real_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    reset($field_names);
    $newid = formSubmit("form_Chiro_personal_injury_form", $field_names, $_GET["id"], $userauthorized);
    addForm($encounter, "Chiro_personal_injury_form", $newid, "Chiro_personal_injury_form", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_Chiro_personal_injury_form set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), _patient_name='" . $field_names["_patient_name"] . "',_middle_name='" . $field_names["_middle_name"] . "',_last_name='" . $field_names["_last_name"] . "',_address_direction='" . $field_names["_address_direction"] . "',_city='" . $field_names["_city"] . "',_state='" . $field_names["_state"] . "',_zip='" . $field_names["_zip"] . "',_phone_number_home='" . $field_names["_phone_number_home"] . "',_phone_number_work='" . $field_names["_phone_number_work"] . "',_sex='" . $field_names["_sex"] . "',_date_of_birth='" . $field_names["_date_of_birth"] . "',_social_security='" . $field_names["_social_security"] . "',_nature_of_accident='" . $field_names["_nature_of_accident"] . "',_other='" . $field_names["_other"] . "',_date_of_accident='" . $field_names["_date_of_accident"] . "',_insurance_name='" . $field_names["_insurance_name"] . "',_phone_no='" . $field_names["_phone_no"] . "',_address_of_insurance_company='" . $field_names["_address_of_insurance_company"] . "',_claim_number='" . $field_names["_claim_number"] . "',_policy_number='" . $field_names["_policy_number"] . "',_attorney_name='" . $field_names["_attorney_name"] . "',_attorney_phone_number='" . $field_names["_attorney_phone_number"] . "',_attorney_address='" . $field_names["_attorney_address"] . "',_health_insurance='" . $field_names["_health_insurance"] . "',_health_insurance_phone_number='" . $field_names["_health_insurance_phone_number"] . "',_address_of_health_insurance='" . $field_names["_address_of_health_insurance"] . "',_subscriber_id_number='" . $field_names["_subscriber_id_number"] . "',_group_number='" . $field_names["_group_number"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #12
0
<?php

//------------Forms generated from formsWiz
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_hearingtest", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Hearing Test", $newid, "hearingtest", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_hearingtest set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), right_ear_250='" . $_POST["right_ear_250"] . "', right_ear_500='" . $_POST["right_ear_500"] . "', right_ear_1000='" . $_POST["right_ear_1000"] . "', right_ear_2000='" . $_POST["right_ear_2000"] . "', right_ear_3000='" . $_POST["right_ear_3000"] . "', right_ear_4000='" . $_POST["right_ear_4000"] . "', right_ear_5000='" . $_POST["right_ear_5000"] . "', right_ear_6000='" . $_POST["right_ear_6000"] . "', left_ear_250='" . $_POST["left_ear_250"] . "', left_ear_500='" . $_POST["left_ear_500"] . "', left_ear_1000='" . $_POST["left_ear_1000"] . "', left_ear_2000='" . $_POST["left_ear_2000"] . "', left_ear_3000='" . $_POST["left_ear_3000"] . "', left_ear_4000='" . $_POST["left_ear_4000"] . "', left_ear_5000='" . $_POST["left_ear_5000"] . "', left_ear_6000='" . $_POST["left_ear_6000"] . "', with_hearing_aid='" . $_POST["with_hearing_aid"] . "', additional_notes='" . $_POST["additional_notes"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #13
0
    public function actionEdit()
    {
        global $urlRequestRoot, $moduleFolder, $cmsFolder, $templateFolder, $sourceFolder, $STARTSCRIPTS;
        require_once $sourceFolder . "/" . $moduleFolder . "/publication/edit.php";
        $scriptFolder = "{$urlRequestRoot}/{$cmsFolder}/{$moduleFolder}/publication";
        $js = "<script src='{$scriptFolder}/edit.js'></script>";
        /* Check for get requests */
        if (isset($_GET['add'])) {
            add_new($this->moduleComponentId);
        }
        if (isset($_GET['del'])) {
            p_delete($this->moduleComponentId, $_GET['del']);
        }
        if (isset($_GET['subaction'])) {
            $pb_array = array();
            for ($i = 0; $i <= $_POST['num'] - 1; $i++) {
                $pb_array[$i] = $_POST['p' . $i];
            }
            formSubmit($this->moduleComponentId, $pb_array);
        }
        $view = '';
        $view1 = <<<FORM_AND_TABLE
<form id='p_form' method='POST' enctype='multipart/form-data' action='./+edit&subaction=SUBMIT'> 
   <table id="publications">
    \t<thead style="font-weight:bold;">
        \t<td >
                sl no.
        \t</td>
        \t<td >
                Publication
        \t</td>
        \t<td >
                Saved Time
        \t</td>
    \t\t<td >
      \t\t\tCreated Time
    \t\t</td>    \t
  \t\t</thead>

FORM_AND_TABLE;
        //Get the publications from database
        $counter = 0;
        $query = "SELECT * FROM publication_details where module_component_id =" . $this->moduleComponentId . ";";
        $details = mysql_query($query) or die("error .." . mysql_error());
        $rows = mysql_num_rows($details) - 1;
        $view2 = '';
        while ($arr_details = mysql_fetch_array($details)) {
            $counter1 = $counter + 1;
            $view2 .= <<<ROWS
\t\t\t\t  <tr>
         \t\t\t<td > {$counter1} </td>
         \t\t\t<td ><textarea name='p{$counter}' id='p{$counter}'>{$arr_details['publication']}</textarea></td>
          \t\t\t<td >{$arr_details['saved_time']}</td>
         \t\t\t<td >{$arr_details['created_time']}</td>
         \t\t\t<td>
    \t\t\t\t\t<button> 
    \t\t\t\t\t\t<a href='./+edit&del={$counter}'>DELETE
    \t\t\t\t\t\t</a>
    \t\t\t\t\t</button>
    \t\t\t\t</td>    
ROWS;
            //Check for first row
            if ($counter != $rows) {
                $view2 .= <<<FIRST_ROW
\t\t\t\t\t<td ><button type="button" onclick="reorder({$counter},1);"><span style='font-weight:bolder;font-size:25px;'>&#x2193;</span></button></td>
FIRST_ROW;
            }
            //Check for last row
            if ($counter != 0) {
                $view2 .= <<<LAST_ROW
\t\t\t\t<td ><button type="button" onclick="reorder({$counter},-1);"><span style='font-weight:bolder;font-size:25px;'>&#x2191;</span></button></td>
LAST_ROW;
            }
            $view2 .= "</tr>";
            $counter++;
        }
        $view3 = <<<END_TABLE
   </table>
   <button><a href="./+edit&add=new">ADD NEW PUBLICATION</a></button>
   <input type='hidden' name='num' value='{$counter}'>
   <button type="submit" name="btn_submit">SUBMIT</button> 
 </form>  
END_TABLE;
        $view4 = <<<js
\t\t\t\t{$js}
js;
        $view .= $view1 . $view2 . $view3 . $view4;
        return $view;
    }
Example #14
0
$data['pl_reactions'] = $_POST['pl_reactions'];
$data['pl_medications'] = $_POST['pl_medications'];
$si = 1;
while ($si < 26) {
    if ($_POST["pl_ed_{$si}"] != '') {
        $data["pl_problem_{$si}"] = $_POST["pl_ed_{$si}"] . '|~' . $_POST["pl_problem_{$si}"] . '|~' . $_POST["pl_onset_{$si}"] . '|~' . $_POST["pl_rd_{$si}"];
    } else {
        $data["pl_problem_{$si}"] = '';
    }
    $si++;
}
//if ($pid == "") { $pid = $_SESSION["pid"]; }
if ($_GET["mode"] == "new") {
    if ($encounter == "") {
        $encounter = date("Ymd");
    }
    $newid = formSubmit("form_plist", $data, $_GET["id"], $userauthorized);
    addForm($encounter, "Problem list", $newid, "plist", $pid, $userauthorized);
    $_SESSION["encounter"] = $encounter;
} elseif ($_GET["mode"] == "update") {
    $q1 = '';
    foreach ($data as $key => $val) {
        $q1 .= "{$key}='{$val}', ";
    }
    sqlInsert("update form_plist set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, {$q1}  date = NOW() where id={$id}");
}
sqlInsert("update patient_data set DOB='" . $_POST['pbdate'] . "' where  id={$pid}");
//$_SESSION["pid"] = $pid;
formHeader("Redirecting....");
formJump();
formFooter();
Example #15
0
// Created by:	Larry Lart
// Version:	1.0 - 30-03-2008
////////////////////////////////////////////////////////////////////
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_real_escape_string($var);
    // echo "$var\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    if ($_GET["id"] != '') {
        $_GET["id"] = '0';
        $newid = formSubmit("form_brief_aan_verwijzer", $_POST, $_GET["id"], $userauthorized);
        // add shoul be here or downoutside if block ?
        addForm($encounter, "Psychiatric Brief Letter", $newid, "brief_aan_verwijzer", $pid, $userauthorized);
    } else {
        $_POST['autosave_flag'] = 0;
        $newid = formUpdate("form_brief_aan_verwijzer", $_POST, $_GET["saveid"], $userauthorized);
    }
} elseif ($_GET["mode"] == "update") {
    $strSql = "UPDATE form_brief_aan_verwijzer\n                SET pid = " . $_SESSION["pid"] . ", groupname='" . $_SESSION["authProvider"] . "', user='******', \n                authorized={$userauthorized}, activity=1, date = NOW(), \n                introductie='" . $_POST["introductie"] . "',\n                reden_van_aanmelding='" . $_POST["reden_van_aanmelding"] . "', \n                anamnese='" . $_POST["anamnese"] . "',\n                psychiatrisch_onderzoek='" . $_POST["psychiatrisch_onderzoek"] . "',\n                beschrijvend_conclusie='" . $_POST["beschrijvend_conclusie"] . "',\n                advies_beleid='" . $_POST["advies_beleid"] . "',\n                autosave_flag=0, \n                autosave_datetime=NOW() \n                  WHERE id = " . $_GET['id'] . ";";
    sqlQuery($strSql);
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #16
0
<?php

//------------Forms generated from formsWiz
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_obstetrical", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Obstetrical Form", $newid, "obstetrical", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_obstetrical set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), name='" . $_POST["name"] . "', birthdate='" . $_POST["birthdate"] . "', feeding='" . $_POST["feeding"] . "', birth_status='" . $_POST["birth_status"] . "', gender='" . $_POST["gender"] . "', circumcised='" . $_POST["circumcised"] . "', delivery_method='" . $_POST["delivery_method"] . "', labor_hours='" . $_POST["labor_hours"] . "', birth_weight='" . $_POST["birth_weight"] . "', pregnancy_weeks='" . $_POST["pregnancy_weeks"] . "', anesthesia='" . $_POST["anesthesia"] . "', pediatrician='" . $_POST["pediatrician"] . "', length_inches='" . $_POST["length_inches"] . "', head_circumference_inches='" . $_POST["head_circumference_inches"] . "', reactions_to_medications_and_immunizations='" . $_POST["reactions_to_medications_and_immunizations"] . "', birth_complications='" . $_POST["birth_complications"] . "', developmental_problems='" . $_POST["developmental_problems"] . "', chronic_illness='" . $_POST["chronic_illness"] . "', chronic_medication='" . $_POST["chronic_medication"] . "', hospitalization='" . $_POST["hospitalization"] . "', surgery='" . $_POST["surgery"] . "', injury='" . $_POST["injury"] . "', day_care='" . $_POST["day_care"] . "', additional_notes='" . $_POST["additional_notes"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #17
0
$ftitle = 'Patient intake history';
$old = sqlStatement("select form_id, formdir from forms where (form_name='{$ftitle}') and (pid={$pid}) order by date desc limit 1");
if ($old) {
    $dt = sqlFetchArray($old);
    $fid = $dt['form_id'];
    if ($fid && $fid != 0 && $fid != '') {
        $fdir = $dt['formdir'];
        unset($dt);
        $dt = formFetch($frmn, $fid);
        $linked = $dt['linked_ros_id'];
        $oldros = sqlStatement("select * from form_patient_intake_history_ros where id={$linked}");
        $dtros = sqlFetchArray($oldros);
        //$dtros = formFetch("form_patient_intake_history_ros", $linked);
        $newid = formSubmit("form_patient_intake_history_ros", array_slice($dtros, 7), $id, $userauthorized);
        $dt['linked_ros_id'] = $newid;
        $newid = formSubmit("form_patient_intake_history", array_slice($dt, 7), $id, $userauthorized);
        addForm($encounter, "Patient intake history", $newid, "patient_intake_history", $pid, $userauthorized);
        $id = $newid;
        formJump("{$rootdir}/patient_file/encounter/view_form.php?formname={$fdir}&id={$newid}");
        exit;
    }
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<?php 
html_header_show();
?>
Example #18
0
    }
    if ($field_names[$key] != '') {
        // $field_names[$key] .= '.';
        // $field_names[$key] = preg_replace('/\s*,\s*([^,]+)\./',' and $1.',$field_names[$key]); // replace last comma with 'and' and ending period
    }
}
//end special processing
if (get_magic_quotes_gpc()) {
    foreach ($field_names as $k => $var) {
        $field_names[$k] = stripslashes($var);
    }
}
foreach ($field_names as $k => $var) {
    #if (strtolower($k) == strtolower($var)) {unset($field_names[$k]);}
    $field_names[$k] = mysql_real_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    reset($field_names);
    $newid = formSubmit("form_chiro_history", $field_names, $_GET["id"], $userauthorized);
    addForm($encounter, "chiro_history", $newid, "chiro_history", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_chiro_history set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), approximate_onset_date='" . $field_names["approximate_onset_date"] . "',general_condit='" . $field_names["general_condit"] . "', muscle_joint='" . $field_names["muscle_joint"] . "', pain_numb_locat='" . $field_names["pain_numb_locat"] . "', gastrointest='" . $field_names["gastrointest"] . "',genitouro='" . $field_names["genitouro"] . "',respiratory='" . $field_names["respiratory"] . "',head_neck='" . $field_names["head_neck"] . "',cardiovascular='" . $field_names["cardiovascular"] . "',women_health='" . $field_names["women_health"] . "',alcoholism='" . $field_names["alcoholism"] . "',anemia='" . $field_names["anemia"] . "',arthritis='" . $field_names["arthritis"] . "',cancer='" . $field_names["cancer"] . "',herpes='" . $field_names["herpes"] . "',hypoglycemia='" . $field_names["hypoglycemia"] . "',diabetes='" . $field_names["diabetes"] . "',eczema='" . $field_names["eczema"] . "',goiter='" . $field_names["goiter"] . "',ulcers='" . $field_names["ulcers"] . "',gout='" . $field_names["gout"] . "',heart_disease='" . $field_names["heart_disease"] . "',rheumatic_fever='" . $field_names["rheumatic_fever"] . "',miscarriage='" . $field_names["miscarriage"] . "',polio='" . $field_names["polio"] . "',pneumonia='" . $field_names["pneumonia"] . "',atherosclerosis='" . $field_names["atherosclerosis"] . "',multiple_sclerosis='" . $field_names["multiple_sclerosis"] . "',stroke='" . $field_names["stroke"] . "',tuberculosis='" . $field_names["tuberculosis"] . "',epilepsy='" . $field_names["epilepsy"] . "',measles='" . $field_names["measles"] . "',chicken_pox='" . $field_names["chicken_pox"] . "',venereal_disease='" . $field_names["venereal_disease"] . "',organ_gland='" . $field_names["organ_gland"] . "',family_history='" . $field_names["family_history"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #19
0
include_once "{$srcdir}/forms.inc";
//echo "intakedatum=".$_POST["intakedatum"];
//var_dump($_POST);
// escape the strings
foreach ($_POST as $k => $var) {
    $_POST[$k] = add_escape_custom($var);
    // echo "$var\n";
}
/////////////////
// here we check to se if there was an autosave version prior to the real save
$vectAutosave = sqlQuery("SELECT id, autosave_flag, autosave_datetime FROM form_intakeverslag \n                            WHERE pid = " . $_SESSION["pid"] . " AND groupname='" . $_SESSION["authProvider"] . "' AND user='******' AND\n                            authorized={$userauthorized} AND activity=1\n                            AND autosave_flag=1 \n                            ORDER by id DESC limit 1");
// if yes then update this else insert
if ($vectAutosave['autosave_flag'] == 1 || $_POST["mode"] == "update") {
    if ($_POST["mode"] == "update") {
        $newid = $_POST["id"];
    } else {
        $newid = $vectAutosave['id'];
    }
    $strSql = "UPDATE form_intakeverslag \n                SET pid = " . $_SESSION["pid"] . ", groupname='" . $_SESSION["authProvider"] . "', user='******', \n                authorized={$userauthorized}, activity=1, date = NOW(), \n                intakedatum='" . $_POST["intakedatum"] . "',\n                reden_van_aanmelding='" . $_POST["reden_van_aanmelding"] . "', \n                klachten_probleemgebieden='" . $_POST["klachten_probleemgebieden"] . "',\n                hulpverlening_onderzoek='" . $_POST["hulpverlening_onderzoek"] . "',\n                hulpvraag_en_doelen='" . $_POST["hulpvraag_en_doelen"] . "',\n                bijzonderheden_systeem='" . $_POST["bijzonderheden_systeem"] . "',\n                werk_opleiding_vrije_tijdsbesteding='" . $_POST["werk_opleiding_vrije_tijdsbesteding"] . "',\n                relatie_kinderen='" . $_POST["relatie_kinderen"] . "',\n                somatische_context='" . $_POST["somatische_context"] . "',\n                alcohol='" . $_POST["alcohol"] . "',\n                drugs='" . $_POST["drugs"] . "',\n                roken='" . $_POST["roken"] . "',\n                medicatie='" . $_POST["medicatie"] . "',\n                familieanamnese='" . $_POST["familieanamnese"] . "',\n                indruk_observaties='" . $_POST["indruk_observaties"] . "',\n                beschrijvende_conclusie='" . $_POST["beschrijvende_conclusie"] . "',\n                behandelvoorstel='" . $_POST["behandelvoorstel"] . "',\n                autosave_flag=1, \n                autosave_datetime=NOW() \n                  WHERE id = " . $newid . ";";
    sqlQuery($strSql);
    //echo "lalalalal id=$newid, sql=$strSql<br>";
} else {
    $newid = formSubmit("form_intakeverslag", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Psychiatric Intake", $newid, "intakeverslag", $pid, $userauthorized);
    //echo "debug :: insert<br>";
}
//get timestamp
$result = sqlQuery("SELECT autosave_datetime FROM form_intakeverslag \n                            WHERE pid = " . $_SESSION["pid"] . " AND groupname='" . $_SESSION["authProvider"] . "' AND user='******' AND\n                            authorized={$userauthorized} AND activity=1 AND id={$newid}\n                            AND autosave_flag=1 \n                            ORDER by id DESC limit 1");
//$timestamp = mysql_result($result, 0);
//output timestamp
echo xl('Last Saved') . ': ' . $result['autosave_datetime'];
Example #20
0
     This program 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 this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. -->

<?php 
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
/* 
 * name of the database table associated with this form
 */
$table_name = "form_note";
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit($table_name, $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Work/School Note", $newid, "note", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    $success = formUpdate($table_name, $_POST, $_GET["id"], $userauthorized);
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #21
0
$ii = 1;
while ($ii < 9) {
    $record = '';
    foreach ($factors as $k => $v) {
        $record .= $_POST[$v . "_date_" . $ii] . '|' . $_POST[$v . "_res_" . $ii];
        if ($v != "thyroid") {
            $record .= '|~';
        }
    }
    $data["record_" . $ii] = $record;
    $ii++;
}
if ($_GET["mode"] == "new") {
    if ($encounter == "") {
        $encounter = date("Ymd");
    }
    $newid = formSubmit("form_routine_screening_record", $data, $_GET["id"], $userauthorized);
    addForm($encounter, "Routine screening record", $newid, "routine_screening_record", $pid, $userauthorized);
    $_SESSION["encounter"] = $encounter;
} elseif ($_GET["mode"] == "update") {
    $q1 = '';
    foreach ($data as $key => $val) {
        $q1 .= "{$key}='{$val}', ";
    }
    sqlInsert("update form_routine_screening_record set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, {$q1} date = NOW() where id={$id}");
}
sqlInsert("update patient_data set DOB='" . $_POST['pbdate'] . "' where  id={$pid}");
//$_SESSION["pid"] = $pid;
formHeader("Redirecting....");
formJump();
formFooter();
Example #22
0
<?php

//------------Forms generated from formsWiz
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_rosform", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Review of Systems", $newid, "rosform", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_rosform set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), fever='" . $_POST["fever"] . "', chills='" . $_POST["chills"] . "', rash='" . $_POST["rash"] . "', cancer='" . $_POST["cancer"] . "', acne='" . $_POST["acne"] . "', eyes_diplopia='" . $_POST["eyes_diplopia"] . "', eyes_cataracts='" . $_POST["eyes_cataracts"] . "', eyes_glaucoma='" . $_POST["eyes_glaucoma"] . "', head_dizziness='" . $_POST["head_dizziness"] . "', head_syncope='" . $_POST["head_syncope"] . "', head_headache='" . $_POST["head_headache"] . "', ear_pain='" . $_POST["ear_pain"] . "', ear_loss='" . $_POST["ear_loss"] . "', nose_congestion='" . $_POST["nose_congestion"] . "', nose_epitaxis='" . $_POST["nose_epitaxis"] . "', throat_sore='" . $_POST["throat_sore"] . "', throat_dysphagia='" . $_POST["throat_dysphagia"] . "', throat_swollen_glands='" . $_POST["throat_swollen_glands"] . "', respiratory_dyspnea='" . $_POST["respiratory_dyspnea"] . "', respiratory_rest='" . $_POST["respiratory_rest"] . "', respiratory_exertion='" . $_POST["respiratory_exertion"] . "', respiratory_cough='" . $_POST["respiratory_cough"] . "', respiratory_asthma='" . $_POST["respiratory_asthma"] . "', cardiac_palpitation='" . $_POST["cardiac_palpitation"] . "', cardiac_heart_murmur='" . $_POST["cardiac_heart_murmur"] . "', cardiac_chest_pain='" . $_POST["cardiac_chest_pain"] . "', cardiac_pleuritic='" . $_POST["cardiac_pleuritic"] . "', cardiac_htm='" . $_POST["cardiac_htm"] . "', cardiac_ntg_use='" . $_POST["cardiac_ntg_use"] . "', hem_lymph_anemia='" . $_POST["hem_lymph_anemia"] . "', hem_lymph_nightsweats='" . $_POST["hem_lymph_nightsweats"] . "', gi_nausea='" . $_POST["gi_nausea"] . "', gi_vomiting='" . $_POST["gi_vomiting"] . "', gi_diarrhea='" . $_POST["gi_diarrhea"] . "', gi_constipation='" . $_POST["gi_constipation"] . "', gi_black_stools='" . $_POST["gi_black_stools"] . "', gi_blood_stools='" . $_POST["gi_blood_stools"] . "', gi_pain='" . $_POST["gi_pain"] . "', gi_abdominal_pain='" . $_POST["gi_abdominal_pain"] . "', gu_nocturia='" . $_POST["gu_nocturia"] . "', gu_stream='" . $_POST["gu_stream"] . "', gu_hematuria='" . $_POST["gu_hematuria"] . "', gu_pain='" . $_POST["gu_pain"] . "', gu_incontinence='" . $_POST["gu_incontinence"] . "', gu_frequency='" . $_POST["gu_frequency"] . "', gyn_lump='" . $_POST["gyn_lump"] . "', gyn_checkup='" . $_POST["gyn_checkup"] . "', gyn_mammogram='" . $_POST["gyn_mammogram"] . "', sexual='" . $_POST["sexual"] . "', ortho_pain='" . $_POST["ortho_pain"] . "', ortho_trauma='" . $_POST["ortho_trauma"] . "', ortho_neuro='" . $_POST["ortho_neuro"] . "', endo_diabetes='" . $_POST["endo_diabetes"] . "', endo_thyroid='" . $_POST["endo_thyroid"] . "', psych_sleep_problems='" . $_POST["psych_sleep_problems"] . "', psych_memory_loss='" . $_POST["psych_memory_loss"] . "', leg_swelling='" . $_POST["leg_swelling"] . "', leg_numbness='" . $_POST["leg_numbness"] . "', appearance_nad='" . $_POST["appearance_nad"] . "', appearance_mild='" . $_POST["appearance_mild"] . "', appearance_moderate='" . $_POST["appearance_moderate"] . "', appearance_severe_distress='" . $_POST["appearance_severe_distress"] . "', skin_moles='" . $_POST["skin_moles"] . "', skin_rash='" . $_POST["skin_rash"] . "', head_ent_nl_inspection='" . $_POST["head_ent_nl_inspection"] . "', head_pharynx_nl='" . $_POST["head_pharynx_nl"] . "', head_abn_tm='" . $_POST["head_abn_tm"] . "', head_scleral_icterus='" . $_POST["head_scleral_icterus"] . "', eyes_pupils_right='" . $_POST["eyes_pupils_right"] . "', eyes_pupils_left='" . $_POST["eyes_pupils_left"] . "', fundi_right='" . $_POST["fundi_right"] . "', fundi_left='" . $_POST["fundi_left"] . "', vision_fields_normal='" . $_POST["vision_fields_normal"] . "', vision_fields_abnormal='" . $_POST["vision_fields_abnormal"] . "', ears_right='" . $_POST["ears_right"] . "', ears_left='" . $_POST["ears_left"] . "', ears_hearing_deficit='" . $_POST["ears_hearing_deficit"] . "', nose_erythema='" . $_POST["nose_erythema"] . "', nose_discharge='" . $_POST["nose_discharge"] . "', throat_nl='" . $_POST["throat_nl"] . "', throat_thyroid_nl='" . $_POST["throat_thyroid_nl"] . "', throat_thyromegaly='" . $_POST["throat_thyromegaly"] . "', throat_erytheomatous='" . $_POST["throat_erytheomatous"] . "', lymph_cervical_right='" . $_POST["lymph_cervical_right"] . "', lymph_cervical_left='" . $_POST["lymph_cervical_left"] . "', lymph_axillary_right='" . $_POST["lymph_axillary_right"] . "', lymph_axillary_left='" . $_POST["lymph_axillary_left"] . "', lymph_supraclav_right='" . $_POST["lymph_supraclav_right"] . "', lymph_supraclav_left='" . $_POST["lymph_supraclav_left"] . "', lymph_inguinal_right='" . $_POST["lymph_inguinal_right"] . "', lymph_inguinal_left='" . $_POST["lymph_inguinal_left"] . "', carotid_bruits='" . $_POST["carotid_bruits"] . "', respiratory_no_distress='" . $_POST["respiratory_no_distress"] . "', chest_non_tender='" . $_POST["chest_non_tender"] . "', respiratory_distress='" . $_POST["respiratory_distress"] . "', respiratory_clear_to_ausc='" . $_POST["respiratory_clear_to_ausc"] . "', respiratory_splinting='" . $_POST["respiratory_splinting"] . "', respiratory_rales='" . $_POST["respiratory_rales"] . "', respiratory_rhonchi='" . $_POST["respiratory_rhonchi"] . "', respiratory_wheezing='" . $_POST["respiratory_wheezing"] . "', heart_regular_rate='" . $_POST["heart_regular_rate"] . "', heart_irregular_rate='" . $_POST["heart_irregular_rate"] . "', heart_murmur='" . $_POST["heart_murmur"] . "', heart_gallop='" . $_POST["heart_gallop"] . "', heart_rub='" . $_POST["heart_rub"] . "', heart_tachy_brady='" . $_POST["heart_tachy_brady"] . "', heart_jvd='" . $_POST["heart_jvd"] . "', heart_grade='" . $_POST["heart_grade"] . "', heart_sys_dias='" . $_POST["heart_sys_dias"] . "', breast_right_cystic='" . $_POST["breast_right_cystic"] . "', breast_left_cystic='" . $_POST["breast_left_cystic"] . "', abdomen_non_tender='" . $_POST["abdomen_non_tender"] . "', abdomen_no_organomegaly='" . $_POST["abdomen_no_organomegaly"] . "', abdomen_guarding='" . $_POST["abdomen_guarding"] . "', abdomen_rebound='" . $_POST["abdomen_rebound"] . "', abdomen_bowel_sounds='" . $_POST["abdomen_bowel_sounds"] . "', abdomen_hepatomegaly='" . $_POST["abdomen_hepatomegaly"] . "', rectal_prostate='" . $_POST["rectal_prostate"] . "', rectal_hemmocult='" . $_POST["rectal_hemmocult"] . "', rectal_tender='" . $_POST["rectal_tender"] . "', rectal_hemmorrhoids='" . $_POST["rectal_hemmorrhoids"] . "', genitalia_hernia='" . $_POST["genitalia_hernia"] . "', genitalia_ext_vagina='" . $_POST["genitalia_ext_vagina"] . "', genitalia_male='" . $_POST["genitalia_male"] . "', speculum='" . $_POST["speculum"] . "', palpation='" . $_POST["palpation"] . "', uterus='" . $_POST["uterus"] . "', adnexa_right='" . $_POST["adnexa_right"] . "', adnexa_left='" . $_POST["adnexa_left"] . "', neuro_exam_cns='" . $_POST["neuro_exam_cns"] . "', neuro_exam_oriented='" . $_POST["neuro_exam_oriented"] . "', neuro_exam_confused='" . $_POST["neuro_exam_confused"] . "', neuro_exam_mmse='" . $_POST["neuro_exam_mmse"] . "', muscle_strength='" . $_POST["muscle_strength"] . "', reflexes_rue='" . $_POST["reflexes_rue"] . "', reflexes_rle='" . $_POST["reflexes_rle"] . "', reflexes_lue='" . $_POST["reflexes_lue"] . "', reflexes_lle='" . $_POST["reflexes_lle"] . "', vibration='" . $_POST["vibration"] . "', sensation='" . $_POST["sensation"] . "', babinski='" . $_POST["babinski"] . "', edema='" . $_POST["edema"] . "', varicosities='" . $_POST["varicosities"] . "', nails='" . $_POST["nails"] . "', joints_neck='" . $_POST["joints_neck"] . "', joints_shoulder_right='" . $_POST["joints_shoulder_right"] . "', joints_sholder_left='" . $_POST["joints_sholder_left"] . "', joints_elbow_right='" . $_POST["joints_elbow_right"] . "', joints_elbow_left='" . $_POST["joints_elbow_left"] . "', joints_wrist_right='" . $_POST["joints_wrist_right"] . "', joints_wrist_left='" . $_POST["joints_wrist_left"] . "', joints_hand_right='" . $_POST["joints_hand_right"] . "', joints_hand_left='" . $_POST["joints_hand_left"] . "', joints_hip_right='" . $_POST["joints_hip_right"] . "', joints_hip_left='" . $_POST["joints_hip_left"] . "', joints_back_right='" . $_POST["joints_back_right"] . "', joints_back_left='" . $_POST["joints_back_left"] . "', joints_slr_right='" . $_POST["joints_slr_right"] . "', joints_slr_left='" . $_POST["joints_slr_left"] . "', joints_knee_right='" . $_POST["joints_knee_right"] . "', joints_knee_left='" . $_POST["joints_knee_left"] . "', joints_ankle_right='" . $_POST["joints_ankle_right"] . "', joints_ankle_left='" . $_POST["joints_ankle_left"] . "', joints_foot_right='" . $_POST["joints_foot_right"] . "', joints_foot_left='" . $_POST["joints_foot_left"] . "', conclusions_impression='" . $_POST["conclusions_impression"] . "', conclusions_discussion='" . $_POST["conclusions_discussion"] . "', conclusions_treatment='" . $_POST["conclusions_treatment"] . "', conclusions_breast_self_exam='" . $_POST["conclusions_breast_self_exam"] . "', conclusions_flex_sig_colonoscopy='" . $_POST["conclusions_flex_sig_colonoscopy"] . "', conclusions_mammography='" . $_POST["conclusions_mammography"] . "', conclusions_cholesterol_teaching='" . $_POST["conclusions_cholesterol_teaching"] . "', conclusions_advance_directive='" . $_POST["conclusions_advance_directive"] . "', follow_up='" . $_POST["follow_up"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #23
0
<?php

//
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_ped_GI", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Pediatric GI Evaluation", $newid, "ped_GI", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_ped_GI set `pid` = {$_SESSION["pid"]},\n\t`groupname`='" . $_SESSION["authProvider"] . "',\n\t`user`='" . $_SESSION["authUser"] . "',\n\t`authorized`={$userauthorized},\n\t`activity`=1, \n\t`date` = NOW(), \n\t`diarrhea`='" . $_POST["diarrhea"] . "',\n\t`with_every_bowel_movement`='" . $_POST["with_every_bowel_movement"] . "',\n\t`after_every_meal`='" . $_POST["after_every_meal"] . "',\n\t`blood_or_mucus_in_stool`='" . $_POST["blood_or_mucus_in_stool"] . "',\n\t`diarrhea_onset`='" . $_POST["diarrhea_onset"] . "',\n\t`worms`='" . $_POST["worms"] . "',\n\t`vomits`='" . $_POST["vomits"] . "',\n\t`duration`='" . $_POST["duration"] . "',\n\t`projectile`='" . $_POST["projectile"] . "',\n\t`more_often_than_2_hours`='" . $_POST["more_often_than_2_hours"] . "',\n\t`vomit_after_every_meal`='" . $_POST["vomit_after_every_meal"] . "',\n\t`blood_in_vomitus`='" . $_POST["blood_in_vomitus"] . "',\n\t`taking_medication`='" . $_POST["taking_medication"] . "',\n\t`oral_rehydration`='" . $_POST["oral_rehydration"] . "',\n\t`eating_solid_food`='" . $_POST["eating_solid_food"] . "',\n\t`fever`='" . $_POST["fever"] . "',\n\t`pain`='" . $_POST["pain"] . "',\n\t`lethargy`='" . $_POST["lethargy"] . "',\n\t`oral_hydration_capable`='" . $_POST["oral_hydration_capable"] . "',\n\t`urine_output_last_6_hours`='" . $_POST["urine_output_last_6_hours"] . "',\n\t`pain_with_urination`='" . $_POST["pain_with_urination"] . "',\n\t`cough_or_breathing_difficulty`='" . $_POST["cough_or_breathing_difficulty"] . "',\n\t`able_to_sleep`='" . $_POST["able_to_sleep"] . "',\n\t`nasal_discharge`='" . $_POST["nasal_discharge"] . "',\n\t`previous_hospitalization`='" . $_POST["previous_hospitalization"] . "',\n\t`siblings_affected`='" . $_POST["siblings_affected"] . "',\n\t`immunization_up_to_date`='" . $_POST["immunization_up_to_date"] . "',\n\t`notes`='" . $_POST["notes"] . "'\n\tWHERE id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #24
0
<?php

//------------Form created by Nikolai Vitsyn by 2004/01/23
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_bronchitis", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Bronchitis Form", $newid, "bronchitis", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_bronchitis set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(),\nbronchitis_date_of_illness='" . $_POST["bronchitis_date_of_illness"] . "',\nbronchitis_hpi='" . $_POST["bronchitis_hpi"] . "',\nbronchitis_ops_fever='" . $_POST["bronchitis_ops_fever"] . "',\nbronchitis_ops_cough='" . $_POST["bronchitis_ops_cough"] . "',\nbronchitis_ops_dizziness='" . $_POST["bronchitis_ops_dizziness"] . "',\nbronchitis_ops_chest_pain='" . $_POST["bronchitis_ops_chest_pain"] . "',\nbronchitis_ops_dyspnea='" . $_POST["bronchitis_ops_dyspnea"] . "',\nbronchitis_ops_sweating='" . $_POST["bronchitis_ops_sweating"] . "',\nbronchitis_ops_wheezing='" . $_POST["bronchitis_ops_wheezing"] . "',\nbronchitis_ops_malaise='" . $_POST["bronchitis_ops_malaise"] . "', \nbronchitis_ops_sputum='" . $_POST["bronchitis_ops_sputum"] . "',\nbronchitis_ops_appearance='" . $_POST["bronchitis_ops_appearance"] . "', \nbronchitis_ops_all_reviewed='" . $_POST["bronchitis_ops_all_reviewed"] . "',\nbronchitis_review_of_pmh='" . $_POST["bronchitis_review_of_pmh"] . "', \nbronchitis_review_of_medications='" . $_POST["bronchitis_review_of_medications"] . "',\nbronchitis_review_of_allergies='" . $_POST["bronchitis_review_of_allergies"] . "', \nbronchitis_review_of_sh='" . $_POST["bronchitis_review_of_sh"] . "',\nbronchitis_review_of_fh='" . $_POST["bronchitis_review_of_fh"] . "', \nbronchitis_tms_normal_right='" . $_POST["bronchitis_tms_normal_right"] . "',\nbronchitis_tms_normal_left='" . $_POST["bronchitis_tms_normal_left"] . "', \nbronchitis_nares_normal_right='" . $_POST["bronchitis_nares_normal_right"] . "',\nbronchitis_nares_normal_left='" . $_POST["bronchitis_nares_normal_left"] . "', \nbronchitis_tms_thickened_right='" . $_POST["bronchitis_tms_thickened_right"] . "',\nbronchitis_tms_thickened_left='" . $_POST["bronchitis_tms_thickened_left"] . "', \nbronchitis_tms_af_level_right='" . $_POST["bronchitis_tms_af_level_right"] . "',\nbronchitis_tms_af_level_left='" . $_POST["bronchitis_tms_af_level_left"] . "', \nbronchitis_nares_swelling_right='" . $_POST["bronchitis_nares_swelling_right"] . "',\nbronchitis_nares_swelling_left='" . $_POST["bronchitis_nares_swelling_left"] . "',\nbronchitis_tms_retracted_right='" . $_POST["bronchitis_tms_retracted_right"] . "',\nbronchitis_tms_retracted_left='" . $_POST["bronchitis_tms_retracted_left"] . "', \nbronchitis_nares_discharge_right='" . $_POST["bronchitis_nares_discharge_right"] . "',\nbronchitis_nares_discharge_left='" . $_POST["bronchitis_nares_discharge_left"] . "', \nbronchitis_tms_bulging_right='" . $_POST["bronchitis_tms_bulging_right"] . "',\nbronchitis_tms_bulging_left='" . $_POST["bronchitis_tms_bulging_left"] . "',\nbronchitis_tms_perforated_right='" . $_POST["bronchitis_tms_perforated_right"] . "', \nbronchitis_tms_perforated_left='" . $_POST["bronchitis_tms_perforated_left"] . "',\nbronchitis_tms_nares_not_examined='" . $_POST["bronchitis_tms_nares_not_examined"] . "',\nbronchitis_no_sinus_tenderness='" . $_POST["bronchitis_no_sinus_tenderness"] . "', \nbronchitis_oropharynx_normal='" . $_POST["bronchitis_oropharynx_normal"] . "',\nbronchitis_sinus_tenderness_frontal_right='" . $_POST["bronchitis_sinus_tenderness_frontal_right"] . "',\nbronchitis_sinus_tenderness_frontal_left='" . $_POST["bronchitis_sinus_tenderness_frontal_left"] . "',\nbronchitis_oropharynx_erythema='" . $_POST["bronchitis_oropharynx_erythema"] . "', \nbronchitis_oropharynx_exudate='" . $_POST["bronchitis_oropharynx_exudate"] . "',\nbronchitis_oropharynx_abcess='" . $_POST["bronchitis_oropharynx_abcess"] . "',\nbronchitis_oropharynx_ulcers='" . $_POST["bronchitis_oropharynx_ulcers"] . "',\nbronchitis_sinus_tenderness_maxillary_right='" . $_POST["bronchitis_sinus_tenderness_maxillary_right"] . "',\nbronchitis_sinus_tenderness_maxillary_left='" . $_POST["bronchitis_sinus_tenderness_maxillary_left"] . "',\nbronchitis_oropharynx_appearance='" . $_POST["bronchitis_oropharynx_appearance"] . "',\nbronchitis_sinus_tenderness_not_examined='" . $_POST["bronchitis_sinus_tenderness_not_examined"] . "',\nbronchitis_oropharynx_not_examined='" . $_POST["bronchitis_oropharynx_not_examined"] . "', \nbronchitis_heart_pmi='" . $_POST["bronchitis_heart_pmi"] . "',\nbronchitis_heart_s3='" . $_POST["bronchitis_heart_s3"] . "',\nbronchitis_heart_s4='" . $_POST["bronchitis_heart_s4"] . "', \nbronchitis_heart_click='" . $_POST["bronchitis_heart_click"] . "',\nbronchitis_heart_rub='" . $_POST["bronchitis_heart_rub"] . "',\nbronchitis_heart_murmur='" . $_POST["bronchitis_heart_murmur"] . "',\nbronchitis_heart_grade='" . $_POST["bronchitis_heart_grade"] . "', \nbronchitis_heart_location='" . $_POST["bronchitis_heart_location"] . "',\nbronchitis_heart_normal='" . $_POST["bronchitis_heart_normal"] . "',\nbronchitis_heart_not_examined='" . $_POST["bronchitis_heart_not_examined"] . "',\nbronchitis_lungs_bs_normal='" . $_POST["bronchitis_lungs_bs_normal"] . "', \nbronchitis_lungs_bs_reduced='" . $_POST["bronchitis_lungs_bs_reduced"] . "',\nbronchitis_lungs_bs_increased='" . $_POST["bronchitis_lungs_bs_increased"] . "',\nbronchitis_lungs_crackles_lll='" . $_POST["bronchitis_lungs_crackles_lll"] . "', \nbronchitis_lungs_crackles_rll='" . $_POST["bronchitis_lungs_crackles_rll"] . "',\nbronchitis_lungs_crackles_bll='" . $_POST["bronchitis_lungs_crackles_bll"] . "', \nbronchitis_lungs_rubs_lll='" . $_POST["bronchitis_lungs_rubs_lll"] . "',\nbronchitis_lungs_rubs_rll='" . $_POST["bronchitis_lungs_rubs_rll"] . "',\nbronchitis_lungs_rubs_bll='" . $_POST["bronchitis_lungs_rubs_bll"] . "',\nbronchitis_lungs_wheezes_lll='" . $_POST["bronchitis_lungs_wheezes_lll"] . "', \nbronchitis_lungs_wheezes_rll='" . $_POST["bronchitis_lungs_wheezes_rll"] . "',\nbronchitis_lungs_wheezes_bll='" . $_POST["bronchitis_lungs_wheezes_bll"] . "',\nbronchitis_lungs_wheezes_dll='" . $_POST["bronchitis_lungs_wheezes_dll"] . "',\nbronchitis_lungs_normal_exam='" . $_POST["bronchitis_lungs_normal_exam"] . "', \nbronchitis_lungs_not_examined='" . $_POST["bronchitis_lungs_not_examined"] . "',\nbronchitis_diagnostic_tests='" . $_POST["bronchitis_diagnostic_tests"] . "',\ndiagnosis1_bronchitis_form='" . $_POST["diagnosis1_bronchitis_form"] . "',\ndiagnosis2_bronchitis_form='" . $_POST["diagnosis2_bronchitis_form"] . "',\ndiagnosis3_bronchitis_form='" . $_POST["diagnosis3_bronchitis_form"] . "', \ndiagnosis4_bronchitis_form='" . $_POST["diagnosis4_bronchitis_form"] . "',\nbronchitis_additional_diagnosis='" . $_POST["bronchitis_additional_diagnosis"] . "',\nbronchitis_treatment='" . $_POST["bronchitis_treatment"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #25
0
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
if ($_POST["off_work_from"] == "0000-00-00" || $_POST["off_work_from"] == "") {
    $_POST["is_unable_to_work"] = "0";
    $_POST["off_work_to"] = "";
} else {
    $_POST["is_unable_to_work"] = "1";
}
if ($_POST["hospitalization_date_from"] == "0000-00-00" || $_POST["hospitalization_date_from"] == "") {
    $_POST["is_hospitalized"] = "0";
    $_POST["hospitalization_date_to"] = "";
} else {
    $_POST["is_hospitalized"] = "1";
}
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_misc_billing_options", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Misc Billing Options", $newid, "misc_billing_options", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_misc_billing_options set pid = {$_SESSION["pid"]},\n\tgroupname='" . $_SESSION["authProvider"] . "',\n\tuser='******',\n\tauthorized={$userauthorized},activity=1, date = NOW(),\n\temployment_related='" . $_POST["employment_related"] . "',\n\tauto_accident='" . $_POST["auto_accident"] . "',\n\taccident_state='" . $_POST["accident_state"] . "',\n\tother_accident='" . $_POST["other_accident"] . "',\n\toutside_lab='" . $_POST["outside_lab"] . "',\n\tlab_amount='" . $_POST["lab_amount"] . "',\n\tis_unable_to_work='" . $_POST["is_unable_to_work"] . "',\n\toff_work_from='" . $_POST["off_work_from"] . "',\n\toff_work_to='" . $_POST["off_work_to"] . "',\n\tis_hospitalized='" . $_POST["is_hospitalized"] . "',\n\thospitalization_date_from='" . $_POST["hospitalization_date_from"] . "',\n\thospitalization_date_to='" . $_POST["hospitalization_date_to"] . "',\n\tmedicaid_resubmission_code='" . $_POST["medicaid_resubmission_code"] . "',\n\tmedicaid_original_reference='" . $_POST["medicaid_original_reference"] . "',\n\tprior_auth_number='" . $_POST["prior_auth_number"] . "',\n  replacement_claim='" . $_POST["replacement_claim"] . "',\n\tcomments='" . $_POST["comments"] . "'\n\twhere id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #26
0
if (preg_match("/^[\\s\\r\\n\\\\r\\\\n]*\$/", $field_names['content']) == 0) {
    //make sure blanks do not get submitted
    // Replace the placeholders before saving the form. This was changed in version 4.0. Previous to this, placeholders
    //   were submitted into the database and converted when viewing. All new notes will now have placeholders converted
    //   before being submitted to the database. Will also continue to support placeholder conversion on report
    //   views to support notes within database that still contain placeholders (ie. notes that were created previous to
    //   version 4.0).
    $field_names['content'] = add_escape_custom(replace($pid, $encounter, $field_names['content']));
    reset($field_names);
    $newid = formSubmit("form_CAMOS", $field_names, $_GET["id"], $userauthorized);
    addForm($encounter, $CAMOS_form_name, $newid, "CAMOS", $pid, $userauthorized);
}
//deal with embedded camos submissions here
foreach ($camos_array as $val) {
    if (preg_match("/^[\\s\\r\\n\\\\r\\\\n]*\$/", $val['content']) == 0) {
        //make sure blanks not submitted
        foreach ($val as $k => $v) {
            // Replace the placeholders before saving the form. This was changed in version 4.0. Previous to this, placeholders
            //   were submitted into the database and converted when viewing. All new notes will now have placeholders converted
            //   before being submitted to the database. Will also continue to support placeholder conversion on report
            //   views to support notes within database that still contain placeholders (ie. notes that were created previous to
            //   version 4.0).
            $val[$k] = trim(add_escape_custom(replace($pid, $encounter, $v)));
        }
        $CAMOS_form_name = "CAMOS-" . $val['category'] . '-' . $val['subcategory'] . '-' . $val['item'];
        reset($val);
        $newid = formSubmit("form_CAMOS", $val, $_GET["id"], $userauthorized);
        addForm($encounter, $CAMOS_form_name, $newid, "CAMOS", $pid, $userauthorized);
    }
}
echo "<font color=red><b>" . xl('submitted') . ": " . time() . "</b></font>";
Example #27
0
<?php

# file habits/save.php
# saves what cames from habits/new.php
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
formHeader('Habits form submitted');
$_POST["smoke_quit"] = dateToDB($_POST["smoke_quit"]);
$id = formSubmit('form_habits', $_POST);
//this function adds the form to a table wich creates a registry
//don't forget to add it in your save.php file.
// then it may be retrievable by the report menu
if ($encounter == "") {
    $encounter = date("Ymd");
}
//$newid=mysql_insert_id($GLOBALS['dbh']); // last id
if ($GLOBALS['lastidado'] > 0) {
    $newid = $GLOBALS['lastidado'];
} else {
    $newid = mysql_insert_id($GLOBALS['dbh']);
}
// last id
addForm($encounter, "Habits", $newid, "habits", $pid, $userauthorized);
formJump("./print.php?id={$id}");
formFooter();
Example #28
0
<?php

//------------Forms generated from formsWiz
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    echo "{$var}\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_contacts", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Contacts", $newid, "contacts", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_contacts set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(), od_base_curve='" . $_POST["od_base_curve"] . "', od_sphere='" . $_POST["od_sphere"] . "', od_cylinder='" . $_POST["od_cylinder"] . "', od_axis='" . $_POST["od_axis"] . "', od_diameter='" . $_POST["od_diameter"] . "', os_base_curve='" . $_POST["os_base_curve"] . "', os_sphere='" . $_POST["os_sphere"] . "', os_cylinder='" . $_POST["os_cylinder"] . "', os_axis='" . $_POST["os_axis"] . "', os_diameter='" . $_POST["os_diameter"] . "', material='" . $_POST["material"] . "', color='" . $_POST["color"] . "', bifocal_type='" . $_POST["bifocal_type"] . "', add_value='" . $_POST["add_value"] . "', va_far='" . $_POST["va_far"] . "', va_near='" . $_POST["va_near"] . "', additional_notes='" . $_POST["additional_notes"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();
Example #29
0
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
include_once "{$srcdir}/calendar.inc";
include_once "{$srcdir}/lists.inc";
$frmn = 'form_plist';
$ftitle = 'Problem list';
$old = sqlStatement("select form_id, formdir from forms where (form_name='{$ftitle}') and (pid={$pid}) order by date desc limit 1");
if ($old) {
    $dt = sqlFetchArray($old);
    $fid = $dt['form_id'];
    if ($fid && $fid != 0 && $fid != '') {
        $fdir = $dt['formdir'];
        unset($dt);
        $dt = formFetch($frmn, $fid);
        $newid = formSubmit($frmn, array_slice($dt, 7), $id, $userauthorized);
        addForm($encounter, $ftitle, $newid, $fdir, $pid, $userauthorized);
        $id = $newid;
        formJump("{$rootdir}/patient_file/encounter/view_form.php?formname={$fdir}&id={$newid}");
        exit;
    }
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<?php 
html_header_show();
?>
Example #30
0
<?php

//------------ sava.php for Ankleinjury Form created by Nikolai Vitsyn by 2004/01/23
include_once "../../globals.php";
include_once "{$srcdir}/api.inc";
include_once "{$srcdir}/forms.inc";
foreach ($_POST as $k => $var) {
    $_POST[$k] = mysql_escape_string($var);
    //echo "$var\n";
}
if ($encounter == "") {
    $encounter = date("Ymd");
}
if ($_GET["mode"] == "new") {
    $newid = formSubmit("form_ankleinjury", $_POST, $_GET["id"], $userauthorized);
    addForm($encounter, "Ankle Evaluation Form", $newid, "ankleinjury", $pid, $userauthorized);
} elseif ($_GET["mode"] == "update") {
    sqlInsert("update form_ankleinjury set pid = {$_SESSION["pid"]},groupname='" . $_SESSION["authProvider"] . "',user='******',authorized={$userauthorized},activity=1, date = NOW(),\nankle_date_of_injuary='" . $_POST["ankle_date_of_injuary"] . "',\nankle_work_related='" . $_POST["ankle_work_related"] . "',\nankle_foot='" . $_POST["ankle_foot"] . "',\nankle_severity_of_pain='" . $_POST["ankle_severity_of_pain"] . "',\nankle_significant_swelling='" . $_POST["ankle_significant_swelling"] . "',\nankle_onset_of_swelling='" . $_POST["ankle_onset_of_swelling"] . "',\nankle_how_did_injury_occur='" . $_POST["ankle_how_did_injury_occur"] . "',\nankle_ottawa_bone_tenderness='" . $_POST["ankle_ottawa_bone_tenderness"] . "',\nankle_able_to_bear_weight_steps='" . $_POST["ankle_able_to_bear_weight_steps"] . "',\nankle_x_ray_interpretation='" . $_POST["ankle_x_ray_interpretation"] . "',\nankle_additional_x_ray_notes='" . $_POST["ankle_additional_x_ray_notes"] . "',\nankle_diagnosis1='" . $_POST["ankle_diagnosis1"] . "',\nankle_diagnosis2='" . $_POST["ankle_diagnosis2"] . "',\nankle_diagnosis3='" . $_POST["ankle_diagnosis3"] . "',\nankle_diagnosis4='" . $_POST["ankle_diagnosis4"] . "',\nankle_plan='" . $_POST["ankle_plan"] . "',\nankle_additional_diagnisis='" . $_POST["ankle_additional_diagnisis"] . "' where id={$id}");
}
$_SESSION["encounter"] = $encounter;
formHeader("Redirecting....");
formJump();
formFooter();