Forms in encounter order


Good afternoon to you all.

I’ve been trying to reorganize how the order that the forms are generated in the encounter form and the patient reports.

Problem is that most of the time the order is inverse, the encounter summary and the forms that you are editing appear last, and the last form appears first.

To no avail I have tried to reorganize them by changing the priority,but this apparently only modifies the order in which the list is generated on the drop down menus.

Any suggestions?


hi @crlsgzmn, it’s set here:


having a configurable list in the list_options table sounds ideal


This would be Ideal. Having worked as an MD for 10 years, in places like Best Doctors I have to give my input to the Developers of Openemr, as the order in which a note is done is something standard among doctors.

A example of this would be this forms / order (and some of them are missing among the standard forms included in Openemr):

  1. Case overview / Brief consultation note / Summary
  2. History of present illness / HPI (With a graphic pain map)
  3. Past Medical History (Is included in demographics, but not on the actual note, a duplication of this info would be ideal)
  4. Past Surgical History (Same as above)
  5. Current medication (Same as #3)
  6. Allergies (Same as #3)
  7. Family History (Sames as #3)
  8. Social History (Same as #3)
  9. Physical Exam
  10. Lab testing (In current encounter)
  11. Imaging studies / Diagnostic reports
  12. Treating physician Assessment and plan
  13. Surgical Recommendations

I will try to make this php forms and sql data to be added to the standard forms in Openemr, with some camos functionality like what ZH healthcare has would be ideal.



Hi @crlsgzmn and @stephenwaite ,

A very nice feature here would be the following in the Administration->Other->Forms:

  1. Another setting to set the priority of how forms are displayed (would have it be a separate setting from what is currently used to decide how it is ordered in the select menu).
  2. Work LBF forms into this interface to allow setting category and these priority settings thus making the forms not appear different to the end user.

And would be nice to have a camos companion template system that is more user friendly and more tied into OpenEMR. For example, clicking on a button would bring in elements such as past medical history etc. Then when this is well featured, could actually start building note templates (ie. user could create a note that brings in all the elements automatically). This would then address a lot of the forms listed above.



Then Mr. Miller,

This should be a feature request?

If so, are there any updated programming guidelines available?



Hi @crlsgzmn ,

Check out here for guidelines (note we are very flexible and happy to provide guidance along the way):



Good morning Mr. Brady,

I think that using ORDER BY FIELD works better than find in set. I set the line to:

$sql .= “ORDER BY FIELD(formdir,‘newpatient’,‘LBFCC’,‘LBFHPI’,‘vitals’,‘physical_exam’,‘reviewofs’,‘ros’,‘soap’,‘LBFA’,‘LBFP’,‘CAMOS’)”;

And now it works perfectly.

Ideally this should come from a list, or from the priority that forms/lists already have.


Hi Mr. Stephen,

I’m trying to find how is the order made when looking at a patient report for printing purposes?. Any suggestions on what file to look for?


hi @crlsgzmn, i think it’s here:


Hi Mr. Stephen,

I can confirm that I have 3 denied claims because of alleged out of order notes.

I tried adding the following code to the file but it didnt work
Line 292

$inclookupres = sqlStatement("select distinct formdir from forms where pid = '$pid' AND deleted=0 order by field(formdir,'newpatient','LBFCC','LBFHPI','vitals','reviewofs','physical_exam','ros','soap','LBFA','LBFP','CAMOS')");


hi @crlsgzmn, that seems odd, are the denied claims paper claims?



The claims were denied because of legibility once submitted to the insurance as per their request (They argue that they can’t be billed as level 3 or 5).

I think that this should be filled as a bug or maximum priority feature request…

Medica, Coventry and Humana are the insurance companies that I’m referring to.

I’m currently trying to figure this out, but the order of the notes is set independantly from LBF forms and formdir related reports.


so after you sent an electronic claim they wanted the corresponding notes? then after receiving your printed report they state that it’s illegible?


Illegible and difficult to read as they don’t have a proper order regarding a standard medical note…

That’s what they argued.



Illegible and not professional as a matter of fact one of the insurances alleged.