Report functions: vaccinations

Donate to this project

Development Project Status: Completed

Total cost estimate (ex-Tax): 
$490
Due date for completion of this stage: 
20/09/2013
Release: 
1.7
Current Percentage Funded: 
100.00%
Project description: 

This project will add report functions that enable patient medication acts to be queried, in order to report on a patient's vaccinations.

The functions are as follows:

  • history:medication(patient)

Returns all medication acts for a patient, ordered on descending start time.

E.g.:

history:medication(openvpms:get(., 'patient.entity'))

  • history:medication(patient, productTypeName)

Returns all medication acts for a patient, that have the specified product type name, ordered on descending start time

E.g.:

history:medication(openvpms:get(., 'patient.entity'), 'Vaccinations')

  • history:medication(patient, from, to)

Returns all medication acts for a patient between the specified dates, inclusive, ordered on descending start time

E.g.:

history:medication(openvpms:get(., 'patient.entity'), java.sql.Date.valueOf('2013-01-01'), java.util.Date.new())

  • history:medication(patient, productTypeName, from, to)

Returns all medication acts for a patient that have the specified product type name, between the specified dates, inclusive, ordered on descending start time

E.g.:

history:medication(openvpms:get(., 'patient.entity'), 'Vaccinations', java.sql.Date.valueOf('2013-01-01'), java.util.Date.new())

The functions may be to used in a JasperReports dataSourceExpression to be passed to a sub-report. E.g.:

<subreport>                               
    <dataSourceExpression>$P{dataSource}.getExpressionDataSource(history:medication(openvpms:get(., 'patient.entity')))</dataSourceExpression>
    <subreportExpression class="net.sf.jasperreports.engine.JasperReport">vaccinations.jrxml</subreportExpression>
</subreport>

 

JIRA: OVPMS-1361

Syndicate content