|
47 | 47 | <script type="text/javascript" src="js/lib/underscore-min.js"></script>
|
48 | 48 | <script type="text/javascript" src="js/lib/backbone-min.js"></script>
|
49 | 49 | <script type="text/javascript" src="js/lib/mustache.min.js"></script>
|
| 50 | + <script type="text/javascript" src="js/lib/moment.min.js"></script> |
50 | 51 | <script type="text/javascript" src="js/models/question-model.js"></script>
|
51 | 52 | <script type="text/javascript" src="js/models/treatment-model.js"></script>
|
52 | 53 | <script type="text/javascript" src="js/collections/question-collection.js"></script>
|
53 | 54 | <script type="text/javascript" src="js/collections/current-treatment-collection.js"></script>
|
54 | 55 | <script type="text/javascript" src="js/collections/past-treatment-collection.js"></script>
|
55 | 56 | <script type="text/javascript" src="js/views/question-view.js"></script>
|
| 57 | + <script type="text/javascript" src="js/views/result-view.js"></script> |
56 | 58 | <script type="text/javascript" src="js/views/app-view.js"></script>
|
57 | 59 | <script type="text/javascript">
|
58 | 60 | var questions = [
|
59 | 61 | {
|
60 | 62 | 'id': 1,
|
61 | 63 | 'text': 'Please rate your pain at its WORST in the last 24 hours.',
|
| 64 | + 'avgShort': 'Worst Pain', |
62 | 65 | 'type': 'range',
|
63 | 66 | 'min': 'No pain',
|
64 | 67 | 'max': 'Extreme pain',
|
65 | 68 | },
|
66 | 69 | {
|
67 | 70 | 'id': 2,
|
68 | 71 | 'text': 'Please rate your pain at its LEAST in the last 24 hours.',
|
| 72 | + 'avgShort': 'Least Pain', |
69 | 73 | 'type': 'range',
|
70 | 74 | 'min': 'No pain',
|
71 | 75 | 'max': 'Extreme pain',
|
72 | 76 | },
|
73 | 77 | {
|
74 | 78 | 'id': 3,
|
75 | 79 | 'text': 'Please rate your pain on the AVERAGE.',
|
| 80 | + 'avgShort': 'Average Pain', |
76 | 81 | 'type': 'range',
|
77 | 82 | 'min': 'No pain',
|
78 | 83 | 'max': 'Extreme pain',
|
79 | 84 | },
|
80 | 85 | {
|
81 | 86 | 'id': 4,
|
82 | 87 | 'text': 'How much pain you have RIGHT NOW.',
|
| 88 | + 'avgShort': 'Pain Right Now', |
83 | 89 | 'type': 'range',
|
84 | 90 | 'min': 'No pain',
|
85 | 91 | 'max': 'Extreme pain',
|
86 | 92 | },
|
87 | 93 | {
|
88 | 94 | 'id': 5,
|
89 | 95 | 'text': 'In the last 24 hours, how much relief have pain treatments or medications provided?',
|
| 96 | + 'avgShort': 'Pain Relief', |
90 | 97 | 'type': 'range',
|
91 | 98 | 'min': 'No relief',
|
92 | 99 | 'max': 'Complete relief',
|
|
95 | 102 | 'id': 7,
|
96 | 103 | 'text': 'During the past 24 hours, how much has pain interfered with your General activity:',
|
97 | 104 | 'type': 'range',
|
| 105 | + 'avgShort': 'General Activity', |
98 | 106 | 'min': 'No interference',
|
99 | 107 | 'max': 'Complete interference',
|
100 | 108 | },
|
101 | 109 | {
|
102 | 110 | 'id': 8,
|
103 | 111 | 'text': 'During the past 24 hours, how much has pain interfered with your Mood:',
|
104 | 112 | 'type': 'range',
|
| 113 | + 'avgShort': 'Mood', |
105 | 114 | 'min': 'No interference',
|
106 | 115 | 'max': 'Complete interference',
|
107 | 116 | },
|
108 | 117 | {
|
109 | 118 | 'id': 9,
|
110 | 119 | 'text': 'During the past 24 hours, how much has pain interfered with your Walking ability:',
|
111 | 120 | 'type': 'range',
|
| 121 | + 'avgShort': 'Walking', |
112 | 122 | 'min': 'No interference',
|
113 | 123 | 'max': 'Complete interference',
|
114 | 124 | },
|
115 | 125 | {
|
116 | 126 | 'id': 10,
|
117 | 127 | 'text': 'During the past 24 hours, how much has pain interfered with your Normal work (includes both work outside the home and housework):',
|
118 | 128 | 'type': 'range',
|
| 129 | + 'avgShort': 'Normal Work', |
| 130 | + |
119 | 131 | 'min': 'No interference',
|
120 | 132 | 'max': 'Complete interference',
|
121 | 133 | },
|
122 | 134 | {
|
123 | 135 | 'id': 11,
|
124 | 136 | 'text': 'During the past 24 hours, how much has pain interfered with your Relations with other people:',
|
125 | 137 | 'type': 'range',
|
| 138 | + 'avgShort': 'Relations', |
| 139 | + |
126 | 140 | 'min': 'No interference',
|
127 | 141 | 'max': 'Complete interference',
|
128 | 142 | },
|
129 | 143 | {
|
130 | 144 | 'id': 12,
|
131 | 145 | 'text': 'During the past 24 hours, how much has pain interfered with your Sleep:',
|
132 | 146 | 'type': 'range',
|
| 147 | + 'avgShort': 'Sleep', |
133 | 148 | 'min': 'No interference',
|
134 | 149 | 'max': 'Complete interference',
|
135 | 150 | },
|
136 | 151 | {
|
137 | 152 | 'id': 13,
|
138 | 153 | 'text': 'During the past 24 hours, how much has pain interfered with your Enjoyment of life:',
|
139 | 154 | 'type': 'range',
|
| 155 | + 'avgShort': 'Enjoyment', |
| 156 | + |
140 | 157 | 'min': 'No interference',
|
141 | 158 | 'max': 'Complete interference',
|
142 | 159 | }
|
@@ -171,14 +188,16 @@ <h1 class="text-center">{{{ text }}}</h1>
|
171 | 188 |
|
172 | 189 | <script id="questionResultsTemplate" type="html/template">
|
173 | 190 | <div class="row questionResult">
|
174 |
| - <h2 class="questionShortText">Average Pain</h2> |
| 191 | + |
| 192 | + <h2 class="questionShortText">{{avgShort}}</h2> |
| 193 | + |
175 | 194 | <div class="col-xs-6 questionCurrentResult">
|
176 |
| - <span class="questionAverageResult">6.4</span> |
| 195 | + <span class="questionAverageResult">{{avg}}</span> |
177 | 196 | </div>
|
178 | 197 | <div class="col-xs-6 comparisons" >
|
179 |
| - <div class="improved"><span class="glyphicon glyphicon-time"></span><span class="glyphicon glyphicon-arrow-up"></span><span class="changeValue">0.4</span></div> |
| 198 | + <div class="{{#avgTimeUp}}improved{{/avgTimeUp}}{{^avgTimeUp}}worse{{/avgTimeUp}}"><span class="glyphicon glyphicon-time"></span><span class="glyphicon glyphicon-arrow-{{#avgTimeUp}}up{{/avgTimeUp}}{{^avgTimeUp}}down{{/avgTimeUp}}"></span><span class="changeValue">{{avgTime}}</span></div> |
180 | 199 | <hr class="separator" />
|
181 |
| - <div class="worse"><span class="glyphicon glyphicon-glass"></span><span class="glyphicon glyphicon-arrow-down"></span><span class="changeValue">1.4</span></div> |
| 200 | + <div class="{{#avgTreatmentUp}}improved{{/avgTreatmentUp}}{{^avgTreatmentUp}}worse{{/avgTreatmentUp}}"><img class="icon icon-treatment report" src="img/icon_treatment.svg"><span class="glyphicon glyphicon-arrow-{{#avgTreatmentUp}}up{{/avgTreatmentUp}}{{^avgTreatmentUp}}down{{/avgTreatmentUp}}"></span><span class="changeValue">{{avgTreatment}}</span></div> |
182 | 201 | </div>
|
183 | 202 | </div>
|
184 | 203 | </script>
|
|
0 commit comments