diff --git a/Consultations.php b/Consultations.php index 08a1ed8..879a0da 100755 --- a/Consultations.php +++ b/Consultations.php @@ -49,7 +49,7 @@ if(!Authentification::checkUser(0)){ /* SAISIR UN RENDEZ-VOUS */ /*************************************/ ?>
-
+
Médecin traitant du patient.

- Date de la consultation
+ Date de la consultation
Heure de la consultation
Durée de la consultation
+
+ +
diff --git a/Docs/Model.mwb b/Docs/Model.mwb old mode 100644 new mode 100755 diff --git a/Docs/Model.mwb.bak b/Docs/Model.mwb.bak old mode 100644 new mode 100755 diff --git a/Docs/RDVExemple.json b/Docs/RDVExemple.json old mode 100644 new mode 100755 diff --git a/Docs/generateRDV b/Docs/generateRDV old mode 100644 new mode 100755 diff --git a/Medecins.php b/Medecins.php old mode 100644 new mode 100755 index 6371e82..1f75fae --- a/Medecins.php +++ b/Medecins.php @@ -47,42 +47,28 @@ if(!Authentification::checkUser(0)){ -
-

Création d'un nouveau médecin au centre

-
-
-
+
+ +

Ajout d'un nouveau médecin

+
+
+
+

+ +
- - - - -
-
-
-
-
- - - - Clé de contrôle invalide. -
-
- - + \ No newline at end of file diff --git a/Patients.php b/Patients.php new file mode 100755 index 0000000..209f63e --- /dev/null +++ b/Patients.php @@ -0,0 +1,99 @@ + + + + + + Gestion des patients + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +
+
+ +

Ajout d'un nouveau patient

+
+
+
+
+
+
+ Code postal
+
+ Date de naissance
+
+ Numéro de sécurité sociale
+ + Choix du médecin traitant (optionnel)
+ +
+ + + +
+ +
+ +
+ +
+ + + + \ No newline at end of file diff --git a/coverage/Authentification.php.html b/coverage/Authentification.php.html old mode 100644 new mode 100755 diff --git a/coverage/MedecinRepo.php.html b/coverage/MedecinRepo.php.html old mode 100644 new mode 100755 diff --git a/coverage/MedecinRepoTest.php.html b/coverage/MedecinRepoTest.php.html old mode 100644 new mode 100755 diff --git a/coverage/PatientRepo.php.html b/coverage/PatientRepo.php.html old mode 100644 new mode 100755 diff --git a/coverage/PatientRepoTest.php.html b/coverage/PatientRepoTest.php.html old mode 100644 new mode 100755 diff --git a/coverage/RDVRepo.php.html b/coverage/RDVRepo.php.html old mode 100644 new mode 100755 diff --git a/coverage/Response.php.html b/coverage/Response.php.html old mode 100644 new mode 100755 diff --git a/coverage/StaticRepo.php.html b/coverage/StaticRepo.php.html old mode 100644 new mode 100755 diff --git a/coverage/StatsRepo.php.html b/coverage/StatsRepo.php.html old mode 100644 new mode 100755 diff --git a/coverage/css/bootstrap.min.css b/coverage/css/bootstrap.min.css old mode 100644 new mode 100755 diff --git a/coverage/css/nv.d3.min.css b/coverage/css/nv.d3.min.css old mode 100644 new mode 100755 diff --git a/coverage/css/style.css b/coverage/css/style.css old mode 100644 new mode 100755 diff --git a/coverage/dashboard.html b/coverage/dashboard.html old mode 100644 new mode 100755 diff --git a/coverage/fonts/glyphicons-halflings-regular.eot b/coverage/fonts/glyphicons-halflings-regular.eot old mode 100644 new mode 100755 diff --git a/coverage/fonts/glyphicons-halflings-regular.svg b/coverage/fonts/glyphicons-halflings-regular.svg old mode 100644 new mode 100755 diff --git a/coverage/fonts/glyphicons-halflings-regular.ttf b/coverage/fonts/glyphicons-halflings-regular.ttf old mode 100644 new mode 100755 diff --git a/coverage/fonts/glyphicons-halflings-regular.woff b/coverage/fonts/glyphicons-halflings-regular.woff old mode 100644 new mode 100755 diff --git a/coverage/fonts/glyphicons-halflings-regular.woff2 b/coverage/fonts/glyphicons-halflings-regular.woff2 old mode 100644 new mode 100755 diff --git a/coverage/index.html b/coverage/index.html old mode 100644 new mode 100755 diff --git a/coverage/js/bootstrap.min.js b/coverage/js/bootstrap.min.js old mode 100644 new mode 100755 diff --git a/coverage/js/d3.min.js b/coverage/js/d3.min.js old mode 100644 new mode 100755 diff --git a/coverage/js/holder.min.js b/coverage/js/holder.min.js old mode 100644 new mode 100755 diff --git a/coverage/js/html5shiv.min.js b/coverage/js/html5shiv.min.js old mode 100644 new mode 100755 diff --git a/coverage/js/jquery.min.js b/coverage/js/jquery.min.js old mode 100644 new mode 100755 diff --git a/coverage/js/nv.d3.min.js b/coverage/js/nv.d3.min.js old mode 100644 new mode 100755 diff --git a/coverage/js/respond.min.js b/coverage/js/respond.min.js old mode 100644 new mode 100755 diff --git a/coverage/repos/MedecinRepo.php.html b/coverage/repos/MedecinRepo.php.html old mode 100644 new mode 100755 diff --git a/coverage/repos/PatientRepo.php.html b/coverage/repos/PatientRepo.php.html old mode 100644 new mode 100755 diff --git a/coverage/repos/RDVRepo.php.html b/coverage/repos/RDVRepo.php.html old mode 100644 new mode 100755 diff --git a/coverage/repos/StatsRepo.php.html b/coverage/repos/StatsRepo.php.html old mode 100644 new mode 100755 diff --git a/coverage/repos/dashboard.html b/coverage/repos/dashboard.html old mode 100644 new mode 100755 diff --git a/coverage/repos/index.html b/coverage/repos/index.html old mode 100644 new mode 100755 diff --git a/css/blue-green.theme.css b/css/blue-green.theme.css old mode 100644 new mode 100755 index abb59ab..f5a46a2 --- a/css/blue-green.theme.css +++ b/css/blue-green.theme.css @@ -1,21 +1,21 @@ -body.theme-bluegreen #CONTAINER > article[data-title]{ +#CONTAINER > article[data-title]{ border-color: #24b993; } -body.theme-bluegreen #CONTAINER > article[data-title]:before{ +#CONTAINER > article[data-title]:before{ border-color: #24b993; background-color: #24b993; } -body.theme-bluegreen #CONTAINER > article select.associated{ +#CONTAINER > article select.associated{ border-color: #24b993; } -body.theme-bluegreen input[type=checkbox] + label:before{ +input[type=radio] + label:before{ border-color: #24b993; } -body.theme-bluegreen input[type=checkbox] + label:before{ - background-image: url(../src/svg/checkbox@bluegreen.theme.svg); +input[type=radio] + label:before{ + background-image: url(../src/svg/radio@bluegreen.theme.svg); } \ No newline at end of file diff --git a/css/global.css b/css/global.css index 8eaac56..41a0661 100755 --- a/css/global.css +++ b/css/global.css @@ -374,6 +374,7 @@ body{ position: relative; margin: 1em; padding: .7em; + padding-right: 3em; /* border */ border: 1px solid #e5e5e5; @@ -391,6 +392,10 @@ body{ -o-transition: border .2s, background-size .2s; } +/* input[type=text] padding-right */ +#CONTAINER > article input[type=text]{ +} + /* @focus */ #CONTAINER > article input:focus{ border-color: #999; @@ -513,11 +518,11 @@ input[type=radio] + label:before{ height: 1.2em; /* border */ - border-radius: 3px; + border-radius: 50% / 50%; border: 1px solid #f18624; /* background */ - background: url(../src/svg/checkbox.svg) center center no-repeat; + background: url(../src/svg/radio.svg) center center no-repeat; background-size: 0% auto; /* animation */ diff --git a/css/purple.theme.css b/css/purple.theme.css new file mode 100755 index 0000000..42847e1 --- /dev/null +++ b/css/purple.theme.css @@ -0,0 +1,21 @@ +#CONTAINER > article[data-title]{ + border-color: #8924b9; +} + +#CONTAINER > article[data-title]:before{ + border-color: #8924b9; + background-color: #8924b9; +} + +#CONTAINER > article select.associated{ + border-color: #8924b9; +} + +input[type=radio] + label:before{ + border-color: #8924b9; +} + + +input[type=radio] + label:before{ + background-image: url(../src/svg/radio@purple.theme.svg); +} \ No newline at end of file diff --git a/js/consultations.js b/js/consultations.js index 7e75d76..c11cc67 100755 --- a/js/consultations.js +++ b/js/consultations.js @@ -59,9 +59,9 @@ var secuFormat = new formatChecker(null, var now = new Date(); -inCk.append( inDate, dateFormat, now.toLocaleFormat('%d/%m/%Y') ); -inCk.append( inHeure, timeFormat, now.toLocaleFormat('%H:%M') ); -inCk.append( inSecu, secuFormat, inSecu.placeholder ); +inCk.append( inDate, dateFormat, '01/01/2015' ); +inCk.append( inHeure, timeFormat, '23:59' ); +inCk.append( inSecu, secuFormat, inSecu.placeholder ); inDate.addEventListener('keyup', function(e){ diff --git a/js/medecins.js b/js/medecins.js new file mode 100755 index 0000000..06f5781 --- /dev/null +++ b/js/medecins.js @@ -0,0 +1,40 @@ +var crPrenom = document.getElementById('crPrenom'); +var crNom = document.getElementById('crNom'); + + + +/* VERIFICATION DES SAISIES */ + +//////////// +// PRENOM // +//////////// +crPrenom.addEventListener('keyup', function(e){ + if( /^([a-z]{3,45})$/i.test(crPrenom.value) ){ // si champ correct + addClass(crPrenom, 'validated'); + remClass(crPrenom, 'invalid'); + }else{ + remClass(crPrenom, 'validated'); + + if( crPrenom.value.length <= 4 || crPrenom.value.length > 45 ) + addClass(crPrenom, 'invalid'); + else + remClass(crPrenom, 'invalid'); + } +}, false); + +///////// +// NOM // +///////// +crNom.addEventListener('keyup', function(e){ + if( /^([a-z]{3,45})$/i.test(crNom.value) ){ // si champ correct + addClass(crNom, 'validated'); + remClass(crNom, 'invalid'); + }else{ + remClass(crNom, 'validated'); + + if( crNom.value.length <= 4 || crNom.value.length > 45 ) + addClass(crNom, 'invalid'); + else + remClass(crNom, 'invalid'); + } +}, false); \ No newline at end of file diff --git a/js/patients.js b/js/patients.js new file mode 100644 index 0000000..e84072e --- /dev/null +++ b/js/patients.js @@ -0,0 +1,128 @@ +var inPrenom = document.getElementById('crPrenom'); +var inNom = document.getElementById('crNom'); +var inAdr = document.getElementById('crAdr'); +var inAdr2 = document.getElementById('crAdr2'); +var inCP = document.getElementById('crCP'); +var inVille = document.getElementById('crVille'); +var inDN = document.getElementById('crDN'); +var inLN = document.getElementById('crLN'); +var inSecu = document.getElementById('crSecu'); + +var inCk = new inputChecker(); +// format de la date +var dateFormat = new formatChecker(null, 'Ji/Mi/Aiii', { 'J': '[0-3]', 'M': '[0-1]', 'A': '[1-2]' } ); +// format du numéro de sécu +var secuFormat = new formatChecker(null, 'S ii Mi ii iii iii ii', { 'S': '[0-1]', 'M': '[0-1]' } ); +inCk.append( inCP, new formatChecker( null, 'iiiii'), '09000'); // on ajoute le CODE_POSTAL au vérificateur de champs +inCk.append( inDN, dateFormat, '01/01/2015'); // on ajoute la DATE_NAISSANCE au vérificateur de champs + + + +/* Met à jour l'état visuel d'un si sa valeur correspond aux initères +* +* @pInputElement l'élément en question +* @pMinLength la taille minimum autorisée +* @pMaxLength la taille maximum autorisée +* @optAlpha [OPT] TRUE si uniquement alphanumérique +*/ +function checkVARCHAR(pInputElement, pMinLength, pMaxLength, optAlpha){ + var optAlpha = (arguments.length > 3) ? optAlpha : false; + optAlpha = (typeof optAlpha == 'boolean') ? optAlpha : false; + + var varcharRegExp; + + if( optAlpha ) varcharRegExp = new RegExp('^([a-z]{'+pMinLength+','+pMaxLength+'})$', 'i'); // only alpha characters + else varcharRegExp = new RegExp('^([\\w -]{'+ pMinLength+','+pMaxLength+'})$', 'i'); // any word character + + if( pInputElement.value.match(varcharRegExp) != null ){ // si champ correct + addClass(pInputElement, 'validated'); + remClass(pInputElement, 'invalid'); + }else{ + remClass(pInputElement, 'validated'); + + addClass(pInputElement, 'invalid'); + } +} + +////////////////////////////// +// PRENOM & NOM (VARCHAR 45)// +////////////////////////////// +inPrenom.addEventListener('keyup', function(e){ checkVARCHAR(e.target, 3, 45, true); }, false); +inNom.addEventListener('keyup', function(e){ checkVARCHAR(e.target, 3, 45, true); }, false); + + +////////////////////////////////////// +// ADRESSE & ADRESSE2 (VARCHAR 255) // +////////////////////////////////////// +inAdr.addEventListener('keyup', function(e){ checkVARCHAR(e.target, 5, 255); }, false); +inAdr2.addEventListener('keyup', function(e){ checkVARCHAR(e.target, 5, 255); }, false); + +//////////////////////////// +// VILLE & LIEU_NAISSANCE // +//////////////////////////// +inVille.addEventListener('keyup', function(e){ checkVARCHAR(e.target, 3, 50); }, false); +inLN.addEventListener('keyup', function(e){ checkVARCHAR(e.target, 3, 50); }, false); + +///////////////// +// CODE POSTAL // +///////////////// +inCP.addEventListener('keyup', function(e){ + if( inCk.check(inCP) ) addClass(inCP, 'validated'); // on active la classe si correct + else{ // si incorrect + remClass(inCP, 'validated'); // on désactive la classe + inCk.correct(inCP, false); // on corrige partiellement + if( inCk.check(inCP) ) addClass(inCP, 'validated'); // mise à jour de la classe après correction + } +}, false); + +/////////////////////// +// DATE DE NAISSANCE // +/////////////////////// +inDN.addEventListener('keyup', function(e){ + if( inCk.check(inDN) ) addClass(inDN, 'validated'); // on active la classe si correct + else{ // si incorrect + remClass(inDN, 'validated'); // on désactive la classe + inCk.correct(inDN, false); // on corrige partiellement + if( inCk.check(inDN) ) addClass(inDN, 'validated'); // mise à jour de la classe après correction + } +}, false); + +//////////////////// +// NUMERO DE SECU // +//////////////////// +function checkSecuControlKey(pNumSecu){ + var NIR = pNumSecu.slice(0,-2).replace(/ /g, ''); + var key = pNumSecu.slice(-2); + + return 97-(NIR%97) == key; +} + +inSecu.addEventListener('keyup', function(e){ + if( inCk.check(inSecu) ){ + + if( checkSecuControlKey(inSecu.value) ){ // si la clé est correcte + addClass(inSecu, 'validated'); // on dis que le champ est valide + remClass(inSecu, 'invalid'); // on dis qu'il n'est pas invalide + }else{ + remClass(inSecu, 'validated'); // on dis que le champ n'est pas valide + addClass(inSecu, 'invalid'); // on dis qu'il est invalide + } + + }else{ // si incorrect + + remClass(inSecu, 'validated'); // on désactive la classe + remClass(inSecu, 'invalid'); // on dis qu'il n'est pas invalide + + inCk.correct(inSecu, false); // on corrige partiellement + if( inCk.check(inSecu) ){ + + if( checkSecuControlKey(inSecu.value) ){ // si la clé est correcte + addClass(inSecu, 'validated'); // on dis que le champ est valide + remClass(inSecu, 'invalid'); // on dis qu'il n'est pas invalide + }else{ + remClass(inSecu, 'validated'); // on dis que le champ n'est pas valide + addClass(inSecu, 'invalid'); // on dis qu'il est invalide + } + } + } +}, false); diff --git a/managers/Response.class.php b/managers/Response.class.php old mode 100644 new mode 100755 diff --git a/src/svg/medecin.svg b/src/svg/medecin.svg old mode 100644 new mode 100755 diff --git a/src/svg/radio.svg b/src/svg/radio.svg new file mode 100755 index 0000000..7be2630 --- /dev/null +++ b/src/svg/radio.svg @@ -0,0 +1,50 @@ + +image/svg+xml \ No newline at end of file diff --git a/src/svg/checkbox@bluegreen.theme.svg b/src/svg/radio@bluegreen.theme.svg old mode 100644 new mode 100755 similarity index 100% rename from src/svg/checkbox@bluegreen.theme.svg rename to src/svg/radio@bluegreen.theme.svg diff --git a/src/svg/checkbox.svg b/src/svg/radio@purple.theme.svg similarity index 87% rename from src/svg/checkbox.svg rename to src/svg/radio@purple.theme.svg index fc03da7..7d012e6 100755 --- a/src/svg/checkbox.svg +++ b/src/svg/radio@purple.theme.svg @@ -15,10 +15,10 @@ width="23.99675" xml:space="preserve" inkscape:version="0.48.4 r9939" - sodipodi:docname="1449698026_checkmark-24.svg">image/svg+xml \ No newline at end of file diff --git a/test.php b/test.php old mode 100644 new mode 100755 diff --git a/test/MedecinRepoTest.php b/test/MedecinRepoTest.php old mode 100644 new mode 100755 diff --git a/test/PatientRepoTest.php b/test/PatientRepoTest.php old mode 100644 new mode 100755 diff --git a/test/RDVRepoTest.php b/test/RDVRepoTest.php old mode 100644 new mode 100755 diff --git a/test/StaticRepoTest.php b/test/StaticRepoTest.php old mode 100644 new mode 100755 diff --git a/test/StatsRepoTest.php b/test/StatsRepoTest.php old mode 100644 new mode 100755