-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Jeu 15 Mai 2014 à 15:49
-- Version du serveur: 5.6.12-log
-- Version de PHP: 5.4.12




--
-- Base de données: `clinimetre`
--
CREATE DATABASE IF NOT EXISTS `clinimetre` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE `clinimetre`;

-- --------------------------------------------------------

--
-- Structure de la table `aide`
--

CREATE TABLE IF NOT EXISTS `aide` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `libelle` varchar(100) NOT NULL,
  `localisation` varchar(100) NOT NULL,
  `id_champ` int(11) NOT NULL,
  `texte` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Structure de la table `donnees_grilles`
--

CREATE TABLE IF NOT EXISTS `donnees_grilles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_grille` int(11) NOT NULL,
  `id_champ` int(11) NOT NULL,
  `valeur` int(11) NOT NULL,
  `id_patient` int(11) NOT NULL,
  `id_docteur` int(11) NOT NULL,
  `id_etablissement` int(11) NOT NULL,
  `date` date NOT NULL,
  `texte` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1498 ;

--
-- Contenu de la table `donnees_grilles`
--

INSERT INTO `donnees_grilles` (`id`, `id_grille`, `id_champ`, `valeur`, `id_patient`, `id_docteur`, `id_etablissement`, `date`, `texte`) VALUES
(2, 1, 1, 1, 1, 1, 1, '2014-01-06', ''),
(3, 1, 2, 1, 1, 1, 1, '2013-12-04', ''),
(4, 1, 3, 5, 1, 1, 1, '2013-12-04', ''),
(5, 1, 4, 8, 1, 1, 1, '2013-12-04', ''),
(6, 1, 5, 9, 1, 1, 1, '2013-12-04', ''),
(7, 1, 6, 8, 1, 1, 1, '2013-12-04', ''),
(8, 1, 7, 8, 1, 1, 1, '2013-12-04', ''),
(9, 1, 8, 0, 1, 1, 1, '2013-12-04', ''),
(10, 1, 9, 8, 1, 1, 1, '2013-12-04', ''),
(11, 1, 10, 8, 1, 1, 1, '2013-12-04', ''),
(12, 1, 11, 7, 1, 1, 1, '2013-12-04', ''),
(13, 1, 12, 7, 1, 1, 1, '2013-12-04', ''),
(14, 1, 13, 8, 1, 1, 1, '2013-12-04', ''),
(15, 1, 14, 8, 1, 1, 1, '2013-12-04', ''),
(16, 1, 15, 7, 1, 1, 1, '2013-12-04', ''),
(17, 1, 16, 8, 1, 1, 1, '2013-12-04', ''),
(18, 1, 17, 8, 1, 1, 1, '2013-12-04', ''),
(19, 1, 18, 8, 1, 1, 1, '2013-12-04', ''),
(259, 1, 5, 9, 4, 1, 1, '2013-12-04', ''),
(260, 1, 3, 7, 4, 1, 1, '2013-12-04', ''),
(261, 1, 4, 8, 4, 1, 1, '2013-12-04', ''),
(263, 1, 17, 9, 4, 1, 1, '2013-12-04', ''),
(265, 1, 2, 9, 4, 1, 1, '2013-12-04', ''),
(266, 1, 1, 7, 4, 1, 1, '2013-12-04', ''),
(267, 1, 16, 9, 4, 1, 1, '2013-12-04', ''),
(269, 1, 12, 9, 4, 1, 1, '2013-12-04', ''),
(270, 1, 10, 9, 4, 1, 1, '2013-12-04', ''),
(271, 1, 11, 7, 4, 1, 1, '2013-12-04', ''),
(273, 1, 7, 5, 4, 1, 1, '2013-12-04', ''),
(275, 1, 14, 5, 4, 1, 1, '2013-12-04', ''),
(278, 1, 6, 8, 4, 1, 1, '2013-12-04', ''),
(304, 1, 18, 9, 4, 1, 1, '2013-12-04', ''),
(330, 1, 8, 9, 4, 1, 1, '2013-12-04', ''),
(385, 1, 13, 8, 4, 1, 1, '2013-12-04', ''),
(390, 1, 15, 6, 4, 1, 1, '2013-12-04', ''),
(391, 1, 9, 9, 4, 1, 1, '2013-12-04', ''),
(392, 1, 1, 7, 1, 1, 1, '2014-01-08', ''),
(393, 1, 2, 7, 1, 1, 1, '2014-01-08', ''),
(394, 1, 3, 4, 1, 1, 1, '2014-01-08', ''),
(395, 1, 4, 7, 1, 1, 1, '2014-01-08', ''),
(396, 1, 5, 3, 1, 1, 1, '2014-01-08', ''),
(397, 1, 6, 9, 1, 1, 1, '2014-01-08', ''),
(398, 1, 7, 3, 1, 1, 1, '2014-01-08', ''),
(399, 1, 8, 3, 1, 1, 1, '2014-01-08', ''),
(400, 1, 9, 3, 1, 1, 1, '2014-01-08', ''),
(401, 1, 10, 3, 1, 1, 1, '2014-01-08', ''),
(402, 1, 11, 3, 1, 1, 1, '2014-01-08', ''),
(403, 1, 12, 3, 1, 1, 1, '2014-01-08', ''),
(404, 1, 13, 3, 1, 1, 1, '2014-01-08', ''),
(405, 1, 14, 3, 1, 1, 1, '2014-01-08', ''),
(406, 1, 15, 7, 1, 1, 1, '2014-01-08', ''),
(407, 1, 16, 3, 1, 1, 1, '2014-01-08', ''),
(408, 1, 17, 3, 1, 1, 1, '2014-01-08', ''),
(409, 1, 18, 3, 1, 1, 1, '2014-01-08', ''),
(410, 1, 1, 1, 1, 1, 1, '2014-01-10', ''),
(411, 1, 2, 7, 1, 1, 1, '2014-01-10', ''),
(412, 1, 3, 4, 1, 1, 1, '2014-01-10', ''),
(413, 1, 4, 7, 1, 1, 1, '2014-01-10', ''),
(414, 1, 5, 3, 1, 1, 1, '2014-01-10', ''),
(415, 1, 6, 9, 1, 1, 1, '2014-01-10', ''),
(416, 1, 7, 3, 1, 1, 1, '2014-01-10', ''),
(417, 1, 8, 3, 1, 1, 1, '2014-01-10', ''),
(418, 1, 9, 3, 1, 1, 1, '2014-01-10', ''),
(419, 1, 10, 3, 1, 1, 1, '2014-01-10', ''),
(420, 1, 11, 3, 1, 1, 1, '2014-01-10', ''),
(421, 1, 12, 3, 1, 1, 1, '2014-01-10', ''),
(422, 1, 13, 3, 1, 1, 1, '2014-01-10', ''),
(423, 1, 14, 3, 1, 1, 1, '2014-01-10', ''),
(424, 1, 15, 7, 1, 1, 1, '2014-01-10', ''),
(425, 1, 16, 3, 1, 1, 1, '2014-01-10', ''),
(426, 1, 17, 3, 1, 1, 1, '2014-01-10', ''),
(427, 1, 18, 3, 1, 1, 1, '2014-01-10', ''),
(1447, 1, 1, 0, 11, 1, 1, '2014-01-23', ''),
(1448, 1, 2, 1, 11, 1, 1, '2014-01-23', ''),
(1449, 1, 3, 1, 11, 1, 1, '2014-01-23', ''),
(1450, 1, 4, 1, 11, 1, 1, '2014-01-23', ''),
(1451, 1, 5, 1, 11, 1, 1, '2014-01-23', ''),
(1452, 1, 6, 1, 11, 1, 1, '2014-01-23', ''),
(1453, 1, 7, 1, 11, 1, 1, '2014-01-23', ''),
(1454, 1, 8, 1, 11, 1, 1, '2014-01-23', ''),
(1455, 1, 9, 1, 11, 1, 1, '2014-01-23', ''),
(1456, 1, 10, 1, 11, 1, 1, '2014-01-23', ''),
(1457, 1, 11, 1, 11, 1, 1, '2014-01-23', ''),
(1458, 1, 12, 1, 11, 1, 1, '2014-01-23', ''),
(1459, 1, 13, 1, 11, 1, 1, '2014-01-23', ''),
(1460, 1, 14, 1, 11, 1, 1, '2014-01-23', ''),
(1461, 1, 15, 1, 11, 1, 1, '2014-01-23', ''),
(1462, 1, 16, 1, 11, 1, 1, '2014-01-23', ''),
(1463, 1, 17, 1, 11, 1, 1, '2014-01-23', ''),
(1464, 1, 18, 1, 11, 1, 1, '2014-01-23', ''),
(1465, 1, 1, 0, 1, 1, 1, '2014-01-23', ''),
(1466, 1, 1, 0, 12, 1, 1, '2014-01-24', ''),
(1467, 1, 2, 1, 12, 1, 1, '2014-01-24', ''),
(1468, 1, 3, 1, 12, 1, 1, '2014-01-24', ''),
(1469, 1, 4, 1, 12, 1, 1, '2014-01-24', ''),
(1470, 1, 5, 1, 12, 1, 1, '2014-01-24', ''),
(1471, 1, 6, 1, 12, 1, 1, '2014-01-24', ''),
(1472, 1, 7, 1, 12, 1, 1, '2014-01-24', ''),
(1473, 1, 8, 1, 12, 1, 1, '2014-01-24', ''),
(1474, 1, 9, 1, 12, 1, 1, '2014-01-24', ''),
(1475, 1, 10, 1, 12, 1, 1, '2014-01-24', ''),
(1476, 1, 11, 1, 12, 1, 1, '2014-01-24', ''),
(1477, 1, 12, 1, 12, 1, 1, '2014-01-24', ''),
(1478, 1, 13, 1, 12, 1, 1, '2014-01-24', ''),
(1479, 1, 14, 1, 12, 1, 1, '2014-01-24', ''),
(1480, 1, 15, 1, 12, 1, 1, '2014-01-24', ''),
(1481, 1, 16, 1, 12, 1, 1, '2014-01-24', ''),
(1482, 1, 17, 1, 12, 1, 1, '2014-01-24', ''),
(1483, 1, 18, 1, 12, 1, 1, '2014-01-24', ''),
(1484, 1, 1, 0, 4, 1, 1, '2014-05-10', ''),
(1485, 1, 0, 0, 1, 1, 1, '2014-05-15', ''),
(1486, 1, 1, 7, 1, 1, 1, '2014-05-15', ''),
(1487, 1, 0, 0, 12, 1, 1, '2014-05-15', ''),
(1488, 1, 1, 8, 12, 1, 1, '2014-05-15', ''),
(1489, 2, 0, 0, 1, 1, 1, '2014-05-15', ''),
(1490, 2, 1, 9, 1, 1, 1, '2014-05-15', ''),
(1491, 2, 2, 1, 1, 1, 1, '2014-05-15', ''),
(1492, 3, 0, 0, 1, 1, 1, '2014-05-15', ''),
(1493, 3, 1, 8, 1, 1, 1, '2014-05-15', ''),
(1494, 3, 2, 1, 1, 1, 1, '2014-05-15', ''),
(1495, 3, 3, 10, 1, 1, 1, '2014-05-15', ''),
(1496, 3, 5, 10, 1, 1, 1, '2014-05-15', ''),
(1497, 3, 7, 10, 1, 1, 1, '2014-05-15', '');

