Jump to content

Template:MedTemplate: Difference between revisions

From Pharmacopedia
Flip '+ Add a problem' link target from SuggestIndication to SuggestProblem (Phase 3 of indications-to-problems rebuild)
Palette sweep: MedTemplate summary-table section headers all to #7c3aed purple (was blue + green, off-palette per the strict 4-color rule)
Tag: Reverted
Line 2: Line 2:
<caption style="font-size:120%; padding:0.4em; font-weight:bold;">{{{generic|{{PAGENAME}}}}}</caption>
<caption style="font-size:120%; padding:0.4em; font-weight:bold;">{{{generic|{{PAGENAME}}}}}</caption>
{{#if:{{{structure|}}}|<tr><td colspan="2" style="padding:0.8em; text-align:center;">[[File:{{{structure}}}|frameless|{{{structuresize|240px}}}|alt=Structure of {{{generic|{{PAGENAME}}}}}]]<br><small>'''Structure'''</small></td></tr>}}
{{#if:{{{structure|}}}|<tr><td colspan="2" style="padding:0.8em; text-align:center;">[[File:{{{structure}}}|frameless|{{{structuresize|240px}}}|alt=Structure of {{{generic|{{PAGENAME}}}}}]]<br><small>'''Structure'''</small></td></tr>}}
<tr><th colspan="2" style="background:#2563eb; color:#fff; padding:0.4em; text-align:left;">Summary</th></tr>
<tr><th colspan="2" style="background:#7c3aed; color:#fff; padding:0.4em; text-align:left;">Summary</th></tr>
{{#if:{{{brand|}}}|<tr><th style="text-align:left; width:9em;">Brand name(s)</th><td>{{{brand}}}</td></tr>}}
{{#if:{{{brand|}}}|<tr><th style="text-align:left; width:9em;">Brand name(s)</th><td>{{{brand}}}</td></tr>}}
{{#if:{{{classes|}}}|<tr><th style="text-align:left;">Classes</th><td>{{{classes}}}</td></tr>}}
{{#if:{{{classes|}}}|<tr><th style="text-align:left;">Classes</th><td>{{{classes}}}</td></tr>}}
{{#if:{{{uses|}}}|<tr><th style="text-align:left;">Common uses</th><td>{{{uses}}}</td></tr>}}
{{#if:{{{uses|}}}|<tr><th style="text-align:left;">Common uses</th><td>{{{uses}}}</td></tr>}}
<tr><th colspan="2" style="background:#16a34a; color:#fff; padding:0.4em; text-align:left;">Pharmacy</th></tr>
<tr><th colspan="2" style="background:#7c3aed; color:#fff; padding:0.4em; text-align:left;">Pharmacy</th></tr>
{{#if:{{{starting_dose|}}}|<tr><th style="text-align:left;">Starting dose</th><td>{{{starting_dose}}}</td></tr>}}
{{#if:{{{starting_dose|}}}|<tr><th style="text-align:left;">Starting dose</th><td>{{{starting_dose}}}</td></tr>}}
{{#if:{{{preparations|}}}|<tr><th style="text-align:left;">Preparations</th><td>{{{preparations}}}</td></tr>}}
{{#if:{{{preparations|}}}|<tr><th style="text-align:left;">Preparations</th><td>{{{preparations}}}</td></tr>}}

Revision as of 01:12, 17 May 2026

This template defines the table "Medicines". View table.

Usage

Medicine entry template. Fill in fields below; empty fields are auto-omitted.

The indications parameter still uses the historical name in template wikitext to preserve compatibility with every existing medicine page; the rendered H2 heading on the page now reads "Problems" (see Special:Problems for the repository and Pharmacopedia:Citation needed adjacent context).

{{MedTemplate
| generic           =
| brand             =
| structure         =
| classes           =
| uses              =
| starting_dose     =
| preparations      =
| fda_max           =
| pill_id           =
| routes            =
| onset             =
| duration          =
| halflife          =
| bioavailability   =
| pregnancy         =
| legal             =
| mechanism         =
| intro             =
| indications       =
| dosing            =
| effects           =
| pk_absorption     =
| pk_distribution   =
| pk_metabolism     =
| pk_elimination    =
| pharmacodynamics  =
| interactions      =
| pregnancy_details =
| monitoring        =
| counseling        =
| anecdotes         =
| seealso           =
| references        =
}}

Notes:

  • The indications parameter feeds the "Problems" H2 section on the rendered page. Content typically consists of <problem ref="..."/> tags (formerly <indication ref="..."/>). Use SuggestProblem or the per-page + Add a problem link to propose new entries.
  • The adverse parameter is deprecated — its content is still rendered, but new pages should combine therapeutic and adverse effects into the single effects parameter.
  • The formula parameter is deprecated and no longer rendered. It can be removed from existing pages.
  • The single pharmacokinetics parameter is deprecated; new pages should use pk_absorption, pk_distribution, pk_metabolism, and pk_elimination.

This template also populates the Medicines Cargo table — see Special:CargoTables/Medicines.