OVPMS-1539 InvoiceItem linking to Documents for reporting
Submitted by Ben_Charlton on Fri, 21/11/2014 - 19:13
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.
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
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:
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
these errors..(also note the error message typo)