Adding Patient Portal Document Templates to OpenEMR Patient Documents

Okay, I can’t decide so, maybe the community will chime in and let me know if this is a worthwhile endeavor.
Edit: 08/10/2019 edit again 08/30/2019
Is included in v5.0.3 and did bring back to v5.0.2 for first patch.

@htuck of mi-square was kind enough to contribute a document for this feature:
https://www.open-emr.org/wiki/index.php/Patient_Portal_Document_Templates

For those whom may not know, the patient portal has a feature name Patient Documents which is based on text and/or html template documents that may be populated by both tag substitutions and editing document directly by patient. These templates may be imported via Portal Dashboard for individual or all portal patients.
The purpose here being to allow patients to review, sign and/or change documents such as consents, invoices from Posting(EOB), insurance changes and whatever one can dream up. Even an intake form for those that sign up using portals self register feature. I’ll show example later.
Anyway, i’ve added a hook into Demographics Patient Documents that is exposed when a document category is selected like so:

From here one may select to open an individual template or the module but, either way, all current template/document history for the patient will be exposed. i.e.


or in the case of selecting OpenEMR’s canned hipaa consent from pull down:

From here several options can be used:

  • First is to populate template and in this case mostly just get patient to sign:

    yields:
  • From here one may choose to simply save in which case the document is saved where further edits may be done in portal or here.
  • Chart the document to the category selected from Documents on form open in which case the document is flattened and store appropriately.

    and

    Note that a user/provider signature is available as well if tagged in template.
  • Important to note that in the OpenEMR module a patient is not required to be a portal user but for those that are this is another way to handshake documents with patient that may be important to both clinic or patient. eg. The clinic could pre populate a template document, save and then document is exposed to patient on their portal to complete and send for review and acceptance.

This just seems handy to me.
Some notes on signature:
The new signer module now includes option to send a signature request to a tablet device running the remote signer application which is started via @mdsupport terrific login application hook :
image
yielding for ipad:


and active:

Note if there is a signature on file it will show and clicking/touching On File signature will populate canvas where a new authorisation will be time stamped and requesting form is populated with signature.
The remote signing feature is automatic where if a remote device is available then signing happens on it otherwise signer pad is popped up on local devices document.

Lastly I may include in this PR a new feature for LBV where i’ve added two new datatypes to editor namely;

I gotta say, I love the encounter preview dialog from layout editor. Just saying:)

Anyway. There is more to all this but hopefully you’ll get the idea if worthwhile having.

1 Like

hi @sjpadgett, being able to hook up patient documents to the patient portal you developed is wonderful. Thanks for the detailed post and for your collaboration with @mdsupport :slight_smile:

These features have examples setup('til midnight pacific) at https://four.openemr.io/openemr/index.php

Check out the LBF signing form example setup in encounter. It’s groovy :wink:

hi @sjpadgett, what’s the easiest way for someone to upload any old document through the portal?

Currently patient can’t upload files or add attachments in portal. Templates are done in portal dashboard.

1 Like

@sjpadgett
I am having a hard time getting {HIS:usertext11} to work within my template.
It is the past medical history list from the history section from the layout lists.

Are there any LBV sample forms that are already created? I have already tried to follow the wiki.

Secondly, I am having problems with the formatting. Does it not use HTML? I am getting this huge space between a heading and a table.:

Please help… TIA

You can mix html/text or use pure text with <pre></pre> tags or pure html w/BS styling. Its just as if you are writing between a div tag. Don’t add doctype or body etc pseudo code for display is:

<html>
<body>
<div>@Template inserted</div>
</body>
</html>

Here is a quick mod’ed insurance template showing mixed format in 5.0.2(haven’t tested v6 in awhile):

<h4 class="text-center"><em>{PatientName} INSURANCE INFORMATION</em></h4>
<pre style="font-size:14px">
{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}
</pre>
<h4 class="text-center">Medical History</h4>
<pre style="font-size:14px">
Risk Factors: {HIS:usertext11}
Exams/Tests: {HIS:exams}
Family Father: {HIS:history_father}
</pre>

1 Like

@sjpadgett
Is this insurance information supposed to populate the patient insurance in the demographics? It would be nice if it did!

Looks like my problem has to do with my newlines. It was my formatting. I had this:

<table>
<tr>
<td>{PatientName}</td>
<td>{PatientDOB}</td>
<td>{DOS}</td>
</tr>
</table>
<font size="4"><b><br></b></font></p><p align="CENTER"><font size="4"><b>Chronic Pain 
Medical History</b></font></p>
<p></p><pre style="font-size:14px">What are your symptoms?&nbsp;{TextInput} 
<p></p>
<p style="margin-bottom: 0in">Where is your pain?</p>
<table>
 <tr>
  <td><p style="margin-bottom: 0in">{CheckMark}Face</p></td>
  <td><p style="margin-bottom: 0in">{CheckMark}Shoulder: R</p></td>
<td><p style="margin-bottom: 0in">{CheckMark}Mid back</p></td>
<td><p style="margin-bottom: 0in">{CheckMark}Knee: R</p></td>
</tr>
<tr>
 <td><p style="margin-bottom: 0in">{CheckMark}Head</p></td>
 <td><p style="margin-bottom: 0in">{CheckMark}Shoulder: L</p></td>
 <td><p style="margin-bottom: 0in">{CheckMark}Low back</p></td>  
 <td><p style="margin-bottom: 0in">{CheckMark}Knee L</p></td>
  </tr>
  <tr>  
   <td><p style="margin-bottom: 0in">{CheckMark}Neck</p></td>
   <td><p style="margin-bottom: 0in">{CheckMark}Arm: R</p></td>
   <td><p style="margin-bottom: 0in">{CheckMark}Hip: R</p></td>
<td><p style="margin-bottom: 0in">{CheckMark}Leg: R</p></td>
</tr>
<tr> 
<td><p style="margin-bottom: 0in">	</p></td>
<td><p style="margin-bottom: 0in">{CheckMark}Arm: L</p></td>
<td><p style="margin-bottom: 0in">{CheckMark}Hip: L</p></td>
<td><p style="margin-bottom: 0in">{CheckMark}Leg: L</p></td>
</tr>
<tr> 
<td><p style="margin-bottom: 0in">	</p></td>
 <td><p style="margin-bottom: 0in">{CheckMark}Forearm: R</p></td>
<td><p style="margin-bottom: 0in">{CheckMark}Thigh: R</p></td>
 <td><p style="margin-bottom: 0in">	</p></td>
</tr>

but it works if I have this:

<table><tr><td>{PatientName}</td><td>{PatientDOB}</td><td>{DOS}</td></tr></table></p>
<h4 class="text-center"><em> Chronic Pain Medical History</em></h4>
<pre></p>What are your symptoms?&nbsp;{TextInput} </p>
<p></p>
<p>Where is your pain?</p>
<table><tr><td><p>{CheckMark}Face</p></td><td><p>{CheckMark}Shoulder: R</p></td><td><p> 
{CheckMark}Mid back</p></td><td><p>{CheckMark}Knee: R</p></td></tr>
<tr><td><p>{CheckMark}Head</p></td><td><p>{CheckMark}Shoulder: L</p></td><td><p>CheckMark}Low back</p></td><td><p>{CheckMark}Knee L</p></td></tr>
 <tr><td><p>{CheckMark}Neck</p></td><td><p>{CheckMark}Arm: R</p></td><td><p>CheckMark}Hip: R</p></td><td><p>{CheckMark}Leg: R</p></td></tr>
 <tr><td><p></p></td><td><p>{CheckMark}Arm: L</p></td><td><p>{CheckMark}Hip: L</p></td> 
