Prescription search Form

Hi everyone, happy holiday. Please i need help. I am looking for a way where when using the prescription , we want to search for the drugs in the inventory instead of the select function array. Please see codes and select form .


hi @Natt_SL_Limited,

I tested this on version 6.0.3 & 7.0.1

locate the file to make the changes here

openemr_directory/templates/prescription/general_edit.html

NB: Make a backup of the file before editing.

  1. In the above file, on line 185 add id=drug_id to the select statement which becomes:
<select class="input-sm form-control" name="drug_id" id="drug_id" onchange="drugselected(this)">
  1. In the same file add
$('#drug_id').select2();

after the function on line 312

$(function () {

2 Likes

Don’t forget to delete Smarty cache after making changes. In most cases Smarty will auto recompile however if changes don’t look like they’ve taken then delete cache in Config->Calendar

2 Likes

Thanks very @kkappiah it works perfect and i have also deleted the first search option which is not important for my work. Thanks also @sjpadgett

1 Like