Add new select option in Encounter History

anshulmittal wrote on Wednesday, May 09, 2012:

I want to add a new option in the select drop down which has “Encounter History” as the default value.I want that if user clicks on that option he is presented with the same window as is presented when one clicks on new encounter.

I have tried to look at the following code in main_title.php but could not understand how it is getting populated with select drop down.

<div style=‘margin-left:5px; float:left; display:none’ id=“past_encounter_block”>
<span class=‘title_bar_top’ id=“past_encounter”><b><?php echo htmlspecialchars( xl(‘None’), ENT_QUOTES) ?></b></span>
</div>
Kindly help

bradymiller wrote on Thursday, May 10, 2012:

Hi anshulmittal,

In main_title.php, try to change the following line:

	if(rawdata=='')
	 {
		 return false;
	 }

to:

	if(rawdata=='')
	 {
	 	top.window.parent.left_nav.loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=')
		return true;
	 }

Also, to answer the mystery of where the select box comes from, search for the setPatientEncounter function in interface/main/left_nav.php script.

-brady
OpenEMR

anshulmittal wrote on Tuesday, June 05, 2012:

Thanks Brady. That was pretty helpful. Now could you suggest a way wherein this newly added option which i have named “telemedicine encounter” will be shown as a separate tele medicine past encounters. That is I want an option past telemedicine encounter list in addition to past encounter list that just shows the past telemedicine encounters

bradymiller wrote on Wednesday, June 06, 2012:

Hi anshulmittal,

Could also consider having the option “Telemedicine” as something to select in the new encounter “Visit Category”, which are taken from categories in the Administration->Calendar->Categories .

Then could code the Past Encounters script to show All encounters, all non-telemedicine encounters or only telemedicine encounters. This would require php/mysql coding skills and knowledge of the form_encounters and openemr_postcalendar_categories sql tables.

-brady
OpenEMR