<td><p>{CheckMark}Leg: L</p></td></tr>
<tr><td><p></p></td><td><p>{CheckMark}Forearm: R</p></td><td><p>{CheckMark}Thigh: R</p> 
</td><td><p></p></td></tr>
<tr><td><p></p></td><td><p>{CheckMark}Forearm: L</p></td><td><p>{CheckMark}Thigh: L</p> 
</td><td><p></p></td></tr></table><p></p>

Regarding this, I believe it is related to me using PHP version 7.4, I will wait to go back to version 7.3

I can see that one may render fields such from a variety of sources, such as:

  • {LBFxxx:fieldid} (data from the specified field of a LBF instance)
  • {DEM:fieldid} (data from the specified field of patient demographics)
  • {HIS:fieldid} (data from the specified field of patient history)

How does one create a form for the patient portal, such as a medical history, that ties responses back to the patient record rather than being read-only, or simply a value that exists only in the context of the form?

For instance, given the Layout “History”, my requirement is to create an array of checkboxes or dropdown lists for the portal user to select that will be populated by the list of risk factors from {usertext11}. The ideal outcome is that the user responds to each question, and once they have completed the form and it has been charted, medical history automatically updates each list item within risk factors i.e. {usertext11} to reflect their answers.

1 Like

This is a great feature. I appreciate the work you have put into it. I am attempting to do something that is not in the forum from what I can see, but it seems like it should be easier than I am making it. I want to add a dropdown box with options to be select rather that have then typed in each time. Here is the code:

< div class=“input-group mb-3” >
< div class=“input-group-prepend” >
< label class=“input-group-text” for=“inputGroupSelect01”>Dimension:< /label>
< /div>
< select class=“custom-select” id=“inputGroupSelect01”>
< option selected="">Choose…< /option>
< option value=“1”>Acute Intoxication and/or Withdrawl potential< /option>
< option value=“2”>Biomedical Conditions and Complications< /option>
< option value=“3”>Emotional, Behavioral, Cognative (EBC) Conditions and Complications < /option>
< option value=“4”>Readiness to Change< /option>
< option value=“5”>Relapse, Continued Use, or Continued Problem Potential< /option>
< option value=“6”>Recovery Environment< /option>

I can select, but it is not sticking on the save. Any ideas? (I had to add a space after the <'s to show the code)

1 Like

@sjpadgett I would also like to know this, is it possible to have the field so the patient can enter data into it rather then it just pulling what is already in the database?

1 Like

Check out this as something new I added for patch(5)(I gave a pre-patch in thread) Implementation of LBF visit forms in Onsite Portal

And also check out the Portal Dashboard Template Management for some examples of default canned forms for portal.

Is there going to be the ability for patients to send in documents via the portal? Have you planned out how that might work? Will we be able to make forms with a directive in the future with a file attach/upload open?

How do I access the signature module? I do not have the “app:” option in my openemr loging screen.

I am having problems with the patient signature saving. I keep getting image

So I’ve looked everywhere (or missed it)

SETUP:
Creating HTML based Privacy Policy in Portal Dashboard Templates.
Document uses google chart API to produce a QRcode with patient ID on document, using this code:
<img alt="" src="https://chart.apis.google.com/chart?cht=qr&amp;chs=100x100&amp;chl={PatientID}" style="margin: 5px; width: 100px; height: 100px;" />

However when document is loaded in dashboard the {PatientID} is not being replaced with appropriate variable.

Directive is use else where in document (displaying as text) and works properly.

Please advise if their is a workaround or a possible patch.

Screenshots Attached:
chrome_jxPrE0VZ5t

Hi @Jmiller Glad you’re interested in this feature.
I’ll have to take a look and if there is a bug I’ll help get a fix to you.
I’ll PM you email if you could send me the template to test with.

@Jmiller
As I did some fixes recently that will be in next patch looks like they fix your issue.

Pdf after review:
Privacypolicy_4.pdf (96.3 KB)

I spoke to soon. The barcode image is missed in PDF. I should have gotten by purifier.

When you check you will have to make sure the image encodes with the correct ID. I use a barcode scanner on my phoen to check. Otherwise it will just be the {PatientID} in the QRCODE