Difference between revisions of "Patient Portal Document Templates"

From OpenEMR Project Wiki
Line 174: Line 174:




== Add Images to a Template ==


It is possible to include images in a template by referencing their storage location in a <div></div> block. At the moment the only place images may be stored for this purpose is on the server, in ./../openemr/sites/default/images/ and the only way to place them there is to ssh in with FileZilla or similar application, and place them there. Follow the forum post mentioned in Conclusion below, for developments on this.


For this example we have the image file, login_logo.gif placed where it needs to be.


If the following code is present at the top of the template file above, we get the template in the next picture.


<div style="margin-left:0.4925in;margin-right:0in;"><div></div>
<div style="margin-left:0.4925in;margin-right:0in;"><img src="./../../sites/default/images/login_logo.gif"></div>
<div style="margin-left:0.4925in;margin-right:0in;"></div></div>
<div style="margin-left:0.4925in;margin-right:0in;">INSURANCE INFORMATION</div>
<div style="margin-left:0.4925in;margin-right:0in;">{CheckMark}Medicare# {TextInput} {CheckMark}Medicaid# {TextInput}</div>
<div style="margin-left:0.4925in;margin-right:0in;">{CheckMark}Workers Compensation (job injury) to whom is bill to be sent? {TextInput}</div>
<div style="margin-left:0.4925in;margin-right:0in;">(etc)</div>
[[Image:templ+hands.png]]
Alternatively, using html is an option though see the forum article for details.
This code in the template:
<div style="margin-left:0.4925in;margin-right:0in;"><img src="./../../sites/default/images/login_logo.gif"> <h4>HIPAA Declaration</h4>Given today: {DOS} OpenEMR Software makes it a priority to keep this piece of software updated with the most recent available security options, so it will integrate easily into a HIPAA-compliant practice and will protect our customers with at least the official HIPAA regulations. <em>The Practice:</em></div>
...produces this:
[[Image:JerrysImgPic.png|top]]
'''''(Thanks Jerry!)'''''




Line 693: Line 764:
Watch Forum posts including this one for updates:
Watch Forum posts including this one for updates:


