-- 1- EFFECTIF ADHERENT FIDRA
CALL `sp_imprimeBenefFidra_rp`('FIDRA',NULL,NULL,NULL,'2023-01-01','2023-05-02')

-- 2- EVOLUTION DES BENEFICIAIRES
CALL `sp_evolution_mensBenefEffetCollege_rp`('FIDRA',NULL,NULL,NULL,'2023-01-01','2023-05-02')

-- 3- EVOLUTION DES ADHERENTS
CALL `sp_evolution_mensBeneCollegeAssure_rp`('FIDRA',NULL,NULL,NULL,'2023-01-01','2023-05-02')

-- 4- EVOLUTION DES EFFECTIFS PAR STATUT
CALL `sp_evolution_StatusBenefTous_rp`('FIDRA',NULL,NULL,NULL,'2023-01-01','2023-05-02')

-- 5- EVOLUTION DES CARTES EDITEES 
CALL `sp_evolution_carteEdite_rp`('FIDRA',NULL,NULL,NULL,'2023-01-01','2023-05-02')

-- 6- LISTES DES BENEFICIARES AVEC DES CARTES EDITEES 
CALL sp_effectif_carteEdite_rp('FIDRA',NULL,NULL,NULL,'2023-01-01','2023-05-02')

-- 7- EVOLUTION DES RETRAITS
CALL `sp_evolution_mensBeneCollegeRetireStatus_rp`('FIDRA',NULL,NULL,NULL,'2023-01-01','2023-05-02',NULL)  -- EVOLUTION MENSUELLE DES RETRAITS

-- 8- LISTES DES BENEFICAIRES RETIRES
CALL sp_imprimer_beneficiaire_retire_rp ('FIDRA',NULL,NULL,'2023-01-02','2023-05-02',NULL);


-- 9- REPARTITION PAR CLASSES D'AGES 
CALL `sp_stats_listetrancheagebeneficiaire`('262','2023-01-01','2023-05-02')


SELECT * FROM beneficiaire
WHERE idPolice IN (SELECT id FROM police WHERE codeGcAssureur='FIDRA')
AND dateEffet>='2023-01-02'


-- rsp manuel fidra

CALL sp_s_rapportsp_periodeAutoGarant_rp (NULL,'2023-01-01','2023-03-31',20); SELECT * FROM temp_rsp;  -- NIVEAU GARANT

CALL sp_s_rapportsp_periodeAuto_rp (@garant,@idPolice,@dateDebut,@dateFin,30);   -- 193  -- NIVEAU POLICE

CALL sp_s_rapportsp_periodeAutoCollegeFIDRA_rp ('FIDRA',NULL,NULL,'2023-01-01','2023-03-31',20); SELECT * FROM temp_rsp;  -- NIVEAU COLLEGE