टेम्पलेट:Medical cases chart

विकिपीडिया से

Description[संपादन करीं]

This template should be used for all outbreak, epidemic and pandemic medical cases charts based on {{Bar box}} to maintain consistency. It displays horizontal bars for up to 5 different classifications of cases for each valid date. It also offers two columns to make numbers explicit and to show relative or absolute changes. It is designed to be flexible, but still standardizes some parts of the chart. This template should be transcluded in other templates, NOT in article pages. Please do not use templates other than {{Medical cases chart}} and, maybe, {{Medical cases chart/Row}} to get away with a custom formatting. Suggest features in the talk page or code it yourself if it's not controversial.

Usage[संपादन करीं]

{{Medical cases chart
|barwidth   = width of the stacked bars area (thin|medium|wide)                        [optional, defaults to: medium]
|numwidth   = max width of the numbers in the right columns (xx or xxxx)<-(n|t|m|w|d)  [optional, defaults to: mm,
                                                                                        see Rows' explanation and examples]
|float      = on what side of the page should the chart be located (left|right|none)   [optional, defaults to: right] 

|pretitle   = text at the beginning of the title                                       [optional]
|disease    = name of the disease
|location   = location of the outbreak the chart is showing
|location2  = broader location such as state/province or country                       [optional]
|location3  = broadest location such as country                                        [optional]
|posttitle  = text at the end of the title                                             [optional]
|outbreak   = name of the main outbreak (for link of the {{navbar}})

|recoveries = display recoveries in the legend (no|n|0)                                [optional]
|altlbl1    = alternate label for the 3rd case classification                          [optional, defaults to: Cases]
|altlbl2    = alternate label for the 4th case classification                          [optional]
|altlbl3    = alternate label for the 5th case classification                          [optional]

|togglesbar = HTML of the toggles bar to show/hide rows                                [optional]  {WIP}

|right1     = heading of the first data column                                         [optional, defaults to: # of cases]
|right2     = heading of the second data column                                        [optional]

|divisor    = manual override of the scaling divisor of the bars                       [optional, defaults to: auto]
|collapsible= whether the rows are collapsible (yes|y|1)                               [optional]  {WIP}
|data       = data lines for each valid date (see Data's and Rows' syntax)

|caption    = caption under the chart                                                  [optional]
}}

Data[संपादन करीं]

The |data= parameter should be populated by a sequence of lines with a format similar to the rows'. The difference is that the parameter separator is the semicolon, ;, and that repetitive parameters, like |divisor=, |numwidth=, and |collapsible=, may be written only once in the body of {{Medical cases chart}}. Using |data= also allows the divisor to be calculated automatically if the parameter is omitted.

|data=date;deaths;recoveries;total cases (3rd classification);4th classification #;5th classification #;1st column #;1st column change;2nd column #;2nd column change;other parameters=values
date;deaths;recoveries;total cases (3rd classification);4th classification #;5th classification #;1st column #;1st column change;2nd column #;2nd column change;other parameters=values
...

Empty values can be represented by sequential semicolons (e.g. ;;). The other parameters=values can be any number of the parameters below and their values, separated by semicolons. See examples.

;alttot1    = ''alternate expression for active cases (3rd classification)''
;alttot2    = ''alternate expression for number in 5th classification''
;firstright1= ''whether a change in the first column is not applicable (n.a.)'' (yes|y|1)
;firstright2= ''whether a change in the second column is not applicable (n.a.)'' (yes|y|1)
;collapsed  = ''manual override of the initial row state'' (yes|y|1)                       {WIP}
;id         = ''manual override of the row id''                                            {WIP}

To convert from the old format, remove {{Medical cases chart/Row| from the beginning and }} from the end of the line, replace all pipes (|) with semicolons (;), and remove any |divisor=, |numwidth=, and |collapsible= parameters from the end (and make sure they are listed in the main template at least once). For example:

{{Medical cases chart/Row|2020-04-15|1921||28059|||28,059|+1058||+4%|divisor=100|numwidth-mmnm}}

becomes

2020-04-15;1921;;28059;;;28,059;+1058;;+4%

Rows[संपादन करीं]

Examples[संपादन करीं]

{{Medical cases chart
|numwidth=mw

|disease=Green Flu
|location=Savannah|location2=Georgia|location3=United States
|outbreak=2009 Green Flu outbreak

|recoveries=n

|data=
2009-04-13;;;42;;;42;firstright1=y
2009-04-14;;;356;;;356;+748%
2009-04-15;;;1503;;;1,503;+322%
2009-04-16;57;;5915;;;5,915;+294%
2009-04-17;2000;;9500;;;~9,500;+60.6%
}}
Savannah में Green Flu के केस , Georgia, United States  ()
     मौत        सक्रिय केस
तारीख
# केस
2009-04-13
42(n.a.)
2009-04-14
356(+748%)
2009-04-15
1,503(+322%)
2009-04-16
5,915(+294%)
2009-04-17
~9,500(+60.6%)
{{Medical cases chart
|barwidth=wide
|numwidth=mwwd

|pretitle=Approximate
|disease=Spanish Flu
|location=the World
|posttitle=(excluding Oceania)
|outbreak=1918-20 Spanish Flu pandemic

|altlbl1=Active confirmed
|altlbl2=Suspected
|altlbl3=Estimated

|right1=Confirmed cases
|right2=Including suspected and estimated cases

|divisor=2550
|data=
1918-03-10;(2060-300);(3000-800);6000;;;6000;firstright1=y
1918-07;12600;20000;40000;12000;;alttot2=(34000-15000-8700+40);40000;+500%;10500;firstright2=y
;12600;20000;40000;12000;;alttot2=(34000-15000-8700+40);40000;;10500
1919;100000;250000;;;1000000;;;1mi;+500k

|caption=Foo Bar
}}
Approximate the World में Spanish Flu के केस (excluding Oceania)  ()
     मौत        ठीक भइल        Active confirmed        Suspected        Estimated
तारीख
Confirmed cases
Including suspected and estimated cases
1918-03-10
6000(n.a.)
1918-07
40000(+500%) 10500(n.a.)
40000(=) 10500(=)
1919
1mi(+500k)
Foo Bar

Applied example[संपादन करीं]

{{2019–20 coronavirus pandemic data/India medical cases chart}}
भारत में कोविड-19 के केस   ()
     मौत        ठीक भइल        सक्रिय केस
तारीख
# केस
2020-01-30
1 NA
1(=)
2020-02-02
2(+1) (+100%)
2020-02-03
3(+1) (+50%)
3(=)
2020-03-02
6(+3) (+100%)
2020-03-03
9(+3) (+50%)
2020-03-04
32‬(+23) (+256%)
2020-03-05
33(+1) (+3.1%)
2020-03-06
34(+1) (+3.0%)
2020-03-07
37(+3) (+8.8%)
2020-03-08
43(+6) (+16%)
2020-03-09
50(+7) (+16%)
2020-03-10
65(+15) (+30%)
65(=)
2020-03-12
77(+12) (+18%)
2020-03-13
85(+8) (+10%)
2020-03-14
100(+15) (+17%)
2020-03-15
110(+10) (+10%)
2020-03-16
114(+4) (+4%)
2020-03-17
140(+26) (+23%)
2020-03-18
170(+30) (+21%)
2020-03-19
198(+28) (+16%)
2020-03-20
249(+51) (+26%)
2020-03-21
329(+80) (+32%)
2020-03-22
391(+62) (+19%)
2020-03-23
468(+77) (+20%)
2020-03-24
519(+51) (+11%)
2020-03-25
606(+87) (+17%)
2020-03-26
649(+43) (+7%)
स्रोत: MoHFW अउरी Worldometers.