Is There a Field Name for Alias

Our patient records have pet name (eg "Fred") as petname and Pedigree Name (eg "Grand Champion SomeBreeder SomeDog") in the Alias field. 

I'm trying to prepare an HD request form, and have tried using [party:getPatientAlias(.)] (modifying the Microchip mergefield) but get an "expression error".

Is there a mergefield for Alias?

Yuri.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Is There a Field Name for Alias

Hi Yuri,

Unfortunately no.  Maybe able to work out a xpath expression to get it though ..

Tim can confirm but maybe something like

 /identities[archetypeid/shortName='entityIdentity.alias']/identity 

Cheers Tony

Re: Is There a Field Name for Alias

Hmm, ok (he said, dubiously...... smiley)

I did try turning the Patient Form into a Patient Letter and creating an Input Field "Enter pedigree name here", looked like it worked fine in openVPMS, I typed in pedigree name when prompted, but the letter printed blank for the input field.

So for the time being, I'm typing the pedigree name and reg number into the Description and that's working well.

Yuri.

Re: Is There a Field Name for Alias

Hi Yuri,

Will give it a try and post the correct field to use .. think it is possible although agree expression looks scary :-)

Cheers Tony

Re: Is There a Field Name for Alias

Thanks.

In a related question, is there any way to format the mergefield StartTime to a different format in OpenOffice?  I can only get 29/06/2012 as a date in a merge document.  If I change the format from text to any other date, openoffice simply inserts 30/12/1899 in whatever format I've chosen, thus:

I can see uses for a different format for StartTime (or EndTime, once vax due dates appear in v1.6) for vaccination certificates where I would prefer to use July 2013 as next vax due, rather than 02/07/2013.

Yuri.

Re: Is There a Field Name for Alias

Off the top of my head, I don't think you'll be able to format the date with just the month and year. I think we'd need to write an extension function to support that. There is already the beginnings of date format support using the date:formatDate() functions. These take the date and optional style argument, which may be one of "short", "medium", or "long".

E.g.:

        date:formatDate(openvpms:get(.,"startTime"))              // locale specific "medium" format"
       date:formatDate(openvpms:get(.,"startTime"), "short")  // locale "short" format"
       date:formatDate(openvpms:get(.,"startTime"), "medium")  // locale "medium" format"
       date:formatDate(openvpms:get(.,"startTime"), "long")       // locale "long" format"

There are also formatTime and formatDateTime functions, :

     date:formatTime(timestamp)               // "medium" format
    date:formatTime(timestamp, style)
    date:formatDateTime(timestamp)           // "medium" format
    date:formatDateTime(timestamp, style)    // formats both date and time with same format
    date:formatDateTime(timestamp, dateStyle, timeStyle)  // formats both date and time with same format

E.g.:

     date:formatTime(openvpms:get(.,"startTime"), "short")
    date:formatDateTime(openvpms:get(.,"startTime"), "short", "medium")

This could be extended to accept a format pattern, as per the java SimpleDateFormat class. In your case it would be:

      date:format(openvpms:get(., "startTime"), "MMM YYYY")

-Tim

Syndicate content