Read about OpenEMR's Response to the COVID-19 Pandemic at

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:

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:

  • 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.


    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 :
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

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

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:

<div>@Template inserted</div>

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}
<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}

1 Like

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:

<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 style="margin-bottom: 0in">Where is your pain?</p>
  <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>
 <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>
   <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>
<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>
<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>

but it works if I have this:

<h4 class="text-center"><em> Chronic Pain Medical History</em></h4>
<pre></p>What are your symptoms?&nbsp;{TextInput} </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> 
<tr><td><p></p></td><td><p>{CheckMark}Forearm: L</p></td><td><p>{CheckMark}Thigh: L</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