No node named patient found in archetype act.

Greetings all,

Upgraded from 2.0 to 2.0.2 last weekend and since then our OTC invoices have been inserting the phrase "No node named patient found in archetype act." where in non-OTC invoices, the patient's name normally appears.  Non-OTC invoices behave correctly. (see attached)

The subreport where this is generated is Invoice Items.  Unfortunately, I have an extensively customized InvoiceItems.jrxml as this is where all of my PST/GST tax calculations are done for our two-tax system.

In the stock Invoice Items, the conditional field expression for the patient name is:

($F{target.patient.entity.name}==null)?"-patient not specified-":$F{target.patient.entity.name}+"  (ID:"+$F{target.patient.entity.id}.toString()+")"

I would expect this to produce a "-patient not specified-" on OTC invoices and the patient name and ID# on non-OTC invoices. I have incorporated a somewhat simplified field expression as we don't normally want the Patient ID#:

($F{target.patient.entity.name}==null)?"-patient not specified-":$F{target.patient.entity.name}

I have tried various approaches including testing for the "No node" phrase instead of null, Blank when null, etc.

Any ideas why this error is being thrown?

Thanks,

Sam

Kamloops, BC

 

Comment viewing options

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

Re: No node named patient found in archetype act.

The error is always raised if a node doesn't exist. In the case of counter sales, there is no patient node, so you get the:
       No node named patient found in archetype act.customerAccountCounterItem
message.

The default Counter Sale.jrxml template reuses the Invoice Items.jrxml subreport as there is a lot of similarities between invoices and counter sales.
It suppresses the display of the patient by defining an isOTC variable which is used in the Invoice Items.jrxml template.
Compare your invoice items template with the standard one, to ensure you are replicating this behaviour.

Re: No node named patient found in archetype act.

Hi Tim,

Thanks for the pointer.  I'll work on that today, but I'm sure that is the issue. Recently we had a real edge case that my PST/GST calculation choked on and I tried to make a universal items subreport that would work with OTC, credits, invoices, etc. But I'm pretty sure I missed this additional issue with the OTC's and the isOTC variable.

I'll look into it.

Thanks!

Sam

Re: No node named patient found in archetype act.

OK... all working.  Adding the isOTC Parameter along with the band conditional print expression fixed it.

Thanks!

Sam

Syndicate content