gnumed-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-bugs] UE on attempting to create a dynamic hint


From: Karsten Hilbert
Subject: Re: [Gnumed-bugs] UE on attempting to create a dynamic hint
Date: Wed, 28 Jan 2015 12:40:34 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Jan 28, 2015 at 05:59:57AM +0000, Jim Busser wrote:

> Log attached
> 
> Problem with the SQL?

Any problems with the hint SQL should cause an exception at
time of creation (and not at hint checking time either - it'd
be reported as a broken hint).

The SQL you provided:

        SELECT EXISTS (
                SELECT 1 FROM clin.encounter WHERE
                        fk_type = (SELECT pk FROM clin.encounter_type WHERE 
description ~* 'seen.*clinic')
                                AND
                        pk_patient = ID_ACTIVE_PATIENT
        );

looks fine and seems to say that you want to check whether
the current patient has got any existing encounters being
documented as being of type "seen<SOMETHING>clinic".

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

[Prev in Thread] Current Thread [Next in Thread]