// JavaScript Document
<!--
    function AddItUp(form) {
        var item, firstValue, secondValue, thirdValue,  fourthValue,  fifthValue,  sixthValue,  seventhValue,  eighthValue,  ninethValue;

        // Get the value of the item that's selected in the first list
        item = form.first.selectedIndex;
        firstValue = eval(form.first.options[item].value)

        // Get the value of the item that's selected in the second list
        item = form.second.selectedIndex;
        secondValue = eval(form.second.options[item].value)

        // Get the value of the item that's selected in the third list
        item = form.third.selectedIndex;
        thirdValue = eval(form.third.options[item].value)

	// Get the value of the item that's selected in the fourth list
        item = form.fourth.selectedIndex;
        fourthValue = eval(form.fourth.options[item].value)

	// Get the value of the item that's selected in the fifth list
        item = form.fifth.selectedIndex;
        fifthValue = eval(form.fifth.options[item].value)

	// Get the value of the item that's selected in the sixth list
        item = form.sixth.selectedIndex;
        sixthValue = eval(form.sixth.options[item].value)

	// Get the value of the item that's selected in the seventh list
        item = form.seventh.selectedIndex;
        seventhValue = eval(form.seventh.options[item].value)

	// Get the value of the item that's selected in the eighth list
        item = form.eighth.selectedIndex;
        eighthValue = eval(form.eighth.options[item].value)

	// Get the value of the item that's selected in the nineth list
        item = form.nineth.selectedIndex;
        ninethValue = eval(form.nineth.options[item].value)

        // Add up the value and display the total
        form.total.value = firstValue + secondValue + thirdValue + fourthValue + 
	fifthValue + sixthValue + seventhValue + eighthValue + ninethValue
	
	if (form.total.value <10)
{
document.write("<H3>Result of PHQ-9 depression score for <font color=&quot#0000FF&quot>" + form.ptname.value + " (DoB: " + form.ptdob.value + ")</font></H3>"
+ "<BR><table border=&quot2&quot width=&quot80%&quot id=&quottable2&quot cellspacing=&quot0&quot><tr><td><b>Depression&nbsp;Score</b></td><td><b>Diagnosis</b></td><td><b>Treatment</b></td></tr>"
+ "<tr><td valign=&quottop&quot align=&quotcenter&quot>"+ form.total.value + "</td>"
+"<td valign=&quottop&quot>Minimal symptoms (Use symptom code - e.g.1BT. Low mood)</td>"
+"<td valign=&quottop&quot>Support, review in 1 month. Note if symptoms present for more than 2 years on most days then consider chronic depression which may warrant antidepressants or psychological treatment</td></tr></table><BR><BR>"
+"<U><B>Notes</B></U><br>A depression diagnosis that warrants treatment or treatment change needs at least one of the first 2 "
+"questions (little pleasure, feeling depressed) to be present <B>more than half the time in the past "
+"two weeks</B>, i.e. a score of 2 or 3. Your patient scored <B><I>"+ form.first.options.value + "</I></B> and <B><I>" 
+ form.second.options.value + " </I></b>respectively.<br><br>In addition the tenth question about difficulty at work or home or getting "
+"along with others should be answered at least <B>somewhat difficult</B>. Your patient answered <i><B>"
+ form.tenth.options.value +".</B></i><br><br>When a depression "
+"diagnosis has been made, patient preferences should be considered, especially when choosing between "
+"treatment recommendations of antidepressant treatment and psychological treatments. <br><br>"
+ "<H4>Using the PHQ-9 to assess response to treatment</H4><UL><li>The goal of treatment is remission of symptoms (PHQ-9 score < 5 points)</li>"
+"<li>Patients who achieve this goal enter the continuation phase of treatment</li>"
+"<li>Patients who do not achieve this goal remain in acute phase treatment and require some alteration in treatment</li>"
+"<li>A drop of 5 or more points after 4-6 weeks treatment suggests an adequate response and no treatment change is required</li>"
+"<li>A drop of 2-4 points after 4-6 weeks suggests a less adequate response and would usually warrant increase in dose</li>"
+"<li>A drop of 1 or no points (or an increase) suggests a lack of response and requires increase dose/ change drug or add psychological treatment</li></UL>")
}
else if (form.total.value >=10 & form.total.value <15)
{
document.write("<H3>Result of PHQ-9 depression score for <font color=&quot#0000FF&quot>" + form.ptname.value + " (DoB: " + form.ptdob.value + ")</font></H3>"
+ "<BR><table border=&quot2&quot width=&quot80%&quot id=&quottable2&quot cellspacing=&quot0&quot><tr><td><b>Depression&nbsp;Score</b></td><td><b>Diagnosis</b></td><td><b>Treatment</b></td></tr>"
+ "<tr><td valign=&quottop&quot align=&quotcenter&quot>"+ form.total.value + "</td>"
+"<td valign=&quottop&quot>Mild depression (use E204 Neurotic depression)</td>"
+"<td valign=&quottop&quot>Support, watchful waiting. Consider antidepressants or psychology, especially if symptoms present for more than 1 month or severe functional impairment</td></tr></table><BR><BR>"
+"<U><B>Notes</B></U><br>A depression diagnosis that warrants treatment or treatment change needs at least one of the first 2 "
+"questions (little pleasure, feeling depressed) to be present <B>more than half the time in the past "
+"two weeks</B>, i.e. a score of 2 or 3. Your patient scored <B><I>"+ form.first.options.value + "</I></B> and <B><I>" 
+ form.second.options.value + " </I></b>respectively.<br><br>In addition the tenth question about difficulty at work or home or getting "
+"along with others should be answered at least <B>somewhat difficult</B>. Your patient answered <i><B>"
+ form.tenth.options.value +".</B></i><br><br>When a depression "
+"diagnosis has been made, patient preferences should be considered, especially when choosing between "
+"treatment recommendations of antidepressant treatment and psychological treatments. <br><br>"
+ "<H4>Using the PHQ-9 to assess response to treatment</H4><UL><li>The goal of treatment is remission of symptoms (PHQ-9 score < 5 points)</li>"
+"<li>Patients who achieve this goal enter the continuation phase of treatment</li>"
+"<li>Patients who do not achieve this goal remain in acute phase treatment and require some alteration in treatment</li>"
+"<li>A drop of 5 or more points after 4-6 weeks treatment suggests an adequate response and no treatment change is required</li>"
+"<li>A drop of 2-4 points after 4-6 weeks suggests a less adequate response and would usually warrant increase in dose</li>"
+"<li>A drop of 1 or no points (or an increase) suggests a lack of response and requires increase dose/ change drug or add psychological treatment</li></UL>")
}
else if (form.total.value >=15 & form.total.value <20)

{
document.write("<H3>Result of PHQ-9 depression score for <font color=&quot#0000FF&quot>" + form.ptname.value + " (DoB: " + form.ptdob.value + ")</font></H3>"
+ "<BR><table border=&quot2&quot width=&quot80%&quot id=&quottable2&quot cellspacing=&quot0&quot><tr><td><b>Depression&nbsp;Score</b></td><td><b>Diagnosis</b></td><td><b>Treatment</b></td></tr>"
+ "<tr><td valign=&quottop&quot align=&quotcenter&quot>"+ form.total.value + "</td>"
+"<td valign=&quottop&quot>Moderate depression (use Eu32z - Depression NOS)</td>"
+"<td valign=&quottop&quot>Antidepressant or psychological treatment</td></tr></table><BR><BR>"
+"<U><B>Notes</B></U><br>A depression diagnosis that warrants treatment or treatment change needs at least one of the first 2 "
+"questions (little pleasure, feeling depressed) to be present <B>more than half the time in the past "
+"two weeks</B>, i.e. a score of 2 or 3. Your patient scored <B><I>"+ form.first.options.value + "</I></B> and <B><I>" 
+ form.second.options.value + " </I></b>respectively.<br><br>In addition the tenth question about difficulty at work or home or getting "
+"along with others should be answered at least <B>somewhat difficult</B>. Your patient answered <i><B>"
+ form.tenth.options.value +".</B></i><br><br>When a depression "
+"diagnosis has been made, patient preferences should be considered, especially when choosing between "
+"treatment recommendations of antidepressant treatment and psychological treatments. <br><br>"
+ "<H4>Using the PHQ-9 to assess response to treatment</H4><UL><li>The goal of treatment is remission of symptoms (PHQ-9 score < 5 points)</li>"
+"<li>Patients who achieve this goal enter the continuation phase of treatment</li>"
+"<li>Patients who do not achieve this goal remain in acute phase treatment and require some alteration in treatment</li>"
+"<li>A drop of 5 or more points after 4-6 weeks treatment suggests an adequate response and no treatment change is required</li>"
+"<li>A drop of 2-4 points after 4-6 weeks suggests a less adequate response and would usually warrant increase in dose</li>"
+"<li>A drop of 1 or no points (or an increase) suggests a lack of response and requires increase dose/ change drug or add psychological treatment</li></UL>")
} 
else
{
document.write("<H3>Result of PHQ-9 depression score for <font color=&quot#0000FF&quot>" + form.ptname.value + " (DoB: " + form.ptdob.value + ")</font></H3>"
+ "<BR><table border=&quot2&quot width=&quot80%&quot id=&quottable2&quot cellspacing=&quot0&quot><tr><td><b>Depression&nbsp;Score</b></td><td><b>Diagnosis</b></td><td><b>Treatment</b></td></tr>"
+ "<tr><td valign=&quottop&quot align=&quotcenter&quot>"+ form.total.value + "</td>"
+"<td valign=&quottop&quot>Severe depression (Use Eu32z - Depression NOS</td>"
+"<td valign=&quottop&quot>Antidepressants and psychological treatment, particularly if not improved on monotherapy</td></tr></table><BR><BR>"
+"<U><B>Notes</B></U><br>A depression diagnosis that warrants treatment or treatment change needs at least one of the first 2 "
+"questions (little pleasure, feeling depressed) to be present <B>more than half the time in the past "
+"two weeks</B>, i.e. a score of 2 or 3. Your patient scored <B><I>"+ form.first.options.value + "</I></B> and <B><I>" 
+ form.second.options.value + " </I></b>respectively.<br><br>In addition the tenth question about difficulty at work or home or getting "
+"along with others should be answered at least <B>somewhat difficult</B>. Your patient answered <i><B>"
+ form.tenth.options.value +".</B></i><br><br>When a depression "
+"diagnosis has been made, patient preferences should be considered, especially when choosing between "
+"treatment recommendations of antidepressant treatment and psychological treatments. <br><br>"
+ "<H4>Using the PHQ-9 to assess response to treatment</H4><UL><li>The goal of treatment is remission of symptoms (PHQ-9 score < 5 points)</li>"
+"<li>Patients who achieve this goal enter the continuation phase of treatment</li>"
+"<li>Patients who do not achieve this goal remain in acute phase treatment and require some alteration in treatment</li>"
+"<li>A drop of 5 or more points after 4-6 weeks treatment suggests an adequate response and no treatment change is required</li>"
+"<li>A drop of 2-4 points after 4-6 weeks suggests a less adequate response and would usually warrant increase in dose</li>"
+"<li>A drop of 1 or no points (or an increase) suggests a lack of response and requires increase dose/ change drug or add psychological treatment</li></UL>")   
}
}
//-->

