Expand my Community achievements bar.

SOLVED

How to generate descriptive narrative from checkboxes to new PDF document

Avatar

Level 2

The attached PDF form collects name and details on medical history.  In the Cardiovascular section, patient indicates none of the symptoms are applicable.  In the Nervous Systems section, patient indicates dizziness is a symptom, but no other symptoms.  I need to generate a new document that takes this information and creates a descriptive narrative like this:

Patient Name:  John Smith

Cardiovascular System Review

The patient denies:  high blood pressure, low blood pressure

Nervouse System Review

The patient denies:  headache, stress

The patient has had:  dizziness

I know I'll need to code logic, probably javascript, to determine the state of the selected/unselected checkboxes.  I am looking for some ideas on how to approach this problem.  I'm relatively new to LiveCycle Designer and would like to learn good techniques.

Thanks,

Rob

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

First of all I would recommend script in the exit events of all of the checkboxes, to ensure that a user does not tick conflicting choices. Have a look.

There are a couple of choices for your main query.

For the names I have used a FormCalc function called Concat. Check out the calculate event of the patient name and the help file.

Now the two reviews are a bit more complicated and I am suggesting a series of nested if statements. Check out the calculate of the two review objects.

Unless you are using a server based product it is going to be difficult to push this information out to a "new" PDF. You could have these new fields on a summary page at the end of the form

Hope that helps,

Niall

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

Hi,

First of all I would recommend script in the exit events of all of the checkboxes, to ensure that a user does not tick conflicting choices. Have a look.

There are a couple of choices for your main query.

For the names I have used a FormCalc function called Concat. Check out the calculate event of the patient name and the help file.

Now the two reviews are a bit more complicated and I am suggesting a series of nested if statements. Check out the calculate of the two review objects.

Unless you are using a server based product it is going to be difficult to push this information out to a "new" PDF. You could have these new fields on a summary page at the end of the form

Hope that helps,

Niall

Avatar

Level 2

Your example helps a lot but I need to take this one level further.  When the user selects the checkbox it may have other

options that need to be included in the narrative.  An example would be the user selects a box indicating that  judge had imposed community service as a condition of supervision.  When they click the community service box I need for the user to be prompted for how many hours of community service and include this answer in the narrative.

Avatar

Level 10

Hi,

Here is a sample. The script in the calculate event of the judgment object looks back at the radio buttons and then assigns the appropriate text in the if statement.

Also have a look at John Brinkman's examples for floating textfields. Editable Floating Fields V2

Good luck,

Niall

Avatar

Level 2

That is exactly what I need.  Thank you so much for the quick response.