1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| SELECT DISTINCT pms_evenem0_.even_id_even AS x0_0_,
pms_evenem0_.even_dat_eve AS x1_0_,
pms_evenem0_.even_dat_eve AS x2_0_,
pms_evenem0_.even_libelle AS x3_0_,
pms_evenem0_.even_ind_hyp_ini AS x4_0_,
ide_medeci1_.mede_nom_usu_maj AS x5_0_,
ide_medeci1_.mede_prenom AS x6_0_,
bas_uf2_.unfo_code || ' - ' || bas_uf2_.unfo_libelle AS x7_0_,
ide_sejour3_.sejo_num_sej AS x8_0_,
bas_type_i12_.tyin_id_tyin AS x9_0_,
pms_evenem0_.even_id_obj AS x10_0_,
pms_rhs7_.trhs_id_trhs AS x11_0_,
pms_rhs9_.trhs_id_trhs AS x12_0_,
pms_rhs10_.trhs_id_trhs AS x13_0_,
pms_rums8_.trum_id_trum AS x14_0_,
sad_diag_s11_.dsai_code_d AS x15_0_,
sad_diag_s11_.dsai_libelle_d AS x16_0_
FROM pms_evenement pms_evenem0_,
ide_medecin ide_medeci1_,
bas_uf bas_uf2_,
ide_sejour ide_sejour3_,
pms_acte_reeduc pms_acte_r4_,
pms_dependance pms_depend5_,
sad_recueil sad_recuei6_,
pms_rhs pms_rhs7_,
pms_rum pms_rums8_,
pms_rhs pms_rhs9_,
pms_rhs pms_rhs10_,
sad_diag_saisis sad_diag_s11_,
bas_type_info bas_type_i12_
WHERE pms_evenem0_.even_id_mede = ide_medeci1_.mede_id_mede(+)
AND pms_evenem0_.even_id_unfo = bas_uf2_.unfo_id_unfo(+)
AND pms_evenem0_.even_id_sejo = ide_sejour3_.sejo_id_sejo(+)
AND sad_recuei6_.recu_id_recu = pms_rhs7_.trhs_id_recu(+)
AND sad_recuei6_.recu_id_recu = pms_rums8_.trum_id_recu(+)
AND pms_acte_r4_.acre_id_trhs = pms_rhs9_.trhs_id_trhs(+)
AND pms_depend5_.rdep_id_trhs = pms_rhs10_.trhs_id_trhs(+)
AND sad_recuei6_.recu_id_recu = sad_diag_s11_.dsai_id_recu(+)
AND pms_evenem0_.even_id_tyin = bas_type_i12_.tyin_id_tyin
AND ( ( bas_type_i12_.tyin_code IN
('REC_ACT_DIAG',
'REC_ACT_PRE',
'REC_ACT_REED',
'REC_DEP',
'REC_GCAP',
'REC_PRES'
)
AND pms_evenem0_.even_id_tyin =
bas_type_i12_.tyin_id_tyin
)
AND ( (ide_sejour3_.sejo_id_sejo = 2327815)
OR ( (ide_sejour3_.sejo_id_sejo IS NULL)
AND ( bas_type_i12_.tyin_code = 'REC_PRES'
AND pms_evenem0_.even_id_tyin =
bas_type_i12_.tyin_id_tyin
)
AND (pms_evenem0_.even_dat_eve >=
TO_DATE ('06/03/2006', 'dd/mm/yyyy')
)
AND (pms_evenem0_.even_id_pati = 1752653)
)
)
AND (pms_evenem0_.even_ind_rec = '1')
AND (pms_evenem0_.even_id_obj = sad_recuei6_.recu_id_recu(+))
AND (pms_evenem0_.even_id_obj = pms_acte_r4_.acre_id_rrea(+))
AND (pms_evenem0_.even_id_obj = pms_depend5_.rdep_id_rdep(+))
AND (sad_diag_s11_.dsai_typ_dia(+) = 'DP')
AND (pms_evenem0_.even_id_etab_d = 1059585)
)
ORDER BY ide_sejour3_.sejo_num_sej DESC,
pms_evenem0_.even_dat_eve DESC |
Partager