Hide fields in new patient

Hello everyone, I greet you from Chile. I am getting to know and working with OpenEMR and I have found it all fantastic, however, I have a query regarding the time to add a new patient to the system.

By default, the system has the patient information fields such as: Contact, Choices, Employer, etc., but for my development, those fields are not necessary and I need to hide them. I was able to add the fields necessary for my development without problems, as well as, I could hide (using code) one of the fields that referred to the insurance, but I have not been successful in finding where to hide: Contact, Choices, Employer, Stats, Misc and Guardian (attached reference image)

So my query is: Can these fields be hidden? If so, where can they be hidden?

I hope you understand my query and that you wrote it in the right place. Thank you very much in advance, greetings.

@MiguelGomez,
Yes, we can make the fields to be hidden.
To make it happen, you can just tweak some of the lines in the file mentioned below.
interface/new/new_comprehensive.php

It can be achieved by including an condition which states not to display the fields that you want(Contact, Choices, Employer etc…)

Try to modify as below

if($group_name!=‘Contact’ && $group_name!=‘Choices’ && $group_name!=‘Employer’ && $group_name!=‘Stats’ && $group_name!=‘Misc’ && $group_name!=‘Guardian’)
{ //Condition need to be added
if (strlen($last_group) > 0) { // Approx line no: 520


echo " \n"; $display_style = ‘none’;
}
}

if($group_name!=‘Contact’ && $group_name!=‘Choices’ && $group_name!=‘Employer’ && $group_name!=‘Stats’ && $group_name!=‘Misc’ && $group_name!=‘Guardian’)
{
if (($titlecols > 0 && $cell_count >= $CPR) || $cell_count == 0) { end_row(); echo " <tr>"; } // Approx line no: 546


generate_form_field($frow, $currvalue);
}
}

Let us know if you have any clarifications

Thanks,
ViSolve

1 Like

Hello friend, first of all I appreciate your time and above all your answer. Unfortunately, I added what you indicated in the .php file but I do not have positive results, because the page is completely blank. If it’s not too much trouble, could you show me the code written inside the file new_comprehensive.php? since something must be doing wrong.

Thank you very much in advance

@MiguelGomez,
Could you please share the apache error log. So that it will be quite easy to predict the issue.

Thanks,
ViSolve