Query re Patients|Medical Records|Print
I am trying to fix the 'patientClinicalEvent a4.jxrml' so that it correctly prints the detail of what is shown on the screen as 'Customer Invoice Item' - ie the non-medication products [for which the current standard jxrml prints no detail].
The CSH say at http://www.openvpms.org/documentation/csh/1.7/reference/reportFields that the 'Patient Visit' template type uses the archetype act.patientClinicalEvent. However, this does not match with how the report is constructed. For example, there is a report field 'product.entity.name' which holds the product for the 'Customer Invoice Item's - however act.patientClinicalEvent has no product node. Ditto for the field 'shortName' which is used by the report but does not exist in act.patientClinical event.
Hence I conclude that the Patient Visit template type actually uses something slightly different.
I need to access the quantity of the invoiced item. I tried simply 'quantity' but this is wrong.
Any help appreciated.
Regards, Tim G
Re: Query re Patients|Medical Records|Print
The act.patientClinicalEvent report gets more than just act.patientClinicalEvent acts; it gets a list of events and their immediate child acts.
Where charge items are being included, the report will get act.customerAccountInvoiceItem acts. For these, a quantity field of type java.math.BigDecimal can be used. You can set the field to be displayed with a printWhenExpression of $F{shortName}.equals("act.customerAccountInvoiceItem").
It may be easier to create separate Detail bands for each of the supported shortNames, to avoid the need to overlap fields.
-Tim A
Re: Query re Patients|Medical Records|Print
Tim - thanks for the reply. I now have the all-singing, all-dancing Patient Visit report running - includes labels and invoice items with quantities, and has been re-engineered to easier maintenance with multiple detail lines. [I have installed a copy on the 1.7 Alpha system if you want to lift it - I have reset its fonts to the standard sanserif. I think the only non-standard part is my use of the clinician description rather than the name.]
I only have one problem - the performance is not good - a large history (15 screen pages, 9 report pages) took 1 minute 45 secs to generate. I would have thought it should be better as the data has already been mostly retrieved to show on the screen and hence should be in the MySQL cache.
Regards, Tim
Re: Query re Patients|Medical Records|Print
There needs to be some profiling work done on the reporting framework in conjunction with the xpath extension functions. At the moment, each openvpms:get() and $F{field} operation translates into at least one call to the archetype service.
There needs to be localised caching done whilst processing the report to avoid this, but there are currently no hooks in place to allow this.
-Tim A
Re: Query re Patients|Medical Records|Print
I've added the updated template to revision 5700.
Thanks,
-Tim A