From 06299f5a69afbeca2ed98aec89acd5821ac0beca Mon Sep 17 00:00:00 2001
From: Lucas Mascaro
Date: Thu, 10 Dec 2015 10:47:30 +0100
Subject: [PATCH] ajout des managers (add/delete/update pour tous) + maj de la
BDD + tests unitaire
---
Docs/BDD.sql | 318 ++++++++++++------
autoloader.php | 2 +-
coverage/StaticRepo.php.html | 22 +-
coverage/dashboard.html | 8 +-
coverage/index.html | 34 +-
coverage/repos/MedecinRepo.php.html | 2 +-
coverage/repos/PatientRepo.php.html | 180 ++++++----
coverage/repos/RDVRepo.php.html | 2 +-
coverage/repos/StatsRepo.php.html | 2 +-
coverage/repos/dashboard.html | 8 +-
coverage/repos/index.html | 34 +-
.../Authentification.class.php | 0
managers/Medecin.class.php | 35 ++
managers/Patient.class.php | 51 +++
managers/RDV.class.php | 49 +++
managers/Response.class.php | 2 +-
managers/config/managers.json | 113 ++-----
{src => managers}/config/users.json | 0
repositories/repos/PatientRepo.php | 25 +-
src/Response.php | 202 -----------
test/PatientRepoTest.php | 8 +
21 files changed, 569 insertions(+), 528 deletions(-)
rename src/Authentification.php => managers/Authentification.class.php (100%)
create mode 100644 managers/Medecin.class.php
create mode 100644 managers/Patient.class.php
create mode 100644 managers/RDV.class.php
rename {src => managers}/config/users.json (100%)
delete mode 100755 src/Response.php
diff --git a/Docs/BDD.sql b/Docs/BDD.sql
index 5206c98..f2914dd 100755
--- a/Docs/BDD.sql
+++ b/Docs/BDD.sql
@@ -3,9 +3,9 @@
-- http://www.phpmyadmin.net
--
-- Client : localhost
--- Généré le : Mar 08 Décembre 2015 à 08:30
+-- Généré le : Jeu 10 Décembre 2015 à 09:46
-- Version du serveur : 10.1.9-MariaDB-log
--- Version de PHP : 7.0.0RC7
+-- Version de PHP : 7.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
@@ -146,17 +146,17 @@ INSERT INTO `Medecin` (`Id`, `Civilite`, `Prenom`, `Nom`) VALUES
--
CREATE TABLE `Patient` (
+ `Id` int(11) NOT NULL,
`Civilite` char(1) NOT NULL,
`Nom` varchar(45) CHARACTER SET big5 NOT NULL,
`Prenom` varchar(45) NOT NULL,
`Adresse` varchar(255) NOT NULL,
- `Adresse 2` varchar(255) DEFAULT NULL,
+ `Adresse2` varchar(255) DEFAULT NULL,
`Ville` varchar(50) NOT NULL,
`CodePostal` varchar(5) NOT NULL,
`DateNaissance` date NOT NULL,
`LieuNaissance` varchar(50) NOT NULL,
`NumSecuriteSociale` varchar(15) NOT NULL,
- `Id` int(11) NOT NULL,
`MedecinTraitant` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@@ -164,107 +164,107 @@ CREATE TABLE `Patient` (
-- Contenu de la table `Patient`
--
-INSERT INTO `Patient` (`Civilite`, `Nom`, `Prenom`, `Adresse`, `Adresse 2`, `Ville`, `CodePostal`, `DateNaissance`, `LieuNaissance`, `NumSecuriteSociale`, `Id`, `MedecinTraitant`) VALUES
- ('M', 'SILVA', 'Lena', '649 Banner Avenue, Tooleville, Iowa', NULL, 'North Dakota', '52882', '1911-09-13', 'Texas', '12698948371', 1, 33),
- ('F', 'KEMP', 'Clay', '807 Beayer Place, Linganore, New Hampshire', NULL, 'South Dakota', '61218', '2010-08-20', 'Arkansas', '20628078948', 2, 70),
- ('M', 'PAUL', 'Buck', '494 Macdougal Street, Chumuckla, Marshall Islands', NULL, 'Massachusetts', '68865', '1910-12-09', 'Federated States Of Micronesia', '15945373003', 3, 9),
- ('M', 'GARNER', 'Martina', '339 Frank Court, Defiance, West Virginia', NULL, 'Puerto Rico', '62671', '2008-10-01', 'Hawaii', '19329610967', 4, 66),
- ('F', 'BURCH', 'Chasity', '866 Clarendon Road, Cumminsville, Virginia', NULL, 'Vermont', '38435', '2012-06-25', 'Arizona', '27391164606', 5, 25),
- ('F', 'JEFFERSON', 'Shana', '175 Wyckoff Street, Trucksville, South Carolina', NULL, 'New Mexico', '85431', '2006-10-15', 'Mississippi', '26819094421', 6, 30),
- ('F', 'BLAKE', 'Arlene', '859 Debevoise Street, Russellville, Virgin Islands', NULL, 'Wyoming', '61926', '1966-06-18', 'Pennsylvania', '23960497083', 7, 93),
- ('F', 'DIAZ', 'Dawn', '273 Madison Street, Boonville, Idaho', NULL, 'North Carolina', '02209', '2006-10-04', 'Rhode Island', '27215823739', 8, 40),
- ('F', 'WHITLEY', 'Franco', '693 Horace Court, Rockbridge, Florida', NULL, 'California', '97479', '1927-06-07', 'Indiana', '29328474141', 9, 46),
- ('M', 'BUCK', 'Beck', '919 Cleveland Street, Barronett, Montana', NULL, 'Palau', '48585', '2012-12-09', 'American Samoa', '19699641707', 10, 67),
- ('M', 'COLE', 'Solomon', '412 Elizabeth Place, Bannock, Wisconsin', NULL, 'Michigan', '12693', '1935-04-15', 'Tennessee', '10678642104', 11, 89),
- ('M', 'VASQUEZ', 'Best', '335 Krier Place, Tedrow, Delaware', NULL, 'Connecticut', '32627', '2007-08-28', 'Guam', '19009855991', 12, 32),
- ('M', 'ROSS', 'Clark', '979 Celeste Court, Hessville, Louisiana', NULL, 'Northern Mariana Islands', '87310', '2007-06-27', 'Illinois', '11086416557', 13, 72),
- ('M', 'CHEN', 'Ida', '205 Malta Street, Camas, Oklahoma', NULL, 'Alaska', '14500', '1927-06-02', 'New York', '17998195070', 14, 35),
- ('F', 'BUCKLEY', 'Kathie', '415 Varick Street, Watchtower, Nevada', NULL, 'Minnesota', '87418', '2010-11-20', 'Colorado', '28577369272', 15, 29),
- ('F', 'FOX', 'Mitchell', '474 Navy Walk, Waterford, Alabama', NULL, 'Kentucky', '20730', '2008-12-13', 'Missouri', '23197712678', 16, 94),
- ('M', 'GOODMAN', 'Anthony', '526 Dodworth Street, Shawmut, Kansas', NULL, 'Ohio', '73624', '2000-11-21', 'Nebraska', '14355429029', 17, 87),
- ('M', 'SAWYER', 'Brigitte', '490 Ebony Court, Steinhatchee, Maryland', NULL, 'Maine', '90009', '1993-09-30', 'Georgia', '19496691291', 18, 12),
- ('F', 'CHRISTENSEN', 'Bates', '743 Middleton Street, Lowell, District Of Columbia', NULL, 'Washington', '43676', '2015-09-05', 'Oregon', '29308759372', 19, 84),
- ('M', 'TALLEY', 'Angela', '524 Wythe Avenue, Bawcomville, New Jersey', NULL, 'Iowa', '50898', '2003-10-30', 'North Dakota', '11465049462', 20, 43),
- ('F', 'COLEMAN', 'Logan', '238 Kent Street, Celeryville, Texas', NULL, 'New Hampshire', '06311', '2008-03-17', 'South Dakota', '28533965670', 21, 21),
- ('M', 'MCCULLOUGH', 'Newman', '199 Kane Place, Yogaville, Arkansas', NULL, 'Marshall Islands', '80883', '2002-07-04', 'Massachusetts', '13498991796', 22, 48),
- ('M', 'ROWLAND', 'Koch', '676 Oliver Street, Kraemer, Federated States Of Micronesia', NULL, 'West Virginia', '52228', '1998-05-18', 'Puerto Rico', '15879675253', 23, 63),
- ('M', 'COOLEY', 'Matthews', '610 Arlington Avenue, Kennedyville, Hawaii', NULL, 'Virginia', '57187', '2003-05-13', 'Vermont', '12165901177', 24, 35),
- ('M', 'PENNINGTON', 'Robbins', '101 Falmouth Street, Unionville, Arizona', NULL, 'South Carolina', '16649', '2012-09-12', 'New Mexico', '13627814148', 25, 50),
- ('M', 'FARLEY', 'Austin', '869 Duffield Street, Rivers, Mississippi', NULL, 'Virgin Islands', '41659', '2002-08-03', 'Wyoming', '19094300308', 26, 8),
- ('M', 'VELAZQUEZ', 'Winifred', '594 Rock Street, Fairacres, Pennsylvania', NULL, 'Idaho', '99838', '1981-06-30', 'North Carolina', '15647563918', 27, 24),
- ('F', 'WALLACE', 'Frost', '135 Sapphire Street, Tolu, Rhode Island', NULL, 'Florida', '85278', '2007-11-12', 'California', '25913410982', 28, 39),
- ('M', 'STANLEY', 'Hood', '833 Fountain Avenue, Moraida, Indiana', NULL, 'Montana', '96419', '2006-08-16', 'Palau', '17946621124', 29, 26),
- ('M', 'GILES', 'Maggie', '643 Joval Court, Trail, American Samoa', NULL, 'Wisconsin', '48204', '2012-03-04', 'Michigan', '10662686180', 30, 26),
- ('F', 'ESPINOZA', 'Tamara', '371 Ralph Avenue, Cuylerville, Tennessee', NULL, 'Delaware', '07341', '2008-08-10', 'Connecticut', '20083172261', 31, 26),
- ('F', 'HOLDER', 'Pena', '712 Channel Avenue, Richmond, Guam', NULL, 'Louisiana', '72630', '2013-06-17', 'Northern Mariana Islands', '29005097826', 32, 65),
- ('M', 'STOKES', 'Strong', '389 Dank Court, Temperanceville, Illinois', NULL, 'Oklahoma', '19213', '1924-04-09', 'Alaska', '14386411303', 33, 82),
- ('M', 'PENA', 'Pamela', '979 Dumont Avenue, Stollings, New York', NULL, 'Nevada', '01244', '2008-09-06', 'Minnesota', '19329398624', 34, 50),
- ('F', 'LEON', 'Allen', '899 Nevins Street, Fedora, Colorado', NULL, 'Alabama', '14863', '2015-05-10', 'Kentucky', '20535405226', 35, 52),
- ('M', 'STOUT', 'Gamble', '238 Oceanview Avenue, Graball, Missouri', NULL, 'Kansas', '35626', '2011-12-13', 'Ohio', '16717569080', 36, 67),
- ('M', 'BUTLER', 'Shawn', '563 Interborough Parkway, Lupton, Nebraska', NULL, 'Maryland', '82759', '1953-09-09', 'Maine', '18681124800', 37, 45),
- ('F', 'HENDRICKS', 'Ayala', '839 Navy Street, Grahamtown, Georgia', NULL, 'District Of Columbia', '60566', '2004-07-12', 'Washington', '29995060639', 38, 48),
- ('M', 'MAYO', 'Hicks', '626 Wilson Street, Noxen, Oregon', NULL, 'New Jersey', '87938', '2002-10-26', 'Iowa', '11993094532', 39, 45),
- ('M', 'ATKINS', 'Cecelia', '210 Humboldt Street, Elbert, North Dakota', NULL, 'Texas', '17198', '2002-08-06', 'New Hampshire', '15111976539', 40, 49),
- ('F', 'SUMMERS', 'Pauline', '550 Lorimer Street, Hailesboro, South Dakota', NULL, 'Arkansas', '95004', '1958-10-05', 'Marshall Islands', '28350963212', 41, 47),
- ('F', 'GREER', 'Shelly', '469 Livonia Avenue, Lodoga, Massachusetts', NULL, 'Federated States Of Micronesia', '30292', '2001-01-30', 'West Virginia', '21326809626', 42, 67),
- ('F', 'NIEVES', 'Wilma', '450 Guider Avenue, Selma, Puerto Rico', NULL, 'Hawaii', '39647', '1917-02-04', 'Virginia', '27216034661', 43, 5),
- ('F', 'WALLER', 'Duncan', '255 Blake Court, Freetown, Vermont', NULL, 'Arizona', '48683', '2008-03-07', 'South Carolina', '25345198647', 44, 36),
- ('M', 'VINCENT', 'Glenna', '727 Leonora Court, Tryon, New Mexico', NULL, 'Mississippi', '55687', '2009-10-09', 'Virgin Islands', '10271387742', 45, 16),
- ('F', 'WILKERSON', 'Kelley', '304 Bleecker Street, Concho, Wyoming', NULL, 'Pennsylvania', '30593', '2004-10-12', 'Idaho', '20837368947', 46, 76),
- ('M', 'CHAVEZ', 'Carolina', '620 Cumberland Street, Greer, North Carolina', NULL, 'Rhode Island', '72334', '1996-06-02', 'Florida', '13128264581', 47, 39),
- ('F', 'CORTEZ', 'Donaldson', '654 Diamond Street, Bonanza, California', NULL, 'Indiana', '67633', '1936-05-13', 'Montana', '20450513660', 48, 5),
- ('M', 'WHITAKER', 'Geraldine', '248 Louisiana Avenue, Hobucken, Palau', NULL, 'American Samoa', '19680', '1912-01-11', 'Wisconsin', '14501409312', 49, 71),
- ('F', 'WILSON', 'Isabelle', '319 Stryker Street, Henrietta, Michigan', NULL, 'Tennessee', '75542', '2013-09-30', 'Delaware', '21523135649', 50, 93),
- ('F', 'KLINE', 'Shirley', '325 Newel Street, Retsof, Connecticut', NULL, 'Guam', '67214', '2006-04-28', 'Louisiana', '29829440387', 51, 97),
- ('F', 'CROSBY', 'Sweet', '406 Dekalb Avenue, Nadine, Northern Mariana Islands', NULL, 'Illinois', '18491', '2002-10-02', 'Oklahoma', '22799689361', 52, 15),
- ('M', 'PRUITT', 'Bette', '140 Voorhies Avenue, Weedville, Alaska', NULL, 'New York', '73961', '1961-11-01', 'Nevada', '11917517213', 53, 59),
- ('F', 'LARSEN', 'Julianne', '706 Tiffany Place, Eagleville, Minnesota', NULL, 'Colorado', '39520', '1984-01-12', 'Alabama', '29343266278', 54, 29),
- ('F', 'NICHOLS', 'Mckay', '383 Dewey Place, Lithium, Kentucky', NULL, 'Missouri', '20493', '1929-07-17', 'Kansas', '21719339678', 55, 47),
- ('M', 'REEVES', 'Vasquez', '164 Cozine Avenue, Tecolotito, Ohio', NULL, 'Nebraska', '64893', '2009-06-25', 'Maryland', '16427456557', 56, 40),
- ('M', 'HERRING', 'Finch', '798 Albemarle Road, Gouglersville, Maine', NULL, 'Georgia', '58812', '1957-06-18', 'District Of Columbia', '13122477225', 57, 24),
- ('M', 'HOLLOWAY', 'Cummings', '522 Howard Alley, Escondida, Washington', NULL, 'Oregon', '62194', '1960-09-09', 'New Jersey', '19596957459', 58, 89),
- ('M', 'MILLER', 'Oliver', '273 Lenox Road, Norwood, Iowa', NULL, 'North Dakota', '62699', '1932-03-25', 'Texas', '19968426193', 59, 57),
- ('M', 'CAMPOS', 'Hart', '787 Polhemus Place, Motley, New Hampshire', NULL, 'South Dakota', '77516', '2007-12-21', 'Arkansas', '17253462074', 60, 31),
- ('M', 'CASE', 'Henson', '174 Stillwell Place, Mulino, Marshall Islands', NULL, 'Massachusetts', '85870', '2001-09-11', 'Federated States Of Micronesia', '12489367510', 61, 96),
- ('M', 'HANSEN', 'Melisa', '349 Berriman Street, Shasta, West Virginia', NULL, 'Puerto Rico', '48480', '2000-12-22', 'Hawaii', '12589313144', 62, 6),
- ('F', 'DALE', 'Jean', '169 Bay Parkway, Mayfair, Virginia', NULL, 'Vermont', '98518', '2009-06-09', 'Arizona', '22810920517', 63, 86),
- ('F', 'GONZALEZ', 'Combs', '374 Merit Court, Sperryville, South Carolina', NULL, 'New Mexico', '59695', '2013-05-27', 'Mississippi', '20990109001', 64, 61),
- ('M', 'SWEENEY', 'Edith', '995 Maple Avenue, Ilchester, Virgin Islands', NULL, 'Wyoming', '67276', '2007-02-02', 'Pennsylvania', '16022894937', 65, 70),
- ('F', 'STRONG', 'Jacquelyn', '626 Hazel Court, Allensworth, Idaho', NULL, 'North Carolina', '67826', '2005-07-12', 'Rhode Island', '20684605971', 66, 56),
- ('F', 'RIVERA', 'Leigh', '708 Quay Street, Hachita, Florida', NULL, 'California', '91928', '2005-12-05', 'Indiana', '29628059742', 67, 33),
- ('F', 'MYERS', 'Gladys', '141 Heyward Street, Darbydale, Montana', NULL, 'Palau', '84636', '1969-09-14', 'American Samoa', '28694761131', 68, 40),
- ('F', 'KELLER', 'Terry', '170 Hanover Place, Boykin, Wisconsin', NULL, 'Michigan', '78173', '2014-01-01', 'Tennessee', '26102225068', 69, 22),
- ('M', 'MAY', 'Snyder', '854 Orange Street, Stouchsburg, Delaware', NULL, 'Connecticut', '55484', '1936-10-14', 'Guam', '16217199153', 70, 75),
- ('M', 'DOTSON', 'Joanna', '976 Albany Avenue, Saranap, Louisiana', NULL, 'Northern Mariana Islands', '88021', '2003-04-25', 'Illinois', '18490418466', 71, 58),
- ('F', 'CRANE', 'Sampson', '574 Summit Street, Johnsonburg, Oklahoma', NULL, 'Alaska', '09843', '2013-01-22', 'New York', '27655744344', 72, 58),
- ('M', 'ROBERTS', 'Elizabeth', '679 Highland Place, Riviera, Nevada', NULL, 'Minnesota', '28575', '1934-06-02', 'Colorado', '19433331796', 73, 8),
- ('F', 'DELANEY', 'Gross', '467 Butler Place, Aurora, Alabama', NULL, 'Kentucky', '69364', '2005-01-08', 'Missouri', '22011388800', 74, 46),
- ('M', 'ROBERSON', 'Claire', '792 Nichols Avenue, Roulette, Kansas', NULL, 'Ohio', '01221', '1919-11-19', 'Nebraska', '16305786338', 75, 80),
- ('F', 'CONRAD', 'Tammi', '621 Crystal Street, Newkirk, Maryland', NULL, 'Maine', '03729', '2010-05-19', 'Georgia', '25770649159', 76, 23),
- ('F', 'ERICKSON', 'Grace', '736 Commerce Street, Beechmont, District Of Columbia', NULL, 'Washington', '32188', '2002-08-09', 'Oregon', '23105547041', 77, 99),
- ('F', 'STEWART', 'Alston', '807 Empire Boulevard, Keyport, New Jersey', NULL, 'Iowa', '73784', '1923-04-03', 'North Dakota', '27009664661', 78, 17),
- ('M', 'RIOS', 'Terri', '462 Fanchon Place, Zeba, Texas', NULL, 'New Hampshire', '50920', '2012-12-10', 'South Dakota', '13800615485', 79, 3),
- ('F', 'BOND', 'Spence', '803 Amherst Street, Rosine, Arkansas', NULL, 'Marshall Islands', '11222', '1975-07-18', 'Massachusetts', '23767781414', 80, 77),
- ('M', 'BARTON', 'Blake', '636 Prince Street, Mammoth, Federated States Of Micronesia', NULL, 'West Virginia', '17295', '2014-09-29', 'Puerto Rico', '10219535739', 81, 22),
- ('M', 'VANG', 'Monica', '691 Gerry Street, Toftrees, Hawaii', NULL, 'Virginia', '17720', '2006-07-08', 'Vermont', '19231014062', 82, 41),
- ('F', 'FIELDS', 'Giles', '189 Sullivan Place, Hilltop, Arizona', NULL, 'South Carolina', '93234', '1945-10-11', 'New Mexico', '24846926528', 83, 75),
- ('M', 'CLAY', 'Dalton', '375 Fay Court, Greensburg, Mississippi', NULL, 'Virgin Islands', '15908', '1939-12-22', 'Wyoming', '19933111163', 84, 24),
- ('M', 'WEEKS', 'Tonya', '411 Milton Street, Valmy, Pennsylvania', NULL, 'Idaho', '64798', '2004-02-08', 'North Carolina', '17176317887', 85, 24),
- ('F', 'WALTER', 'Sanford', '984 Rapelye Street, Oasis, Rhode Island', NULL, 'Florida', '19871', '2007-02-03', 'California', '22983447225', 86, 85),
- ('M', 'SCHWARTZ', 'Mae', '740 Kossuth Place, Tyro, Indiana', NULL, 'Montana', '56876', '2010-11-17', 'Palau', '18050339720', 87, 8),
- ('F', 'HILL', 'Alyson', '935 Bay Avenue, Neibert, American Samoa', NULL, 'Wisconsin', '81361', '2006-11-22', 'Michigan', '24102999369', 88, 37),
- ('F', 'BAKER', 'Judy', '159 Kenilworth Place, Washington, Tennessee', NULL, 'Delaware', '23849', '2012-11-08', 'Connecticut', '28124601703', 89, 92),
- ('F', 'VALDEZ', 'Phelps', '207 Grant Avenue, Buxton, Guam', NULL, 'Louisiana', '39088', '1948-10-28', 'Northern Mariana Islands', '23363949354', 90, 18),
- ('M', 'TERRY', 'Bernadine', '126 Cook Street, Drummond, Illinois', NULL, 'Oklahoma', '82875', '1902-12-13', 'Alaska', '10607274186', 91, 54),
- ('F', 'COFFEY', 'Mabel', '242 Dupont Street, Wiscon, New York', NULL, 'Nevada', '34688', '2015-10-18', 'Minnesota', '20291563081', 92, 95),
- ('F', 'TODD', 'Lucy', '158 Jardine Place, Bowie, Colorado', NULL, 'Alabama', '84196', '2011-01-08', 'Kentucky', '29773564480', 93, 24),
- ('F', 'MENDEZ', 'Joann', '584 Kiely Place, Frizzleburg, Missouri', NULL, 'Kansas', '80528', '2007-04-19', 'Ohio', '22504705446', 94, 47),
- ('F', 'KIRKLAND', 'Patrice', '924 Bond Street, Katonah, Nebraska', NULL, 'Maryland', '56940', '1972-03-21', 'Maine', '25277175911', 95, 34),
- ('F', 'NASH', 'Sexton', '323 Coventry Road, Spelter, Georgia', NULL, 'District Of Columbia', '74403', '1994-03-26', 'Washington', '20857808066', 96, 100),
- ('M', 'FLORES', 'Yvonne', '606 Beacon Court, Westwood, Oregon', NULL, 'New Jersey', '17963', '1977-08-10', 'Iowa', '10912788354', 97, 81),
- ('F', 'IRWIN', 'Helene', '747 Martense Street, Lafferty, North Dakota', NULL, 'Texas', '00597', '1953-06-21', 'New Hampshire', '21111493296', 98, 96),
- ('F', 'JACOBSON', 'Wendi', '482 Poly Place, Veyo, South Dakota', NULL, 'Arkansas', '54428', '1980-12-11', 'Marshall Islands', '20915062532', 99, 69),
- ('F', 'RICH', 'Guerra', '191 Hart Street, Teasdale, Massachusetts', NULL, 'Federated States Of Micronesia', '67771', '2001-05-16', 'West Virginia', '24748914281', 100, 71);
+INSERT INTO `Patient` (`Id`, `Civilite`, `Nom`, `Prenom`, `Adresse`, `Adresse2`, `Ville`, `CodePostal`, `DateNaissance`, `LieuNaissance`, `NumSecuriteSociale`, `MedecinTraitant`) VALUES
+ (1, 'M', 'SILVA', 'Lena', '649 Banner Avenue, Tooleville, Iowa', NULL, 'North Dakota', '52882', '1911-09-13', 'Texas', '12698948371', 33),
+ (2, 'F', 'KEMP', 'Clay', '807 Beayer Place, Linganore, New Hampshire', NULL, 'South Dakota', '61218', '2010-08-20', 'Arkansas', '20628078948', 88),
+ (3, 'M', 'PAUL', 'Buck', '494 Macdougal Street, Chumuckla, Marshall Islands', NULL, 'Massachusetts', '68865', '1910-12-09', 'Federated States Of Micronesia', '15945373003', 9),
+ (4, 'M', 'GARNER', 'Martina', '339 Frank Court, Defiance, West Virginia', NULL, 'Puerto Rico', '62671', '2008-10-01', 'Hawaii', '19329610967', 66),
+ (5, 'F', 'BURCH', 'Chasity', '866 Clarendon Road, Cumminsville, Virginia', NULL, 'Vermont', '38435', '2012-06-25', 'Arizona', '27391164606', 25),
+ (6, 'F', 'JEFFERSON', 'Shana', '175 Wyckoff Street, Trucksville, South Carolina', NULL, 'New Mexico', '85431', '2006-10-15', 'Mississippi', '26819094421', 30),
+ (7, 'F', 'BLAKE', 'Arlene', '859 Debevoise Street, Russellville, Virgin Islands', NULL, 'Wyoming', '61926', '1966-06-18', 'Pennsylvania', '23960497083', 93),
+ (8, 'F', 'DIAZ', 'Dawn', '273 Madison Street, Boonville, Idaho', NULL, 'North Carolina', '02209', '2006-10-04', 'Rhode Island', '27215823739', 40),
+ (9, 'F', 'WHITLEY', 'Franco', '693 Horace Court, Rockbridge, Florida', NULL, 'California', '97479', '1927-06-07', 'Indiana', '29328474141', 46),
+ (10, 'M', 'BUCK', 'Beck', '919 Cleveland Street, Barronett, Montana', NULL, 'Palau', '48585', '2012-12-09', 'American Samoa', '19699641707', 67),
+ (11, 'M', 'COLE', 'Solomon', '412 Elizabeth Place, Bannock, Wisconsin', NULL, 'Michigan', '12693', '1935-04-15', 'Tennessee', '10678642104', 89),
+ (12, 'M', 'VASQUEZ', 'Best', '335 Krier Place, Tedrow, Delaware', NULL, 'Connecticut', '32627', '2007-08-28', 'Guam', '19009855991', 32),
+ (13, 'M', 'ROSS', 'Clark', '979 Celeste Court, Hessville, Louisiana', NULL, 'Northern Mariana Islands', '87310', '2007-06-27', 'Illinois', '11086416557', 72),
+ (14, 'M', 'CHEN', 'Ida', '205 Malta Street, Camas, Oklahoma', NULL, 'Alaska', '14500', '1927-06-02', 'New York', '17998195070', 35),
+ (15, 'F', 'BUCKLEY', 'Kathie', '415 Varick Street, Watchtower, Nevada', NULL, 'Minnesota', '87418', '2010-11-20', 'Colorado', '28577369272', 29),
+ (16, 'F', 'FOX', 'Mitchell', '474 Navy Walk, Waterford, Alabama', NULL, 'Kentucky', '20730', '2008-12-13', 'Missouri', '23197712678', 94),
+ (17, 'M', 'GOODMAN', 'Anthony', '526 Dodworth Street, Shawmut, Kansas', NULL, 'Ohio', '73624', '2000-11-21', 'Nebraska', '14355429029', 87),
+ (18, 'M', 'SAWYER', 'Brigitte', '490 Ebony Court, Steinhatchee, Maryland', NULL, 'Maine', '90009', '1993-09-30', 'Georgia', '19496691291', 12),
+ (19, 'F', 'CHRISTENSEN', 'Bates', '743 Middleton Street, Lowell, District Of Columbia', NULL, 'Washington', '43676', '2015-09-05', 'Oregon', '29308759372', 84),
+ (20, 'M', 'TALLEY', 'Angela', '524 Wythe Avenue, Bawcomville, New Jersey', NULL, 'Iowa', '50898', '2003-10-30', 'North Dakota', '11465049462', 43),
+ (21, 'F', 'COLEMAN', 'Logan', '238 Kent Street, Celeryville, Texas', NULL, 'New Hampshire', '06311', '2008-03-17', 'South Dakota', '28533965670', 21),
+ (22, 'M', 'MCCULLOUGH', 'Newman', '199 Kane Place, Yogaville, Arkansas', NULL, 'Marshall Islands', '80883', '2002-07-04', 'Massachusetts', '13498991796', 48),
+ (23, 'M', 'ROWLAND', 'Koch', '676 Oliver Street, Kraemer, Federated States Of Micronesia', NULL, 'West Virginia', '52228', '1998-05-18', 'Puerto Rico', '15879675253', 63),
+ (24, 'M', 'COOLEY', 'Matthews', '610 Arlington Avenue, Kennedyville, Hawaii', NULL, 'Virginia', '57187', '2003-05-13', 'Vermont', '12165901177', 35),
+ (25, 'M', 'PENNINGTON', 'Robbins', '101 Falmouth Street, Unionville, Arizona', NULL, 'South Carolina', '16649', '2012-09-12', 'New Mexico', '13627814148', 50),
+ (26, 'M', 'FARLEY', 'Austin', '869 Duffield Street, Rivers, Mississippi', NULL, 'Virgin Islands', '41659', '2002-08-03', 'Wyoming', '19094300308', 8),
+ (27, 'M', 'VELAZQUEZ', 'Winifred', '594 Rock Street, Fairacres, Pennsylvania', NULL, 'Idaho', '99838', '1981-06-30', 'North Carolina', '15647563918', 24),
+ (28, 'F', 'WALLACE', 'Frost', '135 Sapphire Street, Tolu, Rhode Island', NULL, 'Florida', '85278', '2007-11-12', 'California', '25913410982', 39),
+ (29, 'M', 'STANLEY', 'Hood', '833 Fountain Avenue, Moraida, Indiana', NULL, 'Montana', '96419', '2006-08-16', 'Palau', '17946621124', 26),
+ (30, 'M', 'GILES', 'Maggie', '643 Joval Court, Trail, American Samoa', NULL, 'Wisconsin', '48204', '2012-03-04', 'Michigan', '10662686180', 26),
+ (31, 'F', 'ESPINOZA', 'Tamara', '371 Ralph Avenue, Cuylerville, Tennessee', NULL, 'Delaware', '07341', '2008-08-10', 'Connecticut', '20083172261', 26),
+ (32, 'F', 'HOLDER', 'Pena', '712 Channel Avenue, Richmond, Guam', NULL, 'Louisiana', '72630', '2013-06-17', 'Northern Mariana Islands', '29005097826', 65),
+ (33, 'M', 'STOKES', 'Strong', '389 Dank Court, Temperanceville, Illinois', NULL, 'Oklahoma', '19213', '1924-04-09', 'Alaska', '14386411303', 82),
+ (34, 'M', 'PENA', 'Pamela', '979 Dumont Avenue, Stollings, New York', NULL, 'Nevada', '01244', '2008-09-06', 'Minnesota', '19329398624', 50),
+ (35, 'F', 'LEON', 'Allen', '899 Nevins Street, Fedora, Colorado', NULL, 'Alabama', '14863', '2015-05-10', 'Kentucky', '20535405226', 52),
+ (36, 'M', 'STOUT', 'Gamble', '238 Oceanview Avenue, Graball, Missouri', NULL, 'Kansas', '35626', '2011-12-13', 'Ohio', '16717569080', 67),
+ (37, 'M', 'BUTLER', 'Shawn', '563 Interborough Parkway, Lupton, Nebraska', NULL, 'Maryland', '82759', '1953-09-09', 'Maine', '18681124800', 45),
+ (38, 'F', 'HENDRICKS', 'Ayala', '839 Navy Street, Grahamtown, Georgia', NULL, 'District Of Columbia', '60566', '2004-07-12', 'Washington', '29995060639', 48),
+ (39, 'M', 'MAYO', 'Hicks', '626 Wilson Street, Noxen, Oregon', NULL, 'New Jersey', '87938', '2002-10-26', 'Iowa', '11993094532', 45),
+ (40, 'M', 'ATKINS', 'Cecelia', '210 Humboldt Street, Elbert, North Dakota', NULL, 'Texas', '17198', '2002-08-06', 'New Hampshire', '15111976539', 49),
+ (41, 'F', 'SUMMERS', 'Pauline', '550 Lorimer Street, Hailesboro, South Dakota', NULL, 'Arkansas', '95004', '1958-10-05', 'Marshall Islands', '28350963212', 47),
+ (42, 'F', 'GREER', 'Shelly', '469 Livonia Avenue, Lodoga, Massachusetts', NULL, 'Federated States Of Micronesia', '30292', '2001-01-30', 'West Virginia', '21326809626', 67),
+ (43, 'F', 'NIEVES', 'Wilma', '450 Guider Avenue, Selma, Puerto Rico', NULL, 'Hawaii', '39647', '1917-02-04', 'Virginia', '27216034661', 5),
+ (44, 'F', 'WALLER', 'Duncan', '255 Blake Court, Freetown, Vermont', NULL, 'Arizona', '48683', '2008-03-07', 'South Carolina', '25345198647', 36),
+ (45, 'M', 'VINCENT', 'Glenna', '727 Leonora Court, Tryon, New Mexico', NULL, 'Mississippi', '55687', '2009-10-09', 'Virgin Islands', '10271387742', 16),
+ (46, 'F', 'WILKERSON', 'Kelley', '304 Bleecker Street, Concho, Wyoming', NULL, 'Pennsylvania', '30593', '2004-10-12', 'Idaho', '20837368947', 76),
+ (47, 'M', 'CHAVEZ', 'Carolina', '620 Cumberland Street, Greer, North Carolina', NULL, 'Rhode Island', '72334', '1996-06-02', 'Florida', '13128264581', 39),
+ (48, 'F', 'CORTEZ', 'Donaldson', '654 Diamond Street, Bonanza, California', NULL, 'Indiana', '67633', '1936-05-13', 'Montana', '20450513660', 5),
+ (49, 'M', 'WHITAKER', 'Geraldine', '248 Louisiana Avenue, Hobucken, Palau', NULL, 'American Samoa', '19680', '1912-01-11', 'Wisconsin', '14501409312', 71),
+ (50, 'F', 'WILSON', 'Isabelle', '319 Stryker Street, Henrietta, Michigan', NULL, 'Tennessee', '75542', '2013-09-30', 'Delaware', '21523135649', 93),
+ (51, 'F', 'KLINE', 'Shirley', '325 Newel Street, Retsof, Connecticut', NULL, 'Guam', '67214', '2006-04-28', 'Louisiana', '29829440387', 97),
+ (52, 'F', 'CROSBY', 'Sweet', '406 Dekalb Avenue, Nadine, Northern Mariana Islands', NULL, 'Illinois', '18491', '2002-10-02', 'Oklahoma', '22799689361', 15),
+ (53, 'M', 'PRUITT', 'Bette', '140 Voorhies Avenue, Weedville, Alaska', NULL, 'New York', '73961', '1961-11-01', 'Nevada', '11917517213', 59),
+ (54, 'F', 'LARSEN', 'Julianne', '706 Tiffany Place, Eagleville, Minnesota', NULL, 'Colorado', '39520', '1984-01-12', 'Alabama', '29343266278', 29),
+ (55, 'F', 'NICHOLS', 'Mckay', '383 Dewey Place, Lithium, Kentucky', NULL, 'Missouri', '20493', '1929-07-17', 'Kansas', '21719339678', 47),
+ (56, 'M', 'REEVES', 'Vasquez', '164 Cozine Avenue, Tecolotito, Ohio', NULL, 'Nebraska', '64893', '2009-06-25', 'Maryland', '16427456557', 40),
+ (57, 'M', 'HERRING', 'Finch', '798 Albemarle Road, Gouglersville, Maine', NULL, 'Georgia', '58812', '1957-06-18', 'District Of Columbia', '13122477225', 24),
+ (58, 'M', 'HOLLOWAY', 'Cummings', '522 Howard Alley, Escondida, Washington', NULL, 'Oregon', '62194', '1960-09-09', 'New Jersey', '19596957459', 89),
+ (59, 'M', 'MILLER', 'Oliver', '273 Lenox Road, Norwood, Iowa', NULL, 'North Dakota', '62699', '1932-03-25', 'Texas', '19968426193', 57),
+ (60, 'M', 'CAMPOS', 'Hart', '787 Polhemus Place, Motley, New Hampshire', NULL, 'South Dakota', '77516', '2007-12-21', 'Arkansas', '17253462074', 31),
+ (61, 'M', 'CASE', 'Henson', '174 Stillwell Place, Mulino, Marshall Islands', NULL, 'Massachusetts', '85870', '2001-09-11', 'Federated States Of Micronesia', '12489367510', 96),
+ (62, 'M', 'HANSEN', 'Melisa', '349 Berriman Street, Shasta, West Virginia', NULL, 'Puerto Rico', '48480', '2000-12-22', 'Hawaii', '12589313144', 6),
+ (63, 'F', 'DALE', 'Jean', '169 Bay Parkway, Mayfair, Virginia', NULL, 'Vermont', '98518', '2009-06-09', 'Arizona', '22810920517', 86),
+ (64, 'F', 'GONZALEZ', 'Combs', '374 Merit Court, Sperryville, South Carolina', NULL, 'New Mexico', '59695', '2013-05-27', 'Mississippi', '20990109001', 61),
+ (65, 'M', 'SWEENEY', 'Edith', '995 Maple Avenue, Ilchester, Virgin Islands', NULL, 'Wyoming', '67276', '2007-02-02', 'Pennsylvania', '16022894937', 70),
+ (66, 'F', 'STRONG', 'Jacquelyn', '626 Hazel Court, Allensworth, Idaho', NULL, 'North Carolina', '67826', '2005-07-12', 'Rhode Island', '20684605971', 56),
+ (67, 'F', 'RIVERA', 'Leigh', '708 Quay Street, Hachita, Florida', NULL, 'California', '91928', '2005-12-05', 'Indiana', '29628059742', 33),
+ (68, 'F', 'MYERS', 'Gladys', '141 Heyward Street, Darbydale, Montana', NULL, 'Palau', '84636', '1969-09-14', 'American Samoa', '28694761131', 40),
+ (69, 'F', 'KELLER', 'Terry', '170 Hanover Place, Boykin, Wisconsin', NULL, 'Michigan', '78173', '2014-01-01', 'Tennessee', '26102225068', 22),
+ (70, 'M', 'MAY', 'Snyder', '854 Orange Street, Stouchsburg, Delaware', NULL, 'Connecticut', '55484', '1936-10-14', 'Guam', '16217199153', 75),
+ (71, 'M', 'DOTSON', 'Joanna', '976 Albany Avenue, Saranap, Louisiana', NULL, 'Northern Mariana Islands', '88021', '2003-04-25', 'Illinois', '18490418466', 58),
+ (72, 'F', 'CRANE', 'Sampson', '574 Summit Street, Johnsonburg, Oklahoma', NULL, 'Alaska', '09843', '2013-01-22', 'New York', '27655744344', 58),
+ (73, 'M', 'ROBERTS', 'Elizabeth', '679 Highland Place, Riviera, Nevada', NULL, 'Minnesota', '28575', '1934-06-02', 'Colorado', '19433331796', 8),
+ (74, 'F', 'DELANEY', 'Gross', '467 Butler Place, Aurora, Alabama', NULL, 'Kentucky', '69364', '2005-01-08', 'Missouri', '22011388800', 46),
+ (75, 'M', 'ROBERSON', 'Claire', '792 Nichols Avenue, Roulette, Kansas', NULL, 'Ohio', '01221', '1919-11-19', 'Nebraska', '16305786338', 80),
+ (76, 'F', 'CONRAD', 'Tammi', '621 Crystal Street, Newkirk, Maryland', NULL, 'Maine', '03729', '2010-05-19', 'Georgia', '25770649159', 23),
+ (77, 'F', 'ERICKSON', 'Grace', '736 Commerce Street, Beechmont, District Of Columbia', NULL, 'Washington', '32188', '2002-08-09', 'Oregon', '23105547041', 99),
+ (78, 'F', 'STEWART', 'Alston', '807 Empire Boulevard, Keyport, New Jersey', NULL, 'Iowa', '73784', '1923-04-03', 'North Dakota', '27009664661', 17),
+ (79, 'M', 'RIOS', 'Terri', '462 Fanchon Place, Zeba, Texas', NULL, 'New Hampshire', '50920', '2012-12-10', 'South Dakota', '13800615485', 3),
+ (80, 'F', 'BOND', 'Spence', '803 Amherst Street, Rosine, Arkansas', NULL, 'Marshall Islands', '11222', '1975-07-18', 'Massachusetts', '23767781414', 77),
+ (81, 'M', 'BARTON', 'Blake', '636 Prince Street, Mammoth, Federated States Of Micronesia', NULL, 'West Virginia', '17295', '2014-09-29', 'Puerto Rico', '10219535739', 22),
+ (82, 'M', 'VANG', 'Monica', '691 Gerry Street, Toftrees, Hawaii', NULL, 'Virginia', '17720', '2006-07-08', 'Vermont', '19231014062', 41),
+ (83, 'F', 'FIELDS', 'Giles', '189 Sullivan Place, Hilltop, Arizona', NULL, 'South Carolina', '93234', '1945-10-11', 'New Mexico', '24846926528', 75),
+ (84, 'M', 'CLAY', 'Dalton', '375 Fay Court, Greensburg, Mississippi', NULL, 'Virgin Islands', '15908', '1939-12-22', 'Wyoming', '19933111163', 24),
+ (85, 'M', 'WEEKS', 'Tonya', '411 Milton Street, Valmy, Pennsylvania', NULL, 'Idaho', '64798', '2004-02-08', 'North Carolina', '17176317887', 24),
+ (86, 'F', 'WALTER', 'Sanford', '984 Rapelye Street, Oasis, Rhode Island', NULL, 'Florida', '19871', '2007-02-03', 'California', '22983447225', 85),
+ (87, 'M', 'SCHWARTZ', 'Mae', '740 Kossuth Place, Tyro, Indiana', NULL, 'Montana', '56876', '2010-11-17', 'Palau', '18050339720', 8),
+ (88, 'F', 'HILL', 'Alyson', '935 Bay Avenue, Neibert, American Samoa', NULL, 'Wisconsin', '81361', '2006-11-22', 'Michigan', '24102999369', 37),
+ (89, 'F', 'BAKER', 'Judy', '159 Kenilworth Place, Washington, Tennessee', NULL, 'Delaware', '23849', '2012-11-08', 'Connecticut', '28124601703', 92),
+ (90, 'F', 'VALDEZ', 'Phelps', '207 Grant Avenue, Buxton, Guam', NULL, 'Louisiana', '39088', '1948-10-28', 'Northern Mariana Islands', '23363949354', 18),
+ (91, 'M', 'TERRY', 'Bernadine', '126 Cook Street, Drummond, Illinois', NULL, 'Oklahoma', '82875', '1902-12-13', 'Alaska', '10607274186', 54),
+ (92, 'F', 'COFFEY', 'Mabel', '242 Dupont Street, Wiscon, New York', NULL, 'Nevada', '34688', '2015-10-18', 'Minnesota', '20291563081', 95),
+ (93, 'F', 'TODD', 'Lucy', '158 Jardine Place, Bowie, Colorado', NULL, 'Alabama', '84196', '2011-01-08', 'Kentucky', '29773564480', 24),
+ (94, 'F', 'MENDEZ', 'Joann', '584 Kiely Place, Frizzleburg, Missouri', NULL, 'Kansas', '80528', '2007-04-19', 'Ohio', '22504705446', 47),
+ (95, 'F', 'KIRKLAND', 'Patrice', '924 Bond Street, Katonah, Nebraska', NULL, 'Maryland', '56940', '1972-03-21', 'Maine', '25277175911', 34),
+ (96, 'F', 'NASH', 'Sexton', '323 Coventry Road, Spelter, Georgia', NULL, 'District Of Columbia', '74403', '1994-03-26', 'Washington', '20857808066', 100),
+ (97, 'M', 'FLORES', 'Yvonne', '606 Beacon Court, Westwood, Oregon', NULL, 'New Jersey', '17963', '1977-08-10', 'Iowa', '10912788354', 81),
+ (98, 'F', 'IRWIN', 'Helene', '747 Martense Street, Lafferty, North Dakota', NULL, 'Texas', '00597', '1953-06-21', 'New Hampshire', '21111493296', 96),
+ (99, 'F', 'JACOBSON', 'Wendi', '482 Poly Place, Veyo, South Dakota', NULL, 'Arkansas', '54428', '1980-12-11', 'Marshall Islands', '20915062532', 69),
+ (100, 'F', 'RICH', 'Guerra', '191 Hart Street, Teasdale, Massachusetts', NULL, 'Federated States Of Micronesia', '67771', '2001-05-16', 'West Virginia', '24748914281', 71);
-- --------------------------------------------------------
@@ -285,8 +285,106 @@ CREATE TABLE `RDV` (
--
INSERT INTO `RDV` (`Id`, `DateRDV`, `Duree`, `Patient_Id`, `Medecin_id`) VALUES
- (1, '2015-12-08 08:28:12', '08:58:12', 2, 1),
- (2, '2015-12-08 08:28:47', '00:30:00', 2, 1);
+ (1, '2015-06-08 11:33:43', '01:00:00', 14, 60),
+ (2, '2015-04-04 04:22:43', '01:00:00', 9, 15),
+ (3, '2015-02-08 06:05:29', '01:00:00', 63, 2),
+ (4, '2015-04-13 08:48:17', '00:30:00', 3, 40),
+ (5, '2015-10-23 08:01:11', '01:00:00', 58, 74),
+ (6, '2015-01-02 09:51:57', '00:30:00', 33, 71),
+ (7, '2015-09-17 11:06:44', '01:00:00', 21, 69),
+ (8, '2015-07-08 03:55:22', '00:30:00', 18, 41),
+ (9, '2015-10-18 03:25:50', '01:00:00', 23, 70),
+ (10, '2015-01-29 09:21:39', '00:30:00', 82, 8),
+ (11, '2015-08-23 02:57:06', '00:30:00', 13, 25),
+ (12, '2015-11-30 05:11:44', '01:00:00', 20, 77),
+ (13, '2015-06-28 09:08:39', '00:30:00', 49, 82),
+ (14, '2015-06-08 02:00:35', '00:30:00', 93, 13),
+ (15, '2015-03-01 02:39:30', '01:00:00', 28, 26),
+ (16, '2015-09-24 01:02:24', '00:30:00', 56, 76),
+ (17, '2015-09-06 11:13:48', '01:00:00', 39, 97),
+ (18, '2015-01-15 03:36:46', '00:30:00', 46, 78),
+ (19, '2015-06-26 09:04:07', '01:00:00', 97, 55),
+ (20, '2015-07-01 08:27:26', '01:00:00', 22, 50),
+ (21, '2015-02-08 11:50:46', '00:30:00', 18, 34),
+ (22, '2015-01-29 03:27:30', '01:00:00', 14, 58),
+ (23, '2015-03-16 01:57:19', '00:30:00', 52, 4),
+ (24, '2015-09-21 05:49:59', '00:30:00', 11, 14),
+ (25, '2015-08-09 03:58:24', '00:30:00', 91, 29),
+ (26, '2015-02-04 06:35:51', '00:30:00', 29, 62),
+ (27, '2015-11-04 09:18:35', '00:30:00', 99, 87),
+ (28, '2015-05-02 04:25:22', '00:30:00', 2, 50),
+ (29, '2015-11-29 02:33:10', '01:00:00', 51, 89),
+ (30, '2015-10-15 07:02:24', '01:00:00', 10, 8),
+ (31, '2015-04-23 08:57:53', '00:30:00', 65, 35),
+ (32, '2015-02-22 04:17:11', '01:00:00', 35, 82),
+ (33, '2015-04-04 07:48:57', '00:30:00', 76, 53),
+ (34, '2015-09-18 07:48:07', '00:30:00', 94, 19),
+ (35, '2015-02-15 07:25:06', '01:00:00', 69, 44),
+ (36, '2015-06-08 04:25:39', '01:00:00', 15, 88),
+ (37, '2015-11-24 01:33:30', '01:00:00', 84, 20),
+ (38, '2015-07-11 04:17:24', '01:00:00', 30, 78),
+ (39, '2015-08-12 10:59:53', '00:30:00', 61, 95),
+ (40, '2015-09-19 05:08:41', '00:30:00', 11, 23),
+ (41, '2015-09-29 07:56:16', '00:30:00', 75, 86),
+ (42, '2015-03-22 01:07:22', '00:30:00', 83, 23),
+ (43, '2015-06-11 06:05:41', '01:00:00', 89, 20),
+ (44, '2015-03-17 04:28:43', '01:00:00', 77, 88),
+ (45, '2015-11-27 06:14:03', '01:00:00', 27, 54),
+ (46, '2015-03-07 09:38:22', '01:00:00', 2, 4),
+ (47, '2015-02-02 01:45:32', '00:30:00', 36, 60),
+ (48, '2015-06-18 04:52:09', '01:00:00', 69, 99),
+ (49, '2015-06-24 11:53:34', '01:00:00', 89, 40),
+ (50, '2015-10-21 04:19:14', '01:00:00', 85, 76),
+ (51, '2015-04-14 09:14:08', '00:30:00', 73, 48),
+ (52, '2015-04-18 09:11:32', '00:30:00', 90, 11),
+ (53, '2015-08-23 02:03:16', '00:30:00', 17, 57),
+ (54, '2015-05-03 02:25:11', '00:30:00', 21, 63),
+ (55, '2015-08-07 09:12:44', '00:30:00', 97, 92),
+ (56, '2015-05-09 06:18:46', '00:30:00', 21, 32),
+ (57, '2015-09-10 10:26:08', '00:30:00', 9, 6),
+ (58, '2015-09-06 11:38:09', '00:30:00', 26, 48),
+ (59, '2015-07-22 04:18:29', '01:00:00', 81, 90),
+ (60, '2015-11-29 12:25:38', '01:00:00', 91, 2),
+ (61, '2015-07-22 05:27:02', '01:00:00', 92, 27),
+ (62, '2015-02-12 09:02:35', '00:30:00', 50, 35),
+ (63, '2015-11-07 04:16:19', '01:00:00', 98, 35),
+ (64, '2015-11-20 09:12:30', '01:00:00', 22, 57),
+ (65, '2015-11-13 09:09:55', '00:30:00', 98, 69),
+ (66, '2015-08-04 07:56:59', '00:30:00', 88, 44),
+ (67, '2015-07-15 07:32:15', '01:00:00', 72, 59),
+ (68, '2015-05-26 07:16:43', '01:00:00', 22, 57),
+ (69, '2015-03-08 05:21:56', '01:00:00', 95, 19),
+ (70, '2015-01-12 02:11:24', '00:30:00', 51, 72),
+ (71, '2015-11-29 08:22:29', '01:00:00', 95, 56),
+ (72, '2015-10-09 06:50:11', '01:00:00', 53, 5),
+ (73, '2015-01-09 04:59:41', '01:00:00', 9, 44),
+ (74, '2015-03-06 01:45:26', '00:30:00', 50, 90),
+ (75, '2015-08-20 07:20:01', '00:30:00', 70, 60),
+ (76, '2015-08-08 03:18:32', '01:00:00', 34, 23),
+ (77, '2015-07-07 05:49:03', '00:30:00', 100, 97),
+ (78, '2015-05-14 12:17:01', '01:00:00', 37, 4),
+ (79, '2015-05-26 02:31:26', '00:30:00', 26, 92),
+ (80, '2015-07-10 01:06:31', '00:30:00', 37, 19),
+ (81, '2015-02-12 06:48:08', '01:00:00', 26, 36),
+ (82, '2015-04-04 09:58:14', '01:00:00', 56, 51),
+ (83, '2015-09-09 11:00:38', '00:30:00', 58, 60),
+ (84, '2015-04-07 06:46:08', '01:00:00', 6, 18),
+ (85, '2015-12-07 04:20:04', '01:00:00', 64, 6),
+ (86, '2015-09-28 02:43:55', '01:00:00', 57, 66),
+ (87, '2015-08-26 12:20:03', '01:00:00', 27, 36),
+ (88, '2015-09-06 08:31:43', '00:30:00', 71, 80),
+ (89, '2015-04-21 08:18:20', '00:30:00', 22, 30),
+ (90, '2015-08-13 11:00:42', '00:30:00', 10, 72),
+ (91, '2015-05-18 01:40:59', '01:00:00', 2, 78),
+ (92, '2015-11-15 05:32:12', '01:00:00', 94, 77),
+ (93, '2015-02-27 03:23:52', '01:00:00', 2, 71),
+ (94, '2015-11-07 04:56:09', '00:30:00', 96, 52),
+ (95, '2015-07-20 10:32:31', '00:30:00', 57, 38),
+ (96, '2015-04-09 06:30:20', '00:30:00', 91, 67),
+ (97, '2015-10-20 04:25:11', '00:30:00', 56, 98),
+ (98, '2015-11-11 08:29:45', '00:30:00', 88, 39),
+ (99, '2015-10-21 07:55:43', '00:30:00', 97, 6),
+ (100, '2015-07-11 11:02:43', '01:00:00', 7, 22);
--
-- Index pour les tables exportées
@@ -324,17 +422,17 @@ ADD KEY `fk_RDV_Medecin1_idx` (`Medecin_id`);
-- AUTO_INCREMENT pour la table `Medecin`
--
ALTER TABLE `Medecin`
-MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=105;
+MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=101;
--
-- AUTO_INCREMENT pour la table `Patient`
--
ALTER TABLE `Patient`
-MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=105;
+MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=101;
--
-- AUTO_INCREMENT pour la table `RDV`
--
ALTER TABLE `RDV`
-MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
+MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=101;
--
-- Contraintes pour les tables exportées
--
diff --git a/autoloader.php b/autoloader.php
index d7e3d66..544f1b5 100755
--- a/autoloader.php
+++ b/autoloader.php
@@ -9,7 +9,7 @@ error_reporting(-1);
*/
//pour l'inclusion dans le dossier src
-$GLOBALS['managers_dir'] = dirname(__FILE__).DIRECTORY_SEPARATOR.'src';
+$GLOBALS['managers_dir'] = dirname(__FILE__).DIRECTORY_SEPARATOR.'managers';
function autoloader($class) {
diff --git a/coverage/StaticRepo.php.html b/coverage/StaticRepo.php.html
index 4b10219..9462b25 100644
--- a/coverage/StaticRepo.php.html
+++ b/coverage/StaticRepo.php.html
@@ -201,13 +201,13 @@
| |
| |
| public static function getConnexion(){ |
- | if(static::$config == null){ |
+ | if(static::$config == null){ |
| static::$config = json_decode(file_get_contents(dirname(__FILE__).DIRECTORY_SEPARATOR.'config.json'),true); |
| } |
- | if(static::$connexion == null){ |
+ | if(static::$connexion == null){ |
| static::$connexion = new PDO('mysql:host='.static::$config['host'].';dbname='.static::$config['database'], static::$config['login'], static::$config['password']); |
| } |
- | return static::$connexion; |
+ | return static::$connexion; |
| } |
| |
| |
@@ -230,11 +230,11 @@
| public static function delNumeric($fetchData, $oneDimension=false){ |
| |
| |
- | if( $fetchData === false ) return false; |
+ | if( $fetchData === false ) return false; |
| |
| |
| |
- | if( !$oneDimension ){ |
+ | if( !$oneDimension ){ |
| |
| |
| for( $i = 0 ; $i < count($fetchData) ; $i++ ) |
@@ -252,18 +252,18 @@
| }else{ |
| |
| |
- | foreach($fetchData as $i=>$val){ |
+ | foreach($fetchData as $i=>$val){ |
| |
- | if( !mb_detect_encoding($val, 'UTF-8') ) |
+ | if( !mb_detect_encoding($val, 'UTF-8') ) |
| $fetchData[$i] = utf8_encode($val); |
| |
- | if( is_int($i) ) |
- | unset( $fetchData[$i] ); |
+ | if( is_int($i) ) |
+ | unset( $fetchData[$i] ); |
| } |
| |
| } |
| |
- | return $fetchData; |
+ | return $fetchData; |
| } |
| |
| |
@@ -358,7 +358,7 @@
Dead Code
- Generated by PHP_CodeCoverage 3.0.2 using PHP 7.0.0 and PHPUnit 5.1.0 at Thu Dec 10 8:01:23 UTC 2015.
+ Generated by PHP_CodeCoverage 3.0.2 using PHP 7.0.0 and PHPUnit 5.1.0 at Thu Dec 10 9:44:35 UTC 2015.
diff --git a/coverage/dashboard.html b/coverage/dashboard.html
index 2ff72a3..2ee1112 100644
--- a/coverage/dashboard.html
+++ b/coverage/dashboard.html
@@ -148,7 +148,7 @@
@@ -187,7 +187,7 @@ $(document).ready(function() {
.yAxis.tickFormat(d3.format('d'));
d3.select('#methodCoverageDistribution svg')
- .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,5,2,18], "Method Coverage"))
+ .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,5,3,18], "Method Coverage"))
.transition().duration(500).call(chart);
nv.utils.windowResize(chart.update);
@@ -237,7 +237,7 @@ $(document).ready(function() {
chart.yAxis.axisLabel('Cyclomatic Complexity');
d3.select('#classComplexity svg')
- .datum(getComplexityData([[86.95652173913,36,"StaticRepo<\/a>"],[95.238095238095,7,"MedecinRepo<\/a>"],[96.428571428571,7,"PatientRepo<\/a>"],[92.682926829268,11,"RDVRepo<\/a>"],[92.307692307692,9,"StatsRepo<\/a>"]], 'Class Complexity'))
+ .datum(getComplexityData([[86.95652173913,36,"StaticRepo<\/a>"],[95.238095238095,7,"MedecinRepo<\/a>"],[95.652173913043,9,"PatientRepo<\/a>"],[92.682926829268,11,"RDVRepo<\/a>"],[92.307692307692,9,"StatsRepo<\/a>"]], 'Class Complexity'))
.transition()
.duration(500)
.call(chart);
@@ -261,7 +261,7 @@ $(document).ready(function() {
chart.yAxis.axisLabel('Method Complexity');
d3.select('#methodComplexity svg')
- .datum(getComplexityData([[100,3,"StaticRepo::getConnexion<\/a>"],[100,1,"StaticRepo::testConnexion<\/a>"],[85.714285714286,10,"StaticRepo::delNumeric<\/a>"],[84.615384615385,22,"StaticRepo::checkParam<\/a>"],[100,1,"MedecinRepo::getById<\/a>"],[83.333333333333,2,"MedecinRepo::add<\/a>"],[100,1,"MedecinRepo::delete<\/a>"],[100,1,"MedecinRepo::search<\/a>"],[100,1,"MedecinRepo::getPatients<\/a>"],[100,1,"MedecinRepo::getAll<\/a>"],[100,1,"PatientRepo::getById<\/a>"],[93.75,2,"PatientRepo::add<\/a>"],[100,1,"PatientRepo::delete<\/a>"],[100,1,"PatientRepo::updateMedecinTraitant<\/a>"],[100,1,"PatientRepo::search<\/a>"],[100,1,"PatientRepo::getAll<\/a>"],[100,1,"RDVRepo::getById<\/a>"],[100,1,"RDVRepo::getByDate<\/a>"],[100,1,"RDVRepo::delete<\/a>"],[88.888888888889,2,"RDVRepo::add<\/a>"],[100,1,"RDVRepo::updateDateTime<\/a>"],[100,1,"RDVRepo::getByPatientAndDate<\/a>"],[85.714285714286,4,"RDVRepo::getAll<\/a>"],[91.304347826087,8,"StatsRepo::getAgePatient<\/a>"],[100,1,"StatsRepo::getRDVStat<\/a>"]], 'Method Complexity'))
+ .datum(getComplexityData([[100,3,"StaticRepo::getConnexion<\/a>"],[100,1,"StaticRepo::testConnexion<\/a>"],[85.714285714286,10,"StaticRepo::delNumeric<\/a>"],[84.615384615385,22,"StaticRepo::checkParam<\/a>"],[100,1,"MedecinRepo::getById<\/a>"],[83.333333333333,2,"MedecinRepo::add<\/a>"],[100,1,"MedecinRepo::delete<\/a>"],[100,1,"MedecinRepo::search<\/a>"],[100,1,"MedecinRepo::getPatients<\/a>"],[100,1,"MedecinRepo::getAll<\/a>"],[100,1,"PatientRepo::getById<\/a>"],[93.75,2,"PatientRepo::add<\/a>"],[94.444444444444,2,"PatientRepo::update<\/a>"],[100,1,"PatientRepo::delete<\/a>"],[100,1,"PatientRepo::updateMedecinTraitant<\/a>"],[100,1,"PatientRepo::search<\/a>"],[100,1,"PatientRepo::getAll<\/a>"],[100,1,"RDVRepo::getById<\/a>"],[100,1,"RDVRepo::getByDate<\/a>"],[100,1,"RDVRepo::delete<\/a>"],[88.888888888889,2,"RDVRepo::add<\/a>"],[100,1,"RDVRepo::updateDateTime<\/a>"],[100,1,"RDVRepo::getByPatientAndDate<\/a>"],[85.714285714286,4,"RDVRepo::getAll<\/a>"],[91.304347826087,8,"StatsRepo::getAgePatient<\/a>"],[100,1,"StatsRepo::getRDVStat<\/a>"]], 'Method Complexity'))
.transition()
.duration(500)
.call(chart);
diff --git a/coverage/index.html b/coverage/index.html
index 3ce42a8..edf73f6 100644
--- a/coverage/index.html
+++ b/coverage/index.html
@@ -43,21 +43,21 @@
Total |
-
- 91.98% covered (success)
+
+ 92.22% covered (success)
|
- 91.98% |
- 149 / 162 |
+ 92.22% |
+ 166 / 180 |
-
- 72.00% covered (warning)
+
+ 69.23% covered (warning)
|
- 72.00% |
- 18 / 25 |
+ 69.23% |
+ 18 / 26 |
0.00% covered (danger)
@@ -71,21 +71,21 @@
repos |
-
- 93.97% covered (success)
+
+ 94.03% covered (success)
|
- 93.97% |
- 109 / 116 |
+ 94.03% |
+ 126 / 134 |
-
- 76.19% covered (warning)
+
+ 72.73% covered (warning)
|
- 76.19% |
- 16 / 21 |
+ 72.73% |
+ 16 / 22 |
diff --git a/coverage/repos/MedecinRepo.php.html b/coverage/repos/MedecinRepo.php.html
index da2a77c..f327b9a 100644
--- a/coverage/repos/MedecinRepo.php.html
+++ b/coverage/repos/MedecinRepo.php.html
@@ -301,7 +301,7 @@
Dead Code
- Generated by PHP_CodeCoverage 3.0.2 using PHP 7.0.0 and PHPUnit 5.1.0 at Thu Dec 10 8:01:23 UTC 2015.
+ Generated by PHP_CodeCoverage 3.0.2 using PHP 7.0.0 and PHPUnit 5.1.0 at Thu Dec 10 9:44:35 UTC 2015.
diff --git a/coverage/repos/PatientRepo.php.html b/coverage/repos/PatientRepo.php.html
index 453326f..6719660 100644
--- a/coverage/repos/PatientRepo.php.html
+++ b/coverage/repos/PatientRepo.php.html
@@ -52,22 +52,22 @@
0.00% |
0 / 1 |
-
- 83.33% covered (warning)
+
+ 71.43% covered (warning)
|
- 83.33% |
- 5 / 6 |
+ 71.43% |
+ 5 / 7 |
CRAP |
-
- 96.43% covered (success)
+
+ 95.65% covered (success)
|
- 96.43% |
- 27 / 28 |
+ 95.65% |
+ 44 / 46 |
|
@@ -81,22 +81,22 @@
0.00% |
0 / 1 |
-
- 83.33% covered (warning)
+
+ 71.43% covered (warning)
|
- 83.33% |
- 5 / 6 |
- 7 |
+ 71.43% |
+ 5 / 7 |
+ 9 |
-
- 96.43% covered (success)
+
+ 95.65% covered (success)
|
- 96.43% |
- 27 / 28 |
+ 95.65% |
+ 44 / 46 |
@@ -142,7 +142,28 @@
- delete |
+ update |
+
+
+ 0.00% covered (danger)
+
+
+ |
+ 0.00% |
+ 0 / 1 |
+ 2.00 |
+
+
+ 94.44% covered (success)
+
+
+ |
+ 94.44% |
+ 17 / 18 |
+
+
+
+ delete |
100.00% covered (success)
@@ -163,7 +184,7 @@
|
- updateMedecinTraitant |
+ updateMedecinTraitant |
100.00% covered (success)
@@ -184,7 +205,7 @@
|
- search |
+ search |
100.00% covered (success)
@@ -205,7 +226,7 @@
|
- getAll |
+ getAll |
100.00% covered (success)
@@ -247,65 +268,88 @@
| |
| |
| public static function getById($id){ |
- | $req = StaticRepo::getConnexion()->prepare('SELECT * FROM Patient WHERE Id = :id'); |
- | $req->execute(['id' => $id]); |
- | return StaticRepo::delNumeric( $req->fetch(), true ); |
+ | $req = StaticRepo::getConnexion()->prepare('SELECT * FROM Patient WHERE Id = :id'); |
+ | $req->execute(['id' => $id]); |
+ | return StaticRepo::delNumeric( $req->fetch(), true ); |
| |
| } |
| |
| public static function add($civilite,$prenom,$nom,$adresse,$adresse2,$ville,$codePostal,$dateNaissance,$lieuNaissance,$numSecu,$medecinTraitant = null){ |
| |
- | $dateNaissance = strtotime($dateNaissance); |
- | $dateNaissance = Date('o-m-d',$dateNaissance); |
+ | $dateNaissance = strtotime($dateNaissance); |
+ | $dateNaissance = Date('o-m-d',$dateNaissance); |
| |
- | $req = StaticRepo::getConnexion()->prepare('INSERT INTO Patient VALUES (:civilite,:nom,:prenom,:adresse,:adresse2,:ville,:codePostal,:dateNaissance,:lieuNaissance,:numSecu,DEFAULT,:medecin)'); |
- | $result = $req->execute(['civilite' => $civilite, |
- | 'nom' => $nom, |
- | 'prenom' => $prenom, |
- | 'adresse' => $adresse, |
- | 'adresse2' => $adresse2, |
- | 'ville' => $ville, |
- | 'codePostal' => $codePostal, |
- | 'dateNaissance' => $dateNaissance, |
- | 'lieuNaissance' => $lieuNaissance, |
- | 'numSecu' => $numSecu, |
- | 'medecin' => $medecinTraitant ]); |
- | if($result){return StaticRepo::getConnexion()->lastInsertId();} |
+ | $req = StaticRepo::getConnexion()->prepare('INSERT INTO Patient VALUES (DEFAULT,:civilite,:nom,:prenom,:adresse,:adresse2,:ville,:codePostal,:dateNaissance,:lieuNaissance,:numSecu,:medecin)'); |
+ | $result = $req->execute(['civilite' => $civilite, |
+ | 'nom' => $nom, |
+ | 'prenom' => $prenom, |
+ | 'adresse' => $adresse, |
+ | 'adresse2' => $adresse2, |
+ | 'ville' => $ville, |
+ | 'codePostal' => $codePostal, |
+ | 'dateNaissance' => $dateNaissance, |
+ | 'lieuNaissance' => $lieuNaissance, |
+ | 'numSecu' => $numSecu, |
+ | 'medecin' => $medecinTraitant ]); |
+ | if($result){return StaticRepo::getConnexion()->lastInsertId();} |
| else{return false;} |
| |
| } |
| |
- | public static function delete($idPatient){ |
- | |
- | $req = StaticRepo::getConnexion()->prepare('DELETE FROM Patient WHERE Patient.Id = :id'); |
- | return $req->execute(['id' => $idPatient]); |
- | |
- | } |
- | |
- | public static function updateMedecinTraitant($idPatient,$idMedecin){ |
- | |
- | $req = StaticRepo::getConnexion()->prepare('UPDATE Patient SET MedecinTraitant = :medecin WHERE Id = :id'); |
- | return $req->execute(['medecin' => $idMedecin, 'id' => $idPatient]); |
- | |
- | } |
- | |
- | public static function search($nom,$prenom){ |
- | |
- | $req = StaticRepo::getConnexion()->prepare('SELECT * FROM Patient WHERE Nom LIKE :nom AND Prenom LIKE :prenom'); |
- | $req->execute(['nom' => $nom, 'prenom' => $prenom]); |
- | return StaticRepo::delNumeric($req->fetchAll()); |
- | |
- | } |
- | |
- | public static function getAll(){ |
- | |
- | $req = StaticRepo::getConnexion()->query('SELECT * FROM Patient ORDER BY nom, prenom ASC'); |
- | |
- | return StaticRepo::delNumeric( $req->fetchAll() ); |
+ | public static function update($id,$civilite,$prenom,$nom,$adresse,$adresse2,$ville,$codePostal,$dateNaissance,$lieuNaissance,$numSecu,$medecinTraitant){ |
+ | $dateNaissance = strtotime($dateNaissance); |
+ | $dateNaissance = Date('o-m-d',$dateNaissance); |
+ | |
+ | $req = StaticRepo::getConnexion()->prepare('UPDATE Patient SET Civilite=:civilite,Nom=:nom,Prenom=:prenom,Adresse=:adresse,Adresse2=:adresse2,Ville=:ville, |
+ | CodePostal=:codePostal,DateNaissance=:dateNaissance,LieuNaissance=:lieuNaissance,NumSecuriteSociale=:numSecu,MedecinTraitant=:medecin WHERE Id=:id;'); |
+ | $result = $req->execute(['civilite' => $civilite, |
+ | 'nom' => $nom, |
+ | 'prenom' => $prenom, |
+ | 'adresse' => $adresse, |
+ | 'adresse2' => $adresse2, |
+ | 'ville' => $ville, |
+ | 'codePostal' => $codePostal, |
+ | 'dateNaissance' => $dateNaissance, |
+ | 'lieuNaissance' => $lieuNaissance, |
+ | 'numSecu' => $numSecu, |
+ | 'medecin' => $medecinTraitant, |
+ | 'id' => $id]); |
+ | if($result){return StaticRepo::getConnexion()->lastInsertId();} |
+ | else{return false;} |
+ | |
+ | } |
+ | |
+ | public static function delete($idPatient){ |
+ | |
+ | $req = StaticRepo::getConnexion()->prepare('DELETE FROM Patient WHERE Patient.Id = :id'); |
+ | return $req->execute(['id' => $idPatient]); |
| |
| } |
| |
- | } |
+ | public static function updateMedecinTraitant($idPatient,$idMedecin){ |
+ | |
+ | $req = StaticRepo::getConnexion()->prepare('UPDATE Patient SET MedecinTraitant = :medecin WHERE Id = :id'); |
+ | return $req->execute(['medecin' => $idMedecin, 'id' => $idPatient]); |
+ | |
+ | } |
+ | |
+ | public static function search($nom,$prenom){ |
+ | |
+ | $req = StaticRepo::getConnexion()->prepare('SELECT * FROM Patient WHERE Nom LIKE :nom AND Prenom LIKE :prenom'); |
+ | $req->execute(['nom' => $nom, 'prenom' => $prenom]); |
+ | return StaticRepo::delNumeric($req->fetchAll()); |
+ | |
+ | } |
+ | |
+ | public static function getAll(){ |
+ | |
+ | $req = StaticRepo::getConnexion()->query('SELECT * FROM Patient ORDER BY nom, prenom ASC'); |
+ | |
+ | return StaticRepo::delNumeric( $req->fetchAll() ); |
+ | |
+ | } |
+ | |
+ | } |
@@ -318,7 +362,7 @@
Dead Code
- Generated by PHP_CodeCoverage 3.0.2 using PHP 7.0.0 and PHPUnit 5.1.0 at Thu Dec 10 8:01:23 UTC 2015.
+ Generated by PHP_CodeCoverage 3.0.2 using PHP 7.0.0 and PHPUnit 5.1.0 at Thu Dec 10 9:44:35 UTC 2015.
diff --git a/coverage/repos/RDVRepo.php.html b/coverage/repos/RDVRepo.php.html
index 9aaaa0c..b73629d 100644
--- a/coverage/repos/RDVRepo.php.html
+++ b/coverage/repos/RDVRepo.php.html
@@ -341,7 +341,7 @@
Dead Code
- Generated by PHP_CodeCoverage 3.0.2 using PHP 7.0.0 and PHPUnit 5.1.0 at Thu Dec 10 8:01:23 UTC 2015.
+ Generated by PHP_CodeCoverage 3.0.2 using PHP 7.0.0 and PHPUnit 5.1.0 at Thu Dec 10 9:44:35 UTC 2015.
diff --git a/coverage/repos/StatsRepo.php.html b/coverage/repos/StatsRepo.php.html
index 6d55dc8..6c4ec2a 100644
--- a/coverage/repos/StatsRepo.php.html
+++ b/coverage/repos/StatsRepo.php.html
@@ -213,7 +213,7 @@
Dead Code
- Generated by PHP_CodeCoverage 3.0.2 using PHP 7.0.0 and PHPUnit 5.1.0 at Thu Dec 10 8:01:23 UTC 2015.
+ Generated by PHP_CodeCoverage 3.0.2 using PHP 7.0.0 and PHPUnit 5.1.0 at Thu Dec 10 9:44:35 UTC 2015.
diff --git a/coverage/repos/dashboard.html b/coverage/repos/dashboard.html
index 55251fd..543e0b4 100644
--- a/coverage/repos/dashboard.html
+++ b/coverage/repos/dashboard.html
@@ -143,7 +143,7 @@
@@ -182,7 +182,7 @@ $(document).ready(function() {
.yAxis.tickFormat(d3.format('d'));
d3.select('#methodCoverageDistribution svg')
- .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,3,2,16], "Method Coverage"))
+ .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,3,3,16], "Method Coverage"))
.transition().duration(500).call(chart);
nv.utils.windowResize(chart.update);
@@ -232,7 +232,7 @@ $(document).ready(function() {
chart.yAxis.axisLabel('Cyclomatic Complexity');
d3.select('#classComplexity svg')
- .datum(getComplexityData([[95.238095238095,7," MedecinRepo<\/a>"],[96.428571428571,7,"PatientRepo<\/a>"],[92.682926829268,11,"RDVRepo<\/a>"],[92.307692307692,9,"StatsRepo<\/a>"]], 'Class Complexity'))
+ .datum(getComplexityData([[95.238095238095,7,"MedecinRepo<\/a>"],[95.652173913043,9,"PatientRepo<\/a>"],[92.682926829268,11,"RDVRepo<\/a>"],[92.307692307692,9,"StatsRepo<\/a>"]], 'Class Complexity'))
.transition()
.duration(500)
.call(chart);
@@ -256,7 +256,7 @@ $(document).ready(function() {
chart.yAxis.axisLabel('Method Complexity');
d3.select('#methodComplexity svg')
- .datum(getComplexityData([[100,1,"MedecinRepo::getById<\/a>"],[83.333333333333,2,"MedecinRepo::add<\/a>"],[100,1,"MedecinRepo::delete<\/a>"],[100,1,"MedecinRepo::search<\/a>"],[100,1,"MedecinRepo::getPatients<\/a>"],[100,1,"MedecinRepo::getAll<\/a>"],[100,1,"PatientRepo::getById<\/a>"],[93.75,2,"PatientRepo::add<\/a>"],[100,1,"PatientRepo::delete<\/a>"],[100,1,"PatientRepo::updateMedecinTraitant<\/a>"],[100,1,"PatientRepo::search<\/a>"],[100,1,"PatientRepo::getAll<\/a>"],[100,1,"RDVRepo::getById<\/a>"],[100,1,"RDVRepo::getByDate<\/a>"],[100,1,"RDVRepo::delete<\/a>"],[88.888888888889,2,"RDVRepo::add<\/a>"],[100,1,"RDVRepo::updateDateTime<\/a>"],[100,1,"RDVRepo::getByPatientAndDate<\/a>"],[85.714285714286,4,"RDVRepo::getAll<\/a>"],[91.304347826087,8,"StatsRepo::getAgePatient<\/a>"],[100,1,"StatsRepo::getRDVStat<\/a>"]], 'Method Complexity'))
+ .datum(getComplexityData([[100,1,"MedecinRepo::getById<\/a>"],[83.333333333333,2,"MedecinRepo::add<\/a>"],[100,1,"MedecinRepo::delete<\/a>"],[100,1,"MedecinRepo::search<\/a>"],[100,1,"MedecinRepo::getPatients<\/a>"],[100,1,"MedecinRepo::getAll<\/a>"],[100,1,"PatientRepo::getById<\/a>"],[93.75,2,"PatientRepo::add<\/a>"],[94.444444444444,2,"PatientRepo::update<\/a>"],[100,1,"PatientRepo::delete<\/a>"],[100,1,"PatientRepo::updateMedecinTraitant<\/a>"],[100,1,"PatientRepo::search<\/a>"],[100,1,"PatientRepo::getAll<\/a>"],[100,1,"RDVRepo::getById<\/a>"],[100,1,"RDVRepo::getByDate<\/a>"],[100,1,"RDVRepo::delete<\/a>"],[88.888888888889,2,"RDVRepo::add<\/a>"],[100,1,"RDVRepo::updateDateTime<\/a>"],[100,1,"RDVRepo::getByPatientAndDate<\/a>"],[85.714285714286,4,"RDVRepo::getAll<\/a>"],[91.304347826087,8,"StatsRepo::getAgePatient<\/a>"],[100,1,"StatsRepo::getRDVStat<\/a>"]], 'Method Complexity'))
.transition()
.duration(500)
.call(chart);
diff --git a/coverage/repos/index.html b/coverage/repos/index.html
index b4a911f..ad5e289 100644
--- a/coverage/repos/index.html
+++ b/coverage/repos/index.html
@@ -44,21 +44,21 @@
Total |
-
- 93.97% covered (success)
+
+ 94.03% covered (success)
|
- 93.97% |
- 109 / 116 |
+ 94.03% |
+ 126 / 134 |
-
- 76.19% covered (warning)
+
+ 72.73% covered (warning)
|
- 76.19% |
- 16 / 21 |
+ 72.73% |
+ 16 / 22 |
0.00% covered (danger)
@@ -100,21 +100,21 @@
PatientRepo.php |
-
- 96.43% covered (success)
+
+ 95.65% covered (success)
|
- 96.43% |
- 27 / 28 |
+ 95.65% |
+ 44 / 46 |
-
- 83.33% covered (warning)
+
+ 71.43% covered (warning)
|
- 83.33% |
- 5 / 6 |
+ 71.43% |
+ 5 / 7 |
diff --git a/src/Authentification.php b/managers/Authentification.class.php
similarity index 100%
rename from src/Authentification.php
rename to managers/Authentification.class.php
diff --git a/managers/Medecin.class.php b/managers/Medecin.class.php
new file mode 100644
index 0000000..c0d2285
--- /dev/null
+++ b/managers/Medecin.class.php
@@ -0,0 +1,35 @@
+setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Medecins.php?type=creation");
+ $response->send();
+ }else{
+ $response = new Response(500);
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Medecins.php?type=error");
+ $response->send();
+ }
+ }
+
+ public function delete($params){
+ if(MedecinRepo::delete($params['id_medecin']) !==FALSE){
+ $response = new Response();
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Medecins.php?type=supression");
+ $response->send();
+ }else{
+ $response = new Response(500);
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Medecins.php?type=error");
+ $response->send();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/managers/Patient.class.php b/managers/Patient.class.php
new file mode 100644
index 0000000..c75dfe5
--- /dev/null
+++ b/managers/Patient.class.php
@@ -0,0 +1,51 @@
+format('Y-m-d'),$params['lieu_naissance'],$params['num_secu'],$params['medecin_traitant']) !==FALSE){
+ $response = new Response();
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/index.php?type=creation");
+ $response->send();
+ }else{
+ $response = new Response(500);
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/index.php?type=error");
+ $response->send();
+ }
+ }
+
+ public function update($params){
+ $params['date_naissance'] = DateTime::createFromFormat('d-m-Y', $params['date_naissance']);
+ if(PatientRepo::update($params['id_patient'],$params['civilite'],strtolower($params['prenom']),strtolower($params['nom']),$params['adresse'],$params['adresse2'],$params['ville'],$params['cope_postal'],
+ $params['date_naissance']->format('Y-m-d'),$params['lieu_naissance'],$params['num_secu'],$params['medecin_traitant']) !==FALSE){
+ $response = new Response();
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/index.php?type=creation");
+ $response->send();
+ }else{
+ $response = new Response(500);
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/index.php?type=error");
+ $response->send();
+ }
+ }
+
+ public function delete($params){
+ if(PatientRepo::delete($params['id_patient']) !==FALSE){
+ $response = new Response();
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Patients.php?type=supression");
+ $response->send();
+ }else{
+ $response = new Response(500);
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Patients.php?type=error");
+ $response->send();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/managers/RDV.class.php b/managers/RDV.class.php
new file mode 100644
index 0000000..95ec47d
--- /dev/null
+++ b/managers/RDV.class.php
@@ -0,0 +1,49 @@
+format('Y-m-d').' '.$params['heure'].':00',$params['duree'],$params['id_patient'],$params['id_medecin']) !==FALSE){
+ $response = new Response();
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Consultation.php?type=creation");
+ $response->send();
+ }else{
+ $response = new Response(500);
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Consultation.php?type=error");
+ $response->send();
+ }
+ }
+
+ public function delete($params){
+ if(RDVRepo::delete($params['id_consultation']) !==FALSE){
+ $response = new Response();
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Consultation.php?type=supression");
+ $response->send();
+ }else{
+ $response = new Response(500);
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Consultation.php?type=error");
+ $response->send();
+ }
+ }
+
+ public function update($params){
+ $params['date'] = DateTime::createFromFormat('d-m-Y', $params['date']);
+ if(RDVRepo::updateDateTime($params['id_consultation'],$params['date']->format('Y-m-d').' '.$params['heure'].':00') !==FALSE){
+ $response = new Response();
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Consultation.php?type=maj");
+ $response->send();
+ }else{
+ $response = new Response(500);
+ $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Consultation.php?type=error");
+ $response->send();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/managers/Response.class.php b/managers/Response.class.php
index 7b63073..5e32c40 100644
--- a/managers/Response.class.php
+++ b/managers/Response.class.php
@@ -134,7 +134,7 @@ class Response{
/**
* Envoi les headers de la réponse (status et ceux potentiellement défnini par l'utilisateur)
*/
- public function sendHeader(){
+ private function sendHeader(){
//envoie le status de la requete (petit trick suivant l'architecture de PHP)
if (strpos(PHP_SAPI, 'cgi') === 0) {
header(sprintf('Status: %s', $this->Messages[$this->status]));
diff --git a/managers/config/managers.json b/managers/config/managers.json
index 1784fc1..407b7ab 100755
--- a/managers/config/managers.json
+++ b/managers/config/managers.json
@@ -1,98 +1,33 @@
{
- "Authentification": {
- "login":{"method": "authentification",
- "role": 3,
+ "Patient": {
+ "add":{"method": "add",
+ "role": 0,
"strict": false},
- "logout":{"method": "deconnection",
- "role": 3,
+ "delete":{"method": "delete",
+ "role": 0,
+ "strict": false},
+ "update":{"method": "update",
+ "role": 0,
"strict": false}
},
- "Eleves": {
- "listByGroup": {"method": "getByGroupe",
- "role": 2,
- "strict": false},
- "listAll": {"method": "getAll",
- "role": 2,
- "strict": false},
- "importFromExcel": {"method":"importFromFile",
- "role":1,
- "strict":true
- },
- "changeGroup": {"method":"changeGroup",
- "role":1,
- "strict":true
- },
- "search": {"method":"search",
- "role":2,
- "strict":false
- },
- "listByDiplome": {"method": "getByDiplome",
- "role": 2,
- "strict":false
- },
- "getByCorrecteurAndControle":{"method": "getElevesByControleAndCorrecteur",
- "role":1,
- "strict":false}
- },
- "Notes": {
- "insert": {"method": "insert",
- "role": 1,
- "strict": true},
- "listAllEleve": {"method": "getAllNoteEleve",
- "role": 3,
- "strict" : true},
- "listAllByModuleEleve": {"method": "getAllNoteModuleEleve",
- "role": 3,
- "strict" : true},
- "updateComment": {"method": "updateComment",
- "role": 1,
- "strict" : true},
- "updateNote": {"method": "updateNote",
- "role": 1,
- "strict" : true},
- "exportAll": {"method": "exportAllNotes",
- "role": 2,
- "strict" : false}
- },
-
- "MCC": {
- "importFromExcel": {"method": "importFromFile",
- "role": 1,
- "strict": true
- },
- "getUEByCode": {"method": "getUEByCode",
- "role": 3,
+ "RDV": {
+ "add": {"method": "add",
+ "role": 0,
"strict": false
},
- "getUEByDiplome": {"method": "getUEByDiplome",
- "role": 1,
- "strict": true
- },
- "getModuleByCode": {"method": "getModuleByCode",
- "role": 1,
- "strict": true
- },
- "getControleByCode": {"method": "getControleByCode",
- "role": 1,
- "strict": true
- },
- "getModuleByCodeUE": {"method": "getModuleByCodeUE",
- "role": 1,
- "strict": true
- },
- "getControleByCodeModule": {"method": "getControleByCodeModule",
- "role": 1,
- "strict": true
- }
+ "delete":{"method": "delete",
+ "role": 0,
+ "strict": false},
+ "updateDateTime":{"method": "update",
+ "role": 0,
+ "strict": false}
},
- "Prof":{"getByControle":{"method":"getByControle",
- "role" : 3,
- "strict": false
- },
- "setForCorrecteur":{"method":"setForControle",
- "role":1,
- "strict":true
- }
-
+ "Medecin":{
+ "add":{"method":"add",
+ "role":0,
+ "strict":false},
+ "delete":{"method": "delete",
+ "role": 0,
+ "strict": false}
}
}
diff --git a/src/config/users.json b/managers/config/users.json
similarity index 100%
rename from src/config/users.json
rename to managers/config/users.json
diff --git a/repositories/repos/PatientRepo.php b/repositories/repos/PatientRepo.php
index f68dda6..86e7c88 100755
--- a/repositories/repos/PatientRepo.php
+++ b/repositories/repos/PatientRepo.php
@@ -26,7 +26,7 @@ class PatientRepo
$dateNaissance = strtotime($dateNaissance);
$dateNaissance = Date('o-m-d',$dateNaissance);
- $req = StaticRepo::getConnexion()->prepare('INSERT INTO Patient VALUES (:civilite,:nom,:prenom,:adresse,:adresse2,:ville,:codePostal,:dateNaissance,:lieuNaissance,:numSecu,DEFAULT,:medecin)');
+ $req = StaticRepo::getConnexion()->prepare('INSERT INTO Patient VALUES (DEFAULT,:civilite,:nom,:prenom,:adresse,:adresse2,:ville,:codePostal,:dateNaissance,:lieuNaissance,:numSecu,:medecin)');
$result = $req->execute(['civilite' => $civilite,
'nom' => $nom,
'prenom' => $prenom,
@@ -43,6 +43,29 @@ class PatientRepo
}
+ public static function update($id,$civilite,$prenom,$nom,$adresse,$adresse2,$ville,$codePostal,$dateNaissance,$lieuNaissance,$numSecu,$medecinTraitant){
+ $dateNaissance = strtotime($dateNaissance);
+ $dateNaissance = Date('o-m-d',$dateNaissance);
+
+ $req = StaticRepo::getConnexion()->prepare('UPDATE Patient SET Civilite=:civilite,Nom=:nom,Prenom=:prenom,Adresse=:adresse,Adresse2=:adresse2,Ville=:ville,
+ CodePostal=:codePostal,DateNaissance=:dateNaissance,LieuNaissance=:lieuNaissance,NumSecuriteSociale=:numSecu,MedecinTraitant=:medecin WHERE Id=:id;');
+ $result = $req->execute(['civilite' => $civilite,
+ 'nom' => $nom,
+ 'prenom' => $prenom,
+ 'adresse' => $adresse,
+ 'adresse2' => $adresse2,
+ 'ville' => $ville,
+ 'codePostal' => $codePostal,
+ 'dateNaissance' => $dateNaissance,
+ 'lieuNaissance' => $lieuNaissance,
+ 'numSecu' => $numSecu,
+ 'medecin' => $medecinTraitant,
+ 'id' => $id]);
+ if($result){return StaticRepo::getConnexion()->lastInsertId();}
+ else{return false;}
+
+ }
+
public static function delete($idPatient){
$req = StaticRepo::getConnexion()->prepare('DELETE FROM Patient WHERE Patient.Id = :id');
diff --git a/src/Response.php b/src/Response.php
deleted file mode 100755
index 23e3971..0000000
--- a/src/Response.php
+++ /dev/null
@@ -1,202 +0,0 @@
- '100 Continue',
- 101 => '101 Switching Protocols',
- //Successful 2xx
- 200 => '200 OK',
- 201 => '201 Created',
- 202 => '202 Accepted',
- 203 => '203 Non-Authoritative Information',
- 204 => '204 No Content',
- 205 => '205 Reset Content',
- 206 => '206 Partial Content',
- 226 => '226 IM Used',
- //Redirection 3xx
- 300 => '300 Multiple Choices',
- 301 => '301 Moved Permanently',
- 302 => '302 Found',
- 303 => '303 See Other',
- 304 => '304 Not Modified',
- 305 => '305 Use Proxy',
- 306 => '306 (Unused)',
- 307 => '307 Temporary Redirect',
- //Client Error 4xx
- 400 => '400 Bad Request',
- 401 => '401 Unauthorized',
- 402 => '402 Payment Required',
- 403 => '403 Forbidden',
- 404 => '404 Not Found',
- 405 => '405 Method Not Allowed',
- 406 => '406 Not Acceptable',
- 407 => '407 Proxy Authentication Required',
- 408 => '408 Request Timeout',
- 409 => '409 Conflict',
- 410 => '410 Gone',
- 411 => '411 Length Required',
- 412 => '412 Precondition Failed',
- 413 => '413 Request Entity Too Large',
- 414 => '414 Request-URI Too Long',
- 415 => '415 Unsupported Media Type',
- 416 => '416 Requested Range Not Satisfiable',
- 417 => '417 Expectation Failed',
- 418 => '418 I\'m a teapot',
- 422 => '422 Unprocessable Entity',
- 423 => '423 Locked',
- 426 => '426 Upgrade Required',
- 428 => '428 Precondition Required',
- 429 => '429 Too Many Requests',
- 431 => '431 Request Header Fields Too Large',
- //Server Error 5xx
- 500 => '500 Internal Server Error',
- 501 => '501 Not Implemented',
- 502 => '502 Bad Gateway',
- 503 => '503 Service Unavailable',
- 504 => '504 Gateway Timeout',
- 505 => '505 HTTP Version Not Supported',
- 506 => '506 Variant Also Negotiates',
- 510 => '510 Not Extended',
- 511 => '511 Network Authentication Required'
- );
-
- /**
- * Constructeur de la Response
- * @param int $status status HTTP de la réponse (404,200,500, etc)
- * @param bool|false $stream Si la réponse est un stream (avtive/désactive les méthodes send/stream()
- * @param string $type type HTTP des données de retour
- * @param bool|true $clearBuffer si activé, vide le buffer avant chaque envoi de donnée (a pour effet de ne pas afficher les echo/printf)
- */
- public function __construct($status = 200,$stream = false,$type = 'application/json', $clearBuffer = false)
- {
- $this->status = $status;
- array_push($this->headers,['Content-Type',$type]);
-
- $this->config['clearBuffer'] = $clearBuffer;
- $this->config['stream'] = $stream;
- }
-
- /** Ajoute du contenu a la réponse qui sera envoyé (par stream() ou par send() )
- * @param $content contenu a ajouter a la réponse
- */
- public function write($content){
- $this->response .= $content;
- }
-
- /** Envoie une partie de réponse au client (doit être récupéré en ajax, aucun intéret sinon), chaque bloc de donéne envoyé est séparé par
- * un délimiteur ("//Block//" par défaut).ATTENTION: stream() vide la réponse (si on write() puis stream(), la réponse qu'il restera dans l'objet sera vide)
- * @param string $content contenu a envoyer (optionnel car on peut utiliser la méthode write pour le faire)
- * @throws Exception si la réponse n'est pas un stream
- */
- public function stream($content="",$delimiter = "//Block//"){
- //vérification que la réponse est un stream
- if(!$this->config['stream']){
- throw new Exception("Stream d'une réponse synchrone");
- }
- //si les headers ne sont pas encore envoyés, on le fait
- if(!headers_sent()){
- $this->sendHeader();
- }
- //si demandé, on clear le buffer avant d'envoyer
- if($this->config['clearBuffer']){
- ob_end_clean();
- if($GLOBALS['compression']){
- ob_start("ob_gzhandler");
- }else{
- ob_start();
- }
- }
- //on envoi le contenu de response et la variable content
- if($this->response!=""){
- echo $delimiter.$this->response;
- }if($content != ""){
- echo $delimiter.$content;
- }
- ob_flush();flush();
- $this->response = '';
- }
-
- /**
- * Envoi les headers de la réponse (status et ceux potentiellement défnini par l'utilisateur)
- */
- public function sendHeader(){
- //envoie le status de la requete (petit trick suivant l'architecture de PHP)
- if (strpos(PHP_SAPI, 'cgi') === 0) {
- header(sprintf('Status: %s', $this->Messages[$this->status]));
- } else {
- header(sprintf('HTTP/1.1 %s', $this->Messages[$this->status]));
- }
- //les autres headers
- foreach($this->headers as $header){
- header(sprintf('%s: %s',$header[0],$header[1]));
- }
- }
-
- /**
- * Défini un header qui sera envoyé
- * @param $header Nom du header
- * @param $value Valeur du header
- */
- public function setHeader($header,$value){
- array_push($this->headers,[$header,$value]);
- }
-
- /** Envoi la réponse et ferme la communication
- * @throws Exception si la réponse est un stream
- */
- public function send(){
- //vérification que la réponse n'est pas un stream
- if($this->config['stream']){
- throw new Exception("Envoi synchrone d'une réponse stream");
- }
- //si les headers ne sont pas encore envoyés, on le fait
- if(!headers_sent()){
- $this->sendHeader();
- }
- //si demandé, on clear le buffer avant d'envoyer
- if($this->config['clearBuffer']){
- ob_end_clean();
- if($GLOBALS['compression']){
- ob_start("ob_gzhandler");
- }else{
- ob_start();
- }
- }
- //envoi de la réponse
- echo $this->response;
- //fermeture de la communication
- header('Connection: close');
- header('Content-Length: '.ob_get_length());
- ob_end_flush();
- ob_flush();
- flush();
- //permet au reste du script de s'executer même si la réponse a été envoyé et que l'utilisateur interromp le script (changement de page, etc...)
- ignore_user_abort(true);
- }
-
- /**
- * @param int $status status HTTP de la réponse (404,200,500, etc)
- * @param $content
- * @param string $type
- */
- public static function quickResponse($status,$content,$type = 'application/json'){
- $response = new Response($status,false,$type);
- $response->write($content);
- $response->send();
- }
-}
diff --git a/test/PatientRepoTest.php b/test/PatientRepoTest.php
index ca78a82..99b2259 100644
--- a/test/PatientRepoTest.php
+++ b/test/PatientRepoTest.php
@@ -43,4 +43,12 @@ class PatientRepoTest extends PHPUnit_Framework_TestCase
$this->assertEquals(count($this->repo->getAll()),100);
}
+ public function testUpdate(){
+ $id = PatientRepo::add('M','Lucas','Mascaro','3 rue des fleurs qui sentent bon',NULL,'Pimpous-Les-Bains','31524','1996-11-19','Toulouse','123456789876543', 69);
+ $this->assertEquals(0,PatientRepo::update($id,'F','Lucas','Mascaro','3 rue des fleurs qui sentent bon','lol','Pimpous-Les-Bains','31524','1996-11-19','Toulouse','123456789876543', 69));
+ $patient = PatientRepo::getById($id);
+ $this->assertEquals('F',$patient['Civilite']);
+ PatientRepo::delete($id);
+ }
+
}
| | | |