New feature to support word processing documents as templates

sunsetsystems wrote on Monday, March 17, 2014:

Tracker item with description and link for code review is here:

https://sourceforge.net/p/openemr/code-review/235/

Email me if you want access to my test site for this.

Rod
http://www.sunsetsystems.com/

blankev wrote on Monday, March 17, 2014:

Probably I don’t know what I am testing.

I get the screen for upload and download. I can find the Acne document in Test Tesla client. But what can be done with this? Downloading does not give an form with information of the Tesla Test client. Nor can I find what to do with my test upload files. So for now I think I do something wrong and need some more info on what I should accomplish.

sunsetsystems wrote on Monday, March 17, 2014:

That test form is a very simple LibreOffice document. You’ll see the fields filled out if you have LibreOffice or OpenOffice. Also to get the keyword substitution you have to download it from the patient documents page, not the Document Template Management page.

Rod
http://www.sunsetsystems.com/

bradymiller wrote on Tuesday, March 18, 2014:

Hi Rod,

Placed a quick review on github.

Also directed one of the “Up For Grabs” demos to your code for testers (may help to paste a quick sample libreoffice file here on the forum thread for testers to try it out on the demo):
http://www.open-emr.org/wiki/index.php/Development_Demo#192.168.1.130

-brady
OpenEMR

blankev wrote on Tuesday, March 18, 2014:

I downloaded the Acne-file from Rod’s site, and tried to upload the same file without anything in the Demo site 130 but get the following error:

Unable to create ‘/var/www/openemr/sites/default/doctemplates/Acne4Test’

Could me be me not understanding the correct upload or the Demo. Could load files in on the Rod-Sunset demo.

sunsetsystems wrote on Tuesday, March 18, 2014:

Hmm, the code tries to create the doctemplates directory if it does not exist. Perhaps it does not have write access to the site directory? I could pre-create it with the commit but package building would also need to give it the right permissions as it does with the edi, era, documents and letter_templates directories.

Brady, thanks!

Rod
http://www.sunsetsystems.com/

bradymiller wrote on Tuesday, March 18, 2014:

Hi Rod,
How about placing the doctemplates directory in the documents directory.
Then permissions are dealt with and it doesn’t require more work on
install/upgrade in addition to changes in package etc. I’d suggest all new
writable directories go in the documents folder in the future. This also
then doesn’t allow direct download of the tempates without login
credentials (some places may not want their templates open to the public).
-brady

On Tue, Mar 18, 2014 at 8:18 AM, Rod Roark sunsetsystems@users.sf.netwrote:

Hmm, the code tries to create the doctemplates directory if it does not
exist. Perhaps it does not have write access to the site directory? I could
pre-create it with the commit but package building would also need to give
it the right permissions as it does with the edi, era, documents and
letter_templates directories.

Brady, thanks!

Rod
http://www.sunsetsystems.com/

New feature to support word processing documents as templateshttps://sourceforge.net/p/openemr/discussion/202506/thread/89134be4/?limit=25#d189

Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/openemr/discussion/202506/

To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/

sunsetsystems wrote on Tuesday, March 18, 2014:

Brady, good idea, I’ll do that.

Very cool that good stuff always seems to come out of these code reviews!

Rod
http://www.sunsetsystems.com/

sunsetsystems wrote on Wednesday, March 19, 2014:

I’ve added a commit to the branch to include the changes discussed in code review, including Brady’s suggestion above. Will merge the two (or more) commits together before applying to SF.

Rod
http://www.sunsetsystems.com/

bradymiller wrote on Wednesday, March 19, 2014:

Hi,

Refreshed the UP FOR GRABS demo (so Pimm does not need to wait until 9:00am PST to test it :slight_smile: ):
http://www.open-emr.org/wiki/index.php/Development_Demo#192.168.1.130

Also placed code review on the new commit.

-brady
OpenEMR

blankev wrote on Tuesday, March 25, 2014:

Now I don’t want to be the wise guy, but your Document looks a lot the same as letter in the Popups.

Is it better! It does give more freedom of choice in document type. But it is almost as difficult to add a certain demographic like e-mail address or siblings…

Please correct me if I am wrong, but after reading the long and many lines of software development it is rather obvious that normal users like me almost never will have the capacity to add other registered field of the OpenEMR database in the Rod document.

Add specific fields not yet included in the Rod-Document just by clicking a dropdown-list of all Demographic fields and even more interesting OpenEMR Database registered fields? Is this something to ask for (??? I can hear the mind sounds rebounding and grinding of the teeth as “I have something better to do, are they never happy with what they get”…) as a future development?

