diff --git a/Patients.php b/Patients.php index 440978f..bc97ed5 100755 --- a/Patients.php +++ b/Patients.php @@ -92,19 +92,19 @@ $patientsSearch = ( isset($_GET['patients']) ) ? json_decode( customCompression( // pour chaque médecin foreach($patientsSearch as $PAT){ if( isset($PAT['Id']) && isset($PAT['Civilite']) && isset($PAT['Prenom']) && isset($PAT['Nom']) && isset($PAT['DateNaissance']) && isset($PAT['NumSecuriteSociale'])){ + echo ''; - - echo ''.(($PAT['Civilite']=='M')?'Monsieur':'Madame').''; - echo ''.$PAT['Prenom'].''; - echo ''.strtoupper($PAT['Nom']).''; - echo ''.$PAT['DateNaissance'].''; - echo ''.$PAT['NumSecuriteSociale'].''; - // début modification - echo "
"; - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo '
'; // fin modification diff --git a/css/global.css b/css/global.css index b96b7a6..aa9be64 100755 --- a/css/global.css +++ b/css/global.css @@ -784,6 +784,18 @@ input[type=radio]:checked + label:before{ } /* Modification champ de recherche (patient/médecin/consultation) */ + +#CONTAINER > article .updPatient input[type=text], +#CONTAINER > article .updMedecin input[type=text]{ + width: 6em; + padding: .1em; + margin: 0 .2em; + + border: 0; +} + + + #CONTAINER > article .updPatient input[type=submit], #CONTAINER > article .updMedecin input[type=submit]{ /* position */ diff --git a/js/lib/API.js b/js/lib/API.js index 5333741..012f567 100755 --- a/js/lib/API.js +++ b/js/lib/API.js @@ -53,7 +53,7 @@ APIClass.prototype = { if( ptrAPI.xhr[i].readyState == 4 ){ // si la requête est terminée /* DEBUG : affiche la réponse BRUTE de API.php */ - console.log('managers/ => '+ptrAPI.xhr[i].responseText); + // console.log('managers/ => '+ptrAPI.xhr[i].responseText); console.log( JSON.parse(ptrAPI.xhr[i].responseText) ); /* si success de requête */ diff --git a/js/patients.js b/js/patients.js index 8217b85..f3daeec 100755 --- a/js/patients.js +++ b/js/patients.js @@ -229,19 +229,21 @@ sbCherche.addEventListener('click', function(e){ //////////////////////////////////////////// function displayFoundPatients(foundPatients){ var container = document.getElementById('searchResultPatient'); - var content = ''; + var content = ''; for( var i = 0 ; i < foundPatients.length ; i++ ){ content += ''; - content += ''; - content += ''; - content += ''; - content += ''; - content += ''; // début modification - content += "'; // fin modification @@ -256,8 +258,6 @@ function displayFoundPatients(foundPatients){ content += ''; } - content += '
'+ ((foundPatients[i].Civilite=='M')?'Monsieur':'Madame') + ''+ foundPatients[i].Prenom + ''+ foundPatients[i].Nom.toUpperCase() + ''+ foundPatients[i].DateNaissance + ''+ foundPatients[i].NumSecuriteSociale + '
"; - content += ""; - content += ""; + content += "
"; + content += ""; + content += ""; + content += ""; + content += ""; + content += ""; + content += ""; + + content += ""; + content += ""; content += ""; content += '
'; - // on vide le container container.innerHTML = content; diff --git a/managers/Patient.class.php b/managers/Patient.class.php index 1c36b7e..6d008c6 100755 --- a/managers/Patient.class.php +++ b/managers/Patient.class.php @@ -26,7 +26,7 @@ class Patient Response::quickResponse(200, json_encode([ 'status' => $_status, 'title' => $_title, 'message' => $_message ])); else{ $response = new Response(); - $response->setHeader('Location','http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); + $response->setHeader('Location', 'http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); $response->send(); } }else{ @@ -38,7 +38,7 @@ class Patient Response::quickResponse(200, json_encode([ 'status' => $_status, 'title' => $_title, 'message' => $_message ])); else{ $response = new Response(); - $response->setHeader('Location','http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); + $response->setHeader('Location', 'http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); $response->send(); } @@ -52,7 +52,7 @@ class Patient Response::quickResponse(200, json_encode([ 'status' => $_status, 'title' => $_title, 'message' => $_message ])); else{ $response = new Response(); - $response->setHeader('Location','http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); + $response->setHeader('Location', 'http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); $response->send(); } @@ -73,7 +73,7 @@ class Patient else{ $response = new Response(); // $response->write("patients=".$compressed_json); - $response->setHeader('Location','http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message.'&patients='.customCompression( json_encode($_patients), true)); + $response->setHeader('Location', 'http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message.'&patients='.customCompression( json_encode($_patients), true)); $response->send(); } }else{ @@ -85,7 +85,7 @@ class Patient Response::quickResponse(200, json_encode([ 'status' => $_status, 'title' => $_title, 'message' => $_message ])); else{ $response = new Response(); - $response->setHeader('Location','http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); + $response->setHeader('Location', 'http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); $response->send(); } } @@ -106,7 +106,7 @@ class Patient Response::quickResponse(200, json_encode([ 'status' => $_status, 'title' => $_title, 'message' => $_message ])); else{ $response = new Response(); - $response->setHeader('Location','http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); + $response->setHeader('Location', 'http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); $response->send(); } @@ -119,7 +119,7 @@ class Patient Response::quickResponse(200, json_encode([ 'status' => $_status, 'title' => $_title, 'message' => $_message ])); else{ $response = new Response(); - $response->setHeader('Location','http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); + $response->setHeader('Location', 'http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); $response->send(); } } @@ -132,7 +132,7 @@ class Patient Response::quickResponse(200, json_encode([ 'status' => $_status, 'title' => $_title, 'message' => $_message ])); else{ $response = new Response(); - $response->setHeader('Location','http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); + $response->setHeader('Location', 'http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); $response->send(); } } @@ -149,7 +149,7 @@ class Patient Response::quickResponse(200, json_encode([ 'status' => $_status, 'title' => $_title, 'message' => $_message ])); else{ $response = new Response(); - $response->setHeader('Location','http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); + $response->setHeader('Location', 'http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); $response->send(); } @@ -162,7 +162,7 @@ class Patient Response::quickResponse(200, json_encode([ 'status' => $_status, 'title' => $_title, 'message' => $_message ])); else{ $response = new Response(); - $response->setHeader('Location','http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); + $response->setHeader('Location', 'http://'.$_SERVER['HTTP_HOST'].'/Patients.php?status='.$_status.'&title='.$_title.'&message='.$_message); $response->send(); } } diff --git a/repositories/repos/PatientRepo.php b/repositories/repos/PatientRepo.php index 86d1523..0c97418 100755 --- a/repositories/repos/PatientRepo.php +++ b/repositories/repos/PatientRepo.php @@ -134,7 +134,7 @@ class PatientRepo $optPrenom = ( $prenom != 'null' && StaticRepo::checkParam($prenom,'String45') ) ? '%'.$prenom.'%' : '%'; $optNom = ( $nom != 'null' && StaticRepo::checkParam($nom, 'String45') ) ? '%'.$nom.'%' : '%'; - $req = StaticRepo::getConnexion()->query("SELECT Id, Civilite, Nom, Prenom, DateNaissance, NumSecuriteSociale + $req = StaticRepo::getConnexion()->query("SELECT Id, Civilite, Nom, Prenom, DATE_FORMAT(DateNaissance, '%d/%m/%Y') as DateNaissance, NumSecuriteSociale FROM Patient WHERE Nom LIKE '".$optNom."' AND Prenom LIKE '".$optPrenom."'