EHR Extensions

From MirrorMed

minority executive womens college softball ib 12 uh oh butt medical device companies in sweden red red wine lyrices sponge bob backgrounds buy vardenafil relationship specialists texas a m jersey job openings for wisconsin acura integras for sale listen to your heart remake elvis prestly biography adult birthday free greeting northern ireland society etp naruto midi file analyzes birth date free name picture police riot im king remix download alcatel ringtones syntactically correct love actually script free total 90 4 power driver failure accommodation golf ireland information on sponge spanish news paper example of arrays pocket polly search team america songs downloads in kit lady mature sex printer refill ink prescription drugs dictionary activation key norton 2005 unload class life shenandoah autoclaving liquids celexa redirected folder state governments india arkansas foreclosure properties et fr futuna wallis a business research 3d mazes games windows xp automated system recovery download promotional staff uk rerio im going quantum technologies inc. accounts accounts payable positions washington contractors license board water exhibitions private lessons 1981 sexy friend picture valtrex missouri city little league baseball 4wd used cars map type wyn las vegas hotel 8 ft entry doors jedi knight 2 demo transport my pet fish to another state picture of people with braids translation french english online recipe for raisin bread microsoft problem window luxury penthouses for sale eminem how come we dont even talk no more san francisco chinatown events modeling jobs in new york peoples credit bureau advisers promotional staff uk euro to american conversion rate media mit edu smooth segment rings reverend dean rave mp com opportunity posters ejaculation free premature journal of business and industrial marketing us navy t shirts pinay big mountain view library california ski buyer guide alcohol council drug houston retirement speeches samples shake speare poems its wanting what you ve got new frontier wind river pop ringtones order norco west virginia division of forestry diovan the river between us book social history of alcohol rose mcgowen picture 1978 body ford part truck school science fair projects clips porno utah home foreclosures tech data group new frontier wind river juvenile court judges commission jordan shoes collection page latest films lady night nude mobile phones wholesale coach handbag bmw usa download chess dogs allergy relieve symptom paintings skin cancer self divorce texas le lien multimedia the black power speech page examination board one week movie promise wedding studio inc antelope valley project lincoln magazine music online uk cancer horoscope lesbian homepage army learned lesson online bible school of the south pacific rails to trails map url world serious acrage for sale in texas linux check disk integrity the art of war sun zi small business minority grant bobcats alabama lots for sale pacman pics marlboro wireless phone cards dvd video frontier air lines indian bride irritable bowel old rocky top oz virtual world discount wallpaper marios seattle unload class home space empires iv download php smarty manual saab dealers asia no blame for how our love did slowly fade teach english in korea summer ointment forbes magazine american diabetes association exchange diet enzymes in the pancreas van peterson overnight summer camps in ontario person search page blood pressure monitor rating raymond weil watches motorcycle fuel cells nude beach picture continental airline tickets electric scooter parts simon watson photo index omega watch price display pictures cellular nextel phone resume forms nfl home problem solving games for children progiciels personal alarm wedding dress weather channel store edonkey download power plant load factor last minute travel deal asian boy skinny special poem for my son session variables cookies diet pills pay as you go camera phones royal society medicine london index home tradeshows for medical imaging asian xxx litapasce MirrorMed has an extensible EHR system. It is possible to collect almost any data and associate it either with a patient or with an encounter. Generally unchanging data regarding a patient should be associated directly with the patient record. For instance if one wanted to record the birth and death days of the patients parents, then this data, while not part of the standard patient demographics, does not change in between visits. Alternatively, it is useful to track data like blood pressure between visits, this kind of data should be associated with the encounter.


Creating a form

In order to extend the MirrorMed EHR you must first make a form to collect the data. The forms use the same general syntax as an HTML form. However, in the place of the typical HTML tags, the EHR extensions use specially designed smarty tags. These tags enable the EHR Extension to interface with the Patient and Encounter tracking system. In order to learn about the forms we will use a simple SOAP form as an example. An EHR Extension is a special kind of html form. So if the text below seems like random gibberish then you might want to take a html forms tutorial

{if $back_link}<a href={$back_link}>return to encounter</a>{/if}<nowiki>
 <nowiki>{clni_form}
<b>
<h2>SOAP</h2>
<p>Subjective</p>
<p>
{input style="width: 10cm; height: 4cm;" name="a_subjective" value="" type="text"}
</p>
<p>Objective</p>
<p>
{input style="width: 6in; height: 2in;" name="b_objective" value="" type="text"}
</p>
<p>Assessment-Action</p>
<p>
{input style="width: 300px; height: 100px;" name="c_assessment" value="" type="text"}
</p>
<p>Plan</p>
<p>
{input style="width: 80%; height: 10%;" name="d_plan" value="" type="text"}
</p>
<p>Notes:</p>
</b>
<p>
{input style="width: 30mm; height: 10mm;" name="e_notes" type="text"}
</p>
{submit}
</form>

Assuming you understand webforms then things that should stand out are the smarty tags. So the following lines deserve explination.

{clni_form}
{input style="width: 10cm; height: 4cm;" name="a_subjective" value="" type="text"}
{submit}

The first tag, {clni_form} builds the <form> html tag in the appropriate way for MirrorMed. The last tag, {submit} builds the submit html form element. For this discussion, we will leave these as magic elements that need to be present to make your EHR Extension work. The middle tag is the heart of the system. This tag determines how text will be gathered on your system. It also determines how text will be displayed. The first thing to note is the style tag. This is standard CSS style information which will dictate how your html form element will look. If you want to know more about how css works, checkout a css tutorial. The next part of the {input} tag is the most important since it determines the order of the display later.

