$resultType = 'xml'; } } return $result; } // main //print_r($_REQUEST); // Variables de GET y POST if (!isset($_REQUEST['op'])) { header($_SERVER['SERVER_PROTOCOL'] . ' op should be present', true, 500); } $result = ''; switch ($_REQUEST['op']) { case 'listQueries': $result = listQueries(); break; case 'listEHRs': $result = listEHRs(); break; case 'getPatient': $result = getPatient($_REQUEST['uid']); break; case 'executeQuery': $result = executeQuery($_REQUEST['query'], $_REQUEST['ehr']); break; } if ($resultType == 'xml') { header('Content-type: text/xml'); } else { header('Content-type: application/json'); } echo $result;
loadCSS('search.css', 'patient'); $component_name = 'Patients'; //loadJS('add_payment.js','payment'); $patient_id = getVar('patient_id'); switch (getView()) { case 'search_patients': //loadView(); loadJS('search-patient.js', 'patient'); //get expected patients for practitioner to select from $patients_for_today = Patient::getPatientsForToday(); include 'views/search.php'; break; case 'patient': //loadView(); //get patient details according to patient_id in url query $patient = getPatient(getVar('patient_id')); //get user info $user = get_userdata($patient->practitioner); //get appointments $appointments = getAppointments($patient->patient_id); //get user_id $practitioner_id = get_current_user_id(); //$letterCount = letterCount();//used in de patient_menu module loadJS('patient.js', 'patient'); include 'views/patient_new.php'; break; } switch (getTask()) { case 'search': $patients = Patient::searchPatients(getVar('q')); include 'views/search_results.php';
<?php loadLib('appointment'); loadJS('add_payment.js', 'payment'); $patient_id = getVar('patient_id'); $patient = getPatient($patient_id); //get all the patient appointments to display in the side menu $appointments = Appointment::getAppointments($patient_id); include 'views/patient_menu.php';