FORUM PER UTENTI MILLEWIN
Attenzione !
Per intervenire sul forum è necessario essere registrati e connessi.

L'Amministratore

****************************************************
“Se tu hai una mela ed io ho una mela, e ce la scambiamo, alla fine tu ed io avremo sempre una mela ciascuno.
Ma se tu hai un’idea ed io ho un’idea, e ce la scambiamo, allora avremo entrambi due idee”.

George Bernard Shaw
****************************************************

Unisciti al forum, è facile e veloce

FORUM PER UTENTI MILLEWIN
Attenzione !
Per intervenire sul forum è necessario essere registrati e connessi.

L'Amministratore

****************************************************
“Se tu hai una mela ed io ho una mela, e ce la scambiamo, alla fine tu ed io avremo sempre una mela ciascuno.
Ma se tu hai un’idea ed io ho un’idea, e ce la scambiamo, allora avremo entrambi due idee”.

George Bernard Shaw
****************************************************
FORUM PER UTENTI MILLEWIN
Vuoi reagire a questo messaggio? Crea un account in pochi click o accedi per continuare.

DOSE DEFINITA GIORNALIERA

Andare in basso

DOSE DEFINITA GIORNALIERA Empty DOSE DEFINITA GIORNALIERA

Messaggio  nanci giacinto Gio 28 Mag 2015 - 12:40

select distinct p.nome nome, p.cognome cognome, n.pa_uslcode cod_reg,
v.codmedico codice_medico,
days(p.nascita, today())/365 eta, p.sesso sesso,
today() data_odierna,
 
(select max(a.cp_code) from cart_pazpbl a
where a.codice=p.codice and a.cp_code like '272%')
____dislipidemia____,
 
(select max(a.cp_code) from cart_pazpbl a
where a.codice=p.codice and a.cp_code like '401%')
_____ipertensione________,
 
(select max(a.cp_code) from cart_pazpbl a
where a.codice=p.codice and a.cp_code like '250%')
______diabete____,
 
(select max(a.cp_code) from cart_pazpbl a
where a.codice=p.codice and a.cp_code like '414%')
______CARD_ISCH__________,
 
(select max(a.cp_code) from cart_pazpbl a
where a.codice=p.codice and a.cp_code like '413%')
___ANGINA_PECT_____,
 
(select max(a.cp_code) from cart_pazpbl a
where a.codice=p.codice and (a.cp_code like '410%' or a.cp_code like '412%%'))
_____INFARTO_MIOCARDIO_______,
 
(select max(a.cp_code) from cart_pazpbl a
where a.codice=p.codice and a.cp_code like '436%')
_____ICTUS______,
 
(select max(a.cp_code) from cart_pazpbl a
where a.codice=p.codice and a.cp_code like '411%')
_____SINDRO_CORON___,
 
(select max(a.cp_code) from cart_pazpbl a
where a.codice=p.codice and (a.cp_code like '431%' or a.cp_code like '430%'))
_____EMORRAGIA_CEREBRALE______,
 
(select max(a.cp_code) from cart_pazpbl a
where a.codice=p.codice and a.cp_code like 'v45.82%')
___ANGIOPLASTICA_CORONARICA____,
 
(select max(a.cp_code) from cart_pazpbl a
where a.codice=p.codice and (a.cp_code like '414.5%%' or a.cp_code like 'v45.81%'))
______BYPASS_AORTOCORONARICO____,
 
(select a.ac_val from cart_accert a
where a.codice=p.codice and a.ac_des like '%LDL%'
and (a.ac_val is not null)
and not exists (select b.codice from cart_accert b where a.codice=b.codice and b.ac_des like '%LDL%' and
(b.data_open>a.data_open or (b.data_open=a.data_open and b.rowid>a.rowid))
and b.ac_val is not null)
and a.data_open between today()-455 and today())____LDL_ultimo15mesi,
 
(select a.ac_val from cart_accert a
where a.codice=p.codice and a.ac_des like '%COLESTEROLO%'
and (a.ac_val is not null)
and not exists (select b.codice from cart_accert b where a.codice=b.codice and b.ac_des like '%COLESTEROLO%' and
(b.data_open>a.data_open or (b.data_open=a.data_open and b.rowid>a.rowid))
and b.ac_val is not null)
and a.data_open between today()-455 and today())____COLESTEROLO_ultimo15mesi,
 
 
(select a.ac_val from cart_accert a
where a.codice=p.codice and a.ac_des like '%TRIGLICERIDI%'
and (a.ac_val is not null)
and not exists (select b.codice from cart_accert b where a.codice=b.codice and b.ac_des like '%TRIGLICERIDI%' and
(b.data_open>a.data_open or (b.data_open=a.data_open and b.rowid>a.rowid))
and b.ac_val is not null)
and a.data_open between today()-455 and today())____TRIGLICERIDI_ultimo15mesi,
 
 
(select a.ac_val from cart_accert a
where a.codice=p.codice and a.ac_des like '%HDL%'
and (a.ac_val is not null)
and not exists (select b.codice from cart_accert b where a.codice=b.codice and b.ac_des like '%HDL%' and
(b.data_open>a.data_open or (b.data_open=a.data_open and b.rowid>a.rowid))
and b.ac_val is not null)
and a.data_open between today()-455 and today())____HDL_ultimo15mesi,
 
 
 
