Reminders on Invoices

Hi All,

Is anyone aware of a way to get reminders on the invoice? The previous system we used was able to do this (Avimark), and I understand another popular one in the States here does it as well (Cornerstone). I took a look at the jrxml, but it doesn't have any SQL or anything in it that I could play with.

Thanks, Paul

Comment viewing options

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

Re: Reminders on Invoices

You could create a template that contained;

a) The vaccination

b) A "reminder" item which had a zero value.

 

You could choose which was linked to the reminder itself.

Matt C

Re: Reminders on Invoices

Hi Matt,

I'm not that familiar w/ templates, but would we then need a different template for all combinations of reminders? Or, is the "reminder" item a product?

Thanks, Paul

Re: Reminders on Invoices

Hi Paul,

Yep. you would need a different template set for each combo so not so practical. I was just thinking of a way to avoid the need to add another invoice item.

Still the idea of a zero value "Reminder" product which is just used so that there is an explicit reference to the creation of the reminder on your customer invoice would still work.

In our hands we have been used to the vaccine product being enough in this regard.

eg "TRIENNIAL CANINE DISTEMPER, PARVO AND HEPATITIS VACCINATION"

Matt C

Re: Reminders on Invoices

Hi Matt,

It seems to me that all the information necessary to piece together the report is there in the database, but I'm not clear exactly on how reports like the invoice really work. I understand that the data tree is passed to the report somehow instead of queried via SQL. Is it possible to have a subreport that pulls reminder information via a straight SQL query?

Thanks, Paul

Re: Reminders on Invoices

Hi Paul,

Currently the invoice is a collection of invoice items related to the parent invoice (this is the sub report bit). Not sure if I understand your query entirely but if you are asking is it possible to have a subquery that pulls information independent of the invoice items related to the parent invoice, I dunno. Too technical for me.

Matt C

Re: Reminders on Invoices

I don't believe we support this at present. Reminders are linked to the invoice items, which are displayed in a sub report from the parent invoice. We don't support sub-reports from within sub-reports, so you can't display a list of reminders associated with an invoice item - in any case it would look a bit odd.

One possible workaround would be to write an invoice report which uses SQL to query the invoice, its items and reminders, and accepts the invoice number as a parameter. This would not be straight forward to use - you would need to launch this from the Reports -> Reporting workspace.

If there is enough interest, we can start a new project to add support for collating reminders so they can be reported in invoices. It should be possible to collate medication, investigation and document acts in the same way.

-Tim

Re: Reminders on Invoices

Hi Tim,

I'm actually not talking about the reminders associated w/ the invoice. Those items might not be the most relevant ones for a particular customer. Instead, I'm talking about all reminders, within a certain time window after the date of the invoice, associated with the invoice customer. Does that make sense? So for instance... they should be reminded on an invoice of due items for completely different pets of theirs.

What would be ideal is if I could create another sub-report (like the invoice-item report) that got "customer-reminders" through an SQL query, and displayed that list there. I'm just looking to understanding if it's possible before I dig into it.

Thanks,

Paul

Re: Reminders on Invoices

Makes sense, but its not supported at present.

The simplest approach would be to provide a function that returned a formatted string of reminders. You'd use it in the invoice items subreport like:

      party:getPatientReminders("$F{target.patient.entity}")

E.g:

 Spotty
    Reminders:  Booster vaccine due 12/09/2012 ....

    Consultation            1            $45.00
    Amoxil Tabs            20            $19.90 

If there are multiple reminders, these could be separated by a comma or new line.

If you want to be able to format the reminders yourself, a more complex solution would be required:

* a function returning a data source of patient reminders would be needed. This data source would be supplied to a sub-report in the invoice items sub-report

* reports would need to support sub-reports containing sub-reports

 

-Tim

Re: Reminders on Invoices

Hi Tim,

Okay.. tnx. Any chance to get an estimate for this one?

Thanks,

Paul

Re: Reminders on Invoices

For the simple approach, 5 hours work.

The party:getPatientReminders() function would:

  • list due reminders in the order they are due, with a new line between each reminders.
  • Each reminder would be formatted according to the act.patientReminder description node.

The current formatting of the description node would need to change.

Currently it is:

Due Date : <due date> Reminders Sent <reminder count>

It would need to change to:

<Reminder  type> due <due date>

The reminders table in the Patients -> Medical Records -> Reminders/Alerts would need to include a new reminder count column as this would no longer be part of the description.

-Tim

Re: Reminders on Invoices

Thanks Tim,

I imagine that the report could then handle the time frame? We wouldn't want to put reminders that are 3 years out on the invoice (I think?). It seems we would only want to put ones for the next 6 months or so. This could be handled w/ reporting correct?