-- --------------------------------------------------------

--
-- Structure de la table `etablissement`
--

CREATE TABLE IF NOT EXISTS `etablissement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `libelle` tinytext NOT NULL,
  `description` text NOT NULL,
  `codeconfi` tinytext NOT NULL,
  `nb_cnx_max` int(11) NOT NULL DEFAULT '1000',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Contenu de la table `etablissement`
--

INSERT INTO `etablissement` (`id`, `libelle`, `description`, `codeconfi`, `nb_cnx_max`) VALUES
(1, 'Hopital Drome Nord', 'Hopital de Romans-sur-Isère (26)\r\n607 avenue Genevieve de Gaulle-Anthonioz, B.P. 1002, 26102 Romans-sur-Isere cedex', 'confi', 1000);

-- --------------------------------------------------------

--
-- Structure de la table `grillesfonctions`
--

CREATE TABLE IF NOT EXISTS `grillesfonctions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_grille` int(11) NOT NULL,
  `id_fonction` int(11) NOT NULL,
  `ordre` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=44 ;

--
-- Contenu de la table `grillesfonctions`
--

INSERT INTO `grillesfonctions` (`id`, `id_grille`, `id_fonction`, `ordre`) VALUES
(1, 1, 1, 0),
(2, 1, 2, 0),
(3, 1, 3, 0),
(4, 1, 4, 0),
(5, 1, 5, 0),
(6, 1, 6, 0),
(7, 1, 7, 0),
(8, 1, 8, 0),
(9, 1, 9, 0),
(10, 1, 10, 0),
(11, 1, 11, 0),
(12, 1, 12, 0),
(13, 1, 13, 0),
(14, 1, 14, 0),
(15, 1, 15, 0),
(16, 1, 16, 0),
(17, 1, 17, 0),
(18, 1, 18, 0),
(19, 3, 1, 0),
(20, 3, 2, 0),
(21, 3, 3, 0),
(22, 3, 4, 0),
(23, 3, 5, 0),
(24, 3, 6, 0),
(25, 3, 7, 0),
(26, 3, 8, 0),
(27, 2, 1, 0),
(28, 2, 2, 0),
(29, 2, 3, 0),
(30, 2, 4, 0),
(31, 2, 5, 0),
(32, 2, 6, 0),
(33, 2, 7, 0),
(34, 2, 8, 0),
(35, 2, 9, 0),
(36, 2, 10, 0),
(37, 2, 11, 0),
(38, 2, 12, 0),
(39, 2, 13, 0),
(40, 2, 14, 0),
(41, 2, 15, 0),
(42, 2, 16, 0),
(43, 2, 17, 0);

-- --------------------------------------------------------

--
-- Structure de la table `libdesc_grille`
--

CREATE TABLE IF NOT EXISTS `libdesc_grille` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_grille` int(11) NOT NULL,
  `libelle_champ` tinytext NOT NULL,
  `description_champ` tinytext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=44 ;

