[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Drug X recalled owing to safety concerns
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] Drug X recalled owing to safety concerns |
Date: |
Wed, 7 Jul 2010 22:50:42 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, Jul 07, 2010 at 08:22:05AM -0700, Jim Busser wrote:
> This happens more than rarely.
>
> I notice, however that GNUmed already provides a listing of all drugs
> currently or previously taken by patients in GNUmed.
>
> Can I suggest (request) prepopulating GNUmed with two more standard queries
>
> Patients currently taking drug X
Done:
SELECT
vbp.lastnames,
vbp.preferred,
vbp.firstnames,
vbp.pk_identity as pk_patient,
vpsi.substance,
vpsi.strength,
vpsi.brand,
vpsi.preparation,
to_char(vpsi.started, ''MM/YYYY''),
vpsi.seems_inactive,
vpsi.atc_substance,
vpsi.atc_brand,
vpsi.external_code_brand,
vpsi.external_code_type_brand
FROM
dem.v_basic_person vbp
INNER JOIN
clin.v_pat_substance_intake vpsi
ON (vpsi.pk_patient = vbp.pk_identity)
WHERE
vpsi.is_currently_active IS True
AND
(
(lower(''enter desired drug name here'') IN
(lower(vpsi.substance), lower(vpsi.brand)))
OR
(lower(''enter desired ATC here'') IN
(lower(vpsi.atc_substance), lower(vpsi.atc_brand)))
OR
(lower(vpsi.external_code_brand) = lower(''enter desired
(national) drug ID here''))
)
ORDER BY
vbp.lastnames,
vbp.firstnames
;
> Patients who are alive and age > 65 with a creatinine above 150 umol/L
> who took drug X between dates 1 and 2
Please provide relevant LOINC codes and typical test type
abbreviations and units to be used to identify creatinine
results and cutoff values ;-)
Thanks,
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346