From 3c59355e465102095e87984ac6346a3b532c62f2 Mon Sep 17 00:00:00 2001 From: teryhill Date: Thu, 28 Apr 2016 07:42:50 -0400 Subject: [PATCH] Removed athletic_team code. --- contrib/forms/xmlformgen/xslt/common_objects.xslt | 8 - interface/forms/newpatient/common.php | 27 +- interface/globals.php | 4 +- interface/main/calendar/add_edit_event.php | 6 +- interface/main/left_nav.php | 305 ++-------- interface/main/main_navigation.php | 13 - interface/main/main_screen.php | 14 +- interface/patient_file/deleter.php | 6 - interface/patient_file/encounter/forms.php | 14 - interface/patient_file/history/encounters.php | 13 +- interface/patient_file/history/history.inc.php | 10 - interface/patient_file/navigation.php | 3 - interface/patient_file/summary/add_edit_issue.php | 114 +--- interface/patient_file/summary/demographics.php | 83 +-- interface/patient_file/summary/patient_summary.php | 13 - interface/patient_file/summary/stats_full.php | 13 +- interface/patient_file/summary/summary_bottom.php | 10 - interface/reports/absences_report.php | 348 ------------ interface/reports/football_injury_report.php | 626 --------------------- interface/reports/injury_overview_report.php | 302 ---------- interface/reports/old_players_report.php | 211 ------- interface/reports/players_report.php | 480 ---------------- interface/reports/players_report_ajax.php | 44 -- interface/reports/players_report_dialog.php | 351 ------------ library/football_injury.inc.php | 578 ------------------- library/globals.inc.php | 1 - library/lists.inc | 4 - library/options.inc.php | 15 - sql/database.sql | 4 - templates/report/general_default.html | 11 - 30 files changed, 88 insertions(+), 3543 deletions(-) delete mode 100644 interface/reports/absences_report.php delete mode 100644 interface/reports/football_injury_report.php delete mode 100644 interface/reports/injury_overview_report.php delete mode 100644 interface/reports/old_players_report.php delete mode 100644 interface/reports/players_report.php delete mode 100644 interface/reports/players_report_ajax.php delete mode 100644 interface/reports/players_report_dialog.php delete mode 100644 library/football_injury.inc.php diff --git a/contrib/forms/xmlformgen/xslt/common_objects.xslt b/contrib/forms/xmlformgen/xslt/common_objects.xslt index 146ac0c6b..36188955c 100644 --- a/contrib/forms/xmlformgen/xslt/common_objects.xslt +++ b/contrib/forms/xmlformgen/xslt/common_objects.xslt @@ -160,14 +160,6 @@ if ( acl_check(']]> $thisauth_write_addonly=TRUE; } ]]> - var category = document.forms[0].pc_catid.value; if ( category == '_blank' ) { alert(""); return; } - - top.restoreSession(); f.submit(); } @@ -182,7 +178,7 @@ function cancelClicked() { - > + - > + > - - + - - + +
'>
- -

Click [Add Issue] to add a new issue if:
- New injury likely to miss > 1 day
- New significant illness/medical
- New allergy - only if nil exist

- -
@@ -328,13 +316,8 @@ if ($fres) {
- - - -
diff --git a/interface/globals.php b/interface/globals.php index 02f98997d..9c0a83dce 100644 --- a/interface/globals.php +++ b/interface/globals.php @@ -169,7 +169,6 @@ require_once (dirname(__FILE__) . "/../library/sanitize.inc.php"); include_once (dirname(__FILE__) . "/../library/date_functions.php"); // Defaults for specific applications. -$GLOBALS['athletic_team'] = false; $GLOBALS['weight_loss_clinic'] = false; $GLOBALS['ippf_specific'] = false; $GLOBALS['cene_specific'] = false; @@ -219,8 +218,7 @@ if (!empty($glrow)) { $temp_css_theme_name = $gl_value; } else if ($gl_name == 'specific_application') { - if ($gl_value == '1') $GLOBALS['athletic_team'] = true; - else if ($gl_value == '2') $GLOBALS['ippf_specific'] = true; + if ($gl_value == '2') $GLOBALS['ippf_specific'] = true; else if ($gl_value == '3') $GLOBALS['weight_loss_clinic'] = true; } else if ($gl_name == 'inhouse_pharmacy') { diff --git a/interface/main/calendar/add_edit_event.php b/interface/main/calendar/add_edit_event.php index 1ca831afa..3759e2d58 100644 --- a/interface/main/calendar/add_edit_event.php +++ b/interface/main/calendar/add_edit_event.php @@ -1134,7 +1134,7 @@ $classpati=''; - : + : ' @@ -1431,7 +1431,7 @@ if ($GLOBALS['select_multi_providers']) { - : + : diff --git a/interface/main/left_nav.php b/interface/main/left_nav.php index e63f2463f..657d97bd8 100644 --- a/interface/main/left_nav.php +++ b/interface/main/left_nav.php @@ -101,7 +101,6 @@ use ESign\Api; // $primary_docs = array( - 'ros' => array(xl('Roster') , 0, 'reports/players_report.php?embed=1'), 'cal' => array(xl('Calendar') , 0, 'main/main_info.php'), 'pfb' => array(xl('Patient Flow Board') , 0, '../interface/patient_tracker/patient_tracker.php?skip_timeout_reset=1'), 'app' => array(xl('Portal Activity') , 0, '../myportal/index.php'), @@ -176,8 +175,6 @@ use ESign\Api; $disallowed['fax'] = !($GLOBALS['enable_hylafax'] || $GLOBALS['enable_scanner']); - $disallowed['ros'] = !$GLOBALS['athletic_team']; - $disallowed['iss'] = !((acl_check('encounters','notes','','write') || acl_check('encounters','notes_a','','write') ) && acl_check('patients','med','','write') ); @@ -266,10 +263,7 @@ function genPopupsList($style='') { - - - - $value) { -?> - $('#icontainer_').empty(); - if (active_pid != 0) { - $('#icontainer_').append("
  • " + - "'>" + - "
  • "); - top.restoreSession(); - $.getScript('../../library/ajax/left_nav_issues_ajax.php?type='); - } - - } // end function reloadIssues - - // This is referenced in left_nav_issues_ajax.php and is called when [Add] - // is clicked for an issue menu item to add a new encounter for the issue. - // So far this only applies to the Athletic Team version of the menu. - // - function addEncNotes(issue) { - - // top.restoreSession(); - // $.getScript('../../library/ajax/left_nav_encounter_ajax.php?createvisit=1&issue=' + issue); - - // The above AJAX call was to create the encounter right away, but we later - // (2012-07-03) decided it's better to present the New Encounter form instead. - // Note the issue ID is passed so it will be pre-selected in that form. - loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=&issue=' + issue); - - return false; - } - + + // + // Commented out this code block are part of the removal of the athletic team code TLH + // + // Clear and reload issue-related menu items for active_pid. + // Currently this only applies to athletic teams, but might be implemented + // in the general menu at some future time. + // + //function reloadIssues() { + // $value) { + //?> + //$('#icontainer_').empty(); + //if (active_pid != 0) { + // $('#icontainer_').append("
  • " + + // "'>" + + // "
  • "); + // top.restoreSession(); + // $.getScript('../../library/ajax/left_nav_issues_ajax.php?type='); + // } + // + //} // end function reloadIssues + + // This is referenced in left_nav_issues_ajax.php and is called when [Add] + // is clicked for an issue menu item to add a new encounter for the issue. + // So far this only applies to the Athletic Team version of the menu. + // + //function addEncNotes(issue) { + + // top.restoreSession(); + // $.getScript('../../library/ajax/left_nav_encounter_ajax.php?createvisit=1&issue=' + issue); + + // The above AJAX call was to create the encounter right away, but we later + // (2012-07-03) decided it's better to present the New Encounter form instead. + // Note the issue ID is passed so it will be pre-selected in that form. + //loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=&issue=' + issue); + + //return false; + //} + // + // Commented out the above code block are part of the removal of the athletic team code TLH + // + + // Call this to announce that the patient has changed. You must call this // if you change the session PID, so that the navigation frame will show the // correct patient and so that the other frame will be reloaded if it contains @@ -807,7 +808,6 @@ function clearactive() { } } - reloadIssues(pid); $(parent.Title.document.getElementById('clear_active')).show();//To display Clear Active Patient button on selecting a patient } function setPatientEncounter(EncounterIdArray,EncounterDateArray,CalendarCategoryArray) { @@ -1044,7 +1044,7 @@ $(document).ready(function(){ $("#navigation").treeview({ animated: "fast", collapsed: true, - unique: , + unique: true, toggle: function() { window.console && console.log("%o was toggled", this); } @@ -1061,22 +1061,13 @@ $(document).ready(function(){
    -\n"; -} -?> -
    - -
    @@ -1087,7 +1078,7 @@ if ($GLOBALS['athletic_team']) {
    - /> +
    @@ -1098,173 +1089,6 @@ if ($GLOBALS['athletic_team']) { - - @@ -1672,7 +1494,7 @@ if (!empty($reg)) { // Builds the table of radio buttons and their labels. Radio button values // are comprised of the 3-character document id and the 1-digit usage type, // so that JavaScript can easily access this information. - $default_top_rbid = $GLOBALS['athletic_team'] ? 'ros' : 'cal'; + $default_top_rbid = 'cal'; foreach ($primary_docs as $key => $varr) { if (!empty($disallowed[$key])) continue; $label = $varr[0]; @@ -1712,14 +1534,11 @@ if (!empty($reg)) { - \n"; genFindBlock(); echo "
    \n"; -} ?> diff --git a/interface/main/main_navigation.php b/interface/main/main_navigation.php index 925e6f989..2576018c6 100644 --- a/interface/main/main_navigation.php +++ b/interface/main/main_navigation.php @@ -116,25 +116,12 @@ include_once("../../library/acl.inc"); - - - -  -  - - -  -  - - -     -   diff --git a/interface/main/main_screen.php b/interface/main/main_screen.php index a35b79af4..5ea148845 100644 --- a/interface/main/main_screen.php +++ b/interface/main/main_screen.php @@ -83,9 +83,6 @@ else if (!empty($_POST['patientID'])) { $frame1url = "../patient_file/summary/demographics.php?set_pid=".attr($patientID)."&set_encounterid=".attr($encounterID); } } -else if ($GLOBALS['athletic_team']) { - $frame1url = "../reports/players_report.php?embed=1"; -} else if (isset($_GET['mode']) && $_GET['mode'] == "loadcalendar") { $frame1url = "calendar/index.php?pid=" . attr($_GET['pid']); if (isset($_GET['date'])) $frame1url .= "&date=" . attr($_GET['date']); @@ -103,7 +100,7 @@ else { $frame1url = "main.php?mode=" . attr($_GET['mode']); } -$nav_area_width = $GLOBALS['athletic_team'] ? '230' : '130'; +$nav_area_width = '130'; if (!empty($GLOBALS['gbl_nav_area_width'])) $nav_area_width = $GLOBALS['gbl_nav_area_width']; ?> @@ -142,9 +139,10 @@ $sidebar_tpl = " "; -$main_tpl = empty($GLOBALS['athletic_team']) ? "" : ""; +$main_tpl = "" ; $main_tpl .= " "; + // Please keep in mind that border (mozilla) and framespacing (ie) are the // same thing. use both. // frameborder specifies a 3d look, not whether there are borders. @@ -170,7 +168,7 @@ if ($GLOBALS['concurrent_layout']) { - + @@ -184,11 +182,7 @@ if ($GLOBALS['concurrent_layout']) { ,*' frameborder='1' border='1' framespacing='1'> - - - - diff --git a/interface/patient_file/deleter.php b/interface/patient_file/deleter.php index abd4daf3b..acd719689 100644 --- a/interface/patient_file/deleter.php +++ b/interface/patient_file/deleter.php @@ -220,12 +220,6 @@ function popup_close() { delete_document($row['id']); } - // This table exists only for athletic teams. - $tmp = sqlQuery("SHOW TABLES LIKE 'daily_fitness'"); - if (!empty($tmp)) { - row_delete("daily_fitness", "pid = '" . add_escape_custom($patient) . "'"); - } - row_delete("patient_data", "pid = '" . add_escape_custom($patient) . "'"); } else if ($encounterid) { diff --git a/interface/patient_file/encounter/forms.php b/interface/patient_file/encounter/forms.php index aac5dbf6b..666757f88 100644 --- a/interface/patient_file/encounter/forms.php +++ b/interface/patient_file/encounter/forms.php @@ -580,20 +580,6 @@ if ( $esign->isButtonViewable() ) { } ?> - - - - diff --git a/interface/patient_file/history/encounters.php b/interface/patient_file/history/encounters.php index 006c3a3e0..abcaa3dc3 100644 --- a/interface/patient_file/history/encounters.php +++ b/interface/patient_file/history/encounters.php @@ -76,7 +76,7 @@ $issue = empty($_GET['issue']) ? 0 : 0 + $_GET['issue']; // $tmp = sqlQuery("select authorized from users " . "where id = ?", array($_SESSION['authUserID']) ); -$billing_view = ($tmp['authorized'] || $GLOBALS['athletic_team']) ? 0 : 1; +$billing_view = ($tmp['authorized']) ? 0 : 1; if (isset($_GET['billing'])) {$billing_view = empty($_GET['billing']) ? 0 : 1; }else $billing_view = ($default_encounter == 0) ? 0 : 1; @@ -151,12 +151,7 @@ function showDocument(&$drow) { echo "". htmlspecialchars( xl('Document') . ": " . basename($drow['url']) . ' (' . xl_document_category($drow['name']) . ')', ENT_NOQUOTES) . "\n"; - - // skip billing and insurance columns - if (!$GLOBALS['athletic_team']) { - echo " \n"; - } - + echo " \n"; echo "\n"; } @@ -373,7 +368,7 @@ $getStringForPage="&pagesize=".attr($pagesize)."&pagestart=".attr($pagestart); - +   @@ -725,7 +720,7 @@ while ($result4 = sqlFetchArray($res4)) { } // show insurance - if (!$GLOBALS['athletic_team'] && !$GLOBALS['ippf_specific']) { + if (!$GLOBALS['ippf_specific']) { $insured = oeFormatShortDate($raw_encounter_date); if ($auth_demo) { $responsible = -1; diff --git a/interface/patient_file/history/history.inc.php b/interface/patient_file/history/history.inc.php index 8252406fb..cc71fe74b 100644 --- a/interface/patient_file/history/history.inc.php +++ b/interface/patient_file/history/history.inc.php @@ -11,15 +11,6 @@ // Exams: database name and descriptive name, in order of on-screen // presentation, and with the exam results index for last_exam_results: // - if ($GLOBALS['athletic_team']) { - $exams = array( - "last_cardiac_echo" => '08 ' . xl('Cardiac Echo'), - "last_ecg" => '07 ' . xl('ECG'), - "last_physical_exam" => '05 ' . xl('Physical Exam'), - "last_breast_exam" => '00 ' . xl('Breast Exam'), - "last_mammogram" => '01 ' . xl('Mammogram') - ); - } else { $exams = array( "last_breast_exam" => '00 ' . xl('Breast Exam'), "last_cardiac_echo" => '08 ' . xl('Cardiac Echo'), @@ -38,7 +29,6 @@ "last_hemoglobin" => '13 ' . xl('Hemoglobin'), "last_psa" => '14 ' . xl('PSA') ); - } // Deprecated surgery date items that should be shown only if there // is data, and which should be moved to the lists table: diff --git a/interface/patient_file/navigation.php b/interface/patient_file/navigation.php index c9ff2e8e2..41f32501b 100644 --- a/interface/patient_file/navigation.php +++ b/interface/patient_file/navigation.php @@ -71,9 +71,6 @@ function selpopup(selobj) { - - - diff --git a/interface/patient_file/summary/add_edit_issue.php b/interface/patient_file/summary/add_edit_issue.php index 1c724a689..ab6251dae 100644 --- a/interface/patient_file/summary/add_edit_issue.php +++ b/interface/patient_file/summary/add_edit_issue.php @@ -487,24 +487,8 @@ ActiveIssueCodeRecycleFn($thispid, $ISSUE_TYPES); document.getElementById('row_reaction' ).style.display = alldisp; document.getElementById('row_referredby' ).style.display = (f.form_referredby.value) ? '' : comdisp; document.getElementById('row_comments' ).style.display = (f.form_comments.value ) ? '' : revdisp; - - document.getElementById('row_returndate' ).style.display = comdisp; - document.getElementById('row_injury_grade' ).style.display = injdisp; - document.getElementById('row_injury_part' ).style.display = injdisp; - document.getElementById('row_injury_type' ).style.display = injdisp; - document.getElementById('row_medical_system').style.display = nordisp; - document.getElementById('row_medical_type' ).style.display = nordisp; - // Change label text of 'title' row depending on issue type: - document.getElementById('title_diagnosis').innerHTML = '' + - (index == ? - '' : - (index == ? - '' : - '')) + - ':'; - document.getElementById('row_referredby' ).style.display = (f.form_referredby.value) ? '' : comdisp; - +   - - : + : ' style='width:100%' /> @@ -699,55 +683,6 @@ function divclick(cb, divid) { - - - id='row_injury_grade'> - : - - - - - - id='row_injury_part'> - : - - - - - - id='row_injury_type'> - : - - - - - - id='row_medical_system'> - : - - - - - - id='row_medical_type'> - : - - - - - - - : @@ -785,20 +720,6 @@ echo generate_select_list('form_medical_type', 'medical_type', $irow['injury_typ - id='row_returndate'> - : - - ' - onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' - title='' /> - [?]' /> -  () - - - : @@ -824,29 +745,6 @@ echo generate_select_list('form_medical_type', 'medical_type', $irow['injury_typ - id='row_reinjury_id'> - : - - - - : @@ -866,7 +764,7 @@ echo generate_select_list('form_medical_type', 'medical_type', $irow['injury_typ - id='row_referredby'> + : ' @@ -881,7 +779,7 @@ echo generate_select_list('form_medical_type', 'medical_type', $irow['injury_typ - > + > : - > + > : diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index 7c87e5445..1128e77cd 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -215,30 +215,6 @@ if ($result3['provider']) { // Use provider in case there is an ins record w/ } - function validate() { - var f = document.forms[0]; - - if (confirm('Do you wish to also set this new return date in the issue titled ""?')) { - f.form_issue_id.value = ''; - } else { - alert('OK, you will need to manually update the return date in any affected issue(s).'); - } - - alert('You have changed the return date but there are no open issues. You probably need to create or modify one.'); - - return true; - } - function newEvt() { dlgopen('../../main/calendar/add_edit_event.php?patientid=', '_blank', 775, 375); return false; @@ -662,7 +638,7 @@ if ($GLOBALS['patient_id_category_name']) {
    - > + \n"; -} - -function cbfiinput($name, $colname) { - global $firow; - $ret = "" . cbfiinput($name, $colname) . "$desc\n"; -} - -function issue_football_injury_newtype() { - echo " var fiadisp = (aitypes[index] == 2) ? '' : 'none';\n"; - echo " document.getElementById('football_injury').style.display = fiadisp;\n"; -} - -function issue_football_injury_save($issue) { - global $arr_activity, $arr_sanction, $arr_weather; - $query = "REPLACE INTO lists_football_injury ( " . - "id, fiinjmin, fiinjtime, fimatchtype, "; - foreach ($arr_activity as $key => $value) - $query .= "fimech_$key, "; - foreach ($arr_sanction as $key => $value) - $query .= "fimech_$key, "; - foreach ($arr_weather as $key => $value) - $query .= "fiweather_$key, "; - $query .= "fimech_othercon, fimech_othernon, fiweather_temperature, " . - "fisurface, fiposition, fifootwear, firemoved, ficondition " . - ") VALUES ( " . - $issue . ", " . - invalue('form_injmin') . ", " . - rbvalue('form_injtime') . ", " . - rbvalue('form_matchtype') . ", "; - foreach ($arr_activity as $key => $value) - $query .= cbvalue("form_mech_$key") . ", "; - foreach ($arr_sanction as $key => $value) - $query .= cbvalue("form_mech_$key") . ", "; - foreach ($arr_weather as $key => $value) - $query .= cbvalue("form_weather_$key") . ", "; - $query .= - txvalue('form_mech_othercon') . ", " . - txvalue('form_mech_othernon') . ", " . - txvalue('form_weather_temperature') . ", " . - rbvalue('form_surface') . ", " . - rbvalue('form_position') . ", " . - rbvalue('form_footwear') . ", " . - // rbvalue('form_side') . ", " . - rbvalue('form_removed') . ", " . - rbvalue('form_condition') . " " . - ")"; - sqlStatement($query); -} - -function issue_football_injury_form($issue) { - global $firow, $arr_match_type, $arr_injtime, $arr_training_type; - global $arr_activity, $arr_activity_contact_count, $arr_position; - global $arr_surface, $arr_condition, $arr_weather, $arr_footwear; - - if ($issue) { - $firow = sqlQuery ("SELECT * FROM lists_football_injury WHERE id = '$issue'"); - } else { - $firow = array(); - } -?> - -
     
    \n"; } - // This stuff only applies to athletic team use of OpenEMR. The client - // insisted on being able to quickly change fitness and return date here: - // - if (false && $GLOBALS['athletic_team']) { - // blue green yellow red orange - $fitcolors = array('#6677ff','#00cc00','#ffff00','#ff3333','#ff8800','#ffeecc','#ffccaa'); - if (!empty($GLOBALS['fitness_colors'])) $fitcolors = $GLOBALS['fitness_colors']; - $fitcolor = $fitcolors[0]; - $form_fitness = $_POST['form_fitness']; - $form_userdate1 = fixDate($_POST['form_userdate1'], ''); - $form_issue_id = $_POST['form_issue_id']; - if ($form_submit) { - $returndate = $form_userdate1 ? "'$form_userdate1'" : "NULL"; - sqlStatement("UPDATE patient_data SET fitness = ?, " . - "userdate1 = ? WHERE pid = ?", array($form_fitness, $returndate, $pid) ); - // Update return date in the designated issue, if requested. - if ($form_issue_id) { - sqlStatement("UPDATE lists SET returndate = ? WHERE " . - "id = ?", array($returndate, $form_issue_id) ); - } - } else { - $form_fitness = $result['fitness']; - if (! $form_fitness) $form_fitness = 1; - $form_userdate1 = $result['userdate1']; - } - $fitcolor = $fitcolors[$form_fitness - 1]; - echo " \n"; - echo " Fitness to Play:
    \n"; - echo " \n"; - echo "
    Return to Play:
    \n"; - echo " \n" . - " [?]\n"; - echo " \n"; - echo " \n"; - echo "

    \n"; - echo " \n"; - } - // Show current and upcoming appointments. if (isset($pid) && !$GLOBALS['disable_calendar']) { // @@ -1549,11 +1473,6 @@ expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel, - - - - - - - - - - - - - -
    - -

    - -
    - - - - - - - - - - - -
    - - />  - />   - - - [?]'> -   - - [?]'> -   - '> -
    -
    - - - - - - - - - - - - - - -= '$from_date' AND e.pc_eventDate <= '$to_date') OR " . - "(e.pc_endDate = '0000-00-00' AND e.pc_eventDate >= '$from_date' AND " . - "e.pc_eventDate <= '$to_date'))"); - - while ($erow = sqlFetchArray($eres)) { - $estart = $erow['pc_eventDate']; - if ($estart < $from_date) $estart = $from_date; - $eend = ($erow['pc_endDate'] > '0000-00-00') ? $erow['pc_endDate'] : $erow['pc_eventDate']; - if ($eend > $to_date) $eend = $to_date; - $time = mktime(0, 0, 0, substr($estart, 5, 2), - substr($estart, 8, 2), substr($estart, 0, 4)); - $endtime = mktime(0, 0, 0, substr($eend, 5, 2), - substr($eend, 8, 2), substr($eend, 0, 4)) + (24 * 60 * 60); - - $eid = $erow['pc_eid']; - $squad = substr($erow['pc_catdesc'], 6); - $duration = $erow['pc_duration'] / 60; - - for (; $time < $endtime; $time += 24 * 60 * 60) { - $date = date('Y-m-d', $time); - if (!eventMatchesDay($erow, $date)) continue; - - $pres = sqlStatement("SELECT pd.lname, pd.fname, pd.mname, " . - "pd.pid, pe.minutes, pe.fitness_related " . - "FROM patient_data AS pd " . - "LEFT JOIN player_event AS pe ON pe.pid = pd.pid AND pe.date = '$date' AND pe.pc_eid = '$eid' " . - "WHERE pd.squad = '$squad'"); - - while ($prow = sqlFetchArray($pres)) { - - // Each iteration of this loop is for a particular player and a - // particular event on a particular day. - - $patient_id = 0 + $prow['pid']; - - if ($PROPLOGIC) { - // For a given date, fitness info is the last on or before that date, - // or if there is none then the defaults apply. - $dfrow = sqlQuery("SELECT df.issue_id, l.diagnosis " . - "FROM daily_fitness AS df " . - "LEFT JOIN lists AS l ON l.id = df.issue_id " . - "WHERE df.pid = '$patient_id' AND df.date <= '$date' " . - "ORDER BY df.date DESC LIMIT 1"); - } - else { - $dfrow = sqlQuery("SELECT df.issue_id, l.diagnosis " . - "FROM daily_fitness AS df " . - "LEFT JOIN lists AS l ON l.id = df.issue_id " . - "WHERE df.pid = '$patient_id' AND df.date = '$date'"); - } - if (empty($dfrow)) { - $dfrow = array( - 'issue_id' => '0', - 'diagnosis' => '', - ); - } - - // For each ($key,$date) accumulate event minutes and missed minutes. - // Then we can total fractions of days missed just before sorting. - - $fitness_related = isset($prow['fitness_related']) ? $prow['fitness_related'] : - !empty($dfrow['issue_id']); - - if ($form_by == 'p') { - $key = trim($prow['lname'] . ', ' . $prow['fname'] . ' ' . $prow['mname']); - } else { - $key = $fitness_related ? $dfrow['diagnosis'] : 'z'; - } - if (empty($areport[$key])) { - $areport[$key] = array(); - $areport[$key]['days'] = array(); - $areport[$key]['gmissed'] = 0; - } - if (empty($areport[$key]['days'][$date])) { - $areport[$key]['days'][$date] = array(); - $areport[$key]['days'][$date][0] = 0; // total event minutes - $areport[$key]['days'][$date][1] = 0; // missed event minutes - } - - $missed = isset($prow['minutes']) ? ($duration - $prow['minutes']) : 0; - - if ($duration && $erow['pc_apptstatus'] == 'G') { // if this is a game event - $areport[$key]['gmissed'] += $missed / $duration; - } - - // echo "\n"; // debugging - - // Event minutes and those missed are totaled by day, so that we - // can later total up the fractions of days missed for each $key. - $areport[$key]['days'][$date][0] += $duration; - $areport[$key]['days'][$date][1] += $missed; - } - } - } - - // echo "\n"; - - foreach ($areport as $key => $arr) { - $areport[$key]['dmissed'] = 0; - foreach ($arr['days'] as $date => $pair) { - if ($pair[0]) { - $areport[$key]['dmissed'] += $pair[1] / $pair[0]; - } - } - unset($areport[$key]['days']); - } - - /******************************************************************* - $query = "SELECT lists.diagnosis, lists.pid, lists.type, " . - "lists.extrainfo AS gmissed, " . - "lists.begdate, lists.enddate, lists.returndate, " . - "pd.lname, pd.fname, pd.mname " . - "FROM lists " . - "JOIN patient_data AS pd ON pd.pid = lists.pid " . - "WHERE ( lists.returndate IS NULL OR lists.returndate >= '$from_date' ) AND " . - "( lists.begdate IS NULL OR lists.begdate <= '$to_date' )" . - "ORDER BY pd.lname, pd.fname, pd.mname, lists.pid, lists.begdate"; - $res = sqlStatement($query); - - $areport = array(); - $last_listid = 0; - $last_pid = 0; - $last_endsecs = 0; - - while ($row = sqlFetchArray($res)) { - $thispid = $row['pid']; - // Compute days missed. Force non-overlap of multiple issues for the - // same player. This logic assumes sorting on begdate within pid. - $begsecs = $row['begdate'] ? strtotime($row['begdate']) : 0; - $endsecs = $row['returndate'] ? strtotime($row['returndate']) : time(); - if ($thispid == $last_pid) { - if ($begsecs < $last_endsecs) { - $begsecs = $last_endsecs; - } - } - else { - $last_pid = $thispid; - $last_endsecs = 0; - $ptname = trim($row['lname'] . ', ' . $row['fname'] . ' ' . $row['mname']); - } - $daysmissed = 0; - if ($row['begdate']) { - if ($begsecs > $endsecs) $begsecs = $endsecs; - if ($last_endsecs < $endsecs) $last_endsecs = $endsecs; - $daysmissed = round(($endsecs - $begsecs) / (60 * 60 * 24)); - } - if ($form_by == 'p') { - $key = $ptname; - } else { - $key = $row['diagnosis']; - } - if (empty($areport[$key])) { - $areport[$key] = array(); - $areport[$key]['count'] = 0; - $areport[$key]['dmissed'] = 0; - $areport[$key]['gmissed'] = 0; - } - $areport[$key]['count'] += 1; - $areport[$key]['dmissed'] += $daysmissed; - $areport[$key]['gmissed'] += $row['gmissed']; - } - *******************************************************************/ - - ksort($areport); - - foreach ($areport as $key => $row) { -?> - - - - - - - - - - - - - - -
    - - - - - - - - - -
    - - - - - - - - - -
    -
    -
    - - - - - - - - diff --git a/interface/reports/football_injury_report.php b/interface/reports/football_injury_report.php deleted file mode 100644 index fce90af4c..000000000 --- a/interface/reports/football_injury_report.php +++ /dev/null @@ -1,626 +0,0 @@ - xl('Activity Type'), - 2 => xl('Body Region'), - 3 => xl('Footwear Type'), - 4 => xl('Game Period'), - 5 => xl('Injury Mechanism'), - 6 => xl('Injury Type'), - 7 => xl('Player'), - 8 => xl('Playing Position'), - 9 => xl('Sanction Type'), - 10 => xl('Surface Type'), - 11 => xl('Training Type') -); - -// A reported value is either scalar, or an array listed horizontally. If -// multiple items are chosen then each starts in the next available column. -// -$arr_show = array( - 1 => array('Number of Injuries'), - 2 => array('Days/Games Missed'), - 3 => array('Body Region'), - 4 => array('Injury Type'), - 5 => array('Issue Title'), -); - -$arr_regions_osi10 = array( - 'A' => xl('Ankle'), - 'B' => xl('Pelvis and buttock'), - 'C' => xl('Chest'), - 'D' => xl('Thoracic spine'), - 'E' => xl('Elbow'), - 'F' => xl('Foot'), - 'G' => xl('Hip and groin'), - 'H' => xl('Head'), - 'I' => xl('Congenital'), - 'J' => xl('Paedeatric'), - 'K' => xl('Knee'), - 'L' => xl('Lumbar spine'), - 'M' => xl('Medical problem'), - 'N' => xl('Neck'), - 'O' => xl('Trunk and abdomen'), - 'Q' => xl('Lower leg'), - 'R' => xl('Forearm'), - 'S' => xl('Shoulder'), - 'T' => xl('Thigh'), - 'U' => xl('Upper arm'), - 'V' => xl('Disabled'), - 'W' => xl('Wrist and hand'), - 'X' => xl('Location unspecified'), - 'Y' => xl('Post surgical'), - 'Z' => xl('No presenting illness/injury'), -); - -$arr_regions_osics = array( - 'A' => xl('Ankle + heel'), - 'B' => xl('Buttock + S.I.'), - 'C' => xl('Chest'), - 'D' => xl('Thoracic spine'), - 'E' => xl('Elbow'), - 'F' => xl('Foot'), - 'G' => xl('Hip + groin'), - 'H' => xl('Head'), - 'K' => xl('Knee'), - 'L' => xl('Lumbar spine'), - 'M' => xl('Medical problem'), - 'N' => xl('Neck'), - 'O' => xl('Abdominal'), - 'P' => xl('Hand + fingers'), - 'Q' => xl('Lower leg'), - 'R' => xl('Forearm'), - 'S' => xl('Shoulder + clavicle'), - 'T' => xl('Thigh + hamstring'), - 'U' => xl('Upper arm'), - 'W' => xl('Wrist'), - 'X' => xl('Multiple areas'), - 'Z' => xl('Area not specified') -); - -$arr_regions_ucsmc = array( - 'AN' => xl('Ankle + heel'), - 'AR' => xl('Upper arm'), - 'BL' => xl('Medical problem'), - 'CV' => xl('Medical problem'), - 'DE' => xl('Medical problem'), - 'EL' => xl('Elbow'), - 'EN' => xl('Medical problem'), - 'EV' => xl('Environmental'), - 'FA' => xl('Forearm'), - 'FE' => xl('Fluid and electrolyte problem'), - 'FO' => xl('Foot'), - 'GI' => xl('Abdominal'), - 'GU' => xl('Medical problem'), - 'HA' => xl('Hand + fingers'), - 'HE' => xl('Head'), - 'HI' => xl('Hip + groin'), - 'ID' => xl('Medical problem'), - 'KN' => xl('Knee'), - 'LE' => xl('Lower leg'), - 'LP' => xl('Lumbar spine'), - 'NE' => xl('Neck'), - 'NS' => xl('Medical problem'), - 'PS' => xl('Medical problem'), - 'RE' => xl('Medical problem'), - 'RM' => xl('Medical problem'), - 'SH' => xl('Shoulder + clavicle'), - 'TH' => xl('Thigh + hamstring'), - 'TR' => xl('Thoracic spine'), - 'WR' => xl('Wrist') -); - -$arr_types_osi10 = array( - 'A' => xl('Arthritis'), - 'C' => xl('Cartilage injury'), - 'D' => xl('Joint dislocations'), - 'F' => xl('Fracture'), - 'G' => xl('Synovitis, impingement, bursitis'), - 'H' => xl('Bruising/haematoma'), - 'J' => xl('Joint sprains'), - 'K' => xl('Laceration/abrasion'), - 'M' => xl('Muscle injury'), - 'N' => xl('Nerve injury'), - 'O' => xl('Organ injury'), - 'S' => xl('Stress fracture'), - 'T' => xl('Tendon injury'), - 'V' => xl('Vascular injury'), - 'W' => xl('Whiplash'), - 'X' => xl('Non specific injury'), - 'Y' => xl('Other stress/Over use injury'), - 'Z' => xl('Other injury not elsewhere specified'), -); - -$arr_types_osics = array( - 'A' => xl('Arthritis / degen joint disease'), - 'B' => xl('Developmental abnormality'), - 'C' => xl('Cartilage / chondral / disc damage'), - 'D' => xl('Dislocation'), - 'E' => xl('Tumour'), - 'F' => xl('Fracture'), - 'G' => xl('Avulsion / avulsion fracture'), - 'H' => xl('Haematoma / bruising'), - 'I' => xl('Infection / Abscess'), - 'J' => xl('Minor joint strain +/- synovitis'), - 'K' => xl('Laceration / skin condition'), - 'L' => xl('Ligament tear or sprain'), - 'M' => xl('Strain of muscle'), - 'N' => xl('Neural condition / nerve damage'), - 'O' => xl('Visceral damage/trauma/surgery'), - 'P' => xl('Chronic synovitis / effusion / joint pain / gout'), - 'Q' => xl('Old fracture non / malunion'), - 'R' => xl('Rupture'), - 'S' => xl('Stress fracture'), - 'T' => xl('Tendonitis / osis / bursitis'), - 'U' => xl('Instability / subluxation'), - 'V' => xl('Vascular condition'), - 'X' => xl('Medical problem'), - 'Y' => xl('Trigger point / compartment syndrome / DOMS / cramp'), - 'Z' => xl('Undiagnosed') -); - -$arr_types_ucsmc = array( - '01' => xl('Ligament tear or sprain'), - '02' => xl('Ligament tear or sprain'), - '03' => xl('Ligament tear or sprain'), - '07' => xl('Strain of muscle'), - '09' => xl('Rupture'), - '10' => xl('Dislocation'), - '11' => xl('Instability / subluxation'), - '12' => xl('Instability / subluxation'), - '13' => xl('Fracture'), - '14' => xl('Avulsion / avulsion fracture'), - '15' => xl('Old fracture non / malunion'), - '16' => xl('Fracture'), - '17' => xl('Cartilage / chondral / disc damage'), - '18' => xl('Stress fracture'), - '23' => xl('Haematoma / bruising'), - '24' => xl('Laceration / skin condition'), - '25' => xl('Haematoma / bruising'), - '26' => xl('Tendonitis / osis / bursitis'), - '27' => xl('Tendonitis / osis / bursitis'), - '28' => xl('Tendonitis / osis / bursitis'), - '29' => xl('Tendonitis / osis / bursitis'), - '33' => xl('Arthritis / degen joint diseas'), - '36' => xl('Trigger point / compartment syndrome / DOMS / cramp'), - '38' => xl('Infection / Abscess'), - '39' => xl('Medical problem'), - '40' => xl('Cartilage / chondral / disc damage'), - '42' => xl('Tumour'), - '44' => xl('Neural condition / nerve damage') -); - -?> - - - -<?php xl('Football Injury Report','e'); ?> - - - - - - - - - - - -
    - -

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    - For each - - - -   - ' title=''> : - - - -   - for: - - -
    - from - - - [?]'> -
    - to - - - [?]'> -
    -
    - -= '$from_date' ) AND " . - "lists.begdate <= '$to_date' AND " . - "lists.type = 'medical_problem' AND lists.title NOT LIKE '%Illness%'" . - "ORDER BY lists.pid, lists.begdate"; - *****************************************************************/ - $query = "SELECT lists.id AS listid, lists.diagnosis, lists.pid, " . - "lists.extrainfo AS gmissed, lists.begdate, lists.enddate, " . - "lists.returndate, lists.title, lfi.*, pd.lname, pd.fname, pd.mname " . - "FROM lists " . - "JOIN lists_football_injury AS lfi ON lfi.id = lists.id " . - "JOIN patient_data AS pd ON pd.pid = lists.pid AND ( $squadmatches ) " . - "WHERE ( lists.enddate IS NULL OR lists.enddate >= '$from_date' ) AND " . - "lists.begdate <= '$to_date' AND lists.type = 'football_injury' " . - "ORDER BY lists.pid, lists.begdate"; - /****************************************************************/ - - $res = sqlStatement($query); - - $areport = array(); - $arr_my_body_regions = array(); - $arr_my_injury_types = array(); - $arr_my_issue_titles = array(); - - // $last_listid = 0; - $last_pid = 0; - $last_endsecs = 0; - - while ($row = sqlFetchArray($res)) { - - // // Throw away extra injury forms. - // if ($row['listid'] == $last_listid) continue; - // $last_listid = $rows['listid']; - - // Determine the primary diagnosis. - $diagnosis = ''; - if (!empty($row['diagnosis'])) { - $relcodes = explode(';', $row['diagnosis']); - foreach ($relcodes as $codestring) { - if ($codestring === '') continue; - list($codetype, $code) = explode(':', $codestring); - if (empty($code)) $code = $codetype; - $diagnosis = $code; - break; - } - } - - $body_region = 'Undiagnosed'; - if (preg_match('/^(.)...$/', $diagnosis, $matches)) { - $body_region = $arr_regions_osi10[$matches[1]]; - } - else if (preg_match('/^(.)..$/', $diagnosis, $matches)) { - $body_region = $arr_regions_osics[$matches[1]]; - } - else if (preg_match('/^(..)\...\...$/', $diagnosis, $matches)) { - $body_region = $arr_regions_ucsmc[$matches[1]]; - } - - $injury_type = 'Undiagnosed'; - if (preg_match('/^.(.)..$/', $diagnosis, $matches)) { - $injury_type = $arr_types_osi10[$matches[1]]; - } - else if (preg_match('/^.(.).$/', $diagnosis, $matches)) { - $injury_type = $arr_types_osics[$matches[1]]; - } - else if (preg_match('/^..\...\.(..)$/', $diagnosis, $matches)) { - $injury_type = $arr_types_ucsmc[$matches[1]]; - } - - $issue_title = trim($row['title']); - - $key = 'Unspecified'; - - if ($form_by == '1') { // Activity Type - if ($row['fimech_tackling'] || $row['fimech_tackled'] || - $row['fimech_collision'] || $row['fimech_kicked'] || - $row['fimech_elbow'] || $row['fimech_othercon']) - { - $key = 'Contact'; - } else { - $key = 'Non-contact'; - } - } - - else if ($form_by == '2') { // Body Region - $key = $body_region; - } - - else if ($form_by == '3') { // Footwear Type - if ($row['fifootwear']) $key = $arr_footwear[$row['fifootwear']]; - } - - else if ($form_by == '4') { // Game Period - if ($row['fiinjmin']) { - $key = 15 * (int)(($row['fiinjmin'] + 14) / 15); - } - } - - else if ($form_by == '5') { // Injury Mechanism - foreach ($arr_activity as $imkey => $imvalue) { - if ($row["fimech_$imkey"]) { - $key = $imvalue; - break; - } - } - } - - else if ($form_by == '6') { // Injury Type - $key = $injury_type; - } - - else if ($form_by == '7') { // Player - $key = trim($row['lname'] . ', ' . $row['fname'] . ' ' . $row['mname']); - } - - else if ($form_by == '8') { // Playing Position - if ($row['fiposition']) $key = $arr_position[$row['fiposition']]; - } - - else if ($form_by == '9') { // Referee Sanction Type - foreach ($arr_sanction as $imkey => $imvalue) { - if ($row["fimech_$imkey"]) { - $key = $imvalue; - break; - } - } - } - - else if ($form_by == '10') { // Surface Type - if ($row['fisurface']) $key = $arr_surface[$row['fisurface']]; - } - - else if ($form_by == '11') { // Training Type - if ($row['fiinjtime']) $key = $arr_injtime[$row['fiinjtime']]; - } - - // OK we now have the reporting key for this issue. - - // If first instance of this key, initialize its arrays. - if (! $areport[$key]) { - $areport[$key] = array(); - $areport[$key]['inj'] = 0; // number of injuries - $areport[$key]['dmissed'] = 0; // days missed - $areport[$key]['gmissed'] = 0; // games missed - $areport[$key]['br'] = array(); // body region array - $areport[$key]['it'] = array(); // injury type array - $areport[$key]['ti'] = array(); // issue title array - } - - // Compute days missed. Force non-overlap of multiple issues for the - // same player. This logic assumes sorting on begdate within pid. - // - $begsecs = strtotime($row['begdate']); - $endsecs = $row['returndate'] ? strtotime($row['returndate']) : time(); - if ($row['pid'] == $last_pid) { - if ($begsecs < $last_endsecs) { - $begsecs = $last_endsecs; - } - } - else { - $last_pid = $row['pid']; - $last_endsecs = 0; - } - if ($begsecs > $endsecs) $begsecs = $endsecs; - if ($last_endsecs < $endsecs) $last_endsecs = $endsecs; - $daysmissed = round(($endsecs - $begsecs) / (60 * 60 * 24)); - - // Store values that we might want to report on. - $areport[$key]['inj'] += 1; // count number of injuries - $areport[$key]['dmissed'] += $daysmissed; // count days missed - $areport[$key]['gmissed'] += $row['gmissed']; // count games missed - $areport[$key]['br'][$body_region] += 1; // count injuries to this body part - $areport[$key]['it'][$injury_type] += 1; // count injuries of this type - $areport[$key]['ti'][$issue_title] += 1; // count injuries with this title - - // These track all body regions and injury types encountered. - $arr_my_body_regions[$body_region] += 1; - $arr_my_injury_types[$injury_type] += 1; - $arr_my_issue_titles[$issue_title] += 1; - - } // end while - - // Sort everything by key for reporting. - ksort($areport); - ksort($arr_my_body_regions); - ksort($arr_my_injury_types); - ksort($arr_my_issue_titles); -?> - - - - - - -Injuries\n"; - } - else if ($value == '2') { // days and games missed - echo " \n"; - echo " \n"; - } - else if ($value == '3') { // body region - foreach ($arr_my_body_regions as $br => $nothing) { - echo " \n"; - } - } - else if ($value == '4') { // injury type - foreach ($arr_my_injury_types as $it => $nothing) { - echo " \n"; - } - } - else if ($value == '5') { // issue titles - foreach ($arr_my_issue_titles as $ti => $nothing) { - echo " \n"; - } - } - } - } - - echo " \n"; - - $encount = 0; - - foreach ($areport as $key => $varr) { - $bgcolor = (++$encount & 1) ? "#ddddff" : "#ffdddd"; - - echo " \n"; - echo " \n"; - - // Generate data for this row. - foreach ($form_show as $value) { - if ($value == '1') { // Number of injuries - echo " \n"; - } - else if ($value == '2') { // days and games missed - echo " \n"; - echo " \n"; - } - else if ($value == '3') { // body region - foreach ($arr_my_body_regions as $body_region => $nothing) { - echo " \n"; - } - } - else if ($value == '4') { // injury type - foreach ($arr_my_injury_types as $injury_type => $nothing) { - echo " \n"; - } - } - else if ($value == '5') { // issue title - foreach ($arr_my_issue_titles as $issue_title => $nothing) { - echo " \n"; - } - } - } - - echo " \n"; - } // end foreach -?> - -
    - - Days MissedGames Missed$br$it$ti
    $key" . $areport[$key]['inj'] . "" . $areport[$key]['dmissed'] . "" . $areport[$key]['gmissed'] . "" . $areport[$key]['br'][$body_region] . "" . $areport[$key]['it'][$injury_type] . "" . $areport[$key]['ti'][$issue_title] . "
    - - - -
    -
    - - - - - diff --git a/interface/reports/injury_overview_report.php b/interface/reports/injury_overview_report.php deleted file mode 100644 index 227f9d104..000000000 --- a/interface/reports/injury_overview_report.php +++ /dev/null @@ -1,302 +0,0 @@ - -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. - -require_once("../globals.php"); -require_once("../../library/patient.inc"); -require_once("../../library/lists.inc"); -require_once("../../library/acl.inc"); -require_once("../../custom/code_types.inc.php"); - -// Might want something different here. -// -// if (! acl_check('acct', 'rep')) die("Unauthorized access."); - -$from_date = fixDate($_POST['form_from_date']); -$to_date = fixDate($_POST['form_to_date'], date('Y-m-d')); -$form_issue_type = $_POST['form_issue_type']; -$form_squads = $_POST['form_squads']; // this is an array - -/********************************************************************* -// Look up descriptions for one or more billing codes. This should -// probably be moved to an "include" file somewhere. -// -function lookup_code_descriptions($codes) { - global $code_types; - $code_text = ''; - if (!empty($codes)) { - $relcodes = explode(';', $codes); - foreach ($relcodes as $codestring) { - if ($codestring === '') continue; - list($codetype, $code) = explode(':', $codestring); - $wheretype = ""; - if (empty($code)) { - $code = $codetype; - } else { - $wheretype = "code_type = '" . $code_types[$codetype]['id'] . "' AND "; - } - $crow = sqlQuery("SELECT code_text FROM codes WHERE " . - "$wheretype code = '$code' ORDER BY id LIMIT 1"); - if (!empty($crow['code_text'])) { - if ($code_text) $code_text .= '; '; - $code_text .= $crow['code_text']; - } - } - } - return $code_text; -} -*********************************************************************/ -?> - - - -<?php xl('Injury Overview Report','e'); ?> - - - - - - - - - - - - - -
    - -

    - -
    - - - - - - - - - - - - - - - - - - - - - - - -
    - Issues: - - - -   - Squads: - - - -   - ' - title=''> -
    - From: - - - [?]'> -
    - To: - - - [?]'> -
    -
    - -= '$from_date' ) AND " . - "( lists.begdate IS NULL OR lists.begdate <= '$to_date' )" . - "$issuetypematches " . - "ORDER BY pd.lname, pd.fname, pd.mname, lists.pid, lists.begdate"; - - // echo "\n\n"; // debugging - - $res = sqlStatement($query); - - $areport = array(); - $last_listid = 0; - $last_pid = 0; - $last_endsecs = 0; - $encount = 0; -?> - - - - - - - - - - - - - - - $endsecs) $begsecs = $endsecs; - if ($last_endsecs < $endsecs) $last_endsecs = $endsecs; - $daysmissed = round(($endsecs - $begsecs) / (60 * 60 * 24)); - } - - // Get the name of the last provider for this issue. - $query = "SELECT users.lname, users.fname, users.mname " . - "FROM issue_encounter, forms, users WHERE " . - "issue_encounter.list_id = $listid AND " . - "forms.pid = issue_encounter.pid AND " . - "forms.encounter = issue_encounter.encounter AND " . - "users.username = forms.user " . - "ORDER BY forms.date DESC LIMIT 1"; - $user = sqlQuery($query); - $provname = $user['lname'] ? - $user['lname'] . ', ' . $user['fname'] . ' ' . $user['mname'] : - ' '; - - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - - echo " \n"; - } // end while -?> - -
    PlayerFitnessIssueDiagnosisStart DateDays MissedGames MissedLast Provider
    $ptname$fitness$issue_title" . lookup_code_descriptions($row['diagnosis']) . "" . $row['begdate'] . "$daysmissed" . $row['gmissed'] . "$provname
    - - - -
    -
    - - - - - diff --git a/interface/reports/old_players_report.php b/interface/reports/old_players_report.php deleted file mode 100644 index 4ee624821..000000000 --- a/interface/reports/old_players_report.php +++ /dev/null @@ -1,211 +0,0 @@ - - // - // This program is free software; you can redistribute it and/or - // modify it under the terms of the GNU General Public License - // as published by the Free Software Foundation; either version 2 - // of the License, or (at your option) any later version. - - // This report simply lists all players/patients by name within - // squad. It is applicable only for sports teams. - -require_once("../globals.php"); -require_once("$srcdir/patient.inc"); -require_once("$srcdir/acl.inc"); - -// Temporary variable while new logic is being tested. -// True means that missing days in the daily_fitness table default to -// the previous entry's values, if there is one. -// Otherwise the default fitness level (Fully Fit) is used. -$PROPLOGIC = true; - - $squads = acl_get_squads(); - $auth_notes_a = acl_check('encounters', 'notes_a'); - - $alertmsg = ''; // not used yet but maybe later - -// Get attributes of the default fitless level. -$fdefault = sqlQuery("SELECT * FROM list_options WHERE " . - "list_id = 'fitness' ORDER BY is_default DESC, seq ASC LIMIT 1"); - - $query = "SELECT pid, squad, lname, fname FROM " . - "patient_data"; // ORDER BY squad, lname, fname - $res = sqlStatement($query); - - // Sort the patients in squad priority order. - function patient_compare($a, $b) { - global $squads; - if ($squads[$a['squad']][3] == $squads[$b['squad']][3]) { - if ($a['lname'] == $b['lname']) { - return ($a['fname'] < $b['fname']) ? -1 : 1; - } - return ($a['lname'] < $b['lname']) ? -1 : 1; - } - // The squads are different so compare their order attributes, - // or unassigned squads sort last. - if (! $squads[$a['squad']][3]) return 1; - if (! $squads[$b['squad']][3]) return -1; - return ($squads[$a['squad']][2] < $squads[$b['squad']][2]) ? -1 : 1; - } - $ordres = array(); - if ($res) { - while ($row = sqlFetchArray($res)) $ordres[] = $row; - usort($ordres, "patient_compare"); - } -?> - - - - - - - -<?php xl('Team Roster','e'); ?> - - - -
    - -
    - - - - - - - - - - - - - - - - -
    -
    -

    -
    - -
    -
    - - - - - - - - - - $fdefault['option_id'], - 'lf_title' => $fdefault['title'], - 'lf_mapping' => $fdefault['mapping'], - ); - } - $mapping = explode(':', $dfrow['lf_mapping']); - $bgcolor = $mapping[0]; - - $query = "SELECT date, reason " . - "FROM form_encounter WHERE " . - "pid = '$patient_id' " . - "ORDER BY date DESC LIMIT 1"; - $erow = sqlQuery($query); -?> - - - - - - - - -
    -   - -   - -   - -   -
    -   - -   - -   - -    -
    - -
    -
    - - - diff --git a/interface/reports/players_report.php b/interface/reports/players_report.php deleted file mode 100644 index 273febfe7..000000000 --- a/interface/reports/players_report.php +++ /dev/null @@ -1,480 +0,0 @@ - -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. - -// This report lists all players/patients by name within squad. -// It is applicable only for sports teams. - -//SANITIZE ALL ESCAPES -$sanitize_all_escapes=true; -// - -//STOP FAKE REGISTER GLOBALS -$fake_register_globals=false; -// - -require_once("../globals.php"); -require_once("$srcdir/patient.inc"); -require_once("$srcdir/acl.inc"); -require_once("$srcdir/lists.inc"); -require_once("$srcdir/calendar_events.inc.php"); - -// Temporary variable while new "propagation" logic is being tested. -// True means that missing days in the daily_fitness table default to -// the previous entry's values, if there is one. -// Otherwise the default fitness level (Fully Fit) is used (old logic). -$PROPLOGIC = true; - -$squads = acl_get_squads(); -$auth_notes_a = acl_check('encounters', 'notes_a'); - -$alertmsg = ''; // not used yet but maybe later - -$form_date = fixDate($_POST['form_date'], date('Y-m-d')); - -// Figure out the desired or default squad to select. -if (!empty($_POST['form_squad'])) { - $form_squad = $_POST['form_squad']; - $_SESSION['roster_squad'] = $form_squad; -} -else if (!empty($_SESSION['roster_squad'])) { - $form_squad = $_SESSION['roster_squad']; -} -else { - $form_squad = array_shift(array_keys($squads)); -} - -// $now = time(); -$now = mktime(0, 0, 0, substr($form_date, 5, 2), - substr($form_date, 8, 2), substr($form_date, 0, 4)); - -// Get attributes of the default fitless level. -$fdefault = sqlQuery("SELECT * FROM list_options WHERE " . - "list_id = 'fitness' ORDER BY is_default DESC, seq ASC LIMIT 1"); - -$query = "SELECT pid, squad, fitness, lname, fname FROM patient_data"; -if (!empty($form_squad)) { - $query .= " WHERE squad LIKE '$form_squad'"; -} -$res = sqlStatement($query); - -// Sort the patients in squad priority order. -function patient_compare($a, $b) { - global $squads; - if ($squads[$a['squad']][3] == $squads[$b['squad']][3]) { - if ($a['lname'] == $b['lname']) { - return ($a['fname'] < $b['fname']) ? -1 : 1; - } - return ($a['lname'] < $b['lname']) ? -1 : 1; - } - // The squads are different so compare their order attributes, - // or unassigned squads sort last. - if (! $squads[$a['squad']][3]) return 1; - if (! $squads[$b['squad']][3]) return -1; - return ($squads[$a['squad']][2] < $squads[$b['squad']][2]) ? -1 : 1; -} -// -$ordres = array(); -if ($res) { - while ($row = sqlFetchArray($res)) $ordres[] = $row; - usort($ordres, "patient_compare"); -} -?> - - - - - - - - - - - - - - - - - -<?php xl('Weekly Exposures','e'); ?> - - - -
    - -
    '> - - - - - - - - - - - - - - - - -
    -
    -

    -
    -   - ' - onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' title='yyyy-mm-dd'> - [?]'> - - - -   - - - - -   - '> -
    -
    - - - - - - - -"; - echo date('D', $time); - echo "\n"; - $time += 60 * 60 * 24; -} -?> - - - - - - $fdefault['option_id'], - 'lf_title' => $fdefault['title'], - 'lf_mapping' => $fdefault['mapping'], - 'am' => '', - 'pm' => '', - ); - } - else if ($dfrow['date'] != $date) { - // As of 2012-07-12 am/pm are not propagated. - $dfrow['am'] = ''; - $dfrow['pm'] = ''; - } - - $mapping = explode(':', $dfrow['lf_mapping']); - $bgcolor = $mapping[0]; - - // Compute percentage of participation. - $eventmins = 0; - $partmins = 0; - $eres = getSquadEvents($date, $squadvalue, $patient_id); - - while ($erow = sqlFetchArray($eres)) { - if (!eventMatchesDay($erow, $date)) continue; - $duration = (int) ($erow['pc_duration'] / 60); - $eventmins += $duration; - if (empty($erow['pid']) || $erow['minutes'] > $duration) { - $partmins += $duration; - } - else { - $partmins += $erow['minutes']; - } - } - - echo " \n"; - - echo " \n"; - - $time += 60 * 60 * 24; - } -?> - - - -
    -   -
    -   - \n"; - if ($PROPLOGIC && (empty($dfrow['date']) || $dfrow['date'] != $date)) - echo '' . $mapping[1] . ''; - else - echo $mapping[1]; // this is obsolete - // Append % fitness to this line. - if ($partmins < $eventmins) { - echo sprintf(" %d", $partmins * 100 / $eventmins) . '%'; - } - - // Write a line for each active issue, and below it enumerate the forms. - // Each form can be clicked to pop it up for editing, or the issue can be - // clicked to add a form. - // At end of forms for each issue, a line to add a new form. - // At end of issues, a line to add a new issue. - // - $ires = sqlStatement("SELECT id, type, title, begdate " . - "FROM lists WHERE pid = ? AND activity = 1 AND " . - "( type = 'football_injury' OR type = 'medical_problem' ) AND " . - "begdate <= ? AND ( enddate IS NULL OR enddate >= ? ) " . - "ORDER BY begdate, id", array($patient_id, $date, $date)); - while ($irow = sqlFetchArray($ires)) { - $issue_id = 0 + $irow['id']; - $tcode = $irow['type']; - if ($ISSUE_TYPES[$tcode]) $tcode = $ISSUE_TYPES[$tcode][2]; - echo "
    "; - // echo ""; - echo ""; - echo "$tcode: " . htmlspecialchars($irow['title'], ENT_NOQUOTES); - echo "\n"; - $fres = sqlStatement("SELECT f.date, f.encounter, f.form_id, tp.value FROM " . - "issue_encounter AS ie, forms AS f , form_treatment_protocols AS tp WHERE " . - "ie.pid = ? AND ie.list_id = ? AND " . - "f.pid = ie.pid AND f.encounter = ie.encounter AND " . - "f.formdir = 'treatment_protocols' AND f.deleted = 0 AND " . - "tp.id = f.form_id AND tp.rownbr = -1 AND tp.colnbr = -1 AND " . - "SUBSTR(tp.value,3,10) <= ? " . // TBD: implement form end date also - "ORDER BY f.encounter DESC, f.id DESC", - array($patient_id, $irow['id'], $date)); - $form_id = 0; - while ($frow = sqlFetchArray($fres)) { - $form_id = 0 + $frow['form_id']; - list($form_completed, $start_date, $template_name) = explode('|', $frow['value'], 3); - echo "
    "; - echo ""; - echo "  "; - echo "$start_date "; - echo htmlspecialchars($template_name, ENT_NOQUOTES); - echo "\n"; - } - // If there were no rehab forms, insert a link for adding one. In this case the link will - // create a new encounter but will not switch to it. - if (!$form_id) { - echo "
    "; - echo "  "; - echo htmlspecialchars('[' . xl('Add Rehab') . ']', ENT_NOQUOTES); - echo "\n"; - } - } - // echo "
    "; - // echo htmlspecialchars('[' . xl('Add Issue') . ']', ENT_NOQUOTES); - // echo "\n"; - echo "
    \n"; - // echo ""; - // echo htmlspecialchars('[' . xl('New')) . ' ' . htmlspecialchars(xl('Inj/Rehab') . ']', ENT_NOQUOTES); - // echo "\n"; - // echo ""; - if (!empty($dfrow['am'])) { - // echo "
    "; - echo '' . htmlspecialchars(xl('AM'), ENT_NOQUOTES) . ': '; - echo htmlspecialchars($dfrow['am'], ENT_NOQUOTES); - } - if (!empty($dfrow['pm'])) { - if (!empty($dfrow['am'])) echo "
    "; - echo '' . htmlspecialchars(xl('PM'), ENT_NOQUOTES) . ': '; - echo htmlspecialchars($dfrow['pm'], ENT_NOQUOTES); - } - if (empty($dfrow['am']) && empty($dfrow['pm'])) { - // echo "
    "; - echo htmlspecialchars('[' . xl('New Inj/Status') . ']', ENT_NOQUOTES); - } - // echo "
    \n"; - echo "
    - -
    -
    - - - - - - - - - - - - - diff --git a/interface/reports/players_report_ajax.php b/interface/reports/players_report_ajax.php deleted file mode 100644 index 5c335f169..000000000 --- a/interface/reports/players_report_ajax.php +++ /dev/null @@ -1,44 +0,0 @@ - -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. - -require_once("../globals.php"); -require_once("$srcdir/lists.inc"); - -$plid = $_GET['plid'] + 0; // pid -$s = ''; - -if (isset($_GET['date'])) { - $date = $_GET['date']; - $date = substr($date,0,4) . '-' . substr($date,4,2) . '-' . substr($date,6,2); - // get patient notes - $res = sqlStatement("SELECT title, body FROM pnotes WHERE " . - "pid = '$plid' AND LEFT(date,10) = '$date' AND " . - "title LIKE 'Roster' AND deleted = 0 ORDER BY date LIMIT 1"); - while ($row = sqlFetchArray($res)) { - $s .= nl2br(htmlentities($row['body'],ENT_QUOTES)) . "
    "; - } - if ($s === '') $s = xl('No notes') . '
    '; - $s .= xl('Click here to add new injury change status and edit daily activity'); -} -else { - // get issues - $res = sqlStatement("SELECT type, title FROM lists WHERE pid = '$plid' " . - "AND activity = 1 ORDER BY type, begdate"); - while ($row = sqlFetchArray($res)) { - $s .= $ISSUE_TYPES[$row['type']][1] . ": " . - htmlentities($row['title'],ENT_QUOTES) . "
    "; - } - if ($s === '') $s = "No issues"; -} - -// $s = str_replace("\r", "", $s); -// $s = str_replace("\n", "", $s); -// echo "ttCallback('$s');\n"; - -echo $s; -?> diff --git a/interface/reports/players_report_dialog.php b/interface/reports/players_report_dialog.php deleted file mode 100644 index 1e0246a1e..000000000 --- a/interface/reports/players_report_dialog.php +++ /dev/null @@ -1,351 +0,0 @@ - -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. - -////////////////////////////////////////////////////////////////////// -// This dialog works with a specified player on a specified date, -// and is used to: -// -// o change fitness level -// o change per-event minutes of participation and absence reason -// o add/modify the associated pt note -// o link an issue to the player's fitness for that day -////////////////////////////////////////////////////////////////////// - -require_once("../globals.php"); -require_once("$srcdir/acl.inc"); -require_once("$srcdir/lists.inc"); -require_once("$srcdir/pnotes.inc"); -require_once("$srcdir/formdata.inc.php"); -require_once("$srcdir/calendar_events.inc.php"); - -// Temporary variable while new logic is being tested. -// True means that missing days in the daily_fitness table default to -// the previous entry's values, if there is one. -// Otherwise the default fitness level (Fully Fit) is used. -$PROPLOGIC = true; - -$plid = $_REQUEST['plid'] + 0; // pid -$ymd = $_REQUEST['date']; -if (empty($ymd)) die("Internal error: date parameter is missing"); -$date = substr($ymd,0,4) . '-' . substr($ymd,4,2) . '-' . substr($ymd,6,2); - -$form_fitness = formData('form_fitness'); -$form_issue = formData('form_issue') + 0; -$form_to = formData('form_to'); - -$form_note = empty($_POST['form_note']) ? '' : $_POST['form_note']; -$form_note = strip_escape_custom($form_note); - -$form_am = empty($_POST['form_am']) ? '' : $_POST['form_am']; -$form_am = strip_escape_custom($form_am); - -$form_pm = empty($_POST['form_pm']) ? '' : $_POST['form_pm']; -$form_pm = strip_escape_custom($form_pm); - -function gen_list_options($list_id, $default='') { - $res = sqlStatement("SELECT * FROM list_options WHERE " . - "list_id = '$list_id' ORDER BY seq"); - while ($row = sqlFetchArray($res)) { - $key = $row['option_id']; - echo " \n"; - } -} - -$alertmsg = ''; // anything here pops up in an alert box - -// Get player info. -$patrow = sqlQuery("SELECT " . - "fname, mname, lname, pubpid, squad " . - "FROM patient_data " . - "WHERE pid = '$plid' LIMIT 1"); -$squad = $patrow['squad']; - -if ($PROPLOGIC) { - // For a given date, fitness info is the last on or before that date, - // or if there is none then the defaults apply. - $dfrow = sqlQuery("SELECT " . - "df.*, lf.option_id AS lf_id, lf.title AS lf_title " . - "FROM daily_fitness AS df " . - "LEFT JOIN list_options AS lf ON lf.list_id = 'fitness' AND lf.option_id = df.fitness " . - "WHERE df.pid = '$plid' AND df.date <= '$date' " . - "ORDER BY df.date DESC LIMIT 1"); -} -else { - $dfrow = sqlQuery("SELECT " . - "df.*, lf.option_id AS lf_id, lf.title AS lf_title " . - "FROM daily_fitness AS df " . - "LEFT JOIN list_options AS lf ON lf.list_id = 'fitness' AND lf.option_id = df.fitness " . - "WHERE df.pid = '$plid' AND df.date = '$date'"); -} - -if (empty($dfrow)) { - $dfrow = array( - 'pid' => '0', - 'date' => '', - 'fitness' => '1', - 'lf_title' => 'FF', - 'issue_id' => '0', - ); -} - -// This gets the events for the player's squad for this date, -// and the player-specific data (if any) for each such event. -$eres = getSquadEvents($date, $squad, $plid); - -// Get the roster note, if any, for this player and date. -$nrow = sqlQuery("SELECT id, body, assigned_to FROM pnotes WHERE " . - "pid = '$plid' AND LEFT(date,10) = '$date' AND title LIKE 'Roster' AND " . - "deleted = 0 ORDER BY date LIMIT 1"); -$noteid = empty($nrow) ? '0' : $nrow['id']; - -// If the Save button was clicked... -if ($_POST['form_save']) { - - // Update daily_fitness. - if ($dfrow['date'] == $date) { - sqlStatement("UPDATE daily_fitness SET " . - "fitness = '$form_fitness', " . - "am = '$form_am', " . - "pm = '$form_pm', " . - "issue_id = '$form_issue'" . - "WHERE pid = '$plid' AND date = '$date'"); - } - else { - sqlStatement("INSERT INTO daily_fitness SET " . - "pid = '$plid', " . - "date = '$date', " . - "fitness = '$form_fitness', " . - "am = '$form_am', " . - "pm = '$form_pm', " . - "issue_id = '$form_issue'"); - } - - // Update player_events. - while ($erow = sqlFetchArray($eres)) { - if (!eventMatchesDay($erow, $date)) continue; - $eid = 0 + $erow['pc_eid']; - $duration = (int) ($erow['pc_duration'] / 60); - $form_mins = formData("form_mins_$eid") + 0; - $form_fitrel = empty($_POST["form_fitrel_$eid"]) ? 0 : 1; - sqlStatement("DELETE FROM player_event WHERE pid = '$plid' AND " . - "date = '$date' AND pc_eid = '$eid'"); - if ($form_mins < $duration) { - sqlStatement("INSERT INTO player_event SET " . - "pid = '$plid', " . - "date = '$date', " . - "pc_eid = '$eid', " . - "minutes = '$form_mins', " . - "fitness_related = '$form_fitrel'"); - } - } - - // Add or append to the roster note. - if ($form_note !== '') { - if ($noteid) { - updatePnote($noteid, $form_note, 'Roster', $form_to); - } - else { - addPnote($plid, $form_note, $userauthorized, '1', 'Roster', $form_to, - "$date 00:00:00"); - } - } - - // Close this window and refresh the roster display. - echo "\n\n\n\n\n"; - exit(); -} -?> - - - - - -<?php echo htmlspecialchars(xl('Record of Fitness')); ?> - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - -\n"; - - if (!eventMatchesDay($erow, $date)) continue; - - echo "\n"; // debugging - - $eid = 0 + $erow['pc_eid']; - if (empty($erow['pid'])) { - // No player_event data so set defaults. - $minutes = (int) ($erow['pc_duration'] / 60); - $fitness_related = ($dfrow['fitness'] == 1) ? 0 : 1; - } - else { - $minutes = 0 + $erow['minutes']; - $fitness_related = empty($erow['fitness_related']) ? 0 : 1; - } - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; -} -?> - - - - - - - - - - - - - - - - -
    - - - -
    - - - -   - ' - onclick='newissue()' />   -
    " . substr($erow['pc_startTime'], 0, 5) . " " . - $erow['pc_hometext'] . "" . xl('Minutes') . ": " . - "" . - " " . xl('Injury/illness-related') . "
    - - -" . - nl2br(htmlentities($nrow['body'])) . "\n"; -} -?> - -
    - : - -
    - - - -
    - - - -
    - -

    -' />   -' onclick='window.close()' /> - -

    -
    - - diff --git a/library/football_injury.inc.php b/library/football_injury.inc.php deleted file mode 100644 index 791f0c79c..000000000 --- a/library/football_injury.inc.php +++ /dev/null @@ -1,578 +0,0 @@ - 'Warm Up', - '2' => 'Extra Time', - '3' => 'Cool Down', - '4' => 'Training Warm Up (deprecated)', - '5' => 'Training Session (deprecated)', - '6' => 'Training Cool Down (deprecated)', - '7' => 'Training Rehab (deprecated)', -); - -// This is the number of leading entries in $arr_activity that are for -// injuries due to contact with a player or object. -$arr_activity_contact_count = 12; - -$arr_activity = array( - 'blocked' => 'Blocked', // new - 'hitbyball' => 'Hit by Ball', // new - 'goalpost' => 'Collision with Goal Post', // new - 'ground' => 'Collision with Ground', // new - 'kicked' => 'Collision with Other Player', - 'collother' => 'Collision with Other Object', // new - 'collision' => 'Collision Non Specified', - 'tackled' => 'Tackled from Front', - 'tackside' => 'Tackled from Side', // new - 'tackback' => 'Tackled from Back', // new - 'tackling' => 'Tackling Other Player', - 'elbow' => 'Use of Arm/Elbow', - // 12 Contact entries, see $arr_activity_contact_count. - 'running' => 'Running/Sprinting', - 'turning' => 'Twisting/Turning', - 'shooting' => 'Shooting', - 'passing' => 'Passing/Crossing', - 'dribbling' => 'Dribbling', - 'jumping' => 'Jumping/Landing', - 'fall' => 'Falling/Diving', - 'stretching' => 'Stretching', - 'sliding' => 'Sliding', // new - 'throwing' => 'Throwing', - 'heading' => 'Heading', - 'landing' => 'Landing (deprecated)', // change to jumping - 'diving' => 'Diving (deprecated)', // change to fall - 'overuse' => 'Overuse (deprecated)', // s/b recorded in Classification -); - -$arr_sanction = array( - 'nofoul' => 'No Foul', - 'oppfoul' => 'Opponent Foul', - 'ownfoul' => 'Own Foul', - 'yellow' => 'Yellow Card', - 'red' => 'Red Card', -); - -$arr_surface = array( - '7' => 'Grass' , - '3' => 'Outdoor Artificial' , - '4' => 'Indoor Artificial' , - '8' => 'Wooden' , - '9' => 'Concrete' , - '10' => 'Carpet' , - '6' => 'Other' , - '1' => 'Pitch (deprecated)' , - '2' => 'Training (deprecated)', - '5' => 'Gym (deprecated)' , -); - -$arr_condition = array( - '1' => 'Hard' , - '2' => 'Firm' , - '3' => 'Soft' , - '4' => 'Slippery/Wet', - '5' => 'Uneven' , - '6' => 'Good' , - '7' => 'Poor' , -); - -$arr_weather = array( - 'sunny' => 'Sunny' , - 'rainy' => 'Rainy' , - 'windy' => 'Windy' , - 'dry' => 'Dry' , - 'sleet' => 'Sleet/Snow', - 'overcast' => 'Overcast' , -); - -$arr_position = array( - '5' => 'Goal Keeper' , - '1' => 'Defender' , - '7' => 'Midfielder' , - '4' => 'Forward' , - '2' => 'Midfield Offensive (deprecated)', - '3' => 'Midfield Defensive (deprecated)', - '6' => 'Substitute (deprecated)' , -); - -$arr_footwear = array( - '4' => 'Blades' , - '1' => 'Molded Studs' , - '2' => 'Detachable Studs', - '3' => 'Indoor Shoes' , - '5' => 'Trainers' , -); - -/********************************************************************* -$arr_side = array( - '1' => 'Left' , - '2' => 'Right' , - '3' => 'Bilateral' , - '4' => 'Not Applicable', -); -*********************************************************************/ - -$arr_removed = array( - '1' => 'Immediately', - '2' => 'Later' , - '3' => 'Not at All' , -); - -$arr_match_type = array( - '1' => 'Premiership (deprecated)', - '2' => 'FA Cup (deprecated)', - '3' => 'League Cup (deprecated)', - '4' => 'Champions League Cup (deprecated)', - '5' => 'Championship Match (deprecated)', - '6' => 'League One Match (deprecated)', - '7' => 'League Two Match (deprecated)', - '8' => 'International Match (deprecated)', - '9' => 'Friendly', - '10' => 'League Match', - '11' => 'UEFA Champtions League Match', - '12' => 'UEFA Europa League Match', - '13' => 'Carling Cup Match', - '14' => 'Other Cup Match', - '15' => 'National Match', - '16' => 'Reserve Match', - '17' => 'Youth Team Match', -); - -$arr_training_type = array( - '51' => 'Football', - '52' => 'Other', - '53' => 'Mixed i.e. Football + Other', - '54' => 'Endurance', - '55' => 'Speed Agility Quickness', - '56' => 'Strength', - '57' => 'Injury Prevention F-mark 11', - '58' => 'Injury Prevention Squad Own', - '59' => 'Recovery', -); - -$firow = array(); - -function rbfiinput($name, $value, $desc, $colname) { - global $firow; - $ret = "" . rbfiinput($name, $value, $desc, $colname) . "
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/library/globals.inc.php b/library/globals.inc.php index fdb52e321..76e18c3a3 100644 --- a/library/globals.inc.php +++ b/library/globals.inc.php @@ -530,7 +530,6 @@ $GLOBALS_METADATA = array( xl('Specific Application'), array( '0' => xl('None'), - '1' => xl('Athletic team'), '2' => xl('IPPF'), '3' => xl('Weight loss clinic'), ), diff --git a/library/lists.inc b/library/lists.inc index f3d9aeed4..1c294d5cc 100644 --- a/library/lists.inc +++ b/library/lists.inc @@ -40,7 +40,6 @@ $ISSUE_TYPE_CATEGORIES = array( 'default' => xl('Default'), // Normal OpenEMR use - 'athletic_team' => xl('Athletic Team'), // For Sports Team use 'ippf_specific' => xl('IPPF') // For IPPF use ); @@ -60,9 +59,6 @@ function collect_issue_type_category() { if (!empty($GLOBALS['ippf_specific'])) { // IPPF version return "ippf_specific"; } - else if (!empty($GLOBALS['athletic_team'])) { // Athletic team version - return "athletic_team"; - } else { // Default version return "default"; } diff --git a/library/options.inc.php b/library/options.inc.php index b359d92e2..dfe145749 100644 --- a/library/options.inc.php +++ b/library/options.inc.php @@ -2306,11 +2306,6 @@ function display_layout_rows($formtype, $result1, $result2='') { $currvalue = ''; if ($formtype == 'DEM') { - if ($GLOBALS['athletic_team']) { - // Skip fitness level and return-to-play date because those appear - // in a special display/update form on this page. - if ($field_id === 'fitness' || $field_id === 'userdate1') continue; - } if (strpos($field_id, 'em_') === 0) { // Skip employer related fields, if it's disabled. if ($GLOBALS['omit_employers']) continue; @@ -2454,11 +2449,6 @@ function display_layout_tabs_data($formtype, $result1, $result2='') { if ($formtype == 'DEM') { - if ($GLOBALS['athletic_team']) { - // Skip fitness level and return-to-play date because those appear - // in a special display/update form on this page. - if ($field_id === 'fitness' || $field_id === 'userdate1') continue; - } if (strpos($field_id, 'em_') === 0) { // Skip employer related fields, if it's disabled. if ($GLOBALS['omit_employers']) continue; @@ -2597,11 +2587,6 @@ function display_layout_tabs_data_editable($formtype, $result1, $result2='') { $currvalue = ''; if ($formtype == 'DEM') { - if ($GLOBALS['athletic_team']) { - // Skip fitness level and return-to-play date because those appear - // in a special display/update form on this page. - if ($field_id === 'fitness' || $field_id === 'userdate1') continue; - } if (strpos($field_id, 'em_') === 0) { // Skip employer related fields, if it's disabled. if ($GLOBALS['omit_employers']) continue; diff --git a/sql/database.sql b/sql/database.sql index 508d3b207..b26c57ccc 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -2594,10 +2594,6 @@ INSERT INTO issue_types(`ordering`,`category`,`type`,`plural`,`singular`,`abbrev INSERT INTO issue_types(`ordering`,`category`,`type`,`plural`,`singular`,`abbreviation`,`style`,`force_show`) VALUES ('20','default','allergy','Allergies','Allergy','A','0','1'); INSERT INTO issue_types(`ordering`,`category`,`type`,`plural`,`singular`,`abbreviation`,`style`,`force_show`) VALUES ('40','default','surgery','Surgeries','Surgery','S','0','0'); INSERT INTO issue_types(`ordering`,`category`,`type`,`plural`,`singular`,`abbreviation`,`style`,`force_show`) VALUES ('50','default','dental','Dental Issues','Dental','D','0','0'); -INSERT INTO issue_types(`ordering`,`category`,`type`,`plural`,`singular`,`abbreviation`,`style`,`force_show`) VALUES ('10','athletic_team','football_injury','Football Injuries','Injury','I','2','1'); -INSERT INTO issue_types(`ordering`,`category`,`type`,`plural`,`singular`,`abbreviation`,`style`,`force_show`) VALUES ('20','athletic_team','medical_problem','Medical Problems','Medical','P','0','0'); -INSERT INTO issue_types(`ordering`,`category`,`type`,`plural`,`singular`,`abbreviation`,`style`,`force_show`) VALUES ('30','athletic_team','allergy','Allergies','Allergy','A','1','0'); -INSERT INTO issue_types(`ordering`,`category`,`type`,`plural`,`singular`,`abbreviation`,`style`,`force_show`) VALUES ('40','athletic_team','general','General','General','G','1','0'); INSERT INTO issue_types(`ordering`,`category`,`type`,`plural`,`singular`,`abbreviation`,`style`,`force_show`) VALUES ('10','ippf_specific','medical_problem','Medical Problems','Problem','P','0','1'); INSERT INTO issue_types(`ordering`,`category`,`type`,`plural`,`singular`,`abbreviation`,`style`,`force_show`) VALUES ('30','ippf_specific','medication','Medications','Medication','M','0','1'); INSERT INTO issue_types(`ordering`,`category`,`type`,`plural`,`singular`,`abbreviation`,`style`,`force_show`) VALUES ('20','ippf_specific','allergy','Allergies','Allergy','Y','0','1'); diff --git a/templates/report/general_default.html b/templates/report/general_default.html index 8f7d3c3f5..80becb9b3 100644 --- a/templates/report/general_default.html +++ b/templates/report/general_default.html @@ -145,17 +145,6 @@ if (is_dir($reportsdir)) {
    {xl t='Services by Category'} {php} - if ($GLOBALS['athletic_team']) { - echo "
  • \n"; - echo "Team Roster\n"; - echo "
  • \n"; - echo "Days and Games Missed\n"; - echo "
  • \n"; - echo "Football Injury Reports\n"; - echo "
  • \n"; - echo "Injury Overview Report\n"; - echo "
  • \n"; - } if (!empty($GLOBALS['code_types']['IPPF'])) { echo "
  • \n"; echo "IPPF Statistics\n"; -- 2.11.4.GIT