Cheers, Paul

Re: Reminders on Invoices

The function could take an upper limit for due dates, e.g.:
          party:getPatientReminders("$F{target.patient.entity}", 6, "MONTHS")

or:

          party:getPatientReminders("$F{target.patient.entity}", 1, "YEARS")

To indicate 6 months or 1 year from the current date.

Alternatively you could pass it a date, but date arithmetic in jasperreports isn't much fun.

The above could include overdue reminders (reminders that are still "In Progress", but whose due date has passed). Alternatively, these could be filtered.

-Tim

Re: Reminders on Invoices

Sounds great! What's the next step to setting up a project to fund?... a cost estimate?

Thanks, Paul

Re: Reminders on Invoices

I've created a new project for it here: http://www.openvpms.org/project/reminders-invoices

-Tim

Re: Reminders on Invoices

What's the next step for this to move it forward?

Thanks, Paul

Re: Reminders on Invoices

I've updated the project status to Seeking Funding - if you're happy with the proposed implementation in https://openvpms.atlassian.net/browse/OVPMS-1071

Note that the implementation outlined there works at the patient level rather than the customer level.

If thats not sufficient, I'll need to re-estimate.

Development won't proceed until funded.

Regards,

Tim

Re: Reminders on Invoices

Hi Tim,

Thanks. Since an invoice is a customer document, I'm not sure how it would work at a patient level. It seems to me that printed reminders should be for all animals of the current invoice customer.

Cheers, Paul

Re: Reminders on Invoices

Could do that. So you'd have functions:

String getReminders(Party customer, int dueInterval, String dueUnits)
String getReminders(Party customer, int dueInterval, String dueUnits, boolean excludeOverdue, String separator)
String getReminders(Act act, int dueInterval, String dueUnits)
String getReminders(Act act, int dueInterval, String dueUnits, boolean excludeOverdue, String separator)

These would return a formatted string of the outstanding reminders for all patients for the customer.

  • the due interval and units would be used to filter reminders with due dates relative the current date.
  • the includeOverdue flag would indicate to include/exclude overdue reminders.
  • the default value for includeOverdue would be false.
  • the default value for separator would be the new line character.

Done this way, the formatting options are  a bit limited, as both the patient name and reminder description must be concatenated. This would prevent alignment of reminder descriptions for example.

E.g.:

 Bitzer Maloney - Vaccination due 12-6-2012
Fluffy - Vaccination due 20-5-2012
Scarface Claw - Some other random procedure due 12-6-2012

 E.g. in jasperreports, usage would be:

		party:getReminders("$F{customer.entity}", 6, "MONTHS")
party:getReminders("$F{customer.entity}", 1, "YEARS", true, ",")

Estimate 6 hours to do it this way.

8 hours to do both versions, i.e reminders per customer and reminders per patient.

-Tim

Re: Reminders on Invoices

Hi Tim,

Would it make sense to arrange it such that the information was passed back in the same way that invoice items are passed through to a sub-report? I don't fully understand how information is passed to a subreport, but if this were done the same way, would it be possible to separate the various fields (date, description, patientname, etc) and allow formatting of each?

Thanks, Paul

Re: Reminders on Invoices

Yes it would.

In order to do this, the list of reminders need to be wrapped up in a data source. This gives you access to each of the reminder fields in the same way as you access other fields - you can format the reminders however you like.

Possibly the best way to do it is enable the reminders be accessed via an xpath expression which can be used within jasperreport dataSource expressions. E.g.:

 $P{dataSource}.getExpressionDataSource("party:getReminders(" + $F{customer.entity} +")")

You would use this in a subreport dataSourceExpression.

 

Regards,

Tim

Re: Reminders on Invoices

Makes sense to me. Thanks Tim.

How does this change the estimate?

Cheers, Paul

Reminders on Invoices (Funding Update 59%)

A user has pledged 59% funding for this project!

 

A reminder that this feature will list reminders for any patients that are due on a customer invoice.

Pretty nice feature huh? Thanks to Paul for driving this one through.

Public pledges can be made to this forum topic or email me directly by clicking here (link only works in the forum).
Development will not commence until fully funded.

Matt C
 

Reminders on Invoices (Funding Update 100%)

This propject is now fully funded and development will proceed.

It should be noted that this development was funded solely by one practice. People who have never pledged to a development should be mindful that it is the prerogative of regular developers to not make their funded developments publically available. 

The more people who contribute, the less likely that regular funders will seek to keep their funded developments to themselves....

Thanks,

Matt C

Syndicate content