Adding keywords

Want to add keywords for “Primary insurance company and policy number”.
Looking for the ID and label name.

Can someone help me out?

@rickzimm,
We assume that you are willing to change label name for two fields. It is possible by making changes in the mentioned path interface/patient_file/summary/demographics_full.php
If not, could you please explain some more details on requirements.

Thanks,
ViSolve

I’m looking for those keywords so I can use them as keywords in a document/template in the patients account under documents; the possibility to fetch a preprogrammed templates with patients information.
Note: I found several keywords and added a few in download_template.php. However could not found the two above. https://www.open-emr.org/wiki/index.php/Templates_for_Patient_Documents

Yes, Primary insurance company and policy number are not available in the keywords list.
So we need to customize the code to bring the keywords in template.

Following changes need to be made in interface/patient_file/download_template.php file.

Modification 1:
Line no : Approximate After Line No : 292

Include two conditions in the loop.

else if (keySearch($s, '{PrimaryInsurance}')) {
    $s = keyReplace($s, dataFixup($ptrow['ic_name'], xl('Primary Insurance')));
} else if (keySearch($s, '{PolicyNumber}')) {
    $s = keyReplace($s, dataFixup($ptrow['id_policy_number'], xl('Policy Number')));
}

Modification 2 :
Line no : approximately 306
Change the existing query with below one

$ptrow = sqlQuery(SELECT pd.*, ur.fname AS ur_fname, ur.mname AS ur_mname, ur.lname AS ur_lname, id.policy_number AS id_policy_number,ic.name AS ic_name FROM patient_data AS pd LEFT JOIN users AS ur ON ur.id = pd.ref_providerID LEFT JOIN insurance_data AS id ON id.pid = pd.pid LEFT JOIN insurance_companies AS ic on ic.id=id.provider WHERE pd.pid = ? AND id.type = 'primary', array($pid));

Include the following keywords in the template
{PrimaryInsurance}
{PolicyNumber}

Try this and let us know if you have any concerns

Thanks,
ViSolve

Implemented the 2 modifications …
However after implementing the following error occurs:

Content Encryption Error
Error while connecting to www.mannenkliniek-de-boer.nl.
Contact the website owners to inform them about this problem.

They occur after fetching document in the patients account under documents.
Can you help me out with this?

I figured it out:
The first modification:

  • I placed it around line 191

  • replaced ’ in: look for the keystroke with both " and ’ (in notepad ’ appears differently than mentioned above in the 2 modifications/ choose ')

And for the 2nd modification:

  • replaced ’ in: look for the keystroke with both " and ’ (in notepad ’ appears differently than mentioned above in the 2 modifications/ choose ')

  • replaced “ in "

Minor details, however this did the trick!

Thank you for your help, it works perfectly.