gnumed-bugs
[Top][All Lists]
Advanced

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

Re: [Gnumed-bugs] Error with placeholder $<gender_mapper>$


From: Jim Busser
Subject: Re: [Gnumed-bugs] Error with placeholder $<gender_mapper>$
Date: Sun, 14 Aug 2011 15:46:19 -0700

On 2011-08-14, at 11:58 AM, Karsten Hilbert wrote:

> On Sun, Aug 14, 2011 at 11:45:35AM -0700, Jim Busser wrote:
> 
>> Ah, I did not realize it would do anything other than
>> pass-through actual existing database values, I though the
>> above was simply informative and/or optional.
>> 
>> Is it reasonable that the lack of arguments should be
>> supported (where the user does not wish to override what may
>> exist) to simply pass through what exists?
> 
> I would expect a _mapper to *map* something that exists.
> 
>> Or is there an
>> issue of limitation of language recognition and therefore
> 
> No.
> 
>> the need to "map" values?
> 
> Perhaps in English the need is less obvious.
> 
> In German we've got a lot of male/female words and phrases,
> say, "Patient" vs. "Patientin" which one may wish to use in
> a piece of paperwork, say "Dear Patient" -> "Lieber Patient"
> or "Liebe Patientin".

A creative use of the flexibility provided by the mapper. People who would be 
thinking basic usage such as

        Patient name: <lastname> , <first_names>
        Date of birth: <date_of_birth>
        Gender: <whatever_would_be_passed_from_the _backend>

might be happy with a "raw" value. It might be nice in the absence of arguments 
to simply pass the raw value and avoid an error. However the issue here is 
small. Suggest in

        gmMacro.py

change this…

        # those must satisfy the pattern "$<name::args::optional length>$" when 
used
        known_variant_placeholders = [

to…
        
        # the following, when used,  must satisfy the pattern 
"$<name::args::optional character length restriction>$"
        known_variant_placeholders = [


and…

        u'gender_mapper',                       # "args" holds: value when 
person is male // is female //  is other
                                                                # e.g. Male // 
Female // Alternative or 
                                                                # Lieber 
Patient // Liebe Patientin


-- Jim


reply via email to

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