OVPMS-1539 InvoiceItem linking to Documents for reporting

In completing this task I cam across one of those issues that plague record keeping

In that the invoiceItem node now creates a permanent reference to the original sale.  But the Product node which is set during creation remains edittable.  

Below is a snip of the how the document layout looks with the new changes IF an invoiceItem exists (if it doesnt it just looks like it did before)

One problem I am still working on is for some reason the versions are hidden on letters if the letter has an invoiceItem...but I am working on that.

 

Comment viewing options

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

Re: OVPMS-1539 InvoiceItem linking to Documents for reporting

Tim A. 

quick query you mentioned I  needed to subclass DocumentActViewLayoutStrategy. but the defaultlayoutfactory never calls that view for patient docs - it always calls DocumentActLayoutStrat which displays all nodes even of they are empty. 

The ViewDocumentLayout factory has no entry for DocumentActViewLayout. There is an entry in the default factory to force customer documents to use the view layout - hiding the version tab in those cases.

Just wondering, I have subclass the the view layout to PatientDocumentActViewLayoutStrategy but should I create an entry in the view factory or leave it as is so it displays empty nodes still.

Ben

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: OVPMS-1539 InvoiceItem linking to Documents for reporting

DocumentActViewLayoutStrategy should be used when you click on a document (patient letter or form) in Patients - Medical Records - Documents.
This is determined by the DefaultLayoutStrategyFactory.properties file.

When you edit a patient document, the PatientDocumentActEditor (via DocumentActEditor), explicitly creates a DocumentActLayoutStrategy.
I was suggesting:

  • creating a PatientDocumentActLayoutStrategy that extends DocumentActLayoutStrategy and excludes empty invoiceItem nodes. This is used by PatientDocumentActEditor
  • creating a corresponding view strategy that replaces the existing  registration in DefaultLayoutStrategyFactory.properties

 

Re: OVPMS-1539 InvoiceItem linking to Documents for reporting

Yes I know I absolutely did that....but I also subclassed to create PatientDocumentActViewLayout...which hides those nodes when empty...\

The DocumentActLayoutStrategy does NOT hide the nodes.  The nodes are hidden in DocumentActViewLayoutStrategy which is used for customer documents.  GIven that hiding the empty nodes was the point:-

What I have done is created a View layout and an edit layout and created the various linkages required in the properties files.... the editfactory and the view factory.  and removed the defaultlayout to avoid 

[WARN,ShortNamePairArchetypeHandlers,http-8080-4 - admin] Duplicate sbort name=act.patientDocument* from jar:file:/C:/Users/benjamincharlton/.m2/repository/org/openvpms/openvpms-web-workspaces/1.8-SNAPSHOT/openvpms-web-workspaces-1.8-SNAPSHOT.jar!/DefaultLayoutStrategyFactory.properties: ignoring

these errors..(also note the error message typo)

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au
Syndicate content