gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Re: 0.5.rc4 Address entry issues


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Re: 0.5.rc4 Address entry issues
Date: Thu, 23 Jul 2009 23:22:26 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Jul 23, 2009 at 01:43:30PM -0700, Jim Busser wrote:

> >I would say, in the now-labeled-"Search (modify)" field tooltip:
> >
> >     "A value here, with any modification(s) below, will be saved as
> >an assumed "home" address.
> 
> 
> In the meantime I more carefully experimented with the phrasewheel
> which appears to key only on Postal code and Street.

That's right as those will provide the most specifity with
the least amount of typing. Here's the query the phrasewheel
uses  ;-)

                query = u"""
select * from (
        (select
                pk_address,
                (street || ' ' || number || coalesce(' (' || subunit || ')', 
'') || ', '
                || urb || coalesce(' (' || suburb || ')', '') || ', '
                || postcode
                || coalesce(', ' || notes_street, '')
                || coalesce(', ' || notes_subunit, '')
                ) as address
        from
                dem.v_address
        where
                street %(fragment_condition)s

        ) union (

        select
                pk_address,
                (street || ' ' || number || coalesce(' (' || subunit || ')', 
'') || ', '
                || urb || coalesce(' (' || suburb || ')', '') || ', '
                || postcode
                || coalesce(', ' || notes_street, '')
                || coalesce(', ' || notes_subunit, '')
                ) as address
        from
                dem.v_address
        where
                postcode_street %(fragment_condition)s

        ) union (

        select
                pk_address,
                (street || ' ' || number || coalesce(' (' || subunit || ')', 
'') || ', '
                || urb || coalesce(' (' || suburb || ')', '') || ', '
                || postcode
                || coalesce(', ' || notes_street, '')
                || coalesce(', ' || notes_subunit, '')
                ) as address
        from
                dem.v_address
        where
                postcode_urb %(fragment_condition)s
        )
) as union_result
order by union_result.address limit 50"""

> Accordingly a more precise tooltip would be:
> 
>       Type a postal code or street to search for an existing address.

Done.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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