-- phpMyAdmin SQL Dump
-- version 3.1.2deb1
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Dim 28 Juin 2009 à 11:29
-- Version du serveur: 5.0.75
-- Version de PHP: 5.2.6-3ubuntu4.1

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Base de données: `alcool3`
--

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

--
-- Structure de la table `activite`
--

CREATE TABLE IF NOT EXISTS `activite` (
  `id_consult` int(11) NOT NULL default '0',
  `id_act` tinyint(4) NOT NULL default '0',
  `act_prescrit` date NOT NULL default '0000-00-00',
  `act_effectue` date NOT NULL default '0000-00-00',
  KEY `id_consult` (`id_consult`),
  KEY `id_act` (`id_act`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `activite`
--


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

--
-- Structure de la table `alctab`
--

CREATE TABLE IF NOT EXISTS `alctab` (
  `id_consult` int(11) NOT NULL default '0',
  `alc_verre_jour` tinyint(4) NOT NULL default '0',
  `alc_jour_sem` tinyint(4) NOT NULL default '0',
  `alc_jour_mois` tinyint(4) NOT NULL default '0',
  `alc_an` tinyint(4) NOT NULL default '0',
  `alc_4_5_jour` tinyint(4) NOT NULL default '0',
  `alc_4_5_occ` tinyint(4) NOT NULL default '0',
  `alc_8_12_jour` tinyint(4) NOT NULL default '0',
  `alc_8_12_occ` tinyint(4) NOT NULL default '0',
  `alc_16_20_jour` tinyint(4) NOT NULL default '0',
  `alc_16_20_occ` tinyint(4) NOT NULL default '0',
  `alc_40_jour` tinyint(4) NOT NULL default '0',
  `alc_40_occ` tinyint(4) NOT NULL default '0',
  `alc_conso_sem` tinyint(4) NOT NULL default '0',
  `alc_conso_jour` tinyint(4) NOT NULL default '0',
  `alc_conso_occ` tinyint(4) NOT NULL default '0',
  `alc_audit` tinyint(4) NOT NULL default '0',
  `tab_conso` tinyint(4) NOT NULL default '0',
  `alc_objectif` tinyint(4) NOT NULL default '0',
  KEY `id_consult` (`id_consult`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `alctab`
--


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

--
-- Structure de la table `bio`
--

CREATE TABLE IF NOT EXISTS `bio` (
  `id_consult` int(11) NOT NULL default '0',
  `bio_spe` varchar(50) NOT NULL default '',
  `bio_posol` varchar(50) NOT NULL default '',
  `bio_duree` varchar(50) NOT NULL default '',
  `bio_date` date NOT NULL default '0000-00-00',
  `bio_vgm` int(11) NOT NULL default '0',
  `bio_ggt` int(11) NOT NULL default '0',
  `bio_asat` int(11) NOT NULL default '0',
  `bio_alat` int(11) NOT NULL default '0',
  `bio_cdt` int(11) NOT NULL default '0',
  `bio_alcoo` int(11) NOT NULL default '0',
  `bio_autre` varchar(128) NOT NULL default '',
  KEY `id_consult` (`id_consult`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `bio`
--


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

--
-- Structure de la table `consultation`
--

CREATE TABLE IF NOT EXISTS `consultation` (
  `id_consult` int(11) NOT NULL auto_increment,
  `id_pat` int(11) NOT NULL default '0',
  `id_user` int(11) NOT NULL default '0',
  `numero_pec` int(11) NOT NULL default '0',
  `cs_numero` int(11) NOT NULL default '0',
  `consu_type` tinyint(4) NOT NULL default '0',
  `consu_date` date NOT NULL default '0000-00-00',
  `consu_comment` text NOT NULL,
  `consu_eval` tinyint(4) NOT NULL default '0',
  `consu_ferme` tinyint(4) NOT NULL default '0',
  `id_prop` int(11) NOT NULL default '0',
  `date_saisie` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`id_consult`),
  KEY `id_pat` (`id_pat`),
  KEY `id_user` (`id_user`),
  KEY `id_prop` (`id_prop`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1768 ;

--
-- Contenu de la table `consultation`
--


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

--
-- Structure de la table `correspondants`
--

CREATE TABLE IF NOT EXISTS `correspondants` (
  `id_consult` int(11) NOT NULL default '0',
  `id_spe` int(11) NOT NULL default '0',
  `corres_coords` text NOT NULL,
  `corres_reseau` tinyint(4) NOT NULL default '0',
  KEY `id_consult` (`id_consult`),
  KEY `id_spe` (`id_spe`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `correspondants`
--


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

--
-- Structure de la table `couv_soc`
--

CREATE TABLE IF NOT EXISTS `couv_soc` (
  `id_couv` int(11) NOT NULL auto_increment,
  `couv_nom` varchar(128) NOT NULL default '',
  PRIMARY KEY  (`id_couv`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Contenu de la table `couv_soc`
--


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

--
-- Structure de la table `debut`
--

CREATE TABLE IF NOT EXISTS `debut` (
  `id_pat` int(11) NOT NULL default '0',
  `alc_debut` tinyint(4) NOT NULL default '0',
  `alc_conso` tinyint(4) NOT NULL default '0',
  `alc_usage` tinyint(4) NOT NULL default '0',
  `alc_ivresse` tinyint(4) NOT NULL default '0',
  `alc_abst` tinyint(4) NOT NULL default '0',
  `alc_abst_duree` smallint(6) NOT NULL default '0',
  `tab_debut` smallint(6) NOT NULL default '0',
  `tab_usage` tinyint(4) NOT NULL default '0',
  KEY `id_pat` (`id_pat`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `debut`
--


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

--
-- Structure de la table `drogue`
--

CREATE TABLE IF NOT EXISTS `drogue` (
  `id_consult` int(11) NOT NULL default '0',
  `drog_canabis` tinyint(4) NOT NULL default '0',
  `drog_heroine` tinyint(4) NOT NULL default '0',
  `drog_codeine` tinyint(4) NOT NULL default '0',
  `drog_opium` tinyint(4) NOT NULL default '0',
  `drog_lsd` tinyint(4) NOT NULL default '0',
  `drog_hallu` tinyint(4) NOT NULL default '0',
  `drog_colle` tinyint(4) NOT NULL default '0',
  `drog_amphe` tinyint(4) NOT NULL default '0',
  `drog_mdma` tinyint(4) NOT NULL default '0',
  `drog_stimul` tinyint(4) NOT NULL default '0',
  `drog_stimul_desc` varchar(128) NOT NULL default '',
  `drog_coke` tinyint(4) NOT NULL default '0',
  `drog_crack` tinyint(4) NOT NULL default '0',
  `drog_autre` tinyint(4) NOT NULL default '0',
  `drog_autre_desc` varchar(128) NOT NULL default '',
  `drog_intra` tinyint(4) NOT NULL default '0',
  KEY `id_consult` (`id_consult`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `drogue`
--


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

--
-- Structure de la table `final`
--

CREATE TABLE IF NOT EXISTS `final` (
  `id_consult` int(11) NOT NULL default '0',
  `fin_add` tinyint(4) NOT NULL default '0',
  `fin_motiv` tinyint(4) NOT NULL default '0',
  `fin_courrier` tinyint(4) NOT NULL default '0',
  `fin_conseil` tinyint(4) NOT NULL default '0',
  `fin_objectif` tinyint(4) NOT NULL default '0',
  `fin_modfini` tinyint(4) NOT NULL default '0',
  `fin_satisf` tinyint(4) NOT NULL default '0',
  `fin_satisf_fait` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id_consult`),
  KEY `id_consult` (`id_consult`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `final`
--


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

--
-- Structure de la table `medicament`
--

CREATE TABLE IF NOT EXISTS `medicament` (
  `id_consult` int(11) NOT NULL default '0',
  `medic_benzo` tinyint(4) NOT NULL default '0',
  `medic_benzo_mesu` tinyint(4) NOT NULL default '0',
  `medic_anxio` tinyint(4) NOT NULL default '0',
  `medic_anxio_mesu` tinyint(4) NOT NULL default '0',
  `medic_hypno` tinyint(4) NOT NULL default '0',
  `medic_hypno_mesu` tinyint(4) NOT NULL default '0',
  `medic_antidepr` tinyint(4) NOT NULL default '0',
  `medic_antidepr_mesu` tinyint(4) NOT NULL default '0',
  `medic_neuro` tinyint(4) NOT NULL default '0',
  `medic_neuro_mesu` tinyint(4) NOT NULL default '0',
  `medic_barbi` tinyint(4) NOT NULL default '0',
  `medic_barbi_mesu` tinyint(4) NOT NULL default '0',
  `medic_autres` tinyint(4) NOT NULL default '0',
  `medic_autres_mesu` tinyint(4) NOT NULL default '0',
  `medic_autres_desc` text NOT NULL,
  `medic_methadone` tinyint(4) NOT NULL default '0',
  `medic_metha_mesu` tinyint(4) NOT NULL default '0',
  `medic_subutex` tinyint(4) NOT NULL default '0',
  `medic_subu_mesu` tinyint(4) NOT NULL default '0',
  `medic_subst_autres` tinyint(4) NOT NULL default '0',
  `medic_subst_autres_mesu` tinyint(4) NOT NULL default '0',
  `medic_iv` tinyint(4) NOT NULL default '0',
  `medic_anorexie` tinyint(4) NOT NULL default '0',
  `medic_boulimie` tinyint(4) NOT NULL default '0',
  `medic_jeupath` tinyint(4) NOT NULL default '0',
  `medic_anxiete` tinyint(4) NOT NULL default '0',
  `medic_depression` tinyint(4) NOT NULL default '0',
  `medic_eval_psy` tinyint(4) NOT NULL default '0',
  `medic_trouble_psy` tinyint(4) NOT NULL default '0',
  KEY `id_consult` (`id_consult`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `medicament`
--


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

--
-- Structure de la table `module`
--

CREATE TABLE IF NOT EXISTS `module` (
  `id_mod` int(11) NOT NULL auto_increment,
  `mod_nom` varchar(128) NOT NULL default '',
  PRIMARY KEY  (`id_mod`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;

--
-- Contenu de la table `module`
--

INSERT INTO `module` (`id_mod`, `mod_nom`) VALUES
(1, '1. Evaluation'),
(2, '3. Intervention longue'),
(3, '4. Sevrage ambulatoire'),
(4, '5. Sevrage hospitalier'),
(5, '6. Maintien'),
(6, '2. Intervention breve'),
(7, 'module tabac');

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

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

CREATE TABLE IF NOT EXISTS `patient` (
  `id_pat` int(11) NOT NULL auto_increment,
  `id_zone` int(11) NOT NULL default '0',
  `pat_dossier` int(11) NOT NULL default '0',
  `pat_sexe` tinyint(4) NOT NULL default '0',
  `pat_nom` varchar(50) NOT NULL default '',
  `pat_prenom` varchar(50) NOT NULL default '',
  `pat_datenaiss` date NOT NULL default '0000-00-00',
  `pat_nom_ep` varchar(50) NOT NULL default '',
  `pat_adresse` text NOT NULL,
  `pat_code` varchar(10) NOT NULL default '',
  `pat_ville` varchar(128) NOT NULL default '',
  `pat_tel` varchar(15) NOT NULL default '',
  `pat_mail` varchar(128) NOT NULL default '',
  `pat_envoi` tinyint(4) NOT NULL default '0',
  `pat_qui` text NOT NULL,
  `pat_hab` tinyint(4) NOT NULL default '0',
  `pat_contrat` date NOT NULL default '0000-00-00',
  `date_saisie` date NOT NULL default '0000-00-00',
  `id_user` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id_pat`),
  KEY `id_user` (`id_user`),
  KEY `id_zone` (`id_zone`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=300 ;

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


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

--
-- Structure de la table `proposition`
--

CREATE TABLE IF NOT EXISTS `proposition` (
  `id_prop` int(11) NOT NULL auto_increment,
  `id_pat` int(11) NOT NULL default '0',
  `id_mod` int(11) NOT NULL default '0',
  `id_user` int(11) NOT NULL default '0',
  `numero_pec` int(11) NOT NULL default '0',
  `prop_date` date NOT NULL default '0000-00-00',
  `prop_contrat` date NOT NULL default '0000-00-00',
  `prop_objectif` text NOT NULL,
  `prop_orientation` tinyint(4) NOT NULL default '0',
  `prop_interv` tinyint(4) NOT NULL default '0',
  `prop_sortie` tinyint(4) NOT NULL default '0',
  `prop_motif` text NOT NULL,
  `prop_fini` tinyint(4) NOT NULL default '0',
  `date_saisie` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`id_prop`),
  KEY `id_pat` (`id_pat`),
  KEY `id_mod` (`id_mod`),
  KEY `id_user` (`id_user`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=304 ;

--
-- Contenu de la table `proposition`
--


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

--
-- Structure de la table `rdv`
--

CREATE TABLE IF NOT EXISTS `rdv` (
  `id_rdv` int(11) NOT NULL auto_increment,
  `id_pat` int(11) NOT NULL default '0',
  `id_user` int(11) NOT NULL default '0',
  `rdv_date` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`id_rdv`),
  KEY `id_pat` (`id_pat`),
  KEY `id_user` (`id_user`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1117 ;

--
-- Contenu de la table `rdv`
--


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

--
-- Structure de la table `rosace`
--

CREATE TABLE IF NOT EXISTS `rosace` (
  `id_consult` int(11) NOT NULL default '0',
  `eval_qv` tinyint(4) NOT NULL default '0',
  `eval_alcool` tinyint(4) NOT NULL default '0',
  `eval_tabac` tinyint(4) NOT NULL default '0',
  `eval_canabis` tinyint(4) NOT NULL default '0',
  `eval_mesusmedi` tinyint(4) NOT NULL default '0',
  `eval_prodill` tinyint(4) NOT NULL default '0',
  `eval_troublcond` tinyint(4) NOT NULL default '0',
  `eval_probjudi` tinyint(4) NOT NULL default '0',
  `eval_probpro` tinyint(4) NOT NULL default '0',
  `eval_probsoc` tinyint(4) NOT NULL default '0',
  `eval_probfam` tinyint(4) NOT NULL default '0',
  `eval_etatpsy` tinyint(4) NOT NULL default '0',
  `eval_etatsoma` tinyint(4) NOT NULL default '0',
  `eval_motiv` tinyint(4) NOT NULL default '0',
  KEY `id_consult` (`id_consult`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `rosace`
--


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

--
-- Structure de la table `satisfaction`
--

CREATE TABLE IF NOT EXISTS `satisfaction` (
  `id_consult` int(11) NOT NULL default '0',
  `sat_secret` tinyint(11) NOT NULL default '0',
  `sat_info` tinyint(11) NOT NULL default '0',
  `sat_rdv` tinyint(11) NOT NULL default '0',
  `sat_demandes` tinyint(11) NOT NULL default '0',
  `sat_accueil` tinyint(11) NOT NULL default '0',
  `sat_soins` tinyint(11) NOT NULL default '0',
  `sat_objectif` tinyint(4) NOT NULL default '0',
  KEY `id_consult` (`id_consult`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `satisfaction`
--


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

--
-- Structure de la table `situpat`
--

CREATE TABLE IF NOT EXISTS `situpat` (
  `id_consult` int(11) NOT NULL default '0',
  `id_mod` int(11) NOT NULL default '0',
  `id_couv` int(11) NOT NULL default '0',
  `sit_ress` tinyint(4) NOT NULL default '0',
  `sit_tutelle` tinyint(4) NOT NULL default '0',
  `sit_prof` tinyint(4) NOT NULL default '0',
  `sit_mat` tinyint(4) NOT NULL default '0',
  `sit_enf` tinyint(4) NOT NULL default '0',
  `sit_enfchg` tinyint(4) NOT NULL default '0',
  `sit_fam` tinyint(4) NOT NULL default '0',
  `sit_log` tinyint(4) NOT NULL default '0',
  `sit_csp` tinyint(4) NOT NULL default '0',
  `sit_etude` tinyint(4) NOT NULL default '0',
  `sit_pec` tinyint(4) NOT NULL default '0',
  `prop_tera` tinyint(4) NOT NULL default '0',
  KEY `id_consult` (`id_consult`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `situpat`
--


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

--
-- Structure de la table `specialite`
--

CREATE TABLE IF NOT EXISTS `specialite` (
  `id_spe` int(11) NOT NULL auto_increment,
  `spe_nom` varchar(128) NOT NULL default '',
  PRIMARY KEY  (`id_spe`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;

--
-- Contenu de la table `specialite`
--

INSERT INTO `specialite` (`id_spe`, `spe_nom`) VALUES
(1, 'Medecin traitant'),
(2, 'Specialiste Reseau'),
(3, 'Specialiste hors reseau'),
(4, 'Travailleur social Reseau'),
(5, 'Travailleur social hors reseau'),
(6, 'Paramedical Reseau'),
(7, 'Paramedical hors reseau'),
(8, 'Association'),
(9, 'Sage femme');

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

--
-- Structure de la table `structure`
--

CREATE TABLE IF NOT EXISTS `structure` (
  `id_consult` int(11) NOT NULL default '0',
  `struct_type` tinyint(4) NOT NULL default '0',
  `struct_add` tinyint(4) NOT NULL default '0',
  `struct_date` varchar(25) NOT NULL default '',
  `struct_interv` text NOT NULL,
  `struct_duree` varchar(25) NOT NULL default '0',
  `struct_res` tinyint(4) NOT NULL default '0',
  KEY `id_consult` (`id_consult`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `structure`
--


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

--
-- Structure de la table `suivi`
--

CREATE TABLE IF NOT EXISTS `suivi` (
  `id_pat` int(11) NOT NULL default '0',
  `id_user` int(11) NOT NULL default '0',
  KEY `id_pat` (`id_pat`),
  KEY `id_user` (`id_user`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `suivi`
--


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

--
-- Structure de la table `utilisateur`
--

CREATE TABLE IF NOT EXISTS `utilisateur` (
  `id_user` int(11) NOT NULL auto_increment,
  `id_zone` int(11) NOT NULL default '0',
  `user_nom` varchar(50) NOT NULL default '',
  `user_prenom` varchar(50) NOT NULL default '',
  `user_coords` text NOT NULL,
  `user_tel1` varchar(15) NOT NULL default '',
  `user_tel2` varchar(15) NOT NULL default '',
  `user_login` varchar(128) NOT NULL default '',
  `user_pass` varchar(32) NOT NULL default '',
  `user_cat` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id_user`),
  KEY `id_zone` (`id_zone`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=113 ;

--
-- Contenu de la table `utilisateur`
--

INSERT INTO `utilisateur` (`id_user`, `id_zone`, `user_nom`, `user_prenom`, `user_coords`, `user_tel1`, `user_tel2`, `user_login`, `user_pass`, `user_cat`) VALUES
(1, 0, 'SUPER', 'Admin', 'Adresse', '', '', 'admin@admin.fr', '21232f297a57a5a743894a0e4a801fc3', 1);

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

--
-- Structure de la table `zone_geo`
--

CREATE TABLE IF NOT EXISTS `zone_geo` (
  `id_zone` int(11) NOT NULL auto_increment,
  `zone_nom` varchar(128) NOT NULL default '',
  PRIMARY KEY  (`id_zone`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=34 ;

--
-- Contenu de la table `zone_geo`
--

INSERT INTO `zone_geo` (`id_zone`, `zone_nom`) VALUES
(1, 'NANCY'),
(4, 'DIEULOUARD'),
(6, 'JARVILLE'),
(7, 'PONT A MOUSSON'),
(13, 'VANDOEUVRE');
