Exemple #1
0
   	function _consult_dental() {
      		echo "<form name='form_dental' action='$_POST[PHP_SELF]' method='POST'>";
      
      		$dental = new dental;
      
      		$dental->toothnumber = 0;
      		$dental->condition[$dental->toothnumber] = 'Y';
      		$dental->consult_id = $_GET['consult_id'];
      		$dental->patient_id = healthcenter::get_patient_id($_GET['consult_id']);
      		$dental->patient_age = healthcenter::get_patient_age($_GET['consult_id']);
      		$dental->dentist = $_SESSION['userid'];
      
      		// The following codes will initialize hidden textboxes and their values
      		echo "<input type='hidden' name='h_patient_id' value='{$dental->patient_id}'></input>";
      		echo "<input type='hidden' name='h_consult_id' value='{$dental->consult_id}'></input>";
      		echo "<input type='hidden' name='h_dentist' value='{$dental->dentist}'></input>";
      
      		if (@$_POST['h_save_flag'] == 'GO') {
        		$dental->new_dental_record();
		
			print "&nbsp;";
			$dental->show_message_if_patient_is_pregnant($dental->patient_id, date("Y-m-d"));
        
        		echo "&nbsp;";
        		$dental->show_date_of_oral();
			
        		$dental->get_teeth_conditions($dental->patient_age);
			
        		//echo "&nbsp;";
        		//$dental->select_tooth_and_condition($dental->patient_age);
			
        		//echo "&nbsp;";
        		//$dental->show_teeth_conditions($dental->patient_age);

			print "&nbsp;";
			$dental->show_teeth_conditions_v02();
        
        		echo "&nbsp;";
        		$dental->show_ohc_table_a($dental->patient_id);
        
        		echo "&nbsp;";
        		$dental->show_ohc_table_b($dental->patient_id);
			
			echo "&nbsp;";
			$dental->show_services_monitoring_chart($dental->patient_id);
			
			print "&nbsp;";
			$dental->show_other_dental_services($dental->patient_id);
        
			echo "&nbsp;";
			$dental->show_tooth_legends($dental->patient_age);
     		}	 
		else {
			$dental->init_primary_keys();

			print "&nbsp;";  
			$dental->show_message_if_patient_is_pregnant($dental->patient_id, date("Y-m-d"));
			
			echo "&nbsp;";
			$dental->show_date_of_oral();
			
			$dental->get_teeth_conditions($dental->patient_age);
			
			//echo "&nbsp;";
			//$dental->select_tooth_and_condition($dental->patient_age);
			
			//echo "&nbsp;";
			//$dental->show_teeth_conditions($dental->patient_age);

			print "&nbsp;";
			$dental->show_teeth_conditions_v02();
        
			echo "&nbsp;";
			$dental->show_ohc_table_a($dental->patient_id);
        
			echo "&nbsp;";
			$dental->show_ohc_table_b($dental->patient_id);
			
			echo "&nbsp;";
			$dental->show_services_monitoring_chart($dental->patient_id);
			
			print "&nbsp;";
			$dental->show_other_dental_services($dental->patient_id);
        
			echo "&nbsp;";
			$dental->show_tooth_legends($dental->patient_age);
      		}
      
		echo "<input type='hidden' name='h_save_flag' value='GO'></input>";
		echo "</form>";
   	}