Exemplo n.º 1
0
<?php 
//print_r($_REQUEST);
$lab_config_id = $_REQUEST['location'];
$lab_config = LabConfig::getById($lab_config_id);
if ($lab_config == null) {
    echo LangUtil::$generalTerms['MSG_NOTFOUND'];
    return;
}
$date_from = $_REQUEST['yyyy_from'] . "-" . $_REQUEST['mm_from'] . "-" . $_REQUEST['dd_from'];
$date_to = $_REQUEST['yyyy_to'] . "-" . $_REQUEST['mm_to'] . "-" . $_REQUEST['dd_to'];
$uiinfo = "from=" . $date_from . "&to=" . $date_to;
putUILog('reports_test_count_grouped', $uiinfo, basename($_SERVER['REQUEST_URI'], ".php"), 'X', 'X', 'X');
# Fetch site-wide settings
//$site_settings = DiseaseReport::getByKeys($lab_config->id, 0, 0);
$configArray = getTestCountGroupedConfig($lab_config->id);
//echo "--".$configArray['group_by_age'].$configArray['group_by_gender'].$configArray['age_groups'].$configArray['measure_groups'].$configArray['measure_id']."<br>";
# Fetch report configuration
$byAge = $configArray['group_by_age'];
$age_group_list = decodeAgeGroups($configArray['age_groups']);
$byGender = $configArray['group_by_gender'];
$bySection = $configArray['measure_id'];
$combo = $configArray['test_type_id'];
// 1 - registered, 2 - completed, 3 - completed / pending
/*
$byAge = 1;
$bySection = 1;
$byGender = 0;
*/
//$age_group_list = $site_settings->getAgeGroupAsList();
?>
Exemplo n.º 2
0
        public function getGroupedCountReportSummary($lab_config)
        {
            $configArray = getTestCountGroupedConfig($lab_config->id);
            $byAge = $configArray['group_by_age'];
            $ageGroups = $configArray['age_groups'];
            $byGender = $configArray['group_by_gender'];
            $bySection = $configArray['measure_id'];
            $combo = $configArray['test_type_id']; // 1 - registered, 2 - completed, 3 - completed / pending
            
            
            $sp_configArray = getSpecimenCountGroupedConfig($lab_config->id);
            $sp_byAge = $sp_configArray['group_by_age'];
            $sp_ageGroups = $sp_configArray['age_groups'];
            $sp_byGender = $sp_configArray['group_by_gender'];
            $sp_bySection = $sp_configArray['measure_id'];
            $sp_combo = $sp_configArray['test_type_id']; // 1 - registered, 2 - completed, 3 - completed / pending
            
            ?>
		<div class='pretty_box' style='width:700px;'>
		<table class='hor-minimalist-b'>
                    <tr>
                    <th></th>
                    <th><b>Test Count (Grouped) Report Settings:</b></th>
                    </tr>
			<tbody>
                            <tr valign='top'>
					<td><?php echo "Group By Lab Section"; ?></td>
					<td>
						<?php
						if($bySection == 1)
							echo LangUtil::$generalTerms['YES'];
						else
							echo LangUtil::$generalTerms['NO']; 
						?>
					</td>
				</tr>
				<tr valign='top'>
					<td><?php echo LangUtil::$pageTerms['GROUP_BYGENDER']; ?></td>
					<td>
						<?php
						if($byGender == 1)
							echo LangUtil::$generalTerms['YES'];
						else
							echo LangUtil::$generalTerms['NO']; 
						?>
					</td>
				</tr>
				<tr valign='top'>
					<td><?php echo LangUtil::$pageTerms['GROUP_BYAGE']; ?></td>
					<td>
						<?php
						if($byAge == 1)
							echo LangUtil::$generalTerms['YES']; 
						else
							echo LangUtil::$generalTerms['NO']; 
						?>
					</td>
				</tr>
				<tr valign='top' <?php
						if($byAge == 0)
							echo " style='display:none' ";
						?>>
					<td><?php echo LangUtil::$pageTerms['RANGE_AGE']; ?> (<?php echo LangUtil::$generalTerms['YEARS']; ?>)</td>
					<td>
						<?php
						# Group by age enabled
                                                $age_parts = explode(",", $ageGroups);
						foreach($age_parts as $age_part)
						{
							if(trim($age_part) == "")
								continue;
							$age_bounds = explode(":", $age_part);
							echo $age_bounds[0]."-".$age_bounds[1];
							echo "&nbsp;&nbsp;&nbsp;";
						}
					
					?>
					</td>
				</tr>
                                <tr valign='top'>
					<td><?php echo "Counts to Display"; ?></td>
					<td>
						<?php
						if($combo == 1)
							echo "All registered tests";
						else if($combo == 3)
							echo "Both completed and pending tests (separated by a slash)"; 
                                                else
                                                    echo "Only completed tests";
                                                    
						?>
					</td>
				</tr>
                                <tr>
                                <th></th>
                                 <th><b>Specimen Count (Grouped) Report Settings:</b></th>
                                 </tr>
				<tr valign='top'>
					<td><?php echo LangUtil::$pageTerms['GROUP_BYGENDER']; ?></td>
					<td>
						<?php
						if($sp_byGender == 1)
							echo LangUtil::$generalTerms['YES'];
						else
							echo LangUtil::$generalTerms['NO']; 
						?>
					</td>
				</tr>
				<tr valign='top'>
					<td><?php echo LangUtil::$pageTerms['GROUP_BYAGE']; ?></td>
					<td>
						<?php
						if($sp_byAge == 1)
							echo LangUtil::$generalTerms['YES']; 
						else
							echo LangUtil::$generalTerms['NO']; 
						?>
					</td>
				</tr>
				<tr valign='top' <?php
						if($sp_byAge == 0)
							echo " style='display:none' ";
						?>>
					<td><?php echo LangUtil::$pageTerms['RANGE_AGE']; ?> (<?php echo LangUtil::$generalTerms['YEARS']; ?>)</td>
					<td>
						<?php
						# Group by age enabled
                                                $sp_age_parts = explode(",", $sp_ageGroups);
						foreach($sp_age_parts as $age_part)
						{
							if(trim($age_part) == "")
								continue;
							$age_bounds = explode(":", $age_part);
							echo $age_bounds[0]."-".$age_bounds[1];
							echo "&nbsp;&nbsp;&nbsp;";
						}
					
					?>
					</td>
				</tr>
                                
                                </tbody>
		</table>
		</div>
		<?php
        }