name="a_subjective"

Note that in the soap example the name values all start with a single letter than an underscore. So the order is..

a_subjective
b_objective
c_assessment
d_plan
e_notes

Once a form has been filled out, its data is frozen. When you click on a form that has been filled out, it will display as a grid. While it is possible to create a report (detailed below) that will allow you to see the information on a given EHR datapoint in any format you program, it is simplest to make sure that the grid display will display in the same order as the original form. However the grid display orders the elements alphabetically. By prepending useful data names with a single letter and underscore you can control the order that the grid displays the data.

For the time being only text inputs are supported in EHR extensions.

Associating Forms

So you have created your own form and now you want to begin using it. Generally you want to assign the form either to the patient dashboard or to the patient encounter. To associate the forms go to the menu location Admin->Forms->Add Form. Here you will be able to name, comment and upload your form. Often when you try to upload a form for the first time you will get an error. This can happen because webserver cannot write to the mirrormed/user directory. To fix this type the following command from the mirrormed home directory.

cd /var/www/html/mirrormed/
chown nobody:nobody user/ -R 

This assumes that your webserver runs as the user "nobody" but sometimes it might be running as "apache" or something else. Replace both of the nobody with your user.

Once you have successfully uploaded your form you want to add the form to the correct MirrorMed interface. To do this go to Admin->Forms->Connect. This interface is designed to allow you to add forms anywhere in the MirrorMed system, but usually you only want to add them to the patient dashboard or the patient encounter. For instance to associate the form with the patient encounter select the item "Encounter Forms" under the heading "Patient". Doing so will create an interface to add any of the forms you have uploaded to the encounter screen. After this create an encounter, and, when you select forms, your new EHR extension should appear.


Overide the default view

MirrorMed (and not ClearHealth) now support the custom override of the default grid view of form data. If you followed the above instructions carefully then and you entered a patients vitals data and then you go to view the data that you recorded, you would see a grid display of the recorded data. This grid display is pretty useless for printing the data.

The MirrorMed 1.0 tree now has a patch to allow for the override of the default display values. In order to use the patch you must create a report file to override the grid display. First you need to find the file created when you upload your form. Look under mirrormed/user/form. For instance on the default installation there is already a soap form that lives at

/mirrormed/user/form/600001.tpl.html

Your number might be different because they are autonumbered by the system as you upload them. Make sure the file your are working with is really the form that you are seeing on the MirrorMed system.

Now create a special file called

/mirrormed/user/form/600001.display.html

This file is the display override for your form. Lets look at the one for overriding the soap form.

{if $back_link}<a href={$back_link}>return to encounter</a>{/if}
<h2>SOAP for {$patient_last_name}, {$patient_first_name}{if $date_of_treatment} seen on {$date_of_treatment}{/if} </h2>
 Last Edit {$last_edit}
 

<table width=800>
<tr><td>
<div align='right'> {$patient_last_name}, {$patient_first_name}{if $date_of_treatment} seen on {$date_of_treatment}{/if}</div>
<b>Subjective: </b>
<br \>
{$values.subjective.value|nl2br}<br \>
<div align='right'> {$patient_last_name}, {$patient_first_name}{if $date_of_treatment} seen on {$date_of_treatment}{/if}</div>
<b>Objective: </b> 
<br \>
{$values.objective.value|nl2br}<br \>
<div align='right'> {$patient_last_name}, {$patient_first_name}{if $date_of_treatment} seen on {$date_of_treatment}{/if}</div>
<b>Asessment/Action: </b> 
<br \>
{$values.assessment.value|nl2br}
<br \>
<div align='right'> {$patient_last_name}, {$patient_first_name}{if $date_of_treatment} seen on  {$date_of_treatment}{/if}</div>
<b>Plan: </b> 
<br \>
{$values.plan.value|nl2br}
<br \>
<div align='right'> {$patient_last_name}, {$patient_first_name}{if $date_of_treatment} seen on  {$date_of_treatment}{/if}</div>
<b>Notes: </b> 
<br \>
{$values.notes.value|nl2br}
<br \>

<td><tr>
</table>

<br>
<br>
<a href='{$edit_link}'>edit SOAP</a> Last Edit {$last_edit} 

Note that we have abandoned the "a_subjective" variable names in favor of names like "subjective" because we are now controlling the layout ourselves.

The display is a simple report with several variables available. Most notably all of the values that were gathered by the form are available as subarrays of the $values array.

$values.subjective.value
$values.objective.value
$values.assessment.value
$values.plan.value
$values.notes.value

Since the SOAP Notes form gathers large text areas, it is possible and likely that the user might have used a carriage return while creating the data. But HTML does not respect newlines, as a result we use the Smarty modifier nl2br to translate the new lines to the HTML br tag.

{$values.subjective.value|nl2br}

There are also some static values available to the user...

{$patient_last_name}
{$patient_first_name}
{$date_of_treatment} - the encounter date, if there was an encounter
{$last_edit} - the last time the form was changed.

Lastly there are two special links available in this report. The first is the backlink, which will take the user back to the encounter or to the patient whichever record the form is associated with. The second is the edit link. It should be noted that having this here can be a HIPAA liability. Perhaps you do not want your form editable after the initial entry.

{$edit_link}
{$back_link} 

To debug the display system make certain that the variable names from the Form file match up perfectly with the calls to the $values array in the display.