--
-- Contenu de la table `libdesc_grille`
--

INSERT INTO `libdesc_grille` (`id`, `id_grille`, `libelle_champ`, `description_champ`) VALUES
(1, 1, 'alimentation', 'Alimentation'),
(2, 1, 't_haut', 'T haut'),
(3, 1, 't_bas', 'T bas'),
(4, 1, 'h_haut', 'H haut'),
(5, 1, 'h_moyen', 'H moyen'),
(6, 1, 'h_bas', 'H bas'),
(7, 1, 'elimin_urine', 'Elim urines'),
(8, 1, 'elimin_fecale', 'Elimination fecale'),
(9, 1, 'transferts', 'Transferts'),
(10, 1, 'repaire_espace', 'Repaire espace'),
(11, 1, 'dep_int', 'Dep interieur'),
(12, 1, 'dep_ext', 'Dep exterieur'),
(13, 1, 'communic', 'Communication'),
(14, 1, 'alerter', 'Alerter'),
(15, 1, 'comporte', 'Comportement'),
(16, 1, 'suivi_trt', 'Suivi du traitement'),
(17, 1, 'orient_temps', 'Orientation temporelle'),
(18, 1, 'manger_prepares', 'Manger prepares'),
(19, 3, 'Alimentation', 'Alimentation'),
(20, 3, 'S.de l''apparence', 'Soins de l''apparence'),
(21, 3, 'Toilette', 'Toilette'),
(22, 3, 'Hab.sup', 'Habillage_sup'),
(23, 3, 'Hab.inf', 'Habillage_inf'),
(24, 3, 'Util.Toil', 'Utilisation toilettes'),
(25, 3, 'Vessie', 'Vessie'),
(26, 3, 'Intestin', 'Intestin'),
(27, 2, 'Alimentation', 'Alimentation'),
(28, 2, 'Soins_app', 'Soins_app'),
(29, 2, 'Toilette', 'Toilette'),
(30, 2, 'Habillage_Sup', 'Habillage_Sup'),
(31, 2, 'Habillage_inf', 'Habillage_inf'),
(32, 2, 'Util_toilettes', 'Util_toilettes'),
(33, 2, 'Vessie', 'Vessie'),
(34, 2, 'Intestin', 'Intestin'),
(35, 2, 'Lit_chaise_fR', 'Lit_chaise_fR'),
(36, 2, 'WC', 'WC'),
(37, 2, 'Baignoire_douche', 'Baignoire_douche'),
(38, 2, 'Marche_fR', 'Marche_fR'),
(39, 2, 'Escaliers', 'Escaliers'),
(40, 2, 'Compréhension_Aud', 'Compréhension_Aud'),
(41, 2, 'Expression_ver', 'Expression_ver'),
(42, 2, 'Inter_sociale', 'Inter_sociale'),
(43, 2, 'Résolution_prob', 'Résolution_prob');

