1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
2 | |
---|
3 | <xsl:stylesheet version="3.0" |
---|
4 | xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" |
---|
5 | xmlns:ibis="http://www.ibisph.org" |
---|
6 | |
---|
7 | exclude-result-prefixes="ibis" |
---|
8 | > |
---|
9 | |
---|
10 | <ibis:doc> |
---|
11 | <name>html/indicator/profile/Indicator</name> |
---|
12 | <summary>Provides core INDICATOR data element fields templates</summary> |
---|
13 | <description> |
---|
14 | This XSLT provides 'indicator.xxx' profile API templates. |
---|
15 | These templates include all the core INDICATOR data element fields as |
---|
16 | well as defining a global 'indicator' variable. |
---|
17 | </description> |
---|
18 | </ibis:doc> |
---|
19 | |
---|
20 | <!-- GARTH TODO: needed for initiatives |
---|
21 | <xsl:import href="../../../xml/ComparisonValues.xslt"/> |
---|
22 | --> |
---|
23 | |
---|
24 | <!-- ==================== VARIABLES and PARAMETERS ===================== --> |
---|
25 | <xsl:param name="xmlURL" |
---|
26 | ibis:doc="Parameter that is used by the IBISPH-Admin system for previewing |
---|
27 | an indicator/view prior to publishing. This parameter is mainly passed |
---|
28 | to the view's chart call so that the charting controller knows to get |
---|
29 | the XML data from the admin app and not the local XML directory. This |
---|
30 | parameter is also used by the related indicators section when building |
---|
31 | the links. As of 11/2010, the admin app can serve up IP and IPV XML |
---|
32 | content based on the same path. This was done to simplify the XSLT |
---|
33 | code needed to retrieve the related indicator or view XML content |
---|
34 | (if the paths are not the same then the xmlURL needs to be modified |
---|
35 | to the correct path). |
---|
36 | NOTE: This mechanism has limitations for preview usage. All preview |
---|
37 | pages will NOT be able to link/navigate to any other preview content |
---|
38 | page. This issue can be overcome with via XSLT code that implements |
---|
39 | all of xmlURL manipulation and with different site specific properties |
---|
40 | and spring config URL values (and possibly some additional Java |
---|
41 | controller code." |
---|
42 | /> |
---|
43 | |
---|
44 | <xsl:param name="Indicator.viewURLPrefix" select="concat($ibis.contextPath, 'indicator/view/')" |
---|
45 | ibis:doc="localizes view prefix to be used - allows for normal view or |
---|
46 | interactive to be set via the ss override mechanism. |
---|
47 | |
---|
48 | NOTE: there are other places that use the standard i/v/ path like |
---|
49 | CP HL and snapshot, IP indexes, and admin preview. It is better to |
---|
50 | simply plug in the approp view in the spring bean config. |
---|
51 | " |
---|
52 | /> |
---|
53 | |
---|
54 | |
---|
55 | <xsl:param name="indicator" select=" |
---|
56 | if(exists(/INDICATOR_VIEW))then |
---|
57 | document(concat(/INDICATOR_VIEW/INDICATOR_NAME, '.xml'), /)/INDICATOR |
---|
58 | else |
---|
59 | /INDICATOR |
---|
60 | " |
---|
61 | ibis:doc="Common indicator that is defined for convenience and |
---|
62 | to serve as a common way to interface for both indicator and view |
---|
63 | XML source documents. This enables all the indicator profile xslts |
---|
64 | to be coded to the $indicator and not have to worry about where it's |
---|
65 | from an INDICATOR_VIEW or an INDICATOR XML document. A similar |
---|
66 | param exists for the indicatorView. |
---|
67 | |
---|
68 | NOTE: for previews, the xmlURL is only needed/used when the XML request |
---|
69 | path differs from the indicator profile XML path. As of 11/2010, the |
---|
70 | admin app serves up IP and IPV XML files via the same path so all that |
---|
71 | is needed is to open the document relative to the current IPV XML with |
---|
72 | the IP XML filename (otherwise the URL path needs to manipulated via |
---|
73 | script - search and replace strings). |
---|
74 | " |
---|
75 | /> |
---|
76 | <xsl:param name="indicatorView" select=" |
---|
77 | if(exists(/INDICATOR))then |
---|
78 | document(concat(/INDICATOR/DEFAULT_INDICATOR_VIEW_NAME, '.xml'), /)/INDICATOR_VIEW |
---|
79 | else |
---|
80 | /INDICATOR_VIEW |
---|
81 | " |
---|
82 | ibis:doc="Common indicatorView that is defined for convenience and |
---|
83 | to serve as a common way to interface for both indicator and view |
---|
84 | XML source documents. This enables all the indicator view xslt code |
---|
85 | to be coded to the $indicatorView and not have to worry about where |
---|
86 | it's from an INDICATOR_VIEW or an INDICATOR XML document. A similar |
---|
87 | param exists for the indicator. |
---|
88 | " |
---|
89 | /> |
---|
90 | |
---|
91 | <xsl:param name="Indicator.useExternalXML" select="true()" |
---|
92 | ibis:doc="Controls where the supplemental XML data resides. If true then |
---|
93 | the XML to be referenced is an external XML file. If false then the |
---|
94 | XML resides within the IP XML file. For adopters that want 100% |
---|
95 | self contained IP XML set this to false. For database/centralized |
---|
96 | data referencing set to true. |
---|
97 | " |
---|
98 | /> |
---|
99 | <xsl:param name="AncillaryValues"/> |
---|
100 | <xsl:param name="Indicator.ancillaryValues" select="if($Indicator.useExternalXML) then $AncillaryValues/ANCILLARY_VALUES else $indicator/ANCILLARY_VALUES"/> |
---|
101 | <xsl:param name="DataSources"/> |
---|
102 | <xsl:param name="Indicator.dataSources" select="if($Indicator.useExternalXML) then $DataSources/DATA_SOURCES else $indicator/DATA_SOURCES"/> |
---|
103 | <xsl:param name="Dimensions"/> |
---|
104 | <xsl:param name="Indicator.dimensions" select="if($Indicator.useExternalXML) then $Dimensions/DIMENSIONS else $indicator/DIMENSIONS"/> |
---|
105 | <xsl:param name="Measures"/> |
---|
106 | <xsl:param name="Indicator.measure" select="if($Indicator.useExternalXML) then $Measures/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME] else $indicator/MEASURES/MEASURE[NAME=$indicatorView/MEASURE_NAME]"/> |
---|
107 | <xsl:param name="ValueTypes"/> |
---|
108 | <xsl:param name="Indicator.valueTypes" select="if($Indicator.useExternalXML) then $ValueTypes/VALUE_TYPES else $indicator/VALUE_TYPES"/> |
---|
109 | <xsl:param name="ValueAttributes"/> |
---|
110 | <xsl:param name="Indicator.valueAttributes" select="if($Indicator.useExternalXML) then $ValueAttributes/VALUE_ATTRIBUTES else $indicator/VALUE_ATTRIBUTES"/> |
---|
111 | |
---|
112 | |
---|
113 | <xsl:param name="Indicator.dataNoteDelimiter" select="'.'" |
---|
114 | ibis:doc="value to be used when separating the IP and IPV data note |
---|
115 | text values. This value can be a sequence of 2 [CR LF]s since |
---|
116 | the text is being CR to BR processed. select='' '


' '' |
---|
117 | " |
---|
118 | /> |
---|
119 | |
---|
120 | <xsl:param name="Indicator.contentBlockType" select="$ContentContainer.defaultContentBlockType"/> |
---|
121 | <xsl:param name="Indicator.contentBlockTitleLevel" select="2"/> |
---|
122 | |
---|
123 | |
---|
124 | |
---|
125 | <!-- ======== BASIC INDICATOR ELEMENT CONTENT BLOCK TEMPLATES ========== --> |
---|
126 | <xsl:template name="Indicator.contentBlock" |
---|
127 | ibis:doc="Localizes setting titleLevel - creates a CR to BR formatted titled content block." |
---|
128 | > |
---|
129 | <xsl:param name="title"/> |
---|
130 | <xsl:param name="content"/> |
---|
131 | <xsl:param name="additionalClasses"/> |
---|
132 | <xsl:param name="description"/> |
---|
133 | <xsl:param name="addWikiAttribute" select="true()"/> |
---|
134 | |
---|
135 | |
---|
136 | <xsl:param name="contentBlockType" tunnel="yes" select="$Indicator.contentBlockType" ibis:doc="Optional param to control the block type. Default is ContentContainer.contentBlockType."/> |
---|
137 | <xsl:param name="expandableControlType" tunnel="yes" select="'checkbox'" ibis:doc="Optional value passed to expandable template if contentBlockType is 'expandable'."/> |
---|
138 | <xsl:param name="expandableContentShow" tunnel="yes" ibis:doc="Optional value passed to expandable template if contentBlockType is 'expandable'."/> |
---|
139 | <xsl:param name="expandableControlName" tunnel="yes" |
---|
140 | ibis:doc="Optional param that is only needed when the expandableControlType |
---|
141 | is 'radio'. This results in a UI where only 1 expandable block |
---|
142 | will be displayed at a time (hence the radio input functionality). |
---|
143 | " |
---|
144 | /> |
---|
145 | <xsl:param name="titleLevel" select="$Indicator.contentBlockTitleLevel"/> |
---|
146 | |
---|
147 | <xsl:variable name="additionalClasses"> |
---|
148 | <xsl:if test="contains($additionalClasses, 'Text')"> |
---|
149 | <xsl:if test="500 < string-length($content)"><xsl:value-of select="$additionalClasses"/></xsl:if> |
---|
150 | </xsl:if> |
---|
151 | <xsl:if test="not(contains($additionalClasses, 'Text')) and 0 != string-length($additionalClasses)"><xsl:value-of select="$additionalClasses"/></xsl:if> |
---|
152 | </xsl:variable> |
---|
153 | <xsl:call-template name="ContentContainer.contentBlock"> |
---|
154 | <xsl:with-param name="title" select="$title"/> |
---|
155 | <xsl:with-param name="titleLevel" select="$titleLevel"/> |
---|
156 | <xsl:with-param name="content" select="$content"/> |
---|
157 | <xsl:with-param name="description" select="$description"/> |
---|
158 | |
---|
159 | <xsl:with-param name="contentBlockType" select="$contentBlockType"/> |
---|
160 | <xsl:with-param name="additionalClasses" select="$additionalClasses"/> |
---|
161 | <xsl:with-param name="expandableControlName" select="$expandableControlName"/> |
---|
162 | <xsl:with-param name="expandableControlType" select="$expandableControlType"/> |
---|
163 | <xsl:with-param name="expandableContentShow" select="$expandableContentShow"/> |
---|
164 | <xsl:with-param name="addWikiAttribute" select="$addWikiAttribute"/> |
---|
165 | </xsl:call-template> |
---|
166 | </xsl:template> |
---|
167 | |
---|
168 | |
---|
169 | <xsl:template name="Indicator.definition" |
---|
170 | ibis:doc="Creates a titled content block that contains the |
---|
171 | 'INDICATOR/DEFINITION' XML contents." |
---|
172 | > |
---|
173 | <xsl:param name="indicator" select="$indicator"/> |
---|
174 | <xsl:call-template name="Indicator.contentBlock"> |
---|
175 | <xsl:with-param name="title" select="'Definition'"/> |
---|
176 | <xsl:with-param name="content" select="$indicator/DEFINITION"/> |
---|
177 | <xsl:with-param name="description" select="'Definition of this indicator'"/> |
---|
178 | <xsl:with-param name="additionalClasses" select="'Text'"/> |
---|
179 | </xsl:call-template> |
---|
180 | </xsl:template> |
---|
181 | |
---|
182 | |
---|
183 | <xsl:template name="Indicator.numerator" |
---|
184 | ibis:doc="Creates a titled content block that contains the |
---|
185 | 'INDICATOR/NUMERATOR' XML contents." |
---|
186 | > |
---|
187 | <xsl:param name="indicator" select="$indicator"/> |
---|
188 | <xsl:param name="indicatorView" select="$indicatorView"/> |
---|
189 | <xsl:call-template name="Indicator.contentBlock"> |
---|
190 | <xsl:with-param name="title" select="'Numerator'"/> |
---|
191 | <xsl:with-param name="content" select="if(0 = string-length($indicatorView/NUMERATOR_OVERRIDE)) then $indicator/NUMERATOR else $indicatorView/NUMERATOR_OVERRIDE"/> |
---|
192 | <xsl:with-param name="description" select="'Definition of this datasets numerator used to calculate the data values'"/> |
---|
193 | </xsl:call-template> |
---|
194 | </xsl:template> |
---|
195 | |
---|
196 | |
---|
197 | <xsl:template name="Indicator.denominator" |
---|
198 | ibis:doc="Creates a titled content block that contains the |
---|
199 | 'INDICATOR/DENOMINATOR' XML contents." |
---|
200 | > |
---|
201 | <xsl:param name="indicator" select="$indicator"/> |
---|
202 | <xsl:call-template name="Indicator.contentBlock"> |
---|
203 | <xsl:with-param name="title" select="'Denominator'"/> |
---|
204 | <xsl:with-param name="content" select="if(0 = string-length($indicatorView/DENOMINATOR_OVERRIDE)) then $indicator/DENOMINATOR else $indicatorView/DENOMINATOR_OVERRIDE"/> |
---|
205 | <xsl:with-param name="description" select="'Definition of this datasets denominator used to calculate the data values'"/> |
---|
206 | </xsl:call-template> |
---|
207 | </xsl:template> |
---|
208 | |
---|
209 | |
---|
210 | <xsl:template name="Indicator.howCalculatedTable" |
---|
211 | ibis:doc="Creates a titled content block that contains a small |
---|
212 | table with the 'INDICATOR/NUMERATOR' and 'INDICATOR/DENOMINATOR' XML |
---|
213 | contents which represent how the data are calculated." |
---|
214 | > |
---|
215 | <xsl:param name="indicator" select="$indicator"/> |
---|
216 | <xsl:param name="indicatorView" select="$indicatorView"/> |
---|
217 | |
---|
218 | <xsl:call-template name="Indicator.contentBlock"> |
---|
219 | <xsl:with-param name="title" select="'How the Measure is Calculated'"/> |
---|
220 | <xsl:with-param name="content"> |
---|
221 | <table cellpadding="0" cellspacing="0"> |
---|
222 | <tr title="Definition of this datasets numerator used to calculate the data values"> |
---|
223 | <td>Numerator:</td> |
---|
224 | <td> |
---|
225 | <xsl:value-of select="if(0 = string-length($indicatorView/NUMERATOR_OVERRIDE)) then $indicator/NUMERATOR else $indicatorView/NUMERATOR_OVERRIDE"/> |
---|
226 | </td> |
---|
227 | </tr> |
---|
228 | <tr title="Definition of this datasets denominator used to calculate the data values"> |
---|
229 | <td style="padding-right: 5px;">Denominator:</td> |
---|
230 | <td> |
---|
231 | <xsl:value-of select="if(0 = string-length($indicatorView/DENOMINATOR_OVERRIDE)) then $indicator/DENOMINATOR else $indicatorView/DENOMINATOR_OVERRIDE"/> |
---|
232 | </td> |
---|
233 | </tr> |
---|
234 | </table> |
---|
235 | </xsl:with-param> |
---|
236 | <xsl:with-param name="description" select="'Describes the numerator and denominator and how these values are used to calculate the values'"/> |
---|
237 | </xsl:call-template> |
---|
238 | </xsl:template> |
---|
239 | |
---|
240 | |
---|
241 | <xsl:template name="Indicator.howCalculated" |
---|
242 | ibis:doc="Creates a titled content block that contains a small |
---|
243 | table with the 'INDICATOR/NUMERATOR' and 'INDICATOR/DENOMINATOR' XML |
---|
244 | contents which represent how the data are calculated." |
---|
245 | > |
---|
246 | <xsl:param name="indicator" select="$indicator"/> |
---|
247 | |
---|
248 | <xsl:call-template name="Indicator.contentBlock"> |
---|
249 | <xsl:with-param name="title" select="'How the Measure is Calculated'"/> |
---|
250 | <xsl:with-param name="content"> |
---|
251 | <ul> |
---|
252 | <li> |
---|
253 | <h4 title="Definition of this datasets numerator used to calculate the data values">Numerator: </h4> |
---|
254 | <xsl:value-of select="if(0 = string-length($indicatorView/NUMERATOR_OVERRIDE)) then $indicator/NUMERATOR else $indicatorView/NUMERATOR_OVERRIDE"/> |
---|
255 | </li> |
---|
256 | <li> |
---|
257 | <h4 title="Definition of this datasets denominator used to calculate the data values">Denominator: </h4> |
---|
258 | <xsl:value-of select="if(0 = string-length($indicatorView/DENOMINATOR_OVERRIDE)) then $indicator/DENOMINATOR else $indicatorView/DENOMINATOR_OVERRIDE"/> |
---|
259 | </li> |
---|
260 | </ul> |
---|
261 | </xsl:with-param> |
---|
262 | <xsl:with-param name="description" select="'Describes the numerator and denominator and how these values are used to calculate the values'"/> |
---|
263 | </xsl:call-template> |
---|
264 | </xsl:template> |
---|
265 | |
---|
266 | |
---|
267 | <xsl:template name="Indicator.riskFactors" |
---|
268 | ibis:doc="Creates a titled content block that contains the |
---|
269 | 'INDICATOR/RELATIONS/RELATION[NAME='RiskFactors']' XML contents." |
---|
270 | > |
---|
271 | <xsl:param name="indicator" select="$indicator"/> |
---|
272 | <xsl:call-template name="Indicator.contentBlock"> |
---|
273 | <xsl:with-param name="title" select="'Risk Factors'"/> |
---|
274 | <xsl:with-param name="content" select="$indicator/RELATIONS/RELATION[NAME='RiskFactors']/TEXT"/> |
---|
275 | <xsl:with-param name="description" select="'Potential health risk factors'"/> |
---|
276 | </xsl:call-template> |
---|
277 | </xsl:template> |
---|
278 | |
---|
279 | |
---|
280 | <xsl:template name="Indicator.whyImportant" |
---|
281 | ibis:doc="Creates a titled content block that contains the |
---|
282 | 'INDICATOR/WHY_IMPORTANT' XML contents." |
---|
283 | > |
---|
284 | <xsl:param name="indicator" select="$indicator"/> |
---|
285 | <xsl:call-template name="Indicator.contentBlock"> |
---|
286 | <xsl:with-param name="title" select="'Why Is This Important?'"/> |
---|
287 | <xsl:with-param name="content" select="$indicator/WHY_IMPORTANT"/> |
---|
288 | <xsl:with-param name="description" select="'Text that describes why this indicator is important to the populations overall health'"/> |
---|
289 | </xsl:call-template> |
---|
290 | </xsl:template> |
---|
291 | |
---|
292 | |
---|
293 | |
---|
294 | <xsl:template name="Indicator.initiatives" |
---|
295 | ibis:doc="Creates a titled content block that contains the |
---|
296 | 'INDICATOR/INITIATIVES/*' XML contents." |
---|
297 | > |
---|
298 | <xsl:param name="indicator"/> |
---|
299 | <xsl:param name="initiatives" select="$indicator/INITIATIVES/INITIATIVE"/> |
---|
300 | <xsl:param name="title"/> |
---|
301 | |
---|
302 | <xsl:if test="0 != count($initiatives)"> |
---|
303 | <xsl:call-template name="Indicator.contentBlock"> |
---|
304 | <xsl:with-param name="title" select="$title"/> |
---|
305 | <xsl:with-param name="description" select="'Provides details on the associated Health Initiatives'"/> |
---|
306 | <xsl:with-param name="content"> |
---|
307 | <xsl:if test="1 = count($initiatives)"> |
---|
308 | <xsl:call-template name="Indicator.initiative"> |
---|
309 | <xsl:with-param name="indicator" select="$indicator"/> |
---|
310 | <xsl:with-param name="initiative" select="$initiatives[1]"/> |
---|
311 | </xsl:call-template> |
---|
312 | </xsl:if> |
---|
313 | <xsl:if test="1 < count($initiatives)"> |
---|
314 | <ul> |
---|
315 | <xsl:for-each select="$initiatives"> |
---|
316 | <xsl:sort select="SORT_ORDER" order="ascending" data-type="number"/> |
---|
317 | <li> |
---|
318 | <xsl:call-template name="Indicator.initiative"> |
---|
319 | <xsl:with-param name="indicator" select="$indicator"/> |
---|
320 | <xsl:with-param name="initiative" select="."/> |
---|
321 | </xsl:call-template> |
---|
322 | </li> |
---|
323 | </xsl:for-each> |
---|
324 | </ul> |
---|
325 | </xsl:if> |
---|
326 | </xsl:with-param> |
---|
327 | </xsl:call-template> |
---|
328 | </xsl:if> |
---|
329 | </xsl:template> |
---|
330 | |
---|
331 | |
---|
332 | |
---|
333 | <xsl:template name="Indicator.initiative" |
---|
334 | ibis:doc="Creates a titled content block that contains the |
---|
335 | 'INDICATOR/INITIATIVES/*' XML contents." |
---|
336 | > |
---|
337 | <xsl:param name="indicator"/> |
---|
338 | <xsl:param name="initiative"/> |
---|
339 | |
---|
340 | <h3 title="{$initiative/DESCRIPTION}"> |
---|
341 | <xsl:if test="0 != string-length($initiative/URL)"> |
---|
342 | <a href="{$initiative/URL}"><xsl:value-of select="$initiative/TITLE"/></a>, |
---|
343 | </xsl:if> |
---|
344 | <xsl:if test="0 = string-length($initiative/URL)"> |
---|
345 | <xsl:value-of select="$initiative/TITLE"/>, |
---|
346 | </xsl:if> |
---|
347 | |
---|
348 | <xsl:if test="0 != string-length($initiative/INITIATIVE_TOPIC/URL)"> |
---|
349 | <a href="{$initiative/INITIATIVE_TOPIC/URL}"><xsl:value-of select="$initiative/INITIATIVE_TOPIC/TITLE"/></a>: |
---|
350 | </xsl:if> |
---|
351 | <xsl:if test="0 = string-length($initiative/INITIATIVE_TOPIC/URL)"> |
---|
352 | <xsl:value-of select="$initiative/INITIATIVE_TOPIC/TITLE"/>: |
---|
353 | </xsl:if> |
---|
354 | |
---|
355 | <xsl:if test="0 != string-length($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/URL)"> |
---|
356 | <a href="{$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/URL}" |
---|
357 | title="{$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/DESCRIPTION}" |
---|
358 | ><xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TITLE"/> |
---|
359 | </a> |
---|
360 | </xsl:if> |
---|
361 | <xsl:if test="0 = string-length($initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/URL)"> |
---|
362 | <xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TITLE"/> |
---|
363 | </xsl:if> |
---|
364 | </h3> |
---|
365 | <xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/NARRATIVE"/><br/> |
---|
366 | <span class="Bold"><xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_LABEL"/></span>: |
---|
367 | <xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_GOAL_VALUE"/>, |
---|
368 | <xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_NARRATIVE"/> |
---|
369 | |
---|
370 | <xsl:variable name="indicatorComparisonValues" select="/"> |
---|
371 | <!-- |
---|
372 | <xsl:call-template name="ComparisonValues.getIndicatorStateUSComparisonValues"> |
---|
373 | <xsl:with-param name="indicator" select="$indicator"/> |
---|
374 | <xsl:with-param name="dimensions" select="$Indicator.dimensions"/> |
---|
375 | <xsl:with-param name="measures" select="$Indicator.measures"/> |
---|
376 | <xsl:with-param name="valueTypes" select="$Indicator.valueTypes"/> |
---|
377 | |
---|
378 | <xsl:with-param name="communityDimensionName" select="'GeoState'"/> |
---|
379 | <xsl:with-param name="communityDimensionValue" select="'35'"/> |
---|
380 | </xsl:call-template> |
---|
381 | --> |
---|
382 | </xsl:variable> |
---|
383 | |
---|
384 | <br/> |
---|
385 | baseline value: <xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_BASELINE_VALUE"/><br/> |
---|
386 | goal value: <xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_GOAL_VALUE"/><br/> |
---|
387 | measure name: <xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/MEASURE_NAME"/><br/> |
---|
388 | COMMUNITY VALUE: <xsl:value-of select="$indicatorComparisonValues/COMMUNITY/VALUE/TITLE"/><br/> |
---|
389 | COMMUNITY DESIRABLE_VALUE: <xsl:value-of select="$indicatorComparisonValues/COMMUNITY/DESIRABLE_VALUE"/><br/> |
---|
390 | COMMUNITY RELIABILITY: <xsl:value-of select="$indicatorComparisonValues/COMMUNITY/RELIABILITY"/><br/> |
---|
391 | STATE compare value: <xsl:value-of select="$indicatorComparisonValues/STATE/VALUE/TITLE"/><br/> |
---|
392 | US compare value: <xsl:value-of select="$indicatorComparisonValues/US/VALUE/TITLE"/><br/> |
---|
393 | PERIOD DIMENSION: <xsl:value-of select="$indicatorComparisonValues/PERIOD_DIMENSION/VALUE/TITLE"/><br/> |
---|
394 | <xsl:message select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/MEASURE_NAME"/> |
---|
395 | <xsl:message select="count($indicator/DATASETS//RECORD[MEASURE/NAME = $initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/MEASURE_NAME])"/> |
---|
396 | <div id="boxplot"></div> |
---|
397 | <div id="chart-temp"></div> |
---|
398 | <div id="gauge"/> |
---|
399 | <div id="thermo_gauge"/> |
---|
400 | |
---|
401 | <script> |
---|
402 | function createChart() |
---|
403 | { |
---|
404 | $("#chart-temp").kendoChart( |
---|
405 | { |
---|
406 | "legend": {"visible": false } // doesn't matter |
---|
407 | ,"series": |
---|
408 | [{ |
---|
409 | "type": "bullet" |
---|
410 | ,"data": [[25, 22]] // , 15, 16, 17 - only does 2 data points |
---|
411 | }] |
---|
412 | ,"categoryAxis": |
---|
413 | { |
---|
414 | "majorGridLines": {"visible": false} |
---|
415 | ,"majorTicks": {"visible": false} |
---|
416 | } |
---|
417 | ,"valueAxis": |
---|
418 | [ |
---|
419 | { |
---|
420 | "reverse": true |
---|
421 | ,"plotBands": |
---|
422 | [ |
---|
423 | {"from": 0, "to": 10, "color": "yellow", "opacity": .3} |
---|
424 | ,{"from": 10, "to": 20, "color": "orange", "opacity": .3} |
---|
425 | ,{"from": 20, "to": 30, "color": "red", "opacity": .3} |
---|
426 | ] |
---|
427 | ,"majorGridLines": {"visible": false} |
---|
428 | ,"min": 5 |
---|
429 | ,"max": 45 |
---|
430 | ,"minorTicks": {"visible": true} |
---|
431 | } |
---|
432 | ] |
---|
433 | ,"tooltip": |
---|
434 | { |
---|
435 | "visible": true |
---|
436 | ,"template": "Maximum: #= value.target # <br/> Average: #= value.current #" |
---|
437 | } |
---|
438 | }); |
---|
439 | |
---|
440 | |
---|
441 | $("#boxplot").kendoChart({ |
---|
442 | "series": |
---|
443 | [ |
---|
444 | { |
---|
445 | "type": "verticalBoxPlot" |
---|
446 | ,q1Field: 'q1' |
---|
447 | ,q3Field: 'q3' |
---|
448 | ,lowerField: 'lower' |
---|
449 | ,upperField: 'upper' |
---|
450 | ,medianField: 'median' |
---|
451 | ,meanField: 'mean' |
---|
452 | ,outliersField: 'outliers' |
---|
453 | } |
---|
454 | ] |
---|
455 | ,dataSource: |
---|
456 | { |
---|
457 | "data": [ |
---|
458 | { year: 2004, lower: 1.8, q1: 2.75, median: 3.35, q3: 3.825, upper: 4.9, mean: 3.4 }, |
---|
459 | { year: 2005, lower: 1.7, q1: 2.275, median: 3.2, q3: 3.825, upper: 5.5, outliers: [0.5, 6.7] }, |
---|
460 | { year: 2006, lower: 1.2, q1: 1.95, median: 2.45, q3: 3.075, upper: 3.5, mean: 2.5 }, |
---|
461 | { year: 2007, lower: 1.3, q1: 1.9, median: 3.05, q3: 3.425, upper: 4, mean: 2.7, outliers: [7, 8.5] } |
---|
462 | ] |
---|
463 | } |
---|
464 | ,categoryAxis: |
---|
465 | { |
---|
466 | field: 'year' |
---|
467 | } |
---|
468 | ,"tooltip": {"visible": true} |
---|
469 | }); |
---|
470 | |
---|
471 | $("#gauge").kendoArcGauge({ |
---|
472 | value: "<xsl:value-of select="$indicatorComparisonValues/STATE/VALUE/text()"/>" |
---|
473 | ,centerTemplate: "State: <xsl:value-of select="$indicatorComparisonValues/STATE/VALUE/TITLE"/>" |
---|
474 | ,scale: |
---|
475 | { |
---|
476 | reverse: false |
---|
477 | ,startAngle: 90 |
---|
478 | ,endAngle: 360 |
---|
479 | ,min: 10 |
---|
480 | ,max: 50 |
---|
481 | ,labels: {visible: true} |
---|
482 | ,majorTicks: {visible: true} |
---|
483 | } |
---|
484 | }); |
---|
485 | |
---|
486 | $("#thermo_gauge").kendoLinearGauge({ |
---|
487 | vertical: false, |
---|
488 | pointer: [{ |
---|
489 | value: 10, |
---|
490 | color: "#c20000", |
---|
491 | shape: "arrow" |
---|
492 | }, { |
---|
493 | value: 70, |
---|
494 | color: "#ff7a00", |
---|
495 | margin: 10 |
---|
496 | }, { |
---|
497 | value: 140, |
---|
498 | color: "#ffc700" |
---|
499 | }], |
---|
500 | scale: { |
---|
501 | vertical: false, |
---|
502 | minorUnit: 5, |
---|
503 | min: 0, |
---|
504 | max: 180 |
---|
505 | } |
---|
506 | }); |
---|
507 | |
---|
508 | } // End of function createChart |
---|
509 | |
---|
510 | $(document).ready(createChart); |
---|
511 | </script> |
---|
512 | |
---|
513 | <style> |
---|
514 | table.Info tr {background-color: yellow;} |
---|
515 | table.Info tr td {background-color: transparent;} |
---|
516 | </style> |
---|
517 | <table class="Info"> |
---|
518 | <tr> |
---|
519 | <th>Year</th> |
---|
520 | <th>Base</th> |
---|
521 | <th>Goal</th> |
---|
522 | <th>State Value</th> |
---|
523 | <th>U.S. Value</th> |
---|
524 | </tr> |
---|
525 | <tr> |
---|
526 | <td><xsl:value-of select="$indicatorComparisonValues/PERIOD_DIMENSION/VALUE/TITLE"/></td> |
---|
527 | <td><xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_BASELINE_VALUE"/></td> |
---|
528 | <td><xsl:value-of select="$initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/TARGET_GOAL_VALUE"/></td> |
---|
529 | <td><xsl:value-of select="$indicatorComparisonValues/STATE/VALUE/TITLE"/></td> |
---|
530 | <td><xsl:value-of select="$indicatorComparisonValues/US/VALUE/TITLE"/></td> |
---|
531 | </tr> |
---|
532 | </table> |
---|
533 | <br/><br/> |
---|
534 | |
---|
535 | <textarea rows="10" cols="80"> |
---|
536 | <xsl:copy-of select="$indicatorComparisonValues"/> |
---|
537 | </textarea> |
---|
538 | <br/> |
---|
539 | |
---|
540 | <!-- |
---|
541 | <xsl:message select="$indicatorComparisonValues"/> |
---|
542 | <xsl:message select="'yyyyyyyyyyyyyyyyyyyyyyyyy'"/> |
---|
543 | |
---|
544 | |
---|
545 | <xsl:copy-of select="$indicator/DATASETS//RECORD[(MEASURE/NAME = $initiative/INITIATIVE_TOPIC/INITIATIVE_TOPIC_OBJECTIVE/MEASURE_NAME) and exists(DIMENSIONS/DIMENSION[(NAME='GeoState') and (VALUE='35')]) ]"/> |
---|
546 | --> |
---|
547 | <link rel="stylesheet" type="text/css" href="{$ibis.contextPath}css/_community.css"/> |
---|
548 | <!-- |
---|
549 | <xsl:call-template name="Highlight.communityStateUSComparisonTable"> |
---|
550 | <xsl:with-param name="communityTitle" |
---|
551 | select="'my title'" |
---|
552 | /> |
---|
553 | <xsl:with-param name="indicatorComparisonValues" select="$indicatorComparisonValues"/> |
---|
554 | <xsl:with-param name="communityValue" select="$indicatorComparisonValues/STATE/VALUE/text()"/> |
---|
555 | </xsl:call-template> |
---|
556 | --> |
---|
557 | |
---|
558 | <!-- GARTH TODO: Could implement the worse, same, better logic here... --> |
---|
559 | </xsl:template> |
---|
560 | |
---|
561 | |
---|
562 | |
---|
563 | <xsl:template name="Indicator.otherObjectives" |
---|
564 | ibis:doc="Creates a titled content block that contains the |
---|
565 | 'INDICATOR/OTHER_OBJECTIVE_DESCRIPTION' XML contents." |
---|
566 | > |
---|
567 | <xsl:param name="indicator" select="$indicator"/> |
---|
568 | <xsl:call-template name="Indicator.contentBlock"> |
---|
569 | <xsl:with-param name="title" select="'Other Objectives'"/> |
---|
570 | <xsl:with-param name="content" select="$indicator/OTHER_OBJECTIVE_DESCRIPTION"/> |
---|
571 | <xsl:with-param name="description" select="'Describes any other health initiative objectives'"/> |
---|
572 | <xsl:with-param name="additionalClasses" select="'Text'"/> |
---|
573 | </xsl:call-template> |
---|
574 | </xsl:template> |
---|
575 | |
---|
576 | |
---|
577 | <xsl:template name="Indicator.howDoing" |
---|
578 | ibis:doc="Creates a titled content block that contains the |
---|
579 | 'INDICATOR/HOW_DOING' XML contents." |
---|
580 | > |
---|
581 | <xsl:param name="indicator" select="$indicator"/> |
---|
582 | <xsl:call-template name="Indicator.contentBlock"> |
---|
583 | <xsl:with-param name="title" select="'How Are We Doing?'"/> |
---|
584 | <xsl:with-param name="content" select="$indicator/HOW_DOING"/> |
---|
585 | <xsl:with-param name="description" select="'Provides a status on how the state is doing'"/> |
---|
586 | <xsl:with-param name="additionalClasses" select="'Text'"/> |
---|
587 | </xsl:call-template> |
---|
588 | </xsl:template> |
---|
589 | |
---|
590 | |
---|
591 | <xsl:template name="Indicator.howCompare" |
---|
592 | ibis:doc="Creates a titled content block that contains the |
---|
593 | 'INDICATOR/STATE_VS_US' XML contents." |
---|
594 | > |
---|
595 | <xsl:param name="indicator" select="$indicator"/> |
---|
596 | <xsl:call-template name="Indicator.contentBlock"> |
---|
597 | <xsl:with-param name="title" select="'How Do We Compare With the U.S.?'"/> |
---|
598 | <xsl:with-param name="content" select="$indicator/STATE_VS_US"/> |
---|
599 | <xsl:with-param name="description" select="'Provides a How Doing comparison between the state and the U.S.'"/> |
---|
600 | <xsl:with-param name="additionalClasses" select="'Text'"/> |
---|
601 | </xsl:call-template> |
---|
602 | </xsl:template> |
---|
603 | |
---|
604 | |
---|
605 | <xsl:template name="Indicator.whatDoing" |
---|
606 | ibis:doc="Creates a titled content block that contains the |
---|
607 | 'INDICATOR/WHAT_DOING' XML contents." |
---|
608 | > |
---|
609 | <xsl:param name="indicator" select="$indicator"/> |
---|
610 | <xsl:call-template name="Indicator.contentBlock"> |
---|
611 | <xsl:with-param name="title" select="'What Is Being Done?'"/> |
---|
612 | <xsl:with-param name="content" select="$indicator/WHAT_DOING"/> |
---|
613 | <xsl:with-param name="description" select="'Describes what is being done to help the population'"/> |
---|
614 | <xsl:with-param name="additionalClasses" select="'Text'"/> |
---|
615 | </xsl:call-template> |
---|
616 | </xsl:template> |
---|
617 | |
---|
618 | |
---|
619 | <xsl:template name="Indicator.evidenceBasedPractices" |
---|
620 | ibis:doc="Creates a titled content block that contains the |
---|
621 | 'INDICATOR/EVIDENCE_BASED_PRACTICES' XML contents." |
---|
622 | > |
---|
623 | <xsl:param name="indicator" select="$indicator"/> |
---|
624 | <xsl:call-template name="Indicator.contentBlock"> |
---|
625 | <xsl:with-param name="title" select="'Evidence-based Practices'"/> |
---|
626 | <xsl:with-param name="content" select="$indicator/EVIDENCE_BASED_PRACTICES"/> |
---|
627 | <xsl:with-param name="description" select="'Describes what evidence-based interventions are recommended'"/> |
---|
628 | <xsl:with-param name="additionalClasses" select="'Text'"/> |
---|
629 | </xsl:call-template> |
---|
630 | </xsl:template> |
---|
631 | |
---|
632 | |
---|
633 | <xsl:template name="Indicator.footnoteReferences" |
---|
634 | ibis:doc="Creates a titled content block that contains the |
---|
635 | 'INDICATOR/FOOTNOTE_REFERENCES' XML contents." |
---|
636 | > |
---|
637 | <xsl:param name="indicator" select="$indicator"/> |
---|
638 | <xsl:call-template name="Indicator.contentBlock"> |
---|
639 | <xsl:with-param name="title" select="'Footnote References'"/> |
---|
640 | <xsl:with-param name="content" select="$indicator/FOOTNOTE_REFERENCES"/> |
---|
641 | <xsl:with-param name="description" select="'Footnote References'"/> |
---|
642 | </xsl:call-template> |
---|
643 | </xsl:template> |
---|
644 | |
---|
645 | |
---|
646 | <xsl:template name="Indicator.availableServices" |
---|
647 | ibis:doc="Creates a titled content block that contains the |
---|
648 | 'INDICATOR/SERVICES_AVAILABLE_TO_PUBLIC' XML contents." |
---|
649 | > |
---|
650 | <xsl:param name="indicator" select="$indicator"/> |
---|
651 | <xsl:call-template name="Indicator.contentBlock"> |
---|
652 | <xsl:with-param name="title" select="'Available Services'"/> |
---|
653 | <xsl:with-param name="content" select="$indicator/SERVICES_AVAILABLE_TO_PUBLIC"/> |
---|
654 | <xsl:with-param name="description" select="'Provides text and links that can be referenced'"/> |
---|
655 | </xsl:call-template> |
---|
656 | </xsl:template> |
---|
657 | |
---|
658 | |
---|
659 | <xsl:template name="Indicator.moreResources" |
---|
660 | ibis:doc="Creates a titled content block that contains the |
---|
661 | 'INDICATOR/MORE_RESOURCES' XML contents." |
---|
662 | > |
---|
663 | <xsl:param name="indicator" select="$indicator"/> |
---|
664 | <xsl:call-template name="Indicator.contentBlock"> |
---|
665 | <xsl:with-param name="title" select="'More Resources'"/> |
---|
666 | <xsl:with-param name="content" select="$indicator/MORE_RESOURCES"/> |
---|
667 | <xsl:with-param name="description" select="'Additional resources'"/> |
---|
668 | </xsl:call-template> |
---|
669 | </xsl:template> |
---|
670 | |
---|
671 | |
---|
672 | <xsl:template name="Indicator.otherInformation" |
---|
673 | ibis:doc="Creates a titled content block that contains the |
---|
674 | 'INDICATOR/OTHER_PROGRAM_INFORMATION' XML contents." |
---|
675 | > |
---|
676 | <xsl:param name="indicator" select="$indicator"/> |
---|
677 | <xsl:call-template name="Indicator.contentBlock"> |
---|
678 | <xsl:with-param name="title" select="'Health Program Information'"/> |
---|
679 | <xsl:with-param name="content" select="$indicator/OTHER_PROGRAM_INFORMATION"/> |
---|
680 | <xsl:with-param name="description" select="'Additional information that does not fit into any of the above categories'"/> |
---|
681 | <xsl:with-param name="additionalClasses" select="'Text'"/> |
---|
682 | </xsl:call-template> |
---|
683 | </xsl:template> |
---|
684 | |
---|
685 | |
---|
686 | <xsl:template name="Indicator.allDates" |
---|
687 | ibis:doc="Creates a titled content block that contains the 'INDICATOR' |
---|
688 | date elements inside a div with the class style of 'Center'." |
---|
689 | > |
---|
690 | <xsl:param name="indicator" select="$indicator"/> |
---|
691 | <div class="DataDate" title="Data source/data as of date and when these data were published to this site"> |
---|
692 | Page Content Updated On <xsl:value-of select="$indicator/DATA_AS_OF_DATE"/>, |
---|
693 | Published on <xsl:value-of select="$indicator/PUBLISHED_DATE"/> |
---|
694 | <!-- Lois does not want this showing on public site 5-14-07. |
---|
695 | Data as of: <xsl:value-of select="$indicator/DATA_AS_OF_DATE"/>, |
---|
696 | Last Modified: <xsl:value-of select="$indicator/MODIFIED_DATE"/>, |
---|
697 | Published: <xsl:value-of select="$indicator/PUBLISHED_DATE"/> |
---|
698 | --> |
---|
699 | </div> |
---|
700 | </xsl:template> |
---|
701 | |
---|
702 | |
---|
703 | <xsl:template name="Indicator.modifiedDate" |
---|
704 | ibis:doc="Creates a titled content block that contains the |
---|
705 | 'INDICATOR/MODIFIED_DATE' XML contents." |
---|
706 | > |
---|
707 | <xsl:param name="indicator" select="$indicator"/> |
---|
708 | <xsl:element name="h{$Indicator.contentBlockTitleLevel}"> |
---|
709 | <xsl:attribute name="title" select="'Date these data were last modified by the admin system.'"/> |
---|
710 | Data Modified Date |
---|
711 | </xsl:element> |
---|
712 | These data were last modified on: <xsl:value-of select="$indicator/MODIFIED_DATE"/> |
---|
713 | </xsl:template> |
---|
714 | |
---|
715 | |
---|
716 | <xsl:template name="Indicator.dataSourceDate" |
---|
717 | ibis:doc="Creates a titled content block that contains the |
---|
718 | 'INDICATOR/DATA_AS_OF_DATE' XML contents (data as of)." |
---|
719 | > |
---|
720 | <xsl:param name="indicator" select="$indicator"/> |
---|
721 | <!-- |
---|
722 | <h2 title="Data source date - date these data points are as of.">Data As Of Date</h2> |
---|
723 | <xsl:value-of select="$indicator/DATA_AS_OF_DATE"/> |
---|
724 | <br/><br/> |
---|
725 | |
---|
726 | <div class="DataDate" title="Data source date - date these data points are as of."> |
---|
727 | Updated On <xsl:value-of select="$indicator/DATA_AS_OF_DATE"/> |
---|
728 | </div> |
---|
729 | --> |
---|
730 | <xsl:element name="h{$Indicator.contentBlockTitleLevel}"> |
---|
731 | <xsl:attribute name="title" select="'Data source date - date these data points are as of.'"/> |
---|
732 | Date Indicator Content Last Updated: <xsl:value-of select="$indicator/DATA_AS_OF_DATE"/> |
---|
733 | </xsl:element><br/> |
---|
734 | </xsl:template> |
---|
735 | |
---|
736 | |
---|
737 | |
---|
738 | |
---|
739 | |
---|
740 | |
---|
741 | <!-- =================== MORE SPECIALIZED TEMPLATES =================== --> |
---|
742 | <xsl:template name="Indicator.dataIssues" |
---|
743 | ibis:doc="Creates a titled content block that contains the list of all |
---|
744 | indicator DATA_ISSUES and DATASOURCE/DATA_ISSUES assoc with the view. |
---|
745 | " |
---|
746 | > |
---|
747 | <xsl:param name="indicator" select="$indicator"/> |
---|
748 | <xsl:param name="indicatorView" select="$indicatorView"/> |
---|
749 | <xsl:param name="title" select="'Data Interpretation Issues'"/> |
---|
750 | |
---|
751 | GARTH TODO: |
---|
752 | <xsl:variable name="dataIssues"> |
---|
753 | <xsl:copy-of select="$indicatorView/DATA_ISSUES"/> |
---|
754 | <xsl:for-each select="$Indicator.dataSources/DATA_SOURCE[NAME = $indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]]"> |
---|
755 | <xsl:sort select="SORT_ORDER" order="ascending" data-type="number"/> |
---|
756 | <xsl:copy-of select="DATA_ISSUES"/> |
---|
757 | </xsl:for-each> |
---|
758 | </xsl:variable> |
---|
759 | <xsl:variable name="dataIssuesCount" select="count($dataIssues/DATA_ISSUES)"/> |
---|
760 | <xsl:message select="concat('Indicator.dataIssues, DI Count: ', $dataIssuesCount)"/> |
---|
761 | |
---|
762 | <xsl:if test="0 != $dataIssuesCount"> |
---|
763 | <xsl:call-template name="Indicator.contentBlock"> |
---|
764 | <xsl:with-param name="title" select="$title"/> |
---|
765 | <xsl:with-param name="content"> |
---|
766 | <xsl:if test="1 < $dataIssuesCount"> |
---|
767 | <ul> |
---|
768 | <xsl:for-each select="$dataIssues/DATA_ISSUES"> |
---|
769 | <li><xsl:value-of select="."/></li> |
---|
770 | </xsl:for-each> |
---|
771 | </ul> |
---|
772 | </xsl:if> |
---|
773 | <xsl:if test="1 = $dataIssuesCount"> |
---|
774 | <xsl:value-of select="$dataIssues/DATA_ISSUES"/> |
---|
775 | </xsl:if> |
---|
776 | </xsl:with-param> |
---|
777 | <xsl:with-param name="description" select="'Current data issues that should be noted and considered'"/> |
---|
778 | </xsl:call-template> |
---|
779 | </xsl:if> |
---|
780 | </xsl:template> |
---|
781 | |
---|
782 | |
---|
783 | <xsl:template name="Indicator.dataNotes" |
---|
784 | ibis:doc="Creates a titled content block that concatenates the |
---|
785 | indicator's DATA_NOTE (placed first) with the indicator's MEASURE |
---|
786 | DATA_NOTE. This template handles blank text as well as putting a |
---|
787 | '.' in between the text if both are non blank and the indicator data |
---|
788 | note does not contain '.'." |
---|
789 | > |
---|
790 | <xsl:param name="measure"/> |
---|
791 | <xsl:param name="indicatorView" select="$indicatorView"/> |
---|
792 | <xsl:param name="title" select="'Data Notes'"/> |
---|
793 | |
---|
794 | <xsl:variable name="dataNotes"> |
---|
795 | <xsl:copy-of select="$measure/DATA_NOTE"/> |
---|
796 | <xsl:copy-of select="$indicatorView/DATA_NOTE"/> |
---|
797 | </xsl:variable> |
---|
798 | |
---|
799 | <xsl:call-template name="Indicator.contentBlock"> |
---|
800 | <xsl:with-param name="title" select="$title"/> |
---|
801 | <xsl:with-param name="content"> |
---|
802 | <xsl:for-each select="$dataNotes"> |
---|
803 | <xsl:if test="1 != position()"><br/><br/></xsl:if> |
---|
804 | <xsl:value-of select="DATA_NOTE"/> |
---|
805 | </xsl:for-each> |
---|
806 | </xsl:with-param> |
---|
807 | <xsl:with-param name="description" select="'Data notes about the indicator data'"/> |
---|
808 | <!-- needed to be true - default |
---|
809 | had this turned off for some conflict but then natual breaks were being ignored |
---|
810 | so turned it back on. |
---|
811 | <xsl:with-param name="addWikiAttribute" select="true()"/> |
---|
812 | --> |
---|
813 | </xsl:call-template> |
---|
814 | </xsl:template> |
---|
815 | |
---|
816 | |
---|
817 | |
---|
818 | |
---|
819 | <xsl:template name="Indicator.dataSources" |
---|
820 | ibis:doc="Creates a titled content block that builds a ';' |
---|
821 | separated text block based on all the applicable indicator's |
---|
822 | DATASET/DATA_SOURCES/DATA_SOURCE elements text. This template handles |
---|
823 | removing/not including any indicator DATASET DATA_SORUCE element that |
---|
824 | already exist in the indicator's DATA_SOURCE elements." |
---|
825 | > |
---|
826 | <xsl:param name="indicator" select="$indicator" ibis:doc="indicator that contains the datasets which contain the data sources."/> |
---|
827 | <xsl:param name="indicatorView" select="$indicatorView" ibis:doc="indicator view element."/> |
---|
828 | |
---|
829 | <xsl:param name="indicatorDatasets" select="$indicator/DATASETS/DATASET[NAME = $indicatorView/DATASET_NAMES/DATASET_NAME]"/> |
---|
830 | <xsl:param name="indicatorDatasetDataSourceNames" select="$indicatorDatasets/DATA_SOURCE_USAGES/DATA_SOURCE_USAGE/NAME"/> |
---|
831 | <xsl:param name="dataSources" select="$Indicator.dataSources/DATA_SOURCE[NAME = $indicatorDatasetDataSourceNames]"/> |
---|
832 | <xsl:param name="title" select="if(count($dataSources) = 1)then 'Data Source' else 'Data Sources'"/> |
---|
833 | |
---|
834 | <!-- Tried bunch of things to remove dup data sources. keys are only good within given node set. |
---|
835 | even though ind and ind view ds structs are the same and had exactly the same values the |
---|
836 | key wouldn't match!!! Finally went to doing a simple boolean exists test and it works. |
---|
837 | Tried unioning node sets (which was supposed to remove dups) - same result as keys. |
---|
838 | Tried unioning and then doing a [not(.=preceding-sibling:: ==> same result. |
---|
839 | --> |
---|
840 | |
---|
841 | <xsl:call-template name="Indicator.contentBlock"> |
---|
842 | <xsl:with-param name="title" select="$title"/> |
---|
843 | <xsl:with-param name="content"> |
---|
844 | <xsl:if test="count($dataSources) = 1"> |
---|
845 | <xsl:value-of select="$dataSources[1]/TEXT"/><br/> |
---|
846 | </xsl:if> |
---|
847 | <xsl:if test="count($dataSources) > 1"> |
---|
848 | <ul> |
---|
849 | <xsl:for-each-group select="$dataSources" group-by="NAME"> |
---|
850 | <xsl:sort select="SORT_ORDER" order="ascending" data-type="number"/> |
---|
851 | <li> |
---|
852 | <xsl:value-of select="TEXT"/> |
---|
853 | <xsl:if test="string-length(DATA_ISSUES) != 0"> |
---|
854 | <div class="Note"> |
---|
855 | <xsl:value-of select="DATA_ISSUES"/> |
---|
856 | </div> |
---|
857 | </xsl:if> |
---|
858 | <xsl:if test="string-length(URL) != 0"> |
---|
859 | <br/> |
---|
860 | (<a href="{URL}"><xsl:value-of select="URL"/></a>) |
---|
861 | </xsl:if> |
---|
862 | </li> |
---|
863 | </xsl:for-each-group> |
---|
864 | </ul> |
---|
865 | </xsl:if> |
---|
866 | </xsl:with-param> |
---|
867 | <xsl:with-param name="description" select="'Metadata about this indicator profiles data source(s)'"/> |
---|
868 | </xsl:call-template> |
---|
869 | </xsl:template> |
---|
870 | |
---|
871 | |
---|
872 | |
---|
873 | |
---|
874 | <xsl:template name="Indicator.views" ibis:doc="Creates a list of other indicator profile view links."> |
---|
875 | <xsl:param name="indicator" select="$indicator"/> |
---|
876 | <xsl:param name="currentIndicatorViewName"/> |
---|
877 | <xsl:param name="title" select="concat($indicator/TITLE, ' Views')"/> |
---|
878 | <xsl:param name="description" select="concat('Chart views for ', $indicator/TITLE)"/> |
---|
879 | |
---|
880 | <xsl:variable name="indicatorViews" select="if(string-length($currentIndicatorViewName) != 0) then $indicator/INDICATOR_VIEWS/INDICATOR_VIEW[NAME != $currentIndicatorViewName] else $indicator/INDICATOR_VIEWS/INDICATOR_VIEW"/> |
---|
881 | <xsl:if test="exists($indicatorViews[1]/NAME)"> |
---|
882 | <xsl:call-template name="ContentContainer.contentBlock"> |
---|
883 | <xsl:with-param name="title" select="$title"/> |
---|
884 | <xsl:with-param name="description" select="$description"/> |
---|
885 | <xsl:with-param name="content"> |
---|
886 | <ul> |
---|
887 | <xsl:for-each select="$indicatorViews"> |
---|
888 | <xsl:variable name="indicatorViewTitle" select="TITLE"/> |
---|
889 | <li><a href="{concat($Indicator.viewURLPrefix, NAME, '.html')}" |
---|
890 | title="Another view for {$indicatorViewTitle}" |
---|
891 | ><xsl:value-of select="$indicatorViewTitle"/> |
---|
892 | </a></li> |
---|
893 | </xsl:for-each> |
---|
894 | </ul> |
---|
895 | </xsl:with-param> |
---|
896 | </xsl:call-template> |
---|
897 | </xsl:if> |
---|
898 | </xsl:template> |
---|
899 | |
---|
900 | |
---|
901 | <xsl:template name="Indicator.relatedIndicators" |
---|
902 | ibis:doc="Localizes handling/display control of the 'INDICATOR/RELATIONS/ |
---|
903 | RELATION' elements. This displays the relation text and title (if |
---|
904 | the text exists), followed by a list of related indicator profile |
---|
905 | links. If preview (e.g. existance of the xmlURL parameter then the |
---|
906 | list is all the RELATED_INDIACTOR elements. Else - live then display |
---|
907 | realted links only for those indicator's that are published." |
---|
908 | > |
---|
909 | <xsl:param name="indicator" select="$indicator"/> |
---|
910 | <xsl:param name="relations" select="$indicator/RELATIONS/RELATION"/> |
---|
911 | <xsl:param name="previewFlag" select="string-length($xmlURL) != 0"/> |
---|
912 | <xsl:param name="viewURLPrefix" select="$Indicator.viewURLPrefix"/> |
---|
913 | |
---|
914 | <xsl:for-each select="$relations/RELATION"> |
---|
915 | <xsl:variable name="relatedIndicators" select="RELATED_INDICATORS/RELATED_INDICATOR"/> |
---|
916 | <xsl:call-template name="Indicator.contentBlock"> |
---|
917 | <xsl:with-param name="title" select="TITLE"/> |
---|
918 | <xsl:with-param name="content" select="TEXT"/> |
---|
919 | </xsl:call-template> |
---|
920 | |
---|
921 | <xsl:call-template name="Indicator.contentBlock"> |
---|
922 | <xsl:with-param name="title" select="concat('Related ', TITLE, ' Indicators: ')"/> |
---|
923 | <xsl:with-param name="content"> |
---|
924 | <xsl:if test="count($relatedIndicators) != 0"> |
---|
925 | <ul> |
---|
926 | <xsl:for-each select="$relatedIndicators"> |
---|
927 | <xsl:sort select="SORT_ORDER" order="ascending" data-type="number"/> |
---|
928 | <li> |
---|
929 | <a href="{if($previewFlag) then '#' else concat($viewURLPrefix, NAME, '.html')}"> |
---|
930 | <xsl:value-of select="TITLE"/> |
---|
931 | </a> |
---|
932 | </li> |
---|
933 | </xsl:for-each> |
---|
934 | </ul> |
---|
935 | </xsl:if> |
---|
936 | </xsl:with-param> |
---|
937 | </xsl:call-template> |
---|
938 | |
---|
939 | </xsl:for-each> |
---|
940 | </xsl:template> |
---|
941 | |
---|
942 | |
---|
943 | <xsl:template name="Indicator.relatedTopics" ibis:doc="Creates a list of topic links."> |
---|
944 | <xsl:param name="indicator" select="$indicator"/> |
---|
945 | <xsl:param name="title" select="concat('Health Topic Pages Related to: ', $indicator/TITLE)"/> |
---|
946 | <xsl:param name="description" select="concat('Associated topics for ', $indicator/TITLE)"/> |
---|
947 | |
---|
948 | <xsl:if test="exists($indicator/TOPICS/TOPIC)"> |
---|
949 | <xsl:call-template name="ContentContainer.contentBlock"> |
---|
950 | <xsl:with-param name="title" select="$title"/> |
---|
951 | <xsl:with-param name="titleLevel" select="2"/> |
---|
952 | <xsl:with-param name="description" select="$description"/> |
---|
953 | <xsl:with-param name="content"> |
---|
954 | <ul> |
---|
955 | <xsl:for-each select="$indicator/TOPICS/TOPIC"> |
---|
956 | <xsl:sort select="SORT_ORDER" order="ascending" data-type="number"/> |
---|
957 | <li><a href="{ibis:getCompleteURL(URL)}" title="Topic {TITLE}" |
---|
958 | ><xsl:value-of select="TITLE"/> |
---|
959 | </a></li> |
---|
960 | </xsl:for-each> |
---|
961 | </ul> |
---|
962 | </xsl:with-param> |
---|
963 | </xsl:call-template> |
---|
964 | </xsl:if> |
---|
965 | </xsl:template> |
---|
966 | |
---|
967 | |
---|
968 | <xsl:template name="Indicator.relatedQueries" ibis:doc="Creates a list of ds query links."> |
---|
969 | <xsl:param name="indicator" select="$indicator"/> |
---|
970 | <xsl:param name="title" select="concat('Dataset Queries Related to: ', $indicator/TITLE)"/> |
---|
971 | <xsl:param name="description" select="concat('Associated queryable datasets for ', $indicator/TITLE)"/> |
---|
972 | |
---|
973 | <xsl:variable name="countOfQueries" select="count($indicator//DATASET/QUERY)"/> |
---|
974 | <xsl:if test="0 != $countOfQueries"> |
---|
975 | <xsl:call-template name="ContentContainer.contentBlock"> |
---|
976 | <xsl:with-param name="title" select="$title"/> |
---|
977 | <xsl:with-param name="description" select="$description"/> |
---|
978 | <xsl:with-param name="content"> |
---|
979 | <ul> |
---|
980 | <xsl:for-each select="$indicator//DATASET/QUERY"> |
---|
981 | <xsl:sort select="SORT_ORDER" order="ascending" data-type="number"/> |
---|
982 | <li><a href="{ibis:getCompleteURL(URL)}" title="Dataset Query {TITLE}" |
---|
983 | ><xsl:value-of select="TITLE"/> |
---|
984 | </a></li> |
---|
985 | </xsl:for-each> |
---|
986 | </ul> |
---|
987 | </xsl:with-param> |
---|
988 | </xsl:call-template> |
---|
989 | </xsl:if> |
---|
990 | </xsl:template> |
---|
991 | |
---|
992 | |
---|
993 | <xsl:template name="Indicator.moreResourcesAndLinks" |
---|
994 | ibis:doc="Localizes handling/display control of the More Resources And |
---|
995 | Links section. |
---|
996 | " |
---|
997 | > |
---|
998 | <xsl:param name="indicator" select="$indicator"/> |
---|
999 | |
---|
1000 | <!-- IMPORTANT NOTE: This is the same information displayed when the |
---|
1001 | Indicator.moreInformation template is called. |
---|
1002 | --> |
---|
1003 | <xsl:if test="string-length($indicator/RESOURCES_REFERENCES_LINKS) != 0"> |
---|
1004 | <xsl:call-template name="ContentContainer.contentBlock"> |
---|
1005 | <xsl:with-param name="title" select="'References and Community Resources'"/> |
---|
1006 | <xsl:with-param name="titleLevel" select="2"/> |
---|
1007 | <xsl:with-param name="content" select="$indicator/RESOURCES_REFERENCES_LINKS"/> |
---|
1008 | <xsl:with-param name="addWikiAttribute" select="true()"/> |
---|
1009 | </xsl:call-template> |
---|
1010 | <br/> |
---|
1011 | </xsl:if> |
---|
1012 | |
---|
1013 | <!-- More Resources Text --> |
---|
1014 | <h2>GARTH: Look at: Indicator .moreResourcesAndLinks - More Resources and Links</h2> |
---|
1015 | |
---|
1016 | Evidence-based community health improvement ideas and interventions may be found at the following sites:<br/> |
---|
1017 | <ul> |
---|
1018 | <li><a href="http://www.thecommunityguide.org/index.html">The Guide to Community Preventive Services </a></li> |
---|
1019 | <li><a href="http://www.countyhealthrankings.org">County Health Rankings</a></li> |
---|
1020 | <li><a href="http://www.healthypeople.gov">Healthy People 2020 Website</a></li> |
---|
1021 | </ul><br/> |
---|
1022 | |
---|
1023 | Additional indicator data by state and county may be found on these Websites:<br/> |
---|
1024 | <ul> |
---|
1025 | <li><a href="http://www.countyhealthrankings.org">County Health Rankings</a></li> |
---|
1026 | <li>Kaiser Family Foundation's <a href="http://www.statehealthfacts.org/">StateHealthFacts.org</a></li> |
---|
1027 | <li>CDC WONDER's <a href="http://wonder.cdc.gov/data2010/">DATA2010</a>, the Healthy People 2010 Database.</li> |
---|
1028 | </ul><br/> |
---|
1029 | |
---|
1030 | Medical literature can be queried at the <a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?">PubMed</a> website. |
---|
1031 | <br/><br/> |
---|
1032 | For an on-line medical dictionary, click on this <a href="http://www.nlm.nih.gov/medlineplus/mplusdictionary.html">Dictionary</a> link. |
---|
1033 | </xsl:template> |
---|
1034 | |
---|
1035 | |
---|
1036 | <xsl:template name="Indicator.externalDataViz"> |
---|
1037 | <xsl:param name="indicatorView"/> |
---|
1038 | |
---|
1039 | <xsl:if test="string-length($indicatorView/EXTERNAL_DATAVIZ_VALUE) != 0"> |
---|
1040 | <div class="Graphic ExternalDataViz"> |
---|
1041 | <xsl:if test="string-length($indicatorView/EXTERNAL_DATAVIZ_TITLE) != 0"> |
---|
1042 | <h2><xsl:value-of select="$indicatorView/EXTERNAL_DATAVIZ_TITLE"/></h2> |
---|
1043 | </xsl:if> |
---|
1044 | <xsl:choose> |
---|
1045 | <xsl:when test="'IMG_SRC' = $indicatorView/EXTERNAL_DATAVIZ_TYPE"> |
---|
1046 | <img src="{$indicatorView/EXTERNAL_DATAVIZ_VALUE}" alt="supplemental image"/> |
---|
1047 | </xsl:when> |
---|
1048 | <xsl:when test="'EMBED_SRC' = $indicatorView/EXTERNAL_DATAVIZ_TYPE"> |
---|
1049 | <embed src="{$indicatorView/EXTERNAL_DATAVIZ_VALUE}" alt="supplemental image"/> |
---|
1050 | </xsl:when> |
---|
1051 | <xsl:when test="'IFRAME_SRC' = $indicatorView/EXTERNAL_DATAVIZ_TYPE"> |
---|
1052 | <iframe src="{$indicatorView/EXTERNAL_DATAVIZ_VALUE}" alt="supplemental image"/> |
---|
1053 | </xsl:when> |
---|
1054 | <xsl:otherwise> |
---|
1055 | <div class="Error">Invalid External DataViz Type</div> |
---|
1056 | </xsl:otherwise> |
---|
1057 | </xsl:choose> |
---|
1058 | <br/> |
---|
1059 | |
---|
1060 | <xsl:if test="string-length($indicatorView/EXTERNAL_DATAVIZ_NARRATIVE) != 0"> |
---|
1061 | <xsl:call-template name="ContentContainer.contentBlock"> |
---|
1062 | <xsl:with-param name="content" select="$indicatorView/EXTERNAL_DATAVIZ_NARRATIVE"/> |
---|
1063 | <xsl:with-param name="addWikiAttribute" select="true()"/> |
---|
1064 | </xsl:call-template> |
---|
1065 | <br/> |
---|
1066 | </xsl:if> |
---|
1067 | </div><br/> |
---|
1068 | </xsl:if> |
---|
1069 | </xsl:template> |
---|
1070 | |
---|
1071 | </xsl:stylesheet> |
---|
1072 | <!-- ============================= End of File ============================= --> |
---|
1073 | |
---|