if (!($result_test_file = $link->query($test_file_Stmt))) { DisplayErrMsg(sprintf("Error in executing %s stmt", $subject_Stmt)); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } $table_test_file = ''; $j = 0; while ($field_test_file = $result_test_file->fetch_object()) { $b = $j % 2; $bgcolor = ''; if ($b == 0) { $bgcolor = '#B8E7FF'; } $table_data = new Smarty_NM(); if ($j == 0) { $table_test_file = $table_data->fetch("file_select_header.tpl"); } $action_update = sprintf("new_test_file.php?pk=%d&t=%d", $field_test_file->pk, time()); $checkbox_name = sprintf("test_file[%d]", $field_test_file->pk); $table_data->assign("bgcolor", $bgcolor); $table_data->assign("checkbox_name", $checkbox_name); $table_data->assign("omschrijving", $field_test_file->omschrijving); $table_data->assign("filenaam", $field_test_file->filenaam); $table_data->assign("action_update", $action_update); $table_test_file .= $table_data->fetch("file_select_row.tpl"); $j++; } $result_test_file->close(); $data = new Smarty_NM(); $data->assign("Title", "Test files"); $data->assign("header", "Test files");
$buttons = new Smarty_NM(); $buttons->assign("patient_button", 'Add_Instance'); $selector_buttons .= $buttons->fetch("pssi_button.tpl"); } if ($selector_instance_pk > 0) { $buttons = new Smarty_NM(); $buttons->assign("patient_button", 'Modify_Instance'); $selector_buttons .= $buttons->fetch("pssi_button.tpl"); $buttons = new Smarty_NM(); $buttons->assign("patient_button", 'Delete_Instance'); $selector_buttons .= $buttons->fetch("pssi_button.tpl"); } $table_selector_buttons = ''; $buttons = new Smarty_NM(); $buttons->assign("selector_buttons", $selector_buttons); $table_selector_buttons = $buttons->fetch("pssi_buttons.tpl"); $selector->assign("submit_value", "Insert"); if ($pk > 0) { if ($selector_patient_pk > 0 || $selector_study_pk > 0 || $selector_series_pk > 0 || $selector_instance_pk > 0) { selector_function_pssi($pk, $selector_patient_pk, $selector_study_pk, $selector_series_pk, $selector_instance_pk, $table_pssi); } $selector->assign("submit_value", "Update"); } if ($pk != 0) { $selector->assign("table_buttons", $table_selector_buttons); $selector->assign("table_pssi", $table_pssi); } $selector->assign("action_new_selector", sprintf("new_selector.php?pk={$pk}&selector_patient_pk={$selector_patient_pk}&selector_study_pk={$selector_study_pk}&selector_series_pk={$selector_series_pk}&selector_instance_pk={$selector_instance_pk}&new_selector_ref={$new_selector_ref}&t=%d", time())); //drop_down_data analysemodule $table_analysemodule = 'analysemodule'; $analysemodule_Stmt = "SELECT * from {$table_analysemodule} order by {$table_analysemodule}.filename";
$action_object = sprintf("show_object.php?pk=%d&object_type=%s&t=%d", $field_results->pk, $object_type, time()); $picture_src = sprintf("image_resize.php?f_name=%s&height=120", $logo_log_file); break; case "application/pdf": $action_object = sprintf("show_object.php?pk=%d&object_type=%s&t=%d", $field_results->pk, $object_type, time()); $picture_src = sprintf("image_resize.php?f_name=%s&height=120", $logo_pdf_file); break; default: $action_object = sprintf("show_object.php?pk=%d&object_type=%s&t=%d", $field_results->pk, $object_type, time()); $picture_src = sprintf("image_resize.php?f_name=%s&height=120", $logo_obj_file); } $picture->assign("picture_src", $picture_src); $picture->assign("picture_action", $action_object); $picture_row .= $picture->fetch("insert_picture_row.tpl"); $description_name->assign("picture_name", $field_results->omschrijving); $name_row .= $description_name->fetch("insert_picture_name_row.tpl"); $j++; $b = $j % 8; if ($b == 0 && $j > 0) { $table_resultaten_object .= sprintf("<tr>%s</tr>", $picture_row); $table_resultaten_object .= sprintf("<tr>%s</tr>", $name_row); $picture_row = ''; $name_row = ''; } } $result_object->close(); if ($b != 0) { while ($b < 8) { $picture_row .= sprintf("<td></td>"); $name_row .= sprintf("<td></td>"); $b++;
exit; } $field_results = $result_selector->fetch_object(); $header_result = sprintf("Selector: %s, analyse level: %s", $field_results->name, $field_results->analyselevel); $result_selector->close(); $table_resultaten_char = ''; $j = 0; while ($field_results = $result_char->fetch_object()) { $b = $j % 2; $bgcolor = ''; if ($b == 0) { $bgcolor = '#B8E7FF'; } $table_data = new Smarty_NM(); if ($j == 0) { $table_resultaten_char = $table_data->fetch("resultaten_char_header.tpl"); } //$action_char=sprintf("show_results.php?selector_fk=%d&gewenste_processen_id=0&omschrijving_char=%s&t=%d",$selector_fk,$field_results->omschrijving,time()); $table_data->assign("bgcolor", $bgcolor); $table_data->assign("datum", $field_results->date_time); $table_data->assign("omschrijving", $field_results->omschrijving); $table_data->assign("criterium", $field_results->criterium); $table_data->assign("waarde_class", "table_data"); $table_data->assign("waarde", $field_results->waarde); if ($field_results->criterium != '') { $table_data->assign("waarde_class", "table_data_green"); // default is green if criterium is defined } //if ( ($field_results->criterium=='') and ($field_results->waarde!=$field_results->criterium) ) //{ // $table_data->assign("waarde_class","table_data_orange"); // assign is criterium not given, but value is
if (!($result_analysemodule = $link->query($analysemodule_Stmt))) { DisplayErrMsg(sprintf("Error in executing %s stmt", $subject_Stmt)); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } $table_analysemodule = ''; $j = 0; while ($field_analysemodule = $result_analysemodule->fetch_object()) { $b = $j % 2; $bgcolor = ''; if ($b == 0) { $bgcolor = '#B8E7FF'; } $table_data = new Smarty_NM(); if ($j == 0) { $table_analysemodule = $table_data->fetch("file_select_header.tpl"); } $action_update = sprintf("new_analysemodule.php?pk=%d&t=%d", $field_analysemodule->pk, time()); $checkbox_name = sprintf("analysemodule[%d]", $field_analysemodule->pk); $table_data->assign("bgcolor", $bgcolor); $table_data->assign("checkbox_name", $checkbox_name); $table_data->assign("description", $field_analysemodule->description); $table_data->assign("filename", $field_analysemodule->filename); $table_data->assign("action_update", $action_update); $table_analysemodule .= $table_data->fetch("file_select_row.tpl"); $j++; } $result_analysemodule->close(); $data = new Smarty_NM(); $data->assign("Title", "Analyse Modules"); $data->assign("header", "Analyse Modules");
$table_data->assign("status_id", $status); $table_data->assign("date_options", $list_date); $table_data->assign("date_select", $date_filter); $selector_list = $table_data->fetch("status_filter_processor.tpl"); $processor_status_row = ''; $j = 0; while ($field_gewenste_processen = $result_gewenste_processen->fetch_object()) { $b = $j % 2; $bgcolor = ''; if ($b == 0) { $bgcolor = '#B8E7FF'; } $table_data = new Smarty_NM(); if ($j == 0) { if (!empty($user_level_1)) { $processor_status_row = $table_data->fetch("proces_select_header.tpl"); } if (!empty($user_level_2) || !empty($user_level_3)) { $processor_status_row = $table_data->fetch("proces_header.tpl"); } } if (!($field_gewenste_processen->study_fk == NULL)) { if (!($result_processor_study = $link->query(sprintf($processor_study_Stmt, $field_gewenste_processen->pk)))) { DisplayErrMsg(sprintf("Error in executing %s stmt", $collector_study_Stmt)); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } while ($field_processor_study = $result_processor_study->fetch_object()) { $checkbox_name = sprintf("gewenste_processen[%d]", $field_gewenste_processen->pk); $table_data->assign("bgcolor", $bgcolor); $table_data->assign("checkbox_name", $checkbox_name);
$result_selector->close(); $grens_kritisch_boven_visible = 'false'; $grens_kritisch_onder_visible = 'false'; $grens_acceptabel_boven_visible = 'false'; $grens_acceptabel_onder_visible = 'false'; $table_resultaten_floating = ''; $j = 0; while ($field_results = $result_floating->fetch_object()) { $b = $j % 2; $bgcolor = ''; if ($b == 0) { $bgcolor = '#B8E7FF'; } $table_data = new Smarty_NM(); if ($j == 0) { $table_resultaten_floating = $table_data->fetch("resultaten_floating_value_header.tpl"); } $table_data->assign("bgcolor", $bgcolor); $table_data->assign("datum", $field_results->date_time); $table_data->assign("omschrijving", $field_results->omschrijving); $table_data->assign("grootheid", $field_results->grootheid); $table_data->assign("eenheid", $field_results->eenheid); $table_data->assign("waarde", $field_results->waarde); $table_data->assign("waarde_class", "table_data"); if (!is_null($field_results->grens_kritisch_boven) and !is_null($field_results->grens_kritisch_onder)) { $table_data->assign("waarde_class", "table_data_green"); } if (($field_results->waarde >= $field_results->grens_kritisch_boven or $field_results->waarde <= $field_results->grens_kritisch_onder) and ($field_results->grens_kritisch_boven != '' and !is_null($field_results->grens_kritisch_onder))) { $table_data->assign("waarde_class", "table_data_red"); } if ($field_results->waarde >= $field_results->grens_acceptabel_boven and $field_results->waarde < $field_results->grens_kritisch_boven and ($field_results->grens_acceptabel_boven != '' and !is_null($field_results->grens_kritisch_boven))) {
$button->assign("top_menu", $top_menu); $button->assign("bottom_menu", $bottom_menu); $button->assign("selected_top", $selected_top); $button->assign("selected_bottom", $level[$menu][$level_ref_key[$i]]); if ($i + 1 == $selected_bottom) { $button->assign("menu_class", "menu_bottom_selected"); } if ($i + 1 != $selected_bottom) { $button->assign("menu_class", "menu_bottom"); } $bottom_frame = $action[$menu][$level_ref_key[$i]]; $button->assign("bottom_frame", "{$bottom_frame}"); //navigator $button->assign("menu_target", '_parent'); $button->assign("menu_name", $level_ref_key[$i]); $button_row .= $button->fetch("menu_item.tpl"); $i++; } $bottom_row = $button_row; } //voorwaarde voor wel of geen bottom //bottom row and top row are defined //$menu=new Smarty_NM(); $top = new Smarty_NM(); $top->assign("user", $users_name); $top->assign("application_picture", "../../../WAD-logo_pictures/logo_iqc_70.jpg"); $top->assign("application_link", "./about.php"); $top->assign("version", $version); $top->assign("top_row", $top_row); $top->assign("bottom_row", $bottom_row); $top->display("frontpage_level_all.tpl");
/* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit; } $result_versions = $link->query($versions_Stmt); $j = 0; while ($field_config = $result_versions->fetch_object()) { $b = $j % 2; $bgcolor = ''; if ($b == 0) { $bgcolor = '#B8E7FF'; } $table_data = new Smarty_NM(); if ($j == 0) { $table_versions = $table_data->fetch("about_versions_header.tpl"); } $table_data->assign("bgcolor", $bgcolor); $table_data->assign("software_onderdeel", str_replace('Version_', '', $field_config->property)); $table_data->assign("software_versie", $field_config->value); $table_data->assign("laatste_wijziging", $field_config->date_modified); $table_versions .= $table_data->fetch("about_versions_row.tpl"); $j++; } $result_versions->close(); } $start_page = new Smarty_NM(); $main_logo = sprintf("./../../../WAD-logo_pictures/logo_iqc.jpg"); $start_page->assign("main_logo", $main_logo); $start_page->assign("versions_list", $table_versions); $start_page->assign("versions_title", $table_title);
DisplayErrMsg(sprintf("Error in executing %s stmt", $users_Stmt)); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } $users_row = ''; $j = 0; while ($field_users = $result_users->fetch_object()) { $b = $j % 2; $bgcolor = ''; if ($b == 0) { $bgcolor = '#B8E7FF'; } $table_data = new Smarty_NM(); if ($j == 0) { if (!empty($user_level_1)) { $users_row = $table_data->fetch("users_select_header.tpl"); } if (!empty($user_level_2) || !empty($user_level_5)) { $users_row = $table_data->fetch("users_header.tpl"); } } $checkbox_name = sprintf("users[%d]", $field_users->pk); $action = sprintf("view_users.php?pk=%s&t=%d", $field_users->pk, time()); $table_data->assign("bgcolor", $bgcolor); $table_data->assign("checkbox_name", $checkbox_name); $table_data->assign("login", $field_users->login); $table_data->assign("firstname", $field_users->firstname); $table_data->assign("lastname", $field_users->lastname); $table_data->assign("initials", $field_users->initials); $table_data->assign("phone", $field_users->phone); $table_data->assign("email", $field_users->email);
$selectoren = selectors($link, $group, $field_location->lokatie); if (!empty($selectoren)) { $gewenste_processen = gewenste_processen($link, $selectoren); if (!empty($gewenste_processen)) { $qc_status = qc_status($link, $gewenste_processen); $qc_freq_status = check_qc_frequency($link, $gewenste_processen); } } $b = $j % 2; $bgcolor = ''; if ($b == 0) { $bgcolor = '#B8E7FF'; } $table_data = new Smarty_NM(); if ($j == 0) { $table_selector = $table_data->fetch("dashboard_header_location.tpl"); } $action = sprintf("show_dashboard.php?group=0&lokatie=%s", $field_location->lokatie); $table_data->assign("bgcolor", $bgcolor); $table_data->assign("location", $field_location->lokatie); $table_data->assign("datetime", $field_location->creation_time); $status_array = check_status($qc_status); $table_data->assign("status_img", $status_array['img']); $table_data->assign("status_txt", $status_array['txt']); if (!empty($gewenste_processen)) { if (!$qc_freq_status) { $table_data->assign("qc_frequency", "1 of meerdere qc's te laat"); $table_data->assign("waarde_class", "table_data_red"); } else { $table_data->assign("qc_frequency", "ok"); $table_data->assign("waarde_class", "table_data_green");
$main_page->assign("action_name", 'Verwijder'); if (!($result = $link->query($gewenste_processen_no_results_Stmt))) { DisplayErrMsg(sprintf("Error in executing %s stmt", $gewenste_processen_no_results_Stmt)); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } $main_page->assign("action_result", 'Aantal gewenste processen zonder resultaten: ' . $result->num_rows . '<br/>'); $result->close(); } break; case 6: if (!empty($confirm_action)) { // FIXME $main_page->assign("action_result", 'Gewenst proces incl resultaten verwijderd'); $db_action = 0; } else { $main_page->assign("action_text", 'Weet u het heel zeker?'); $main_page->assign("action_name", 'Verwijder'); } break; default: break; } $table_data = new Smarty_NM(); $table_data->assign("db_action_options", $db_action_list); $table_data->assign("db_action_select", $db_action); $action_list = $table_data->fetch("beheer_db_dropdown.tpl"); $main_page->assign("form_action", sprintf("beheer_db.php?db_action=%s", $db_action)); $main_page->assign("action_list", $action_list); $main_page->assign("table_list", $table_output); $main_page->display("beheer_db.tpl");
} } // end study_pk<0 if ($study_pk > 0) { $collector_series_row = ''; $j = 0; while ($field_collector_series = $result_collector_series->fetch_object()) { $b = $j % 2; $bgcolor = ''; if ($b == 0) { $bgcolor = '#B8E7FF'; } $table_data = new Smarty_NM(); if ($j == 0) { if (!empty($user_level_1)) { $collector_series_row = $table_data->fetch("series_select_header.tpl"); } if (!empty($user_level_2) || !empty($user_level_5)) { $collector_series_row = $table_data->fetch("series_header.tpl"); } //$collector_series_row=$table_data->fetch("series_header.tpl"); } $checkbox_name = sprintf("series[%d]", $field_collector_series->series_pk); $action = sprintf("status-collector.php?pk=%s&t=%d", $field_collector_study->study_pk, time()); $table_data->assign("bgcolor", $bgcolor); $table_data->assign("checkbox_name", $checkbox_name); $table_data->assign("series_number", $field_collector_series->series_number); $table_data->assign("modality", $field_collector_series->modality); $table_data->assign("series_description", $field_collector_series->series_description); $table_data->assign("station_name", $field_collector_series->station_name); $table_data->assign("series_datetime", $field_collector_series->series_datetime);
if (!($result_analysemodule_cfg = $link->query(sprintf($configfile_Stmt, $field_selector->analysemodule_cfg_fk)))) { DisplayErrMsg(sprintf("Error in executing %s stmt", sprintf($configfile_Stmt, $field_selector->analysemodule_cfg_fk))); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } $field_analysemodule_cfg = $result_analysemodule_cfg->fetch_object(); $analysemodule_cfg_name = $field_analysemodule_cfg->description; $result_analysemodule_cfg->close(); $b = $j % 2; $bgcolor = ''; if ($b == 0) { $bgcolor = '#B8E7FF'; } $table_data = new Smarty_NM(); if ($j == 0) { $table_selector = $table_data->fetch("selector_select_header.tpl"); } $action = sprintf("new_selector.php?pk=%d&selector_patient_fk=%d&selector_study_fk=%d&selector_series_fk=%d&selector_instance_fk=%d&t=%d", $field_selector->pk, $selector_patient_fk, $selector_study_fk, $selector_series_fk, $selector_instance_fk, time()); $checkbox_name = sprintf("selector[%d]", $field_selector->pk); $table_data->assign("bgcolor", $bgcolor); $table_data->assign("checkbox_name", $checkbox_name); $table_data->assign("name", $field_selector->name); $table_data->assign("analysemodule", $analysemodule_name); $table_data->assign("analysemodule_cfg", $analysemodule_cfg_name); $table_data->assign("category", $selector_category); $table_data->assign("modality", $field_selector->modaliteit); $table_data->assign("location", $field_selector->lokatie); $table_data->assign("qc_frequency", $qc_frequency_list[$field_selector->qc_frequentie]); $table_data->assign("action", $action); $table_selector .= $table_data->fetch("selector_selector_select_row.tpl"); $j++;
if ($selector_series_fk <= 0) { $constraint_pssi->assign("submit_value", "Add_series"); } if ($selector_series_fk > 0) { $constraint_pssi->assign("submit_value", "Modify_series"); } $constraint_pssi->assign("table_series", $table_series); $constraint_pssi->assign("header", sprintf("%s", $constraint)); //$constraint_pssi->display("constraint_series.tpl"); //exit(); } //Instance if ($constraint == 'Add_Instance' || $constraint == 'Modify_Instance') { $instance = new Smarty_NM(); if ($selector_instance_fk <= 0) { $table_instance = $instance->fetch("constraint_instance.tpl"); } if ($selector_instance_fk > 0) { $table_instance = 'selector_instance'; $instance_Stmt = "SELECT * from {$table_instance} where\n {$table_instance}.pk='{$selector_instance_fk}'"; if (!($result_instance = $link->query($instance_Stmt))) { DisplayErrMsg(sprintf("Error in executing %s stmt", $student_Stmt)); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } if (!($field_instance = $result_instance->fetch_object())) { DisplayErrMsg("Internal error: the entry does not exist"); exit; } //personal_instance $table_instance = '';
if (!($result_category = $link->query($category_Stmt))) { DisplayErrMsg(sprintf("Error in executing %s stmt", $category_Stmt)); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } $table_category = ''; $j = 0; while ($field_category = $result_category->fetch_object()) { $b = $j % 2; $bgcolor = ''; if ($b == 0) { $bgcolor = '#B8E7FF'; } $table_data = new Smarty_NM(); if ($j == 0) { $table_category = $table_data->fetch("category_header.tpl"); } $action = sprintf("new_category.php?pk=%d&t=%d", $field_category->pk, time()); $checkbox_name = sprintf("category[%d]", $field_category->pk); $table_data->assign("bgcolor", $bgcolor); $table_data->assign("checkbox_name", $checkbox_name); $table_data->assign("description", $field_category->omschrijving); $table_data->assign("action", $action); $table_category .= $table_data->fetch("category_row.tpl"); $j++; } $result_category->close(); $data = new Smarty_NM(); $data->assign("Title", "Selector category"); $data->assign("header", "Selector category"); $data->assign("form_action", sprintf("new_category.php?pk=-1&t=%d", time()));
function selector_function_pssi($pk, $selector_patient_pk, $selector_study_pk, $selector_series_pk, $selector_instance_pk, &$table_pssi) { require "../globals.php"; //require("./php/includes/setup.php"); // Connect to the Database $link = new mysqli($hostName, $userName, $password, $databaseName); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit; } $patient_header = ""; $study_header = ""; $series_header = ""; $instance_header = ""; if ($selector_patient_pk > 0) { $patient_header = "Patient"; $patient = new Smarty_NM(); $table_patient = 'selector_patient'; $patient_Stmt = "SELECT * from {$table_patient} where\n {$table_patient}.pk='{$selector_patient_pk}'"; if (!($result_patient = $link->query($patient_Stmt))) { DisplayErrMsg(sprintf("Error in executing %s stmt", $student_Stmt)); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } if (!($field_patient = $result_patient->fetch_object())) { DisplayErrMsg("Internal error: the entry does not exist"); exit; } //personal_patient $table_patient = ''; $patient->assign("default_pat_id", $field_patient->pat_id); $patient->assign("default_pat_id_issuer", $field_patient->pat_id_issuer); $patient->assign("default_pat_name", $field_patient->pat_name); $patient->assign("default_pat_fn_sx", $field_patient->pat_fn_sx); $patient->assign("default_pat_gn_sx", $field_patient->pat_gn_sx); $patient->assign("default_pat_i_name", $field_patient->pat_i_name); $patient->assign("default_pat_p_name", $field_patient->pat_p_name); $patient->assign("default_pat_birthdate", $field_patient->pat_birthdate); $patient->assign("default_pat_sex", $field_patient->pat_sex); $patient->assign("default_pat_custom1", $field_patient->pat_custom1); $patient->assign("default_pat_custom2", $field_patient->pat_custom2); $patient->assign("default_pat_custom3", $field_patient->pat_custom3); $result_patient->close(); $table_patient = $patient->fetch("selector_patient.tpl"); } // end patient_ref if ($selector_study_pk > 0) { $study_header = "Study"; $study = new Smarty_NM(); $table_study = 'selector_study'; $study_Stmt = "SELECT * from {$table_study} where\n {$table_study}.pk='{$selector_study_pk}'"; if (!($result_study = $link->query($study_Stmt))) { DisplayErrMsg(sprintf("Error in executing %s stmt", $student_Stmt)); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } if (!($field_study = $result_study->fetch_object())) { DisplayErrMsg("Internal error: the entry does not exist"); exit; } //personal_study $table_study = ''; $study->assign("default_study_iuid", $field_study->study_iuid); $study->assign("default_study_id", $field_study->study_id); $study->assign("default_study_datetime", $field_study->study_datetime); $study->assign("default_accession_no", $field_study->accession_no); $study->assign("default_ref_physician", $field_study->ref_physician); $study->assign("default_ref_phys_fn_sx", $field_study->ref_phys_fn_sx); $study->assign("default_ref_phys_gn_sx", $field_study->ref_phys_gn_sx); $study->assign("default_ref_phys_i_name", $field_study->ref_phys_i_name); $study->assign("default_ref_phys_p_name", $field_study->ref_phys_p_name); $study->assign("default_study_desc", $field_study->study_desc); $study->assign("default_study_custom1", $field_study->study_custom1); $study->assign("default_study_custom2", $field_study->study_custom2); $study->assign("default_study_custom3", $field_study->study_custom3); $study->assign("default_study_status_id", $field_study->study_status_id); $study->assign("default_mods_in_study", $field_study->mods_in_study); $study->assign("default_cuids_in_study", $field_study->cuids_in_study); $study->assign("default_num_series", $field_study->num_series); $study->assign("default_num_instances", $field_study->num_instances); $study->assign("default_ext_retr_aet", $field_study->ext_retr_aet); $study->assign("default_retrieve_aets", $field_study->retrieve_aets); $study->assign("default_fileset_iuid", $field_study->fileset_iuid); $study->assign("default_fileset_id", $field_study->fileset_id); $study->assign("default_availability", $field_study->availability); $study->assign("default_study_status", $field_study->study_status); $study->assign("default_checked_time", $field_study->checked_time); $study->assign("default_updated_time", $field_study->updated_time); $study->assign("default_created_time", $field_study->created_time); $study->assign("default_updated_time", $field_study->updated_time); $study->assign("default_study_attrs", $field_study->study_attrs); $result_study->close(); $table_study = $study->fetch("selector_study.tpl"); } // end study_ref if ($selector_series_pk > 0) { $series_header = "Series"; $series = new Smarty_NM(); $table_series = 'selector_series'; $series_Stmt = "SELECT * from {$table_series} where\n {$table_series}.pk='{$selector_series_pk}'"; if (!($result_series = $link->query($series_Stmt))) { DisplayErrMsg(sprintf("Error in executing %s stmt", $student_Stmt)); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } if (!($field_series = $result_series->fetch_object())) { DisplayErrMsg("Internal error: the entry does not exist"); exit; } //personal_series $table_series = ''; $series->assign("default_series_iuid", $field_series->series_iuid); $series->assign("default_series_no", $field_series->series_no); $series->assign("default_modality", $field_series->modality); $series->assign("default_body_part", $field_series->body_part); $series->assign("default_laterality", $field_series->laterality); $series->assign("default_series_desc", $field_series->series_desc); $series->assign("default_institution", $field_series->institution); $series->assign("default_station_name", $field_series->station_name); $series->assign("default_department", $field_series->department); $series->assign("default_perf_physician", $field_series->perf_physician); $series->assign("default_perf_phys_fn_sx", $field_series->perf_phys_fn_sx); $series->assign("default_perf_phys_gn_sx", $field_series->perf_phys_gn_sx); $series->assign("default_perf_phys_i_name", $field_series->perf_phys_i_name); $series->assign("default_perf_phys_p_name", $field_series->perf_phys_p_name); $series->assign("default_pps_start", $field_series->pps_start); $series->assign("default_pps_iuid", $field_series->pps_iuid); $series->assign("default_series_custom1", $field_series->series_custom1); $series->assign("default_series_custom2", $field_series->series_custom2); $series->assign("default_series_custom3", $field_series->series_custom3); $series->assign("default_num_instances", $field_series->num_instances); $series->assign("default_src_aet", $field_series->src_aet); $series->assign("default_ext_retr_aet", $field_series->ext_retr_aet); $series->assign("default_retrieve_aets", $field_series->retrieve_aets); $series->assign("default_fileset_iuid", $field_series->fileset_iuid); $series->assign("default_fileset_id", $field_series->fileset_id); $series->assign("default_availability", $field_series->availability); $series->assign("default_series_status", $field_series->series_status); $series->assign("default_created_time", $field_series->created_time); $series->assign("default_updated_time", $field_series->updated_time); $series->assign("default_series_attrs", $field_series->series_attrs); $table_series = $series->fetch("selector_series.tpl"); } // end series_ref if ($selector_instance_pk > 0) { $instance_header = "Instance"; $instance = new Smarty_NM(); $table_instance = 'selector_instance'; $instance_Stmt = "SELECT * from {$table_instance} where\n {$table_instance}.pk='{$selector_instance_pk}'"; if (!($result_instance = $link->query($instance_Stmt))) { DisplayErrMsg(sprintf("Error in executing %s stmt", $student_Stmt)); DisplayErrMsg(sprintf("error: %s", $link->error)); exit; } if (!($field_instance = $result_instance->fetch_object())) { DisplayErrMsg("Internal error: the entry does not exist"); exit; } //personal_instance $table_instance = ''; $instance->assign("default_sop_iuid", $field_instance->sop_iuid); $instance->assign("default_sop_cuid", $field_instance->sop_cuid); $instance->assign("default_inst_no", $field_instance->inst_no); $instance->assign("default_content_datetime", $field_instance->content_datetime); $instance->assign("default_sr_complete", $field_instance->sr_complete); $instance->assign("default_sr_verified", $field_instance->sr_verified); $instance->assign("default_inst_custom1", $field_instance->inst_custom1); $instance->assign("default_inst_custom2", $field_instance->inst_custom2); $instance->assign("default_inst_custom3", $field_instance->inst_custom3); $instance->assign("default_ext_retr_aet", $field_instance->ext_retr_aet); $instance->assign("default_retrieve_aets", $field_instance->retrieve_aets); $instance->assign("default_availability", $field_instance->availability); $instance->assign("default_inst_status", $field_instance->inst_status); $instance->assign("default_all_attrs", $field_instance->all_attrs); $instance->assign("default_commitment", $field_instance->commitment); $instance->assign("default_archived", $field_instance->archived); $instance->assign("default_updated_time", $field_instance->updated_time); $instance->assign("default_created_time", $field_instance->created_time); $instance->assign("default_inst_attrs", $field_instance->inst_attrs); $result_instance->close(); $table_instance = $instance->fetch("selector_instance.tpl"); } // end instance_ref $selector_pssi = new Smarty_NM(); $selector_pssi->assign("patient_header", $patient_header); $selector_pssi->assign("study_header", $study_header); $selector_pssi->assign("series_header", $series_header); $selector_pssi->assign("instance_header", $instance_header); $selector_pssi->assign("table_patient", $table_patient); $selector_pssi->assign("table_series", $table_series); $selector_pssi->assign("table_study", $table_study); $selector_pssi->assign("table_instance", $table_instance); $table_pssi = $selector_pssi->fetch("constraints_pssi.tpl"); }