Exemplo n.º 3
0
    public function DHIMS2ConfigsForm($lab_config_id)
    {
        ?>
    
   	<div class='pretty_box' style='width:800px;'>
   	  <table class='hor-minimalist-b'>
            <tr>
                    <th></th>
                    <th><b>Authentication:</b></th>
        </tr>
    	<tbody>
        <tr>
        <td>Username:</td>
        <td><input type="text"  name="dhims2username"  id="dhims2username"/></td>  
        </tr>      
        <tr>
         <td>Password:</td>
        <td><input type="password"  name="dhims2password"  id="dhims2password"/></td>       
       
        </tr>
        <tr>
         <td></td>
        <td><input type="button" id="dhims2Authenticate" name="dhims2Authenticate" value="Authenticate" onclick="javascript:authenticateDHIMS2();" />
        	<span id='DHIMS2AuthenticateProgress' style='display:none'>
            <br />
											<?php 
        $this->getProgressSpinner("Connecting to DHIMS2, Please wait...");
        ?>
                                            
		  </span>  
        </td>       
       
        </tr>
         <tr>
         <td>Organisation Unit:</td>
        <td><select id="dhims2orgunit" name="dhims2orgunit" onchange="javascript:getDHIMS2DataSet(this.value);">        
        </select><span id='DHIMS2orgunitProgress' style='display:none'>
            <br />
											<?php 
        $this->getProgressSpinner("Connecting to DHIMS2, Please wait...");
        ?>
                                            
										</span>  </td>       
       
        </tr>
        <th></th>
          <th><b>Dataset Mapping:</b></th>
          </tr>
         <tr>
         <td>Dataset:</td>
        <td><select id="dhims2dataset" name="dhims2dataset" onchange="javascript:getDHIMS2DataElements(this.value);">       
        </select><a style="display:none" id="DHIMS2datasetProgressRetry" href="javascript:getDHIMS2DataElements(null);">Retry</a><span id='DHIMS2datasetProgress' style='display:none'>
            <br />
											<?php 
        $this->getProgressSpinner("Connecting to DHIMS2, Please wait...");
        ?>
                                            
										</span> </td>       
       
        </tr>
        <tr>
        <td>Entry Period:</td>
         <td><input type="text" name="entryperiod" id="entryperiod"  readonly="readonly"/></td>
        </tr>
       <tr><th></th>
          <th><b>DataElements Mapping:</b></th>
        </tr>     
        </tbody>
        </table>
        <table class='hor-minimalist-b'>
         <tbody>
         <tr>
        <th><b>DHIMS2</b></th>
          <th colspan="2"><b>BLIS</b></th>
          </tr>
           <tr valign="middle">
         <td>DataElement:<select id="dhims2dataelement" name="dhims2dataelement" onchange="javascript:getDHIMS2CatComboOptions(this.value);">
        
        </select><a style="display:none" id="DHIMS2ElementProgressRetry" href="javascript:getDHIMS2CatComboOptions(null);">Retry</a><span id='DHIMS2ElementProgress' style='display:none'>
            <br />
											<?php 
        $this->getProgressSpinner("Connecting to DHIMS2, Please wait...");
        ?>
                                            
										</span> </td>
        <td valign="middle">   
        <select id="blis2dataelement" name="blis2dataelement" class='uniform_width' onchange="javascript:setSelB(this);">
        <option value="">-</option>
        <?php 
        $this->getTestTypesSelect($lab_config_id->id);
        ?>
        </select><input type="button" id="addBlisTest" value=">" onclick="javascript:addtoBlisList();" /><input type="button" id="removeBlisTest"  onclick="javascript: remBOrder();" value="<" /></td><td>Selected:<select id="blistestSelected" name="blistestSelected" size="5" onchange="javascript: setSelB(this);">
        </select></td> 
           </tr>      
          <tr>
         <td>Date Range:<select id="dhims2catCombo" name="dhims2catCombo">
         </select></td>
        <td colspan="2"><select id="bliscat" name="bliscat">
        <?php 
        $configArray = getTestCountGroupedConfig($lab_config_id->id);
        $ageGroups = $configArray['age_groups'];
        if (!empty($ageGroups)) {
            $age_parts = explode(",", $ageGroups);
            foreach ($age_parts as $age_part) {
                if (trim($age_part) == "") {
                    continue;
                }
                $age_bounds = explode(":", $age_part);
                echo '<option value="' . $age_bounds[0] . "-" . $age_bounds[1] . '">' . $age_bounds[0] . "-" . $age_bounds[1] . '</option>';
            }
        }
        ?>
        </select>
        
        Sex:<input type="text" id="blisgender" name="blisgender" size="1" value="B" /><input type="button" id="addtolist" name="addtolist" value="Apply"  onclick="javascript:AddnewDHIMS2Config();" disabled="disabled"/><span id='DHIMS2ApplyProgress' style='display:none'>
											<?php 
        $this->getProgressSpinner(LangUtil::$generalTerms['CMD_SUBMITTING']);
        ?>
                                            
										</span>
         <input type="hidden" name="dhims2orgunit_text"  id="dhims2orgunit_text" />
         <input type="hidden" name="dhims2dataset_text" id="dhims2dataset_text" />
         <input type="hidden" name="dhims2dataelement_text" id="dhims2dataelement_text" />
         <input type="hidden" name="blis2dataelement_text" id="blis2dataelement_text" />
         <input type="hidden" name="dhims2catCombo_text" id="dhims2catCombo_text" />
         <input type="hidden" name="lid" id="lid" value="<?php 
        echo $lab_config_id->id;
        ?>
" />
        </td>       
       
        </tr>
        <tr>
        <td colspan="3"><?php 
        $this->getDHIMSConfigs($lab_config_id->id);
        ?>
</td>
        </tr>
          <tr>
         <td colspan="3" align="center"><a href="javascript:toggle_DHIMS2();"><?php 
        echo LangUtil::$generalTerms['CMD_CANCEL'];
        ?>
</a></td>
           
        </tr>
         </tbody>
        </table>         
    </div>
	<?php 
    }