sunsetsystems wrote on Tuesday, March 25, 2014:

True that a non-programmer would have trouble expanding the list of keywords. But it’s a pretty easy task for a developer. Once there’s a rich enough set I think many users will like the selection.

Rod
http://www.sunsetsystems.com/

blankev wrote on Tuesday, March 25, 2014:

Rod, please don’t take my comment as an offense. I was just thinking of the many questions the newbies are going to ask. The answer will be NO, just ask a Developer. You are correct.

Is there still a need for an OpenEMR-WIKI page on the Document and Template menu choice? For me as a new user of this menu option it was not as easy as it seemed with your explanation. But your explanation did say it all. So with all info in this tread it is rather easy to make a new WIKI-OpenEMR page for the non-developers.

sunsetsystems wrote on Tuesday, March 25, 2014:

No offense taken! Not sure what you mean about a new wiki page, but I made one that is linked to here:

http://open-emr.org/wiki/index.php/OpenEMR_Wiki_Home_Page#Supplementary

as “Templates for Patient Documents”.

Also I do see a need for a manual page that covers patient documents in general.

Rod
http://www.sunsetsystems.com/

blankev wrote on Tuesday, March 25, 2014:

Give me some time, I will come back. The Manual and paragraphs becomes quite cluttered with all options that use the words Document and or Template. Would nice to have it all together as you suggest.

If I do some discoveries in your part of the Document Template WIKI, you want me to make suggestions through this Forum, or you want me to do it right away and if you not like it, have the option to go back to the older version?

Let me know.

sunsetsystems wrote on Tuesday, March 25, 2014:

Pieter, the wiki welcomes your improvements. Please go ahead. Thanks!

Rod
http://www.sunsetsystems.com/

fsgl wrote on Tuesday, March 25, 2014:

What was the impetus to create this module initially?

I can think of 2 situations wherein a document template will come in handy. The first is a Withdrawal of Care document, to avoid the problems with abandonment and a delinquent balance letter before turnover to collection.

It’s good to be able to incorporate text documents without the hassle of conversion to .jpeg files and the fooling about with ImageMagick.

There is another circumstance for a document known as “Private Notes and Observations”, which is not discoverable. For it to be truly non-discoverable, it probably should not even be in OpenEMR. This document would be helpful should the physician have to defend himself in a legal setting.

blankev wrote on Tuesday, March 25, 2014:

You can make whatever document you want with the following information directly related to a client:

The uploaded documents may contain any of these keywords:

    {PatientName}
    {PatientID}
    {PatientDOB}
    {DOS} (Date of service)
    {ReferringDOC}
    {ChiefComplaint}
    {Allergies}
    {ProblemList}
    {PatientSex}
    {Address} (street address only i.e. 1224 Oakdale Rd.)
    {City}
    {State}
    {Zip}
    {PatientPhone} (output in this form: (000)000-0000) 

Next step is, to download the as such created client information and change if needed, and add information whatever you can think of. In any format you like.

The templates can be prepared with MS Word or OpenOffice or LibreOffice, and probably more. And when needed these templates can be used and changed at will. So actually it is only limited by the borders of your imagination. Can be send as attachment, snail-mail, printed etc. Want to write me a letter with content and free text: Use a template, but first include my demographics in the Client Database. Almost the same as Popup-letter, but far more flexible.

Have some fun and start testing! O sorry, you will need your own Logo on paper when printing.

Or we could ask Rod politely for an additional line: {logo}

sunsetsystems wrote on Tuesday, March 25, 2014:

Things that are not patient-specific such as heading, logo, font choices, formatting, boilerplate text, etc. would not be suitable for keyword substitution. You can just make them part of the template document.

Rod
http://www.sunsetsystems.com/

fsgl wrote on Tuesday, March 25, 2014:

The above description is reminescent of “the sky is the limit” for NationNotes. LibreOffice Writer and the WYSIWYG editor share common features. In essence Document Templates can be used as the turbo-charged version of Letters in Popups or for internal documentation.

Since Medicare eliminated the CPT consultation codes, there is no financial reason for our office to send out letters to the PMD’s.

Can’t envision using the keywords because the template would go straight into Documents/Medical Record, therefore it would be unnecessary to provide identifiers.

One very nice feature is the decoupling from an encounter, thereby avoiding corruption of Meaningful Use calculations. This would have been a good solution for the recording of serial Serum Glucose values.