I have a form on which the user will list all of or some the symptoms identified on a patient. Some patients will display only one symptom while others might displayed 3,5, 8 or 10 other symptoms listed. on some symptoms, my user will have to type in additional info to further clarify each symptom. for example, say I have these symptoms listed:
1- client is under age. (a textbox is provided to type in the exact age on the form)
2- client is delusional (a textbox is provided to give short explanation on the form)
3- client’s substance abuse resulted in (another textbox to be filled in)
On the report, I need to concatenate each symptom and maintain correct punctuation. How can I accomplish this? Say a client have 2 symptoms (1 and 3), how can I concatenate the symtoms so the final sentence will look like this “Client is underage (15 years old) AND client’s substance abuse has resulted in 3 DUI citations.” i.e. itf there is only one symptom, I want a period at the end of the sentence, if there are 2 symptoms I need to put an ‘AND’ between the 1st and 2nd symptoms and a period at the end of the 2nd symptom. On the other hand, if there are 3 symptoms, a comma should be placed at the end of the 1st symptom, an ‘AND’ should appear between the 2nd and 3rd symptoms and a period should go at the end of the 3rd symptom. If there are 4 symptoms, there should be a comma after the 1st and 2nd symptoms, the word ‘AND’ at the end of the 3rd and a period at the end of the 4th symptom. I hope I am making sense here. On my form I’ve made each symptom as a checkbox. I figure I should try counting how many checkboxes are checked to figure out how many commas and the like but beyond this I have no idea how to proceed. Any insight is very much welcome. Thank you.