Skip to main content
rakeshk21205956
Inspiring
December 19, 2016
Answered

Using Action Button to generate "Notes" in a Text field with dynamic formatting

  • December 19, 2016
  • 1 reply
  • 4293 views

I am making a medical form in which i have text fields which generates notes based upon the form fields selection.

Dropbox - ScreenCapture_12.flv

First of you plz see the video from the above link.... i am getting everything right.. except for the problem in the video....the problem is .... when one doesnot choose the continous check boxes there is a one line gap between the two options (plz refer the above video link)............I want that when any of the checkbox is checked the there should not be a  line gap.. as is the case in the video.

Below is the java script which i am using:

this.getField("subjective").value = "SOAP Notes\n" + "\n"+ "Chief Complaint\n" + "\n" + "Mr. " + this.getField("member.name.last").value + " is inquiring about utilizing orthotic bracing for his current conditions. His chief complaint at the time of this assessment is: " + this.getField("consult.chief-complaint").value + "\n\n" + "Subjective Notes - Information Reported by Patient\n\n" + "On a 0-10 pain scale" + "; " +  "the patient describes his pain as being at a level "  + this.getField("dme.pain-level").value + ". " + this.getField("location").value + " pain has been constant for " + this.getField("dme.length-of-pain").value + " months.\n\n" + "Mr. " + this.getField("member.name.last").value + " chief complaint is " + this.getField("area.pain").value + " pain, which he reports is associated with a level " + this.getField("dme.pain-scale").value + " pain on the 1 to 10 severity scale. The patient also says that " + this.getField("blankfield").value + " aggravates the condition" + "," + " temporarily resulting in higher pain levels on the severity scale.\n" +  "\n"+ this.getField("member.name.first").value + " has indicated that his back pain makes it difficult to walk.\n\n" +

"Objective Notes from Treating Physician\n\n" + "My consultation with " + this.getField("salutation").value + " " + this.getField("member.name.last").value + " today, a/an " + this.getField("member.age").value + " years old, " + this.getField("member.gender").value

+ " was in regard to his complaint of " + this.getField("location").value + " pain. " + "This a " + this.getField("dme.pain-level").value + " level " + this.getField("dme.pain-scale").value + " pain, but is made even worse when aggravated by " + this.getField("dme.worsen-pain").value + "." + " I consider this to be caused by general weakness, due to a pre-existing condition resulting in the current level of pain and discomfort for an extended time.\n\n" + "Assessment Notes\n\n" + this.getField("Text1").value + "\n" + this.getField("Text2").value + "\n" + this.getField("Text3").value

The above in red text are the check box values which should be listed without space .. irrespective of the selection of any options.. continuous or non-continuous

This topic has been closed for replies.
Correct answer rakeshk21205956

This is not mine script.


Yes , this is your script....

You should use something like this:

var txt = "";

if (this.getField("Text2").value != "") txt = "\n" + this.getField("Text2").value;

Then add txt to your subject.

1 reply

Inspiring
December 19, 2016

And if one of the text fields is empty, null sting, or has a space what do you want to heppen?

Right not is is inserting the line with the null or space character.

rakeshk21205956
Inspiring
December 20, 2016

Plz see the video ... when i choose the first three checkboxes... .three options a listed ..... but when i choose only two or only one of the three checkboxes....... there is space between the line......  i want if any of the checkboxes is checked.. there should not be any gap between two options..

Inspiring
December 20, 2016

Your vedio did not play.