GNUmed dynamic hint problem

Karsten Hilbert <[email protected]>
Newsgroups gmane.comp.gnu.medical.devel
Message-ID <[email protected]>
For people being haunted by GNUmed telling them to wean off
ACEI/Sartans supposedly pregnant women find below an updated
dynamic hint query:

	SELECT EXISTS (
		SELECT 1 FROM clin.v_substance_intakes WHERE
			pk_patient = ID_ACTIVE_PATIENT
				AND
			(
				substance ~* ''.*sartan.*''
					OR
				substance ~* ''.*angiotensin.*''
					OR
				substance ~ ''.*ACE.*''
					OR
				substance ~* ''.*pril.*''
					OR
				atc_brand ~* ''^C09.*''
					OR
				atc_substance ~* ''^C09.*''
			)
	) AND EXISTS (
		SELECT 1 FROM clin.v_narrative4search WHERE
			pk_patient = ID_ACTIVE_PATIENT
				AND
			narrative ~* ''.*schwanger.*''
	);

It turned out said query lacked a pair of parentheses around
the ORed substance selections.

To use the above go to menu

	GNUmed
		Manage lists
			edit list "Dynamic hints"
				edit hint "Kontraindikation: ACE/Sartan <-> Schwangerschaft"

and post the above SQL into the "Query/SQL" field.

If you aren't interested in this hint you can just as well
disable it, too.

GNUmed 1.6 will contain a much improved hint based on
documented EDC rather than relying on the narrative
containing the fragment "schwanger" (roughly translates to
"pregna").

Best,
Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.