Reports' layout

irsptn32 wrote on Thursday, June 30, 2016:

Hi there, I’m sorry to bother you with an obvious newbie’s question but I haven’t found anything precisely describing the solution of the issue I need to address.

Where do I find the rules that are used to format the patient reports (PDFs needed to print them)? How do I change them?

Is it possible to change the font, the spacing or the overall formatting of reports? For example, a random comma appears on my reports under the facility name on a row on its own, so how do I get rid of it?

Thank you for your understanding and for your time, have a nice day!

visolveemr wrote on Friday, July 01, 2016:

Hi Isacco,
By default we do not have features to control the fonts and other formatting option. Manual customization through code should be done to get the reports in the required format.

Generally, if there is no data to be printed, OpenEMR prints it with comma and I guess you are observing similar to it.

Please share a screenshot of the concern you observe, we would try if it could be solved out in a simple way.

Thanks,
ViSolve OpenEMR Support Team
ViSolve

irsptn32 wrote on Sunday, July 03, 2016:

Hi, thanks for your reply.

I’d like to get rid of the comma just under the “facility” name (I’m a med student and I’m using OpenEMR to store data collected from patients in a clinical trial, so the facility name is my university’s) and above the patient’s name.

Other than that, I would like to translate the form, adding a space between “PATIENT:” and the patient’s name, and so on (like the colon after “Patient Data”, “History Data”,…).

I can work on a manual customization through code, if it is possible, because, given the enormous amount of data I have to log, and the conspicuous quantity of patients we are seeing, a lot of reports will be printed, so the effort is worth the result… I just don’t know where to look and how to intervene :slight_smile:

Thank you very much for your time!

blankev wrote on Sunday, July 03, 2016:

An effective way is:

Administration => Other -> Language => Change the “Constant” of your choice. To find “Patient:” enter %%%%%%%:

Change"Patient:"" “without” space into "Patient: " => “with space”

For every used version on different computers you need to include/chenge these new constants.

Let me know if this works, since there might be another better solution .

irsptn32 wrote on Sunday, July 03, 2016:

Thank you for your suggestion. I tried it and I was able to change “PATIENT” to “Patient”, but if I add a colon a double one appears on the report’s PDF. It appears the colon, and so the space after it, is not managed by the constant. Anyway, I can translate it (I prefer to keep the software in English since it’s easier to find the “directions” when I follow tutorials and guides which are written in English, so I’ll translate only what matters in printing, so thank you for this first input.

blankev wrote on Sunday, July 03, 2016:

For the end space you might have to use something like an escape character. It is somewhere in the translation WIKI Pages. What also works a a dot “.” you hardly notice the difference between a dot or a space in real life.

epsdky wrote on Thursday, July 07, 2016:

Hello Isacco and Pieter,

To separate the string “PATIENT:” from the patient name in patient reports a code change is needed in…

/interface/patient_file/report/custom_report.php

on line 490 (4.2.2) the element…

xlt("PATIENT") . ':'

needs to change to…

xlt("PATIENT") . ': '

or if you like…

xlt("Patient") . ': '

As for the comma replace it on line 502 with…

<?php if($facility['state']) echo "," ?>

line 502 becomes…

<?php echo $facility['city'] ?><?php if($facility['state']) echo "," ?> <?php echo $facility['state'] ?> <?php echo $facility['postal_code'] ?><br clear='all'>

Now the comma only appears when there is an entry for state.

Regards,

epsdky.

blankev wrote on Thursday, July 07, 2016:

This indeed will do for this one spot. Nowfor me it is impossible to add a space in the translation table at the end of any word or after the Patient: …" is there something like an escape character that would allow to add a space at the end of a constant?

epsdky wrote on Friday, July 08, 2016:

Hello Pieter,

Isacco touched on this…for the situation with the patient report where the string “PATIENTS:” appears, in the code the string is initially two strings “PATIENTS” and “:” that are joined after “PATIENTS” is sent to the translation function. “:” is not translated so what comes after it cannot be influenced by the translation module. For situations like this your idea will not work.

What about where the whole string is translated…looking at the translation function code I cannot see anthing that would support the idea of an escape sequence present at the end of a definition having any effect.

However adjusting the definition string in the database might work…haven’t tried it yet.

Regards,

epsdky.

irsptn32 wrote on Saturday, July 30, 2016:

Hello there, I’m reporting about the problem, which seems solved after using the idea from epsdky. I thank everyone so much for their input.

Does anyone know how to edit the prescriptions document, too? Where could it be located?