-- OLD 
/*
DROP TABLE  sinistresexterieurs;

CREATE TABLE IF NOT EXISTS sinistresexterieurs (
	dateCloture DATETIME ,
	codeGcAssureur VARCHAR(20) ,
	garant VARCHAR(100) ,
	idClient VARCHAR(20) ,
	souscripteur VARCHAR(100) ,
	idPolice BIGINT ,
	police VARCHAR(100) ,
	idBeneficiaire BIGINT ,
	beneficiaire VARCHAR(100) ,
	idCollege VARCHAR(20) ,
	college VARCHAR(100) ,
	dateNaissance DATETIME ,
	idAdherent BIGINT ,
	idBeneficiaireS BIGINT ,
	adherent VARCHAR(100) ,
	prestataire VARCHAR(100) ,
	prestation VARCHAR(100) ,
	acte VARCHAR(10) ,
	medecin VARCHAR(100) ,
	dateSoins DATETIME ,
	codeaffection VARCHAR(4) ,
	affection VARCHAR(80) ,
	typeActe VARCHAR(4) ,
	montantReclame DOUBLE(10,0) ,
	montantBase  DOUBLE(10,0) ,
	tm  DOUBLE(10,0) ,
	montantExclus DOUBLE(10,0) ,
	montantApayer DOUBLE(10,0) ,
	montantTm  DOUBLE(10,0) ,
	dateChargement TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=INNODB DEFAULT CHARSET=utf8;


TRUNCATE TABLE sinistresexterieurs;*/

-- NEWS

CREATE TABLE IF NOT EXISTS sinistresexterieurs (
	Datecloture DATETIME ,
	Codgar VARCHAR(20) ,
	garant VARCHAR(100) ,
	Codesouscr VARCHAR(20) ,
	Souscripteur VARCHAR(100) ,
	N BIGINT ,
	Police VARCHAR(100) ,
	MatriculeP BIGINT ,
	-- matriculeSociete VARCHAR(30) ,
	Patient VARCHAR(100) ,
	Codecollege VARCHAR(20) ,
	College VARCHAR(100) ,
	Datenais DATETIME ,
	MatriculeA BIGINT ,
	matric_benef BIGINT ,
	Assure VARCHAR(100) ,
	Centre VARCHAR(100) ,
	Prestation VARCHAR(100) ,
	Acte VARCHAR(10) ,
	Medecin VARCHAR(100) ,
	date_soins DATETIME ,
	Codeaffection VARCHAR(4) ,
	Affection VARCHAR(80) ,
	TypeD VARCHAR(4) ,
	Réclamé DOUBLE(10,0) ,
	Base  DOUBLE(10,0) ,
	TM  DOUBLE(10,0) ,
	Exclusion DOUBLE(10,0) ,
	Remboursé DOUBLE(10,0) ,
	Part_patient  DOUBLE(10,0) ,
	dateChargement TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP  	  
) ENGINE=INNODB DEFAULT CHARSET=utf8;

-- ALTER TABLE sinistresexterieurs ADD PRIMARY KEY (id);

TRUNCATE TABLE sinistresexterieurs;