(select distinct 'si' from cart_terap a
where a.codice=p.codice and a.co_atc like 'C10AA01%'
and a.data_open between today()-365 and today())____simvastatina____,
 
(select distinct 'si' from cart_terap a
where a.codice=p.codice and a.co_atc like 'c10aa02%'
and a.data_open between today()-365 and today())______lovastatina______,
 
(select distinct 'si' from cart_terap a
where a.codice=p.codice and a.co_atc like 'c10aa03%'
and a.data_open between today()-365 and today())_______pravastatina____,
 
(select distinct 'si' from cart_terap a
where a.codice=p.codice and a.co_atc like 'c10aa04%'
and a.data_open between today()-365 and today())____fluvastatina______,
 
(select distinct 'si' from cart_terap a
where a.codice=p.codice and a.co_atc like 'c10aa05%'
and a.data_open between today()-365 and today())______atorvatsatina_____,
 
(select distinct 'si' from cart_terap a
where a.codice=p.codice and a.co_atc like 'c10aa07%'
and a.data_open between today()-365 and today())_____rosuvastatina_____,
 
(select distinct 'si' from cart_terap a
where a.codice=p.codice and a.co_atc like 'c10ax09%'
and a.data_open between today()-365 and today())_______ezetemibe_____,
 
BUON GIORNO SE POSSIBILE AVREI BISOGNO DI MODOFICARE LA SEQUENTE QUERY PER ESTRARRE I FARMACI IN ELENCO  NELLA DOSE DEFINITA GIORNALIERA (DDD). IL TUTTO IN QUANTO LE ASP CI INVIANO I REPORT CON LA DDD E CON IL NUMERO DELLE SCATOLE DI FARMACI CON I RISPETTIVI DOSAGGI  E QUINDI AVERE I DATI DEL PROPRIO ARCHIVIO MI PERMETTEREBBE DI POTER DIFENDERE LA MIA APPROPRIATEZZA CON MAGGIORE EFFICACIA. GRAZIE 



(select distinct 'si' from cart_terap a
where a.codice=p.codice and a.co_atc like 'c10ba02%'
and a.data_open between today()-365 and today())______simvaezetimibe______
 
from pazienti p , nos_002 n, cart_pazpbl c, v_pazienti v
where p.codice=n.codice
and c.codice=n.codice
and v.codice=p.codice
and (c.cp_code like '413%' or c.cp_code like '414%' or c.cp_code like '272%'or c.cp_code like '401%' or c.cp_code like '250%' or c.cp_code like '410%' or c.cp_code like '411%'or c.cp_code like '412%' or c.cp_code like '436%' or c.cp_code like '430%' or c.cp_code like '431%' or c.cp_code like '414.5%'or c.cp_code like 'v45.81%' or c.cp_code like 'v45.82%')
and n.pa_drevoca is null
and p.decesso is null
and p.pa_convenzione not like 'I'
 

order by p.cognome, p.nome
nanci giacinto
nanci giacinto
Membro Junior
Membro Junior

Messaggi : 128
Punti : 5000
Voti per importanza dei messaggi : -1
Data d'iscrizione : 02.03.11

Torna in alto Andare in basso

DOSE DEFINITA GIORNALIERA Empty dose definita giornaliera

Messaggio  nanci giacinto Gio 4 Giu 2015 - 9:41

BUON GIORNO VISTO CHE NON E' POSSIBILE, IN QUESTA QUERY, ESTRARRE LA DOSE DEFINITA GIORNALIERA IN ALTERNATIVA E' POSSIBILE ESTRARRE I FARMACI NON PER ATC MA PER NOME COMMERCIALE? GRAZIE
nanci giacinto
nanci giacinto
Membro Junior
Membro Junior

Messaggi : 128
Punti : 5000
Voti per importanza dei messaggi : -1
Data d'iscrizione : 02.03.11

Torna in alto Andare in basso

Torna in alto


 
Permessi in questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum.