Retaining formatting of the SOAP Note

juggernautsei wrote on Thursday, October 20, 2016:

It has served well to always ask has anyone worked on this?

The request that is on the table is the retaining of the formatting that Doc’s place in the Native SOAP note when going to Report > Patient Report and selecting SOAP note all the formatting is stripped from the paragraphs.

The doc thinks it would enhance the document if the formatting was retianed.

I have dug into the code to look to see where does this happen and if there is a way to correct this. Following the bread crumbs to the lbr_report function around line 36 Rod put in a wordwrap.

Is there a way keep the line breaks?

I have tried $arr[$field_id] = htmlspecialchars($currvalue); in front of the wordwrap but no joy.

juggernautsei wrote on Friday, October 21, 2016:

Figured it out!
Went to SOAP_report and changed line 19 from text($value) to nl2br($value).

Gives a whole new look to the report

robertovasquez wrote on Saturday, October 22, 2016:

Hi Sherwin
Function text($value) return htmlspecialchars($text, ENT_NOQUOTES); Do you know if nl2br will do the same?

As soon I know openemr do not have translation function for nl2br.

bradymiller wrote on Saturday, October 22, 2016:

This should both keep the line break formatting and the html escaping (needed to prevent cross scripting attacks):

nl2br(text($value))

robertovasquez wrote on Saturday, October 22, 2016:

If translation need it we can do
nl2br(xlt($value))

bradymiller wrote on Saturday, October 22, 2016:

Agreed that would do that if need to translate. But don’t think this is meant to be translated (ie. I think this is the content of the progress note rather than a label). Will be more clear if can see this change in a git commit.
-brady

juggernautsei wrote on Monday, October 24, 2016:

I will convert this into a git commit.+

juggernautsei wrote on Monday, October 24, 2016:

Brady is right this is the value that is already stored in the table and should be in the language of the doctor already. It just has to be displayed.

mdsupport wrote on Monday, October 24, 2016:

We don’t use this form but replacing text areas with hard coded nation notes controls will make it nicer for users - more formatting, use of templates etc. As a bonus for developers, this form will reuse existing components.