示例#1
0
    $_DATA->setRowLink($sViewListID, CURRENT_PATH . '/' . $_DATA->sRowID);
    $_DATA->viewList($sViewListID);
    $_T->printFooter();
    exit;
}
if (PATH_COUNT == 3 && $_PE[1] == 'disease' && ctype_digit($_PE[2]) && !ACTION) {
    // URL: /phenotypes/disease/00001
    // View all phenotype entries for a certain disease.
    $nDiseaseID = sprintf('%05d', $_PE[2]);
    define('PAGE_TITLE', 'View phenotypes for disease #' . $nDiseaseID);
    $_T->printHeader();
    $_T->printTitle();
    require ROOT_PATH . 'class/object_phenotypes.php';
    $_DATA = new LOVD_Phenotype($nDiseaseID);
    $_GET['search_diseaseid'] = $nDiseaseID;
    $_DATA->viewList('Phenotypes_for_Disease_' . $nDiseaseID, array('diseaseid'), false, false, (bool) ($_AUTH['level'] >= LEVEL_MANAGER), false, true);
    $_T->printFooter();
    exit;
}
if (PATH_COUNT == 2 && ctype_digit($_PE[1]) && !ACTION) {
    // URL: /phenotypes/0000000001
    // View specific entry.
    $nID = sprintf('%010d', $_PE[1]);
    define('PAGE_TITLE', 'View phenotype #' . $nID);
    $_T->printHeader();
    $_T->printTitle();
    // Load appropriate user level for this phenotype entry.
    lovd_isAuthorized('phenotype', $nID);
    require ROOT_PATH . 'class/object_phenotypes.php';
    $_DATA = new LOVD_Phenotype('', $nID);
    $zData = $_DATA->viewEntry($nID);
示例#2
0
 lovd_showJGNavigation($aNavigation, 'Individuals');
 print '<BR><BR>' . "\n\n";
 if (!empty($zData['phenotypes'])) {
     // List of phenotype entries associated with this person, per disease.
     $_GET['search_individualid'] = $nID;
     $_T->printTitle('Phenotypes', 'H4');
     // Repeat searching for diseases, since this individual might have phenotype entry for a disease he doesn't have.
     $zData['diseases'] = $_DB->query('SELECT id, symbol, name FROM ' . TABLE_DISEASES . ' WHERE id IN (?' . str_repeat(', ?', count($zData['phenotypes']) - 1) . ')', $zData['phenotypes'])->fetchAllRow();
     require ROOT_PATH . 'class/object_phenotypes.php';
     foreach ($zData['diseases'] as $aDisease) {
         list($nDiseaseID, $sSymbol, $sName) = $aDisease;
         if (in_array($nDiseaseID, $zData['phenotypes'])) {
             $_GET['search_diseaseid'] = $nDiseaseID;
             $_DATA = new LOVD_Phenotype($nDiseaseID);
             print '<B>' . $sName . ' (<A href="diseases/' . $nDiseaseID . '">' . $sSymbol . '</A>)</B>&nbsp;&nbsp;<A href="phenotypes?create&amp;target=' . $nID . '&amp;diseaseid=' . $nDiseaseID . '"><IMG src="gfx/plus.png"></A> Add phenotype for this disease';
             $_DATA->viewList('Phenotypes_for_I_VE_' . $nDiseaseID, array('phenotypeid', 'individualid', 'diseaseid'), true, true);
         }
     }
     unset($_GET['search_individualid']);
     unset($_GET['search_diseaseid']);
 } else {
     lovd_showInfoTable('No phenotypes found for this individual!', 'stop');
 }
 if (count($zData['screeningids'])) {
     $_GET['search_individualid'] = $nID;
     print '<BR><BR>' . "\n\n";
     $_T->printTitle('Screenings', 'H4');
     require ROOT_PATH . 'class/object_screenings.php';
     $_DATA = new LOVD_Screening();
     $_DATA->setSortDefault('id');
     $_DATA->viewList('Screenings_for_I_VE', array('screeningid', 'individualid', 'created_date', 'edited_date'), true, true);