Jump to content

still no help? :(


kenny724

Recommended Posts

I'm trying to: There are several columns, MD aapt, PA, PCP....all columns have dates that are highlighted red over due, blue less than 7 days, and yellow less than 14. I need to change the PA column to red less than 7 days, blue less than 14, and yellow less than 21. I can't quite figure this on out either b/c all information is pulled at same time, using one color scheme. How can I just separate the PA column. Thanks for any input.

 

Actually, here is the code for the page. I cannot tell where the colors are coming from??!!! Can anyone?

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
    <style type="text/css">
    .style1 {	font-family: "Lucida Sans Unicode";	font-size: 13px; }
  		A:link    { color: black }
  		A:active  { color: red; font-size: 100% }
  		A:visited { color: black; font-size: 100% }
  		.dbd { font-weight: bold; color: black; }
  		.note { font-weight: lighter; font-size: 70%; color: #AAAAAA; }
  		.req { font-weight: lighter; font-size: 70%; color: #AA3333; }
  		.fixed { font-family: "Courier";	font-size: 12px; font-weight: normal;}
  		.cv_normal  {  background-color:#FFFFFF;  }
.cv_late {  background-color:#FFFF99;  }
.cv_1weeks  {  background-color:#AACCFF;  }
.cv_1weekspa  {  background-color:#CC0000;  }
.cv_2weeks  {  background-color:#FFFF99;  }
.cv_2weekspa  {  background-color:#AACCFF;  }
.cv_now  {  background-color:#CC0000;  }
.cv_annual  {  background-color:#FFBB00;  }
.cv_inactive  {  background-color:#AACCFF;  }
.cv_closed  {  background-color:#CC0000;  }
  	</style>
    <title>Life Strategies Of Arkansas, LLC Patient Compliance Report</title>
    <link rel="stylesheet" href="../css/demos.css">
    <link rel="stylesheet" href="../css/droppy.css">
    <link rel="stylesheet" href="../css/droppy_lsa.css">
    
    
    <link rel="stylesheet" href="../css/themes/cupertino/jquery-ui-1.7.2.custom.css">

  <script type="text/javascript" language="javascript" src="../scripts/jquery-1.3.2.min.js"></script>
  <script type="text/javascript" language="javascript" src="../scripts/jquery-ui-1.7.2.custom.min.js"></script>  
    <script type="text/javascript" language="javascript" type="text/javascript" src="../scripts/jquery.jclock.js"></script>
    <script type="text/javascript" language="javascript" src="../scripts/jquery.droppy.js"></script>
    <script type="text/javascript" language="javascript" src="../scripts/jquery.dataTables.js"></script>
    <script type="text/javascript" language="javascript" src="../scripts/jquery.jeditable.min.js"></script>

	<script type="text/javascript" language="javascript" src="../scripts/jquery.timers.js"></script>
    <script type="text/javascript" language="javascript" src="../scripts/jquery.tooltip.js"></script>
	<script type="text/javascript" charset="utf-8">
	var oTable;
	var giRedraw = false;
	var oCache = {
    	iCacheLower: -1
    };
    
    function fnSetKey( aoData, sKey, mValue )
    {
    	for ( var i=0, iLen=aoData.length ; i<iLen ; i++ )
    	{
    		if ( aoData[i].name == sKey )
    		{
    			aoData[i].value = mValue;
    		}
    	}
    }
    
    function fnGetKey( aoData, sKey )
    {
    	for ( var i=0, iLen=aoData.length ; i<iLen ; i++ )
    	{
    		if ( aoData[i].name == sKey )
    		{
    			return aoData[i].value;
    		}
    	}
    	return null;
    }
    
    function fnDataTablesPipeline ( sSource, aoData, fnCallback ) {
    	var iPipe = 5; /* Ajust the pipe size */
    	
    	var bNeedServer = false;
    	var sEcho = fnGetKey(aoData, "sEcho");
    	var iRequestStart = fnGetKey(aoData, "iDisplayStart");
    	var iRequestLength = fnGetKey(aoData, "iDisplayLength");
    	var iRequestEnd = iRequestStart + iRequestLength;
    	oCache.iDisplayStart = iRequestStart;
    	
    	/* outside pipeline? */
    	if ( oCache.iCacheLower < 0 || iRequestStart < oCache.iCacheLower || iRequestEnd > oCache.iCacheUpper )
    	{
    		bNeedServer = true;
    	}
    	
    	/* sorting etc changed? */
    	if ( oCache.lastRequest && !bNeedServer )
    	{
    		for( var i=0, iLen=aoData.length ; i<iLen ; i++ )
    		{
    			if ( aoData[i].name != "iDisplayStart" && aoData[i].name != "iDisplayLength" && aoData[i].name != "sEcho" )
    			{
    				if ( aoData[i].value != oCache.lastRequest[i].value )
    				{
    					bNeedServer = true;
    					break;
    				}
    			}
    		}
    	}
    	
    	/* Store the request for checking next time around */
    	oCache.lastRequest = aoData.slice();
    	
    	if ( bNeedServer )
    	{
    		if ( iRequestStart < oCache.iCacheLower )
    		{
    			iRequestStart = iRequestStart - (iRequestLength*(iPipe-1));
    			if ( iRequestStart < 0 )
    			{
    				iRequestStart = 0;
    			}
    		}
    		
    		oCache.iCacheLower = iRequestStart;
    		oCache.iCacheUpper = iRequestStart + (iRequestLength * iPipe);
    		oCache.iDisplayLength = fnGetKey( aoData, "iDisplayLength" );
    		fnSetKey( aoData, "iDisplayStart", iRequestStart );
    		fnSetKey( aoData, "iDisplayLength", iRequestLength*iPipe );
    		
    		$.getJSON( sSource, aoData, function (json) { 
    			/* Callback processing */
    			oCache.lastJson = jQuery.extend(true, {}, json);
    			
    			if ( oCache.iCacheLower != oCache.iDisplayStart )
    			{
    				json.aaData.splice( 0, oCache.iDisplayStart-oCache.iCacheLower );
    			}
    			json.aaData.splice( oCache.iDisplayLength, json.aaData.length );
    			
    			fnCallback(json)
    		} );
    	}
    	else
    	{
    		json = jQuery.extend(true, {}, oCache.lastJson);
    		json.sEcho = sEcho; /* Update the echo for each response */
    		json.aaData.splice( 0, iRequestStart-oCache.iCacheLower );
    		json.aaData.splice( iRequestLength, json.aaData.length );
    		fnCallback(json);
    		return;
    	}
    }

	$(document).ready(function() {
	  
	  oTable = $('#example').dataTable( {
			"bProcessing": true,
			"bServerSide": true,
        "bStateSave": true,
        "sPaginationType": "full_numbers",
        "sDom": 'lipft<bottom>rp',
        "sAjaxSource": 'compliance_report_query_dev2.php?where=%&status=1',
        "fnServerData": fnDataTablesPipeline,
        "fnDrawCallback": function() {
          //alert( 'DataTables has finished it\'s initialisation.' );
          
          //-----------------------------------------------------------Edit status entry
          $('.editable').editable( function( sValue ) {
		    	// the id has the Patient ID 
		    	var patientID = $(this).attr('id');
		    	//alert('1: ' + sValue);
		    	$.post("ajax_update_patient.php", { patientID: patientID, value: sValue }, function(data){
                    // if it was not ok show the error
                    if (data != "OK") {
                        alert(data);
                    }
            });
            if(sValue == 1) sValue = '<font color=#007700>Active</font>'; 
            if(sValue == 2) sValue = '<font color=#777777>Inactive</font>'
            if(sValue == 3) sValue = 'Discharged';
            if(sValue == 99) sValue = '<b><font color=#660000>DELETED</font></b>';
		    	return sValue;
		    }, { 
		    	 data      : " {'1':'Active','2':'Inactive','3':'Closed'}",
     	    	 type      : 'select',
			       id        : 'field',
             indicator : 'Saving...',
             tooltip   : 'Click to edit. Note If you Delete a patient they will not show up on any queries, reports, etc...',
             event     : 'click',
     	    	 submit    : 'OK' } 
     	    ).addClass('ui-state-highlight ui-corner-all');
     	    
     	    //-----------------------------------------------------------Date entries
     	    $('#example tbody td input[date=1]').attr({readonly: '1'}).datepicker({
            yearRange: '1909:2040',
		    	changeMonth: true,
		    	changeYear: true,
            onSelect: function(dateText){
              // Build the post data
              if($(this).val() == "01/01/1909") $(this).val("");
              var postData = {
                  patientID: $(this).attr('patientID'),
                  field: $(this).attr('field'),
                  value: $(this).val()
              };
              var myparent = $(this).parent().attr('class');
              var temp = $(this).val();
              var thisdate = new Date();
              var new_date = new Date(temp.substring(6,10),temp.substring(0,2)-1,temp.substring(3,5));
              var dateDiff = Math.ceil((new_date - thisdate)/(1000*60*60*24));
              var new_class = '';
              
        
              //alert(var_diff);
              $(this).parent().removeClass(myparent);
              $(this).parent().addClass(new_class);
              // Update the database
              $.post("ajax_update_patient.php", postData, function(data){
                  // if it was not ok show the error
                  if (data != "OK") {
                    alert(data);
                  }
              });
            }
          }).addClass('ui-state-highlight ui-corner-all');
     	    
     	    //-----------------------------------------------------------Date field entries
     	    $('.edit').editable( function( sValue ) {
		    	// the id has the Patient ID 
		    	var patientID = $(this).attr('id');
		    	$.post("ajax_update_patient.php", { patientID: patientID, value: sValue }, function(data){
                // if it was not ok show the error
                if (data != "OK") {
                alert(data);
              }
            });
            if(sValue=="")
             sValue = "<font class='note'>N/A</font>";
		    	return sValue;
		    }, { 
			       id        : 'field',
             indicator : 'Saving...',
             tooltip   : 'Click to edit',
             event     : 'click',
     	    	 submit    : 'OK' } ).addClass('ui-state-highlight ui-corner-all');
     	    
     	    // Now make all columes no wrap and centered
     	    //$('#example tbody td div').css('white-space','nowrap').css('text-align','center');
     	    $('#example tbody td:not(editarea)').css('white-space','nowrap').css('text-align','center');
     	    $('.editarea').parent().css('white-space','').css('text-align','center');
//*********************************************************************************************************Fix me 6/28/2010     	    
     	    // Add the table row tooltip
     	    $('#example tbody tr').each( function() {
     	      //this.$(td a);
     	      // We have our rows, we need the name and patientID
     	      //get the first td and it's offset
     	      var this_text = $(this).html();
     	      
     	      var t1 = this_text.indexOf('patient_id=',this_text)+19;
     	      var t2 = this_text.indexOf('</a>',this_text);
     	      
     	      var td1_text = this_text.substring(t1,t2);
     	      //alert(t1 + ' '+ t2 + ' ' + this_text );
     	      //alert(td3_text + ' ' + td1_text);
     	      $(this).attr('title', td1_text);
     	    });//
     	    
     	    //-----------------------------------------------------------Checkboxes
     	    $('#example tbody:checkbox').click( function() {
		      var checked = this.checked;
		      var patientID = $(this).attr('id');
		      var sValue = checked ? '1' : ''; // translated boolean to character 1 or blank
		      $.post("ajax_update_patient.php", { patientID: patientID, value: sValue }, function(data){
                // if it was not ok show the error
                if (data != "OK") {
                alert(data);
              }
            });
		    });
		    
		    //-----------------------------------------------------------Notes
		    $('.editarea').editable( function( sValue ) {
        //alert('1');
          var patientID = $(this).attr('id');
          //alert(id);
		    	$.post("ajax_update_patient.php", { patientID: patientID, value: sValue }, function(data){
                // if it was not ok show the error
                if (data != "OK"){
                  alert(data);
                }
            });
		    	return sValue;
		    }, { 
			       id        : 'field',
			       type      : 'textarea',
			       rows      : '4',
             indicator : 'Saving...',
             tooltip   : 'Click to edit.',
             event     : 'click',
     	    	 submit    : 'Save' ,
     	    	 data      : function(value, settings) {
     	    	  $(this).fadeTo(1,.01).fadeTo(1000,1);
                var retval = value;
                return retval;
             }
     	    }).addClass('ui-state-highlight ui-corner-all');
		    
		    
		    
     	        
        }
	  } );
	  
	  
		//$('#example tbody tr').tooltip( {cssClass:"tooltip-yellow", delay:1000,duration : 400,fadeDuration: 10, opacity:20} );
		//$(function() { 
			$('#clinic_picker').droppy({speed: 130});		
	//		});
		/* Apply the jEditable handlers to the table */

} );

  $(function() {
		$('#nav').droppy({speed: 130});
		var options1 = {
     	format: '%I:%M:%S %p' // 12-hour
   	}
   	$('#jclock1').jclock(options1);
   	
   	$('#timeout').everyTime(5000,function(i) {
   	  var cookiename = "time_left=";
       var ca = document.cookie.split(';');
       for(var i=0;i < ca.length;i++) {
         var c = ca[i];
         while (c.charAt(0)==' ') 
           c = c.substring(1,c.length);
         if (c.indexOf(cookiename) == 0) {
           var data = c.substring(cookiename.length,c.length);
           data = unescape(data.replace(/\+/," "));
           data = "Session expires<br/>at " + data;
         }
       }
       //$('#timeout').slideUp(400).slideDown(400).html(data);
       $('#timeout').html(data);
	  //$(this).html(i);
  });

      
// scroll reminder droppy
menuYloc = 5;// parseInt($('#reminder').css('top').substring(0,$('#reminder').css('top').indexOf('px')));
menuXloc = 5;//parseInt($('#reminder').css('top').substring(0,$('#reminder').css('left').indexOf('px')));
$(window).scroll(function () {  
  var yoffset = menuYloc;
  var xoffset = menuXloc; 
if($('#float_pref').attr('value') != 2) {
  yoffset = menuYloc+$(document).scrollTop()+'px';  
  xoffset = menuYloc+$(document).scrollLeft()+'px';  
}
$('#reminder').animate({top:yoffset, left:xoffset},{duration:500,queue:false}); 
}); 

      
  $('#float_pref').bind('click', function(event) {
    var sValue = $(this).attr('value');
    if(sValue == 1)
      sValue = 2;
    else
      sValue = 1;
    //alert(sValue);
      $.post('ajax_update_user.php', { 
        userID: '10014', 
        field: 'float_pref', 
        value: sValue }, 
			  function(data){
            // if it was not ok show the error
            if (data != 'OK'){
              alert(data);
            }
            else {
              if(sValue == 1){
                $('#float_pref').html('<span class=\'ui-icon ui-icon-carat-2-n-s\'></span>');
                $('#float_pref').attr('value', '1');
              }
              else {
                $('#float_pref').html('<span class=\'ui-icon ui-icon-stop\'></span>');
                $('#float_pref').attr('value','2');
              }
            }  
        });
   });

  });

	</script>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
	<body id="dt_example">
<br /><br />
<div id="reminder" style="position:absolute; top:5px; margin-left:5px; width:100%; z-index:2; ">

<div id="reminder_inner" style="float:left;height:15px;">
<ul id='nav'>
  <li><a href='#'>Mr  Kenny Hunt</a>
    <ul>
      <li><a onclick="newwindow=window.open('guide/ct_guide.html','mywindow','scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes');if(window.focus)newwindow.focus()" href='#'>User Guide</a></li>	
      <li><a href='unsigned_report.php'>Unsigned Forms Report</a></li>	
    </ul>
  </li>

		<li><a href='#'>Admin Menu</a>
		<ul>
    		<li><a href='approval_form.php'>Form Approvals</a></li>
    		<li><a href='#'>Maintenance</a>
    			<ul>
    				<li><a href='users_clinics.php'>Clinician to Clinic Assignment</a></li><li><a href='mtp_template_maint.php'>Template Maintenance</a></li><li><a href='user_maint.php'>User Maintenance</a></li>

    			</ul>
    		</li>

    		</li>
  		</ul>
  	</li>
  	<li><a href='#'>Reports Menu</a>
      <ul>
      	<li><a href='#'>Billing</a>

      		<ul>
      			<li><a href='daily_billing_individual.php'>Kenny's Daily Billing</a></li><li><a href='daily_billing.php'>Daily Billing Form</a></li><li><a href='daily_billing_adhoc.php'>Provider Adhoc Report</a></li><li><a onclick="newwindow=window.open('new.html','mywindow','width=500,height=300,scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes');if(window.focus)newwindow.focus()" href='#'>New Report</a></li>
      		</ul>
      	</li>
      		<li><a href='compliance_report_dev2.php'>Compliance Report</a></li><li><a href='adm_dc_report_dev2.php'>Admissions, Transfers, Discharges Report</a></li><li><a href='patient_list_report_dev2.php'>Patient List Report</a></li><li><a href='patient_demo_report.php'>Patient Demographics Report</a></li>

     	</ul>
    </li>
  	<li><a href='patientselect.php?patient_id='>Select Patient</a></li>
  	<li></li>
  	<li><a href='logoff.php'>Log Off</a></li>
  </ul></div><div id='jclock1' style="float:left;"></div>
  <div id='timeout' style="float:left; text-align:center;">Session expires<br/>at 5:01:30 pm</div><div id='float_pref' value='1'><span class='ui-icon ui-icon-carat-2-n-s'></span></div><div style="clear: both;"></div> <div style="clear: both;"></div></div>

<br />
<center><form method="post"><div style="float:center; width:550px;">
<ul id='clinic_picker'>
	<li>   Select a Clinic from either list </li>
	<li>     </li>
	<li><a href='#'> Clinics A through M </a>

		<ul>
    		<li><a href='/secure/compliance_report_dev2.php?where=%'>All Clinics </a></li><li><a href='/secure/compliance_report_dev2.php?where=3'>Corporate Office <font size="-1"></font></a></li><li><a href='/secure/compliance_report_dev2.php?where=9'>Earle Outpatient Clinic <font size="-1">171503526</font></a></li><li><a href='/secure/compliance_report_dev2.php?where=5'>Forrest City Outpatient Clinic <font size="-1"></font></a></li><li><a href='/secure/compliance_report_dev2.php?where=10'>Hughes <font size="-1">171533526</font></a></li><li><a href='/secure/compliance_report_dev2.php?where=6'>Marianna Outpatient Clinic <font size="-1">171504526</font></a></li>
  		</ul>
  	</li>

  	<li><a href='#'> Clinics N through Z </a>
		<ul>
    		<li><a href='/secure/compliance_report_dev2.php?where=7'>Newport Comprehensive Clinic <font size="-1">170936526</font></a></li><li><a href='/secure/compliance_report_dev2.php?where=2'>West Memphis Adult Day Treatment Program <font size="-1">1700950011</font></a></li><li><a href='/secure/compliance_report_dev2.php?where=4'>West Memphis After School Program <font size="-1">171532526</font></a></li><li><a href='/secure/compliance_report_dev2.php?where=1'>West Memphis Outpatient Clinic <font size="-1">171534526</font></a></li><li><a href='/secure/compliance_report_dev2.php?where=8'>Wynne Outpatient Clinic <font size="-1">171535526</font></a></li>

  		</ul>
  	</li>
  </ul>
  </div>
<tr><td colspan=2><center>Show: <input onclick="this.form.submit()" type="radio" name="status" value="1" checked="CHECKED"> Active Patients  <input onclick="this.form.submit()" type="radio" name="status" value="2"> Inactive Patients  <input onclick="this.form.submit()" type="radio" name="status" value="3"> Closed Patients  <br /><br /> </form><b>Current Clinic: All Clinics</b></center>

	<br /><div style='text-align: center;'>
	<form name='xlsout' method='post' action='/secure/compliance_report_dev2.php?excel=1' enctype='application_x-www-form-urlencoded'>
	<input type='submit' name='submit_b' value='Excel Output'></form></div>
		<div class="full_width big"><b><font size="+1">Patient Compliance Report</font></b></div>
		<tr><td><center><font class='note'>Key: <font color="#CCCC33">Yellow</font>: less than 14 days to appt. date   <font color="#3399FF">Blue</font>: Less than 7 days to appt. date   <font color="#CC0000">Red</font>: Appt. date is past due.   <br />*Note: be sure to enter all dates in the following format MM/DD/YYYY. "/"'s are included</font>

<table cellpadding="0" cellspacing="0" border="1" class="display" id="example" width='95%'>
	<thead>
	<tr><td colspan="18">Click the<font class="ui-state-highlight ui-corner-all"> highlighted text </font>to edit the contents. You can prese Escape or click elsewhere to cancel any changes. To delete a date set it to Jan 1, 1909</td></tr>
		<tr>
			<th>Client Name</th>
			<th width="4%">On<br />Meds</th>

			<th width="9%">MD Appt<br />Due</th>
			<th width="9%">PA</th>
			<th width="9%">PCP</th>
			<th width="9%">YOQ</th>
			<th width="9%">Treatment<br />Plan</th>

			<th width="9%">Date of<br />Admission</th>
			<th>Comments</th>
			<th width="9%">Status</th>
		</tr>
	</thead>
	<tbody>
	</tbody>

	<tfoot>

	</tfoot>
</table>

</body>
</html>

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.