https://community.open-emr.org/t/any-help-with-understanding-documents/13798/7
[https://community.open-emr.org/t/any-help-with-understanding-documents/13798/7 https://community.open-emr.org/t/any-help-with-understanding-documents/13798/7]
 
Some changes to the v 4.2 'Templates for Patient Documents' are mentioned in a brief though illustrated discussion.




Also discussed is what Jerry has planned for its final version expected to be released in OpenEMR 5.0.3.
* Some changes to the v 4.2 'Templates for Patient Documents' are mentioned in a brief though illustrated discussion.
* Also discussed is what Jerry has planned for its final version expected to be released in OpenEMR 5.0.3.
* And the restrictions on using html in templates.<br/>

Revision as of 20:57, 7 May 2020

Introduction

As of OpenEMR version 5.0.2, Jerry Padgett (OpenEMR forum: @sjpadgett) added some functionality to the Patient Portal documents template module. Although it was originally intended for producing documents by the patient when logged into their portal, it can also be used by clinic staff outside the portal, working in the EMR.


The original 'Documents Templates' functionality found at Main Menu: 'Miscellaneous/ Document Templates' does not appear to work properly any more. But since the 5.0.2 version of the Templates functionality includes the capabilities of the 4.2 version this doc will effectively supersede the 4.2 'Templates' doc.

See the Conclusion of this document for links to relevant OpenEMR forum posts.

HTuck - MI-Squared

Procedure

This doc will cover the following main activities:

1. Manage Patient Portal Document Templates

2. Create a new template

3. Staff use a template from the EMR

4. Patient use a template from the Portal

Pdoc02.png

One of the requirements of this functionality is that the Onsite Patient Portal must be activated.


In 'Administration / Globals / Portal ' 'Enable Onsite Patient Portal'

(oval at top)



NOTE: If you want the template functionality but not the portal, it is possible to activate the portal and leave the dummy URL as the portal address (arrow above). However I can't advise if this is a good idea or a bad idea.



Manage Patient Portal Document Templates

When managing the patient portal document templates we can

  • upload new templates
  • edit existing ones
  • delete unwanted templates



1. Select from Main Menu, 'Miscellaneous/ Portal Dashboard' (cursor arrow top right, image below)


Pdoc03.png





2. On 'Portal Dashboard' tab, under 'Patient Document Templates' click 'Manage Templates' (oval)...


Pdoc032.png


... which opens the 'Portal | Import' tab.



The top section, 'Patient Document Template Upload' is for uploading new templates discussed below, see section '2. Create a new template' for details.



In the lower half of the panel, "Active Templates" (round rectangle) you may select a stock template, edit it to suit your facility needs (see next section) and save it back to the system for general use. Or click the red button next to it to delete an unwanted template.

Create A New Template

These templates are plain text files that have a patient's data, derived primarily from their demographics, inserted into the output document in the same way a 'mail merge' function would. The patient data to be inserted are indicated in the template by tags of text enclosed in {curly braces}. The tags also generate control objects such as signature boxes, text areas, check boxes and radio buttons, which are displayed when the template is being used, that insert appropriate content into the finished document.


Here is the list of patient data fields currently supported:* {Address} - street address only, e.g., 1224 Oakdale Rd.

  • {AdminSignature} - box to input signature of the staff person administering the form
  • {Allergies} - allergies list from patient's Issues tab
  • {CheckMark} - checkbox next to a list item
  • {ChiefComplaint} - [data origin unknown]
  • {City} - from patient's demographics
  • {DEM:fieldid} - data from the specified field of patient demographics; get field ID from the Demographics LBV form
  • {DOS} - date of service in the format yyyy-mm-dd
  • {HIS:fieldid} - data from the specified field of patient history LBV form
  • {LBFxxx:fieldid} - data from the specified field of a LBF (LBV) instance, from list in 'Administration/ Layouts'
  • {Medications} - ? from patient's Issues: Medications list?
  • {PatientDOB} - format yyyy-mm-dd
  • {PatientID} - external ID as distinct from the database's internal pid though may be the same
  • {PatientName} - in format 'FirstName Middle Lastname' from Demographics
  • {PatientPhone} - output in this form: (000)000-0000
  • {PatientSex} - 'Male' / 'Female/ 'Unassigned' from Demographics
  • {PatientSignature} - box to input patient signature
  • {ProblemList} - from Patient record's 'Issues' screen
  • {ReferringDOC} - Name of Referring Provider from Demographics/ Choices
  • {State} - full state name from Demographics/ Contact
  • {TextInput} - text area to input plain text
  • {ynRadioGroup} - set of radio buttons for 'Yes / No/ Unk'
  • {Zip} - Patient's demographics 'Contact/ Postal Code' field


NOTE: In the 4.2 documentation they provide a template named 'woc.doc'. That is a binary .doc file and will not work in an OpenEMR v5.0.x version of the Patient Template function.


All this being said, to make your own template you can either copy an existing template to a new text file, modify it as desired, then save it with a different template file name, or compose your own from scratch.


These next examples may be helpful.


Remember, the template file is a plain text file which may have a .txt filename extension.

This template file contents (dashed lines not included):

--------------------------------------------------------------------------------------------

INSURANCE INFORMATION

{CheckMark}Medicare# {TextInput} {CheckMark}Medicaid# {TextInput}

{CheckMark}Workers Compensation (job injury) to whom is bill to be sent? {TextInput}

{CheckMark}Other Medical Insurance:Group#{TextInput} ID#{TextInput}

Name/Address 2nd Insurance: Name{TextInput} Relationship{TextInput}

Address {TextInput}

State {TextInput} Zip {TextInput}


Are you personally responsible for the payment of your fees? {ynRadioGroup}

If not, who is?

Name:{TextInput} Relationship:{TextInput} DOB:{TextInput}


Who to notify in emergency (nearest relative or friend)?

Name{TextInput} Relationship{TextInput}

Address {TextInput}

State {TextInput} Zip {TextInput}

Work Phone {TextInput} Home Phone {TextInput}

--------------------------------------------------------------------------------------------


...produces this template form:


InsInfoForm.png


Add Images to a Template

It is possible to include images in a template by referencing their storage location in a

block. At the moment the only place images may be stored for this purpose is on the server, in ./../openemr/sites/default/images/ and the only way to place them there is to ssh in with FileZilla or similar application, and place them there. Follow the forum post mentioned in Conclusion below, for developments on this.

For this example we have the image file, login_logo.gif placed where it needs to be.

If the following code is present at the top of the template file above, we get the template in the next picture.

<img src="./../../sites/default/images/login_logo.gif">
INSURANCE INFORMATION
{CheckMark}Medicare# {TextInput} {CheckMark}Medicaid# {TextInput}
{CheckMark}Workers Compensation (job injury) to whom is bill to be sent? {TextInput}
(etc)


Templ+hands.png












Alternatively, using html is an option though see the forum article for details.

This code in the template:

<img src="./../../sites/default/images/login_logo.gif">

HIPAA Declaration

Given today: {DOS} OpenEMR Software makes it a priority to keep this piece of software updated with the most recent available security options, so it will integrate easily into a HIPAA-compliant practice and will protect our customers with at least the official HIPAA regulations. The Practice:


...produces this:


JerrysImgPic.png









(Thanks Jerry!)


Save for general use

When your template file is complete, follow these steps:

1. Save it as [filename].txt (I'm using the 'woc' filename for my own purposes)

2. From Main Menu: Miscellaneous/ Portal Dashboard (back to third pic above)

3. Click 'Manage Templates' (oval above) to open the Patient Document Templates

4. Browse to the template file

Pdoc034.png


5. Click 'Upload Template for Global All Patients' (oval)

...and see it added to the 'Active Templates' list for global use of all patients.

Pdoc032.png

NOTE: the file name has been changed to woc.tpl as promised at the top of the panel.


Save for use by a specific patient

In the Template Manager:


Tpl07.png


1. In 'Active Templates' section, (round rectangle) select the patient in the dropdown list.













See the list in the image above of templates for general use but when Pepe is selected (image below) he has nothing specifically for him




Tpl02.png

2. Browse the local filesystem for the template






3. Click green area: 'Upload template for' that patient









Tpl03.png

4. Patient's name returns to 'Global all patients'; observe the uploaded template is not there.
















Tpl04.png







5. In patient's Documents list: select the category to put this doc into (oval on pt Info)


6. Click the blue 'Open' button to view this patient's templates (cursor arrow, at lower right)







7. The template is in the menu line of templates for this patient (oval)

From this point use the template as described in following sections.




Tpl05.png


Confirm that this template is not available to other patients


Tpl06.png


Staff Use a Template from the EMR

1. Open the patient's record. Click on 'Documents' tab (oval)


Pdoc0.png




2. ...to open the Document Uploader/ Viewer


pdoc01.png

NOTE: the Document Uploader/ Viewer is strictly for inserting external documents to the patient record.

Its functions are documented elsewhere.


3. Select a category to put the document in

here we have selected 'Patient Information' (oval, above)


NOTE: the dropdown list at bottom left is associated with the obsolete version of the Docs Template module (red 'X' below left)


4. Click on the 'Patient Document Patient Forms' dropdown list (round rectangle lower right) and select the desired template

Here using 'Privacy Document'


NOTE: these are the same templates shown in the 'manage templates' section above.



Pdoc05.png





5. The form appears; can see top of form in Step 6 below.

Select/ operate all appropriate controls (Arrows):

... text areas, check boxes, radio buttons...


Pdoc06b.png




... Patient and staff click their signature 'X' and signs with mouse cursor and accepts signature (ovals)



Pdoc07.png














Pdoc08.png

... everybody signs.


6. Enter the document into the patient record:


Pdoc06.png




Menu at top left:


'Save' - saves it to a location in the EMR server where it can be accessed by the Portal Templates Manager


'Chart to Category Patient Information' - sends doc to the patient's document category selected in step 3 above


'Download' - generates pdf to download locally


'Return' - back to the Documents List / Uploader/ Viewer screen


7. We have clicked 'Chart to Category Patient Information'...


Pdoc11.png



...and now, looking in the patient's 'Documents List' we see the Privacy Document there in the 'Patient Information' category

Patient Use a Template from the Portal

Patient is logged into portal:

Pdocp01.png


1. Click 'Patient Documents' in left menu



The Patient Documents panel (below):

  • Line of tabs to right of 'Pending' (round rectangle) displays all templates available to this patient
  • At right end of list may 'Exit' back to portal home screen (arrow)
  • List below blue bar shows all current documents for this patient.
    Note: the Patient Portal documents list is different from the patient's Documents list in the EMR!



Pdocp02.png




2. Select a template from that line of tabs.


3. Fill out the form. The form and steps look and work the same as above when done in the EMR.



The menu at top left of the form:

Pdocp08.png


Depending on the form these menu items may be displayed:

  • 'Signature' - put a signature on file for the portal- it is separate from their EMR sig.
  • 'Save' - the document to patient's portal documents
  • 'Print' - a hard copy from the browser
  • 'Send for Review' - if this document needs to be co-signed by clinic staff
  • 'Return Home' to return to the patient's portal home screen.





When attempting to sign the form, if the patient does not have a signature on file for the portal, they will see notification of that fact (oval below).


Pdocp05.png





4. Click the 'Signature' menu item (arrow) and file a sig, in the same manner as shown above in the EMR.


5. Click 'Save' on the menu.

  • OR- if the document must be co-signed or reviewed by a provider, click 'Send for Review'.


6. Click 'Return Home' to log out of portal




That is all for the Patient to do.

When the next user with suitable access permissions logs into the EMR after that, they will see a 'Portal Alert' at top right of initial EMR screen (arrow)


Pdocp09.png






1. Open it to see what's happening: we have a Portal Audit.

Pdocp10.png




If the user has system access permissions to do this,

2. Click on the item needing attention.



  • Onsite Portal - Patient Activities tab opens.


Pdocp11.png






2. Click in the item's row to open the document.

  • Note the limited top left menu items, and an earlier Privacy Document in list at bottom.


Pdocp12.png



3. Click 'Clinic Representative' x in the document above (oval)


4. Click 'Chart to Category' in the document's menu


Pdocp13.png

Note: this does not save to a pre-selected document category. However the document may be moved to other category later if desired.


5. Back at the form screen Click 'Done'; the item leaves the display

(At present the 'Help' button is non-functional)


Pdocp12b.png


6. Confirm new file in patient's 'Documents List', 'Onsite Portal/ Reviewed' category:


Pdocsp15.png

Conclusion

The 'new ' Patent Portal Document Template has added considerable functionality to the document- producing capability of OpenEMR, with more to come.

Jerry's brief illustrated summary of the project is in the OpenEMR forum here:

https://community.open-emr.org/t/adding-patient-portal-document-templates-to-openemr-patient-documents/12141/3


Watch Forum posts including this one for updates:

https://community.open-emr.org/t/any-help-with-understanding-documents/13798/7


  • Some changes to the v 4.2 'Templates for Patient Documents' are mentioned in a brief though illustrated discussion.
  • Also discussed is what Jerry has planned for its final version expected to be released in OpenEMR 5.0.3.
  • And the restrictions on using html in templates.