-- --------------------------------------------------------

--
-- Structure de la table `liste_grilles`
--

CREATE TABLE IF NOT EXISTS `liste_grilles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `libelle` tinytext NOT NULL,
  `description` text NOT NULL,
  `lvlgrillemin` char(1) NOT NULL,
  `lvlgrillemax` char(1) NOT NULL,
  `seuil` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Contenu de la table `liste_grilles`
--

INSERT INTO `liste_grilles` (`id`, `libelle`, `description`, `lvlgrillemin`, `lvlgrillemax`, `seuil`) VALUES
(1, 'MIF', 'Grille MIF', '1', '7', 63),
(2, 'AGGIR', 'Grille AGGIR', '1', '6', 0),
(3, 'HAD', '', '1', '4', 0);

-- --------------------------------------------------------

--
-- Structure de la table `objectifs`
--

CREATE TABLE IF NOT EXISTS `objectifs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_grille` int(11) NOT NULL,
  `id_champ` int(11) NOT NULL,
  `valeur` int(11) NOT NULL,
  `id_patient` int(11) NOT NULL,
  `id_docteur` int(11) NOT NULL,
  `id_etablissement` int(11) NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=400 ;

--
-- Contenu de la table `objectifs`
--

INSERT INTO `objectifs` (`id`, `id_grille`, `id_champ`, `valeur`, `id_patient`, `id_docteur`, `id_etablissement`, `date`) VALUES
(179, 1, 1, 8, 4, 1, 1, '2013-12-23'),
(180, 1, 2, 2, 4, 1, 1, '2013-12-23'),
(181, 1, 3, 7, 4, 1, 1, '2013-12-23'),
(182, 1, 4, 8, 4, 1, 1, '2013-12-23'),
(183, 1, 5, 9, 4, 1, 1, '2013-12-23'),
(184, 1, 6, 9, 4, 1, 1, '2013-12-23'),
(185, 1, 7, 9, 4, 1, 1, '2013-12-23'),
(186, 1, 8, 0, 4, 1, 1, '2013-12-23'),
(187, 1, 9, 6, 4, 1, 1, '2013-12-23'),
(188, 1, 10, 9, 4, 1, 1, '2013-12-23'),
(189, 1, 11, 7, 4, 1, 1, '2013-12-23'),
(190, 1, 12, 9, 4, 1, 1, '2013-12-23'),
(191, 1, 13, 9, 4, 1, 1, '2013-12-23'),
(192, 1, 14, 5, 4, 1, 1, '2013-12-23'),
(193, 1, 15, 9, 4, 1, 1, '2013-12-23'),
(194, 1, 16, 9, 4, 1, 1, '2013-12-23'),
(195, 1, 17, 0, 4, 1, 1, '2013-12-23'),
(196, 1, 18, 8, 4, 1, 1, '2013-12-23'),
(197, 1, 1, 8, 4, 1, 1, '2013-12-23'),
(198, 1, 14, 9, 4, 1, 1, '2013-12-23'),
(199, 1, 2, 9, 4, 1, 1, '2013-12-23'),
(200, 1, 5, 9, 4, 1, 1, '2013-12-23'),
(201, 1, 6, 9, 4, 1, 1, '2013-12-23'),
(202, 1, 7, 9, 4, 1, 1, '2013-12-23'),
(203, 1, 8, 0, 4, 1, 1, '2013-12-23'),
(204, 1, 16, 7, 4, 1, 1, '2013-12-23'),
(205, 1, 17, 9, 4, 1, 1, '2013-12-23'),
(206, 1, 16, 8, 4, 1, 1, '2013-12-23'),
(207, 1, 14, 8, 4, 1, 1, '2013-12-23'),
(208, 1, 17, 7, 4, 1, 1, '2013-12-23'),
(209, 1, 18, 8, 4, 1, 1, '2013-12-23'),
(210, 1, 18, 8, 4, 1, 1, '2013-12-23'),
(211, 1, 15, 7, 4, 1, 1, '2013-12-23'),
(212, 1, 14, 8, 4, 1, 1, '2013-12-23'),
(213, 1, 13, 6, 4, 1, 1, '2013-12-23'),
(214, 1, 14, 6, 4, 1, 1, '2013-12-23'),
(215, 1, 15, 9, 4, 1, 1, '2013-12-23'),
(216, 1, 16, 8, 4, 1, 1, '2013-12-23'),
(217, 1, 17, 8, 4, 1, 1, '2013-12-23'),
(218, 1, 18, 8, 4, 1, 1, '2013-12-23'),
(219, 1, 1, 8, 4, 1, 1, '2013-12-23'),
(220, 1, 18, 5, 4, 1, 1, '2013-12-23'),
(221, 1, 17, 5, 4, 1, 1, '2013-12-23'),
(222, 1, 17, 8, 4, 1, 1, '2013-12-23'),
(223, 1, 1, 8, 4, 1, 1, '2013-12-23'),
(224, 1, 4, 6, 4, 1, 1, '2013-12-23'),
(225, 1, 3, 6, 4, 1, 1, '2013-12-23'),
(226, 1, 2, 9, 4, 1, 1, '2013-12-23'),
(227, 1, 13, 9, 4, 1, 1, '2013-12-23'),
(228, 1, 12, 8, 4, 1, 1, '2013-12-23'),
(229, 1, 12, 2, 4, 1, 1, '2013-12-23'),
(230, 1, 13, 8, 4, 1, 1, '2013-12-23'),
(231, 1, 16, 7, 4, 1, 1, '2013-12-23'),
(232, 1, 17, 7, 4, 1, 1, '2013-12-23'),
(233, 1, 18, 8, 4, 1, 1, '2013-12-23'),
(234, 1, 1, 3, 14, 1, 1, '0000-00-00'),
(235, 1, 2, 0, 14, 1, 1, '0000-00-00'),
(236, 1, 3, 0, 14, 1, 1, '0000-00-00'),
(237, 1, 4, 0, 14, 1, 1, '0000-00-00'),
(238, 1, 5, 0, 14, 1, 1, '0000-00-00'),
(239, 1, 6, 0, 14, 1, 1, '0000-00-00'),
(240, 1, 7, 0, 14, 1, 1, '0000-00-00'),
(241, 1, 8, 0, 14, 1, 1, '0000-00-00'),
(242, 1, 9, 0, 14, 1, 1, '0000-00-00'),
(243, 1, 10, 0, 14, 1, 1, '0000-00-00'),
(244, 1, 11, 0, 14, 1, 1, '0000-00-00'),
(245, 1, 12, 0, 14, 1, 1, '0000-00-00'),
(246, 1, 13, 0, 14, 1, 1, '0000-00-00'),
(247, 1, 14, 0, 14, 1, 1, '0000-00-00'),
(248, 1, 15, 0, 14, 1, 1, '0000-00-00'),
(249, 1, 16, 0, 14, 1, 1, '0000-00-00'),
(250, 1, 17, 0, 14, 1, 1, '0000-00-00'),
(251, 1, 18, 0, 14, 1, 1, '0000-00-00'),
(252, 1, 1, 7, 16, 1, 1, '2013-12-10'),
(253, 1, 2, 6, 16, 1, 1, '2013-12-10'),
(254, 1, 3, 9, 16, 1, 1, '2013-12-10'),
(255, 1, 4, 0, 16, 1, 1, '2013-12-10'),
(256, 1, 5, 6, 16, 1, 1, '2013-12-10'),
(257, 1, 6, 2, 16, 1, 1, '2013-12-10'),
(258, 1, 7, 8, 16, 1, 1, '2013-12-10'),
(259, 1, 8, 8, 16, 1, 1, '2013-12-10'),
(260, 1, 9, 8, 16, 1, 1, '2013-12-10'),
(261, 1, 10, 9, 16, 1, 1, '2013-12-10'),
(262, 1, 11, 8, 16, 1, 1, '2013-12-10'),
(263, 1, 12, 8, 16, 1, 1, '2013-12-10'),
(264, 1, 13, 3, 16, 1, 1, '2013-12-10'),
(265, 1, 14, 8, 16, 1, 1, '2013-12-10'),
(266, 1, 15, 8, 16, 1, 1, '2013-12-10'),
(267, 1, 16, 8, 16, 1, 1, '2013-12-10'),
(268, 1, 17, 8, 16, 1, 1, '2013-12-10'),
(269, 1, 18, 8, 16, 1, 1, '2013-12-10'),
(270, 1, 1, 8, 4, 1, 1, '2013-12-23'),
(271, 1, 1, 9, 4, 1, 1, '2013-12-23'),
(272, 1, 18, 9, 4, 1, 1, '2013-12-23'),
(273, 1, 18, 9, 4, 1, 1, '2013-12-23'),
(274, 1, 17, 9, 4, 1, 1, '2013-12-23'),
(275, 1, 16, 9, 4, 1, 1, '2013-12-23'),
(276, 1, 15, 9, 4, 1, 1, '2013-12-23'),
(277, 1, 14, 9, 4, 1, 1, '2013-12-23'),
(278, 1, 13, 9, 4, 1, 1, '2013-12-23'),
(279, 1, 13, 9, 4, 1, 1, '2013-12-23'),
(280, 1, 13, 9, 4, 1, 1, '2013-12-23'),
(281, 1, 13, 9, 4, 1, 1, '2013-12-23'),
(282, 1, 18, 4, 4, 1, 1, '2013-12-23'),
(283, 1, 18, 4, 4, 1, 1, '2013-12-23'),
(284, 1, 18, 8, 4, 1, 1, '2013-12-23'),
(285, 1, 1, 8, 14, 1, 1, '0000-00-00'),
(286, 1, 1, 6, 14, 1, 1, '0000-00-00'),
(287, 1, 1, 7, 14, 1, 1, '0000-00-00'),
(288, 1, 1, 7, 14, 1, 1, '0000-00-00'),
(289, 1, 1, 7, 14, 1, 1, '0000-00-00'),
(290, 1, 1, 5, 14, 1, 1, '0000-00-00'),
(291, 1, 1, 9, 14, 1, 1, '0000-00-00'),
(292, 1, 18, 0, 14, 1, 1, '0000-00-00'),
(293, 1, 18, 9, 14, 1, 1, '0000-00-00'),
(294, 1, 1, 9, 20, 1, 1, '0000-00-00'),
(295, 1, 18, 9, 20, 1, 1, '0000-00-00'),
(296, 1, 17, 9, 20, 1, 1, '0000-00-00'),
(297, 1, 1, 9, 20, 1, 1, '2013-11-28'),
(298, 1, 6, 9, 20, 1, 1, '2013-11-28'),
(299, 1, 7, 9, 20, 1, 1, '2013-11-28'),
(300, 1, 8, 8, 20, 1, 1, '2013-11-28'),
(301, 1, 12, 9, 20, 1, 1, '2013-11-28'),
(302, 1, 13, 9, 20, 1, 1, '2013-11-28'),
(303, 1, 14, 9, 20, 1, 1, '2013-11-28'),
(304, 1, 16, 9, 20, 1, 1, '2013-11-28'),
(305, 1, 18, 9, 20, 1, 1, '2013-11-28'),
(306, 1, 3, 9, 20, 1, 1, '2013-11-28'),
(307, 1, 4, 9, 20, 1, 1, '2013-11-28'),
(308, 1, 5, 9, 20, 1, 1, '2013-11-28'),
(309, 1, 9, 9, 20, 1, 1, '2013-11-28'),
(310, 1, 10, 9, 20, 1, 1, '2013-11-28'),
(311, 1, 11, 8, 20, 1, 1, '2013-11-28'),
(312, 1, 1, 1, 14, 1, 1, '0000-00-00'),
(313, 1, 1, 1, 14, 1, 1, '0000-00-00'),
(314, 1, 1, 2, 14, 1, 1, '0000-00-00'),
(315, 1, 1, 3, 14, 1, 1, '0000-00-00'),
(316, 1, 1, 4, 14, 1, 1, '0000-00-00'),
(317, 1, 1, 5, 14, 1, 1, '0000-00-00'),
(318, 1, 1, 6, 14, 1, 1, '0000-00-00'),
(319, 1, 1, 7, 14, 1, 1, '0000-00-00'),
(320, 1, 1, 2, 14, 1, 1, '0000-00-00'),
(321, 1, 1, 2, 14, 1, 1, '0000-00-00'),
(322, 1, 1, 2, 14, 1, 1, '0000-00-00'),
(323, 1, 1, 1, 14, 1, 1, '0000-00-00'),
(324, 1, 1, 8, 14, 1, 1, '0000-00-00'),
(325, 1, 1, 7, 14, 1, 1, '0000-00-00'),
(326, 1, 15, 3, 14, 1, 1, '0000-00-00'),
(327, 1, 12, 6, 14, 1, 1, '0000-00-00'),
(328, 1, 12, 7, 14, 1, 1, '0000-00-00'),
(329, 1, 12, 1, 14, 1, 1, '0000-00-00'),
(330, 1, 15, 0, 14, 1, 1, '0000-00-00'),
(331, 1, 17, 3, 14, 1, 1, '0000-00-00'),
(332, 1, 17, 1, 14, 1, 1, '0000-00-00'),
(333, 1, 3, 9, 14, 1, 1, '0000-00-00'),
(334, 1, 16, 4, 14, 1, 1, '2013-11-29'),
(335, 1, 15, 5, 14, 1, 1, '2013-11-29'),
(336, 1, 10, 4, 14, 1, 1, '2013-11-29'),
(337, 1, 7, 4, 14, 1, 1, '2013-11-29'),
(338, 1, 8, 2, 14, 1, 1, '0000-00-00'),
(339, 1, 2, 9, 14, 1, 1, '0000-00-00'),
(340, 1, 2, 9, 4, 1, 1, '2013-12-23'),
(341, 1, 1, 9, 4, 1, 1, '2013-12-23'),
(342, 1, 2, 9, 4, 1, 1, '2013-12-23'),
(343, 1, 4, 9, 4, 1, 1, '2013-12-23'),
(344, 1, 18, 9, 4, 1, 1, '2013-12-23'),
(345, 1, 4, 9, 4, 1, 1, '2013-12-23'),
(346, 1, 2, 9, 4, 1, 1, '2013-12-23'),
(347, 1, 1, 9, 4, 1, 1, '2013-12-23'),
(348, 1, 18, 9, 4, 1, 1, '2013-12-23'),
(349, 1, 17, 7, 4, 1, 1, '2013-12-23'),
(350, 1, 6, 8, 4, 1, 1, '2013-12-23'),
(351, 1, 7, 8, 4, 1, 1, '2013-12-23'),
(352, 1, 8, 7, 4, 1, 1, '2013-12-23'),
(353, 1, 9, 7, 4, 1, 1, '2013-12-23'),
(354, 1, 13, 9, 4, 1, 1, '2013-12-23'),
(355, 1, 1, 2, 4, 1, 1, '2013-12-23'),
(356, 1, 1, 8, 4, 1, 1, '2013-12-23'),
(357, 1, 1, 3, 4, 1, 1, '2013-12-23'),
(358, 1, 18, 1, 4, 1, 1, '2013-12-23'),
(359, 1, 17, 8, 4, 1, 1, '2013-12-23'),
(360, 1, 16, 7, 4, 1, 1, '2013-12-23'),
(361, 1, 15, 7, 4, 1, 1, '2013-12-23'),
(362, 1, 15, 5, 4, 1, 1, '2013-12-23'),
(363, 1, 13, 9, 4, 1, 1, '2013-12-23'),
(364, 1, 18, 9, 4, 1, 1, '2013-12-23'),
(365, 1, 18, 9, 4, 1, 1, '2013-12-23'),
(366, 1, 1, 0, 4, 1, 1, '2013-12-23'),
(367, 1, 1, 0, 4, 1, 1, '2013-12-23'),
(368, 1, 1, 3, 4, 1, 1, '2013-12-23'),
(369, 1, 1, 9, 4, 1, 1, '2013-12-23'),
(370, 1, 17, 5, 4, 1, 1, '2013-12-23'),
(371, 1, 16, 3, 4, 1, 1, '2013-12-23'),
(372, 1, 16, 3, 4, 1, 1, '2013-12-23'),
(373, 1, 16, 0, 4, 1, 1, '2013-12-23'),
(374, 1, 18, 5, 4, 1, 1, '2013-12-23'),
(375, 1, 7, 7, 4, 1, 1, '2013-12-23'),
(376, 1, 10, 4, 4, 1, 1, '2013-12-23'),
(377, 1, 10, 0, 4, 1, 1, '2013-12-23'),
(378, 1, 10, 0, 4, 1, 1, '2013-12-23'),
(379, 1, 10, 0, 4, 1, 1, '2013-12-23'),
(380, 1, 1, 0, 4, 1, 1, '2013-12-23'),
(381, 1, 6, 0, 4, 1, 1, '2013-12-23'),
(382, 1, 1, 1, 1, 1, 1, '2014-01-21'),
(383, 1, 2, 1, 1, 1, 1, '2014-01-21'),
(384, 1, 3, 5, 1, 1, 1, '2014-01-21'),
(385, 1, 4, 8, 1, 1, 1, '2014-01-21'),
(386, 1, 5, 9, 1, 1, 1, '2014-01-21'),
(387, 1, 6, 8, 1, 1, 1, '2014-01-21'),
(388, 1, 7, 8, 1, 1, 1, '2014-01-21'),
(389, 1, 8, 0, 1, 1, 1, '2014-01-21'),
(390, 1, 9, 8, 1, 1, 1, '2014-01-21'),
(391, 1, 10, 8, 1, 1, 1, '2014-01-21'),
(392, 1, 11, 7, 1, 1, 1, '2014-01-21'),
(393, 1, 12, 7, 1, 1, 1, '2014-01-21'),
(394, 1, 13, 8, 1, 1, 1, '2014-01-21'),
(395, 1, 14, 8, 1, 1, 1, '2014-01-21'),
(396, 1, 15, 7, 1, 1, 1, '2014-01-21'),
(397, 1, 16, 8, 1, 1, 1, '2014-01-21'),
(398, 1, 17, 8, 1, 1, 1, '2014-01-21'),
(399, 1, 18, 8, 1, 1, 1, '2014-01-21');

-- --------------------------------------------------------

--
-- Structure de la table `parametre`
--

CREATE TABLE IF NOT EXISTS `parametre` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_etablissement` int(11) NOT NULL,
  `thermo` int(11) NOT NULL,
  `taille` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Contenu de la table `parametre`
