In the add new patient, I want to make a new group (Companies) which includes:
Name:
DOB:
Gender:
Company: —> (which is the insurance Companies)
…
…
…
…
and other information.
I will make this new group from layouts–> demographics…
So I need to select the company from the insurance companies already added in practice setting–> insurance companies.
(a drop down list that links to the database records of practice settings, so that when these change the list reflects these changes…Exactly like pharmacies)
To add the insurance companies data type in the layouts section, you need to add the following at line 58 in the file interface/super/edit_layout.php
"36" => xl("Insurance Companies")
And in the file library/options.inc.php , you can add the function get_insurance_companies() similar to get_pharmacies() function to return the insurances list.
Similary in the following functions also, you may need to replicate for the datatypes=36 (insurance copanies) by refering to the datatypes=12 (which is used for pharmacies).
We have attached the modified library/options.inc.php file from OpenEMR 4.1.2(patch 7).
You can use this file, if you are running the latest OpenEMR version.