
DELETE from schedule_logs;
DELETE from study;
delete from room_appointment_study_receipt;
delete from appointment;
delete from user_schedule;

delete from contratos_examenes;
SELECT setval('contratos_examenes_id_contratos_examenes_seq', 1, FALSE); 

DELETE FROM contratos_sedes;
SELECT setval('contratos_sedes_id_contratos_sede_seq', 1, FALSE); 

DELETE FROM  contratos_modalidades ;
SELECT setval('contratos_modalidades_id_contratos_modalidad_seq', 1, FALSE); 

DELETE FROM block_des;
SELECT setval('block_des_id_blocked_seq',1,FALSE);

delete from room ;
SELECT setval('room_id_seq', 1 , FALSE);


-- ELIMINA MASESTROS REALACIONADOS A UN ESTUDIO
delete from rel_study_list_consent;
SELECT setval('consent_id_seq', 1, FALSE); 

DELETE from rel_study_list_indication;

DELETE FROM indication;
SELECT setval('indication_id_seq', 1, FALSE); 

DELETE FROM rel_study_list_contra_indication;

DELETE FROM contra_indication;
SELECT setval('contra_indication_id_seq', 1, FALSE); 

delete from rel_study_list_preparation;


DELETE FROM preparation;
SELECT setval('preparation_id_seq', 1, FALSE); 


delete from rate;
SELECT setval('rate_id_seq	', 1, FALSE); 

delete from study_list;
SELECT setval('study_list_id_study_list_seq', 1, FALSE); 

delete from headquarter ;

delete from modality ;

DELETE from facturas_ordenes;
SELECT setval('facturas_ordenes_id_facturas_ordenes_seq', 1 , FALSE);

DELETE from internal_order;
SELECT setval('codigo_internal_order', 1 , FALSE);

DELETE from facturas;
SELECT setval('facturas_id_factura_seq', 1 , FALSE);

delete from contratos ;
SELECT setval('contratos_id_contratos_seq', 1 , FALSE);

delete from resoluciones ;
SELECT setval('resoluciones_id_resoluciones_seq', 1 , FALSE);

DELETE FROM entity;

DELETE from cuotas_copagos;
SELECT setval('cuotas_copagos_id_cuotas_copago_seq', 1, FALSE); 



DELETE from modality_worklist; 
SELECT setval('modality_worklist_id_modality_worklist_seq', 1, FALSE); 

delete from base_price ; 
SELECT setval('base_price_id_seq', 1 , FALSE);

delete from especialidad_medico ;
SELECT setval('especialidad_medico_id_especialidad_medico_seq', 1 , FALSE);

--DELETE from eps_type;
--SELECT setval('eps_type_id_seq', 1 , FALSE);

delete from eps;

delete from provenance_date;
SELECT setval('provenance_date_id_seq', 1 , FALSE);

delete from reservation; 
SELECT setval('reservation_id_seq', 1, FALSE); 

DELETE from  fos_user_headquarter;

DELETE from  fos_user_user_group;

-- DELETE from  user_sonata;
-- SELECT setval('user_sonata_id_seq', 1, FALSE);

-- DELETE from user_sonata where id > 6;
-- SELECT setval('user_sonata_id_seq', 7, FALSE); 



