[OpenVPMS Developers] Open VPMS: Exporting pet weight

Dear All,

I have a number of forms which can automatically calculate drug dosages etc as long as the weight appears as a digit i.e. not attached to text such as "kilograms"

They are very handy for anesthetic pre-med doses, IV volumes of 2.5 % Thiopentone, Alfaxan, Protocol etc. as well as recommending IV fluid rates during anesthetic and recommended IV bolus fluid rates should the blood pressure drop. The forms can be changed to suit particular practice preferences for types of drugs.

Is there a way to export the pet's weight just as a number with of text attached?

Cheers,

Mark Allison

St George Veterinary Hospital

325 Princes Hwy.

Carlton. NSW. 2218

* (02) 9587 3599

* (02) 9588 5048

* sgah@tpg.com.au www.sgah.com.au

Confidentiality Notice: You may not forward this document onto the Internet or in any other format without the author's permission. This e-mail transmission may contain confidential or legally privileged information that is intended only for the individual or entity named in the e-mail address. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or reliance upon the contents of this e-mail is strictly prohibited. If you have received this e-mail transmission in error, please reply to the sender and then please delete the message from your inbox.

Comment viewing options

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

Re: [OpenVPMS Developers] Open VPMS: Exporting pet weight

Hi Mark,

Currently the getPatientWeight function returns the fully formatted weight including units. I agree there should be a function that gets the raw weight as well. We can add this to JIRA and should be easy to implement.

In the mean time I think you can utilise the internal open office basic functions to convert the field into a numeric value i.e see here

http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide/Conversio n_Functions_(Runtime_Library)

An idiosyncrasy of the conversion functions is they still work if the string being converted to a Double contains non numeric data. It just stops at the first non numeric data it finds and returns the result. Given the units are at the the end of the weight string returned from the getPatientWeight function this should work as expected.

Cheers Tony

On 25/06/09 10:17 AM, "St George Animal Hospital" :

> Dear All, > I have a number of forms which can automatically calculate drug dosages etc as > long as the weight appears as a digit i.e. not attached to text such as > ³kilograms² > They are very handy for anesthetic pre-med doses, IV volumes of 2.5 % > Thiopentone, Alfaxan, Protocol etc. as well as recommending IV fluid rates > during anesthetic and recommended IV bolus fluid rates should the blood > pressure drop. The forms can be changed to suit particular practice > preferences for types of drugs. > > > Is there a way to export the pet¹s weight just as a number with of text > attached? > > > Cheers, Mark Allison St George Veterinary Hospital 325 Princes Hwy. > Carlton. NSW. 2218 > ( (02) 9587 3599 7 (02) 9588 5048 : sgah@tpg.com.au > www.sgah.com.au //www.sgah.com.au> Confidentiality Notice: You may > not forward this document onto the Internet or in any other format without the > author's permission. This e-mail transmission may contain confidential or > legally privileged information that is intended only for the individual or > entity named in the e-mail address. If you are not the intended recipient, you > are hereby notified that any disclosure, copying, distribution, or reliance > upon the contents of this e-mail is strictly prohibited. If you have received > this e-mail transmission in error, please reply to the sender and then please > delete the message from your inbox. > > > > _______________________________________________ > OpenVPMS Developers Mailing List > developers@lists.openvpms.org > To unsubscribe or change your subscription visit: > http://lists.openvpms.org/listinfo/developers > Posts from this mailing list can be viewed online and replied to in the > OpenVPMS Developer's forum- http://tinyurl.com/openvdf

Re: [OpenVPMS Developers] Open VPMS: Exporting pet weight

Hi,

Just wondering if there has been development and there is a now a weight function that only has the raw digits (not text)?

I can't figure out how to use the conversion functions to get the calculations within a form to work.

Re: [OpenVPMS Developers] Open VPMS: Exporting pet weight

Yes. From https://www.openvpms.org/documentation/csh/2.1/reference/jxpath#party

party:getWeight(patient)

  • patient: a party.patientpet

Returns the patient weight in kg.

If the patient has no recorded weight, returns 0.

This uses the most recent recorded weight for the patient.

Examples

  • party:getWeight($patient)
  • party:getWeight(openvpms:get(. 'patient.entity'))

party:getWeight(patient, units)

  • patient: a party.patientpet
  • units: the weight units. One of 'KILOGRAMS', 'GRAMS', or 'POUNDS'

 

Returns the patient weight in the specified units.

If the patient has no recorded weight, returns 0.

This uses the most recent recorded weight for the patient.

Examples

  • party:getWeight($patient, 'KILOGRAMS')
  • party:getWeight(openvpms:get(. 'patient.entity', 'GRAMS'))
  • party:getWeight($patient, 'POUNDS')

party:getWeight(act)

  • act: any act archetype with a patient node

Returns the weight (in kilograms) for a patient linked to act, or 0 if there is no patient, or the patient has no weight recorded.

This uses the most recent recorded weight for the patient.

Examples

  • party:getWeight(.)
  • party:getWeight($visit)

party:getWeight(act, units)

  • act: any act archetype with a patient node
  • units: the weight units. One of 'KILOGRAMS', 'GRAMS', or 'POUNDS'

Returns the weight in units for a patient linked to act, or 0 if there is no patient, or the patient has no weight recorded.

This uses the most recent recorded weight for the patient.

Examples

  • party:getWeight(., 'KILOGRAMS')
  • party:getWeight($visit, 'POUNDS)

Re: [OpenVPMS Developers] Open VPMS: Exporting pet weight

Thanks so much for the quick reply Tim, I've made it work now.

The next question if you don't mind... I can get the patient weight number into the patient letter (openOffice odt) using the Variable-User Field, and am inserting it into a table.

Then I have calculations down the table depending on the number inserted.

The calculations aren't working. I presume it is because the insertion of the number via Variable-User Field is happening after the document is created (the calculations are happening before the number is inserted).

Is there a way to get the table calculations to work using the weight via Variable-User Field from OpenVPMS?

 

**Previously worked using a Function-Input Field

 

I've attached the documents so you can see what I mean.

 

Let me know if this is something I need to contact Vertical Connect for.

Thanks,

Greta

AttachmentSize
Cage Card Canine Surgery.odt 75.51 KB
Cage Card Canine Surgery old.odt 75.55 KB

Re: [OpenVPMS Developers] Open VPMS: Exporting pet weight

This isn't supported. Its not clear to me if this is an OpenOffice limitation[1], or due to the way we use it, but OpenOffice sees the E1 column as being zero when it goes to evaluate the subsequent columns, even though it contains the weight text.

One workaround is to get OpenVPMS to do the calculations for you., i.e. replace each of the calculated cells with a user field that is an expression e.g.

           [party:patientWeight(.) * 2.5]

 

[1] https://bz.apache.org/ooo/show_bug.cgi?id=74155

Re: [OpenVPMS Developers] Open VPMS: Exporting pet weight

Hi Tim,

Thanks for that, the work around will be perfect.

Greta

Syndicate content