Condition and patient weight report functions

Donate to this project

Development Project Status: Completed

Total cost estimate (ex-Tax): 
$520
Due date for completion of this stage: 
10/07/2013
Release: 
1.7
Current Percentage Funded: 
100.00%
Project funding: 

Funding pledges can be made by clicking here (link only works in the forum).

Project description: 

This project will add the following xpath extension functions to be used in macros and reports:

 

Function Description Example
expr:if(expression, thenExpression)

Evaluates expression. If true, returns the value of thenExpression, otherwise returns null.

NOTE: thenExpression will be evaluated even if expression is false.

expr:if(openvpms:get(.,'sex')='MALE','M')
expr:if(expression, thenExpression, elseExpression)

Evaluates expression. If true, returns the value of thenExpression, otherwise returns the value of elseExpression.

NOTE: both thenExpression and elseExpression will be evaluated.

expr:if(openvpms:get(.,'sex')='MALE','M', 'F')
party:getWeight(patient)

Returns the patient weight in kg.

If the patient has no recorded weight, returns 0.

party:getWeight($patient)
party:getWeight(act)

Returns the weight in kg of the patient associated with the act.

If the patient has no recorded weight, returns 0.

party:getWeight($visit)
party:getWeight(patient, units) Returns the patient weight in the specified units party:getWeight($patient, "POUNDS")
party:getWeight(act, units) Returns the weight in kg of the patient associated with the act party:getWeight($visit, "GRAMS")
math:pow(value, exponent) Raises a value to the power of exponent math:pow(party:getWeight($patient), 2)
math:round(value, n) Round a value to N decimal places math:round(22 div 7, 3)

 

JIRA: OVPMS-1351

Comments

Comment viewing options

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

Re: Condition and patient weight report functions

We will fund 50% of this project

Kind regards,

Adrian

Re: Condition and patient weight report functions

We will fund the other 50% of this project. Advanced Vetcare

Syndicate content