--

INSERT INTO `parametre` (`id`, `id_etablissement`, `thermo`, `taille`) VALUES
(1, 1, 3, 2);

-- --------------------------------------------------------

--
-- Structure de la table `patient`
--

CREATE TABLE IF NOT EXISTS `patient` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_docteur` int(11) NOT NULL,
  `sexe` char(1) NOT NULL,
  `nom` tinytext NOT NULL,
  `prenom` tinytext NOT NULL,
  `date_naissance` date NOT NULL,
  `adresse` tinytext NOT NULL,
  `ville` tinytext NOT NULL,
  `chambre` tinytext NOT NULL,
  `num_dossier` tinytext NOT NULL,
  `Localisation` tinytext NOT NULL,
  `Service` tinytext NOT NULL,
  `num_SS` tinytext NOT NULL,
  `dc1` varchar(100) NOT NULL,
  `dc2` varchar(100) NOT NULL,
  `dc3` varchar(100) NOT NULL,
  `texte` tinytext NOT NULL,
  `confidentiel` tinyint(1) NOT NULL DEFAULT '1',
  `voir_dossier` tinyint(1) NOT NULL DEFAULT '0',
  `type_surveillance` varchar(100) NOT NULL,
  `groupe_malade` varchar(100) NOT NULL,
  `freq_surveillance` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;

--
-- Contenu de la table `patient`
--

INSERT INTO `patient` (`id`, `id_docteur`, `sexe`, `nom`, `prenom`, `date_naissance`, `adresse`, `ville`, `chambre`, `num_dossier`, `Localisation`, `Service`, `num_SS`, `dc1`, `dc2`, `dc3`, `texte`, `confidentiel`, `voir_dossier`, `type_surveillance`, `groupe_malade`, `freq_surveillance`) VALUES
(1, 1, 'H', 'Mazouyer', 'Cyril', '1991-06-09', '', '', '', '1', '', '', '', '', '', '', '', 1, 0, '', '', ''),
(4, 1, 'H', 'mathieu', 'jean', '2013-11-15', 'rie de la dime', 'montrottier', '13005', '2', '', '', '', '', '', '', '', 1, 0, '', '', ''),
(11, 1, 'H', 'Cessou', 'Cyril', '1990-04-09', 'rue coucoulan', 'saint-etienne', '54654', '9', '', '', '', '', '', '', '', 1, 0, '', '', ''),
(12, 1, 'H', 'DÃ©dÃ©', 'Doudou', '0005-05-05', 'LÃ ', 'Ici', '54146', '545', '', '', '', '', '', '', '', 1, 0, '', '', '');

-- --------------------------------------------------------

--
-- Structure de la table `questions`
--

CREATE TABLE IF NOT EXISTS `questions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_grille` int(11) NOT NULL,
  `id_question` int(11) NOT NULL,
  `reponse` tinyint(1) NOT NULL,
  `id_patient` int(11) NOT NULL,
  `id_docteur` int(11) NOT NULL,
  `id_etablissement` int(11) NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=33 ;

--
-- Contenu de la table `questions`
--

INSERT INTO `questions` (`id`, `id_grille`, `id_question`, `reponse`, `id_patient`, `id_docteur`, `id_etablissement`, `date`) VALUES
(1, 1, 1, 1, 1, 1, 1, '2013-11-18'),
(2, 1, 2, 0, 1, 1, 1, '2013-11-18'),
(3, 1, 3, 1, 1, 1, 1, '2013-11-18'),
(4, 1, 1, 1, 16, 1, 1, '2013-11-21'),
(5, 1, 2, 0, 16, 1, 1, '2013-11-21'),
(6, 1, 3, 1, 16, 1, 1, '2013-11-21'),
(7, 1, 1, 1, 4, 1, 1, '2013-11-21'),
(8, 1, 2, 1, 4, 1, 1, '2013-11-21'),
(9, 1, 3, 1, 4, 1, 1, '2013-11-21'),
(10, 1, 1, 1, 4, 1, 1, '2013-11-22'),
(11, 1, 2, 1, 4, 1, 1, '2013-11-22'),
(12, 1, 3, 1, 4, 1, 1, '2013-11-22'),
(13, 1, 1, 1, 4, 1, 1, '2013-11-23'),
(14, 1, 3, 1, 4, 1, 1, '2013-11-23'),
(15, 1, 2, 1, 4, 1, 1, '2013-11-23'),
(16, 1, 2, 5, 4, 1, 1, '2013-11-24'),
(17, 1, 3, 3, 4, 1, 1, '2013-11-24'),
(18, 1, 3, 41, 4, 1, 1, '2013-11-27'),
(19, 1, 2, 0, 4, 1, 1, '2013-11-27'),
(20, 1, 1, 0, 4, 1, 1, '2013-11-27'),
(21, 1, 3, 0, 4, 1, 1, '2013-11-28'),
(22, 1, 1, 0, 14, 1, 1, '2013-11-29'),
(23, 1, 2, 0, 4, 1, 1, '2013-11-30'),
(24, 1, 3, 0, 4, 1, 1, '2013-11-30'),
(25, 1, 1, 0, 4, 1, 1, '2013-11-30'),
(26, 1, 1, 0, 14, 1, 1, '2013-12-12'),
(27, 1, 2, 0, 14, 1, 1, '2013-12-12'),
(28, 1, 3, 0, 14, 1, 1, '2013-12-12'),
(29, 1, 3, 127, 20, 1, 1, '2013-12-22'),
(30, 1, 3, 5, 4, 1, 1, '2013-12-26'),
(31, 1, 2, 3, 4, 1, 1, '2013-12-26'),
(32, 1, 1, 2, 4, 1, 1, '2013-12-26');

-- --------------------------------------------------------

--
-- Structure de la table `test`
--

CREATE TABLE IF NOT EXISTS `test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idPatient` int(11) NOT NULL,
  `idGrille` int(11) NOT NULL,
  `donneesClinimetre` varchar(500) NOT NULL,
  `date` varchar(255) NOT NULL,
  `test` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=30 ;

--
-- Contenu de la table `test`
--

INSERT INTO `test` (`id`, `idPatient`, `idGrille`, `donneesClinimetre`, `date`, `test`) VALUES
(4, 1, 1, '1', '', 0),
(5, 1, 1, 'Array', '2014/01/08', 0),
(6, 1, 1, 'Array', '2014-01-08', 0),
(7, 1, 1, '1', '2014-01-08', 0),
(8, 1, 1, '6', '2014-01-08', 0),
(9, 1, 1, '6', '2014-01-08', 0),
(10, 1, 1, '4', '2014-01-08', 0),
(11, 1, 1, '4', '2014-01-08', 1),
(12, 1, 1, '4', '2014-01-08', 1),
(13, 1, 1, '4', '2014-01-08', 1),
(14, 1, 1, '3', '2014-01-08', 1),
(15, 1, 1, '2', '2014-01-08', 1),
(16, 1, 1, '4', '2014-01-08', 1),
(17, 1, 1, '4', '2014-01-08', 1),
(18, 1, 1, '4', '2014-01-08', 1),
(19, 1, 1, '4', '2014-01-08', 1),
(20, 1, 1, '3', '2014-01-08', 1),
(21, 1, 1, '2', '2014-01-08', 1),
(22, 1, 1, '2', '2014-01-08', 1),
(23, 1, 1, '2', '2014-01-08', 1),
(24, 1, 1, '2', '2014-01-08', 1),
(25, 1, 1, '3', '2014-01-08', 1),
(26, 1, 1, '7', '2014-01-08', 1),
(27, 1, 1, '7', '2014-01-08', 1),
(28, 1, 1, '7', '2014-01-10', 0),
(29, 1, 1, '7', '2014-01-10', 1);

-- --------------------------------------------------------

--
-- Structure de la table `trad_grilles`
--

CREATE TABLE IF NOT EXISTS `trad_grilles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_grille` int(11) NOT NULL,
  `valeur_grille` varchar(1) NOT NULL,
  `libelle_champ` tinytext NOT NULL,
  `description_champ` tinytext NOT NULL,
  `texte` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=27 ;

--
-- Contenu de la table `trad_grilles`
--

INSERT INTO `trad_grilles` (`id`, `id_grille`, `valeur_grille`, `libelle_champ`, `description_champ`, `texte`) VALUES
(1, 1, '1', 'aide_totale', 'AV / aide totale', ''),
(3, 1, '2', 'aide_maximale', 'AV / aide maximale', ''),
(4, 1, '3', 'aide_moyenne', 'AV / aide moyenne', ''),
(5, 1, '4', 'aide_minimale', 'AV / aide minimale', ''),
(6, 1, '5', 'surveillance', 'AV / surveillance', ''),
(7, 1, '6', 'indep_modifiee', 'AV / independance modifiee', ''),
(8, 1, '7', 'indep_complete', 'AV / independance complete', ''),
(11, 3, '1', 'assistance_totale', 'Assistance totale', ''),
(14, 3, '2', 'surveil_adaptation', 'AV / surveil./adaptation', ''),
(15, 3, '2', 'surveil', 'AV / surveillance', ''),
(16, 3, '4', 'indep_modifiee', 'indep_modifiee', ''),
(17, 3, '3', 'indep_complete', 'indep_complete', ''),
(20, 2, 'C', 'nfp', ' Ne fait pas', ''),
(21, 2, 'C', 'fait_25', 'Ne fait pas plus de 25%', ''),
(24, 2, 'B', 'nfp_STCH', 'Ne fait pas STCH', ''),
(25, 2, 'A', 'fait_avec_aide', 'Fait avec aide technique', ''),
(26, 2, 'A', 'fait_sans_adverbe', 'Fait sans aucun adverbe', '');

