Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:MedTemplate: Difference between revisions

Template page
Palette sweep: MedTemplate summary-table section headers all to #7c3aed purple (was blue + green, off-palette per the strict 4-color rule)
Tag: Reverted
Common uses datasheet field: draw from the problems database (top 5 linked problems by rater count) via <pharmaCommonUses>, hand-entered uses kept as the empty-case fallback (designer-claude + parser-claude 2026-05-22)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><table class="wikitable" style="float:right; clear:right; max-width:28em; margin:0 0 1em 1em; font-size:92%;">
<includeonly><div class="medpage"><div class="titleblock"><div class="tb-eyebrow">{{{classes|}}}</div><div class="tb-row"><div class="tb-name">{{{generic|{{PAGENAME}}}}}</div>{{#if:{{{brand|}}}|<div class="tb-brand">{{{brand}}}</div>}}</div></div>{{#cargo_store:_table=Medicines
<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>}}
<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:{{{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>}}
<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:{{{preparations|}}}|<tr><th style="text-align:left;">Preparations</th><td>{{{preparations}}}</td></tr>}}
{{#if:{{{fda_max|}}}|<tr><th style="text-align:left;">US FDA Max</th><td>{{{fda_max}}}</td></tr>}}
{{#if:{{{pill_id|}}}|<tr><th style="text-align:left; vertical-align:top;">Pill ID</th><td><div class="pcp-pill-id"><div class="mw-collapsible mw-collapsed" data-expandtext="Show pill identifiers" data-collapsetext="Hide pill identifiers">
{{{pill_id}}}
</div></div></td></tr>}}
<tr><th colspan="2" style="background:#7c3aed; color:#fff; padding:0.4em; text-align:left;">Pharmacology</th></tr>
{{#if:{{{routes|}}}|<tr><th style="text-align:left;">Routes</th><td>{{{routes}}}</td></tr>}}
{{#if:{{{onset|}}}|<tr><th style="text-align:left;">Onset</th><td>{{{onset}}}</td></tr>}}
{{#if:{{{duration|}}}|<tr><th style="text-align:left;">Duration</th><td>{{{duration}}}</td></tr>}}
{{#if:{{{halflife|}}}|<tr><th style="text-align:left;">Half-life</th><td>{{{halflife}}}</td></tr>}}
{{#if:{{{bioavailability|}}}|<tr><th style="text-align:left;">Bioavailability</th><td>{{{bioavailability}}}</td></tr>}}
{{#if:{{{pregnancy|}}}|<tr><th style="text-align:left;">Pregnancy</th><td>{{{pregnancy}}}</td></tr>}}
{{#if:{{{legal|}}}|<tr><th style="text-align:left;">Legal status</th><td>{{{legal}}}</td></tr>}}
{{#if:{{{mechanism|}}}|<tr><th style="text-align:left;">Purported mechanism</th><td>{{{mechanism}}}</td></tr>}}
</table>{{#cargo_store:_table=Medicines
| generic={{{generic|}}}
| generic={{{generic|}}}
| brand={{{brand|}}}
| brand={{{brand|}}}
Line 40: Line 17:
| pregnancy={{{pregnancy|}}}
| pregnancy={{{pregnancy|}}}
| legal={{{legal|}}}
| legal={{{legal|}}}
}}{{#if:{{{intro|}}}|
}}<div class="med-grid"><div class="med-main">{{#if:{{{intro|}}}|
{{{intro}}}
{{{intro}}}
}}<h2 id="Experience">Experience</h2>
}}{{#if:{{{history|}}}|<div class="med-sec-head"><h2 class="sec-title" id="History">History</h2></div>
{{{history}}}}}<div class="med-sec-head"><h2 class="sec-title" id="Experience">Experience</h2></div>
<pharmaExperience/>
<pharmaExperience/>
<h2 id="Problems">Problems</h2>
<div class="med-sec-head"><h2 class="sec-title" id="Problems">Problems</h2></div>
{{#if:{{{indications|}}}|{{{indications}}}|<p style="opacity:0.7; font-style:italic;">No problems yet — be the first to suggest one.</p>}}
{{#if:{{{indications|}}}|{{{indications}}}|<p style="opacity:0.7; font-style:italic;">No problems yet. Be the first to suggest one.</p>}}


<span class="pcp-problem-suggest-wrap">[[Special:SuggestProblem/{{FULLPAGENAME}}|+ Add a problem]]</span><h2 id="Titration">Titration strategies</h2>
<span class="pcp-problem-suggest-wrap">[[Special:SuggestProblem/{{FULLPAGENAME}}|+ Add a problem]]</span><div class="med-sec-head"><h2 class="sec-title" id="Titration">Titration strategies</h2></div>
{{#if:{{{dosing|}}}|{{{dosing}}}|<p style="opacity:0.7; font-style:italic;">No titration strategies yet — be the first to suggest one.</p>}}
{{#if:{{{dosing|}}}|{{{dosing}}}|<p style="opacity:0.7; font-style:italic;">No titration strategies yet. Be the first to suggest one.</p>}}


<span class="pcp-titration-suggest-wrap">[[Special:SuggestTitration/{{FULLPAGENAME}}|+ Add a titration strategy]]</span>
<span class="pcp-titration-suggest-wrap">[[Special:SuggestTitration/{{FULLPAGENAME}}|+ Add a titration strategy]]</span>


<h2 id="Effects">Effects</h2>
<div class="med-sec-head"><h2 class="sec-title" id="Effects">Effects</h2></div>
{{#if:{{{effects|}}}{{{adverse|}}}|{{{effects|}}}{{#if:{{{adverse|}}}|
{{#if:{{{effects|}}}{{{adverse|}}}|{{{effects|}}}{{#if:{{{adverse|}}}|


{{{adverse}}}}}|<p style="opacity:0.7; font-style:italic;">No effects listed yet — be the first to suggest one.</p>}}
{{{adverse}}}}}|<p style="opacity:0.7; font-style:italic;">No effects listed yet. Be the first to suggest one.</p>}}


<span class="pcp-effect-suggest-wrap">[[Special:SuggestEffect/{{FULLPAGENAME}}|+ Add an effect]]</span>
<span class="pcp-effect-suggest-wrap">[[Special:SuggestEffect/{{FULLPAGENAME}}|+ Add an effect]]</span>
{{#if:{{{pharmacokinetics|}}}{{{pk_absorption|}}}{{{pk_distribution|}}}{{{pk_metabolism|}}}{{{pk_elimination|}}}|<h2 id="Pharmacokinetics">Pharmacokinetics</h2>
{{#if:{{{pharmacokinetics|}}}{{{pk_absorption|}}}{{{pk_distribution|}}}{{{pk_metabolism|}}}{{{pk_elimination|}}}|<div class="med-sec-head"><h2 class="sec-title" id="Pharmacokinetics">Pharmacokinetics</h2></div>
{{#if:{{{pk_absorption|}}}|<h3 id="Absorption">Absorption</h3>
{{#if:{{{pk_absorption|}}}|<h3 class="med-subhead" id="Absorption">Absorption</h3>
{{{pk_absorption}}}
{{{pk_absorption}}}
}}{{#if:{{{pk_distribution|}}}|<h3 id="Distribution">Distribution</h3>
}}{{#if:{{{pk_distribution|}}}|<h3 class="med-subhead" id="Distribution">Distribution</h3>
{{{pk_distribution}}}
{{{pk_distribution}}}
}}{{#if:{{{pk_metabolism|}}}|<h3 id="Metabolism">Metabolism</h3>
}}{{#if:{{{pk_metabolism|}}}|<h3 class="med-subhead" id="Metabolism">Metabolism</h3>
{{{pk_metabolism}}}
{{{pk_metabolism}}}
}}{{#if:{{{pk_elimination|}}}|<h3 id="Elimination">Elimination</h3>
}}{{#if:{{{pk_elimination|}}}|<h3 class="med-subhead" id="Elimination">Elimination</h3>
{{{pk_elimination}}}
{{{pk_elimination}}}
}}{{#if:{{{pharmacokinetics|}}}|
}}{{#if:{{{pharmacokinetics|}}}|
{{{pharmacokinetics}}}}}
{{{pharmacokinetics}}}}}
}}{{#if:{{{pharmacodynamics|}}}|<h2 id="Pharmacodynamics">Pharmacodynamics</h2>
}}{{#if:{{{pharmacodynamics|}}}|<div class="med-sec-head"><h2 class="sec-title" id="Pharmacodynamics">Pharmacodynamics</h2></div>
{{{pharmacodynamics}}}}}{{#if:{{{interactions|}}}|<h2 id="Interactions">Interactions</h2>
{{{pharmacodynamics}}}}}{{#if:{{{interactions|}}}|<div class="med-sec-head"><h2 class="sec-title" id="Interactions">Interactions</h2></div>
{{{interactions}}}}}{{#if:{{{pregnancy_details|}}}|<h2 id="Pregnancy">Pregnancy and lactation</h2>
{{{interactions}}}}}{{#if:{{{pregnancy_details|}}}|<div class="med-sec-head"><h2 class="sec-title" id="Pregnancy">Pregnancy and lactation</h2></div>
{{{pregnancy_details}}}}}{{#if:{{{monitoring|}}}|<h2 id="Monitoring">Monitoring</h2>
{{{pregnancy_details}}}}}{{#if:{{{monitoring|}}}|<div class="med-sec-head"><h2 class="sec-title" id="Monitoring">Monitoring</h2></div>
{{{monitoring}}}}}{{#if:{{{counseling|}}}|<h2 id="Counseling">Patient counseling</h2>
{{{monitoring}}}}}{{#if:{{{counseling|}}}|<div class="med-sec-head"><h2 class="sec-title" id="Counseling">Patient counseling</h2></div>
{{{counseling}}}}}<h2 id="Anecdote">Relevant anecdote</h2>
{{{counseling}}}}}<div class="med-sec-head"><h2 class="sec-title" id="Anecdote">Relevant anecdote</h2></div>
{{#if:{{{anecdotes|}}}|{{{anecdotes}}}|<p style="opacity:0.7; font-style:italic;">No anecdotes yet — share a relevant one.</p>}}
{{#if:{{{anecdotes|}}}|{{{anecdotes}}}|<p style="opacity:0.7; font-style:italic;">No anecdotes yet. Share a relevant one.</p>}}


<span class="pcp-anecdote-suggest-wrap">[[Special:SuggestAnecdote/{{FULLPAGENAME}}|+ Add an anecdote]]</span>
<span class="pcp-anecdote-suggest-wrap">[[Special:SuggestAnecdote/{{FULLPAGENAME}}|+ Add an anecdote]]</span>
<h2 id="Literature">Relevant Literature</h2>
<div class="med-sec-head"><h2 class="sec-title" id="Literature">Relevant Literature</h2></div>
<pharmaLiterature/>
<pharmaLiterature/>
{{#if:{{{seealso|}}}|<h2 id="SeeAlso">See also</h2>
{{#if:{{{seealso|}}}|<div class="med-sec-head"><h2 class="sec-title" id="SeeAlso">See also</h2></div>
{{{seealso}}}}}{{#if:{{{references|}}}|<h2 id="References">References</h2>
{{{seealso}}}}}{{#if:{{{references|}}}|<div class="med-sec-head"><h2 class="sec-title" id="References">References</h2></div>
{{{references}}}}}[[Category:Medicines]]</includeonly><noinclude>
{{{references}}}}}</div><div class="med-rail"><div class="med-rail-inner">{{#if:{{{structure|}}}|<div class="med-structure">[[File:{{{structure}}}|frameless|{{{structuresize|240px}}}|alt=Structure of {{{generic|{{PAGENAME}}}}}]]</div>}}<div class="med-channel ch-summary"><div class="ch-head"><span class="ch-mark"></span><span class="ch-name">Summary</span></div>{{#if:{{{classes|}}}|<div class="med-field"><div class="fl">Classes</div><div class="fv">{{{classes}}}</div></div>}}<pharmaCommonUses>{{{uses|}}}</pharmaCommonUses></div><div class="med-channel ch-pharmacy"><div class="ch-head"><span class="ch-mark"></span><span class="ch-name">Pharmacy</span></div>{{#if:{{{starting_dose|}}}|<div class="med-field"><div class="fl">Starting dose</div><div class="fv">{{{starting_dose}}}</div></div>}}{{#if:{{{preparations|}}}|<div class="med-field"><div class="fl">Preparations</div><div class="fv">{{{preparations}}}</div></div>}}{{#if:{{{fda_max|}}}|<div class="med-field"><div class="fl">US FDA Max</div><div class="fv">{{{fda_max}}}</div></div>}}{{#if:{{{pill_id|}}}|<div class="med-field"><div class="fl">Pill ID</div><div class="fv"><div class="pcp-pill-id"><div class="mw-collapsible mw-collapsed" data-expandtext="Show pill identifiers" data-collapsetext="Hide pill identifiers">
{{{pill_id}}}
</div></div></div></div>}}</div><div class="med-channel ch-pharmacology"><div class="ch-head"><span class="ch-mark"></span><span class="ch-name">Pharmacology</span></div>{{#if:{{{routes|}}}|<div class="med-field"><div class="fl">Routes</div><div class="fv">{{{routes}}}</div></div>}}{{#if:{{{onset|}}}|<div class="med-field"><div class="fl">Onset</div><div class="fv">{{{onset}}}</div></div>}}{{#if:{{{duration|}}}|<div class="med-field"><div class="fl">Duration</div><div class="fv">{{{duration}}}</div></div>}}{{#if:{{{halflife|}}}|<div class="med-field"><div class="fl">Half-life</div><div class="fv">{{{halflife}}}</div></div>}}{{#if:{{{bioavailability|}}}|<div class="med-field"><div class="fl">Bioavailability</div><div class="fv">{{{bioavailability}}}</div></div>}}{{#if:{{{pregnancy|}}}|<div class="med-field"><div class="fl">Pregnancy</div><div class="fv">{{{pregnancy}}}</div></div>}}{{#if:{{{legal|}}}|<div class="med-field"><div class="fl">Legal status</div><div class="fv">{{{legal}}}</div></div>}}{{#if:{{{mechanism|}}}|<div class="med-field"><div class="fl">Purported mechanism</div><div class="fv">{{{mechanism}}}</div></div>}}</div></div></div></div>[[Category:Medicines]]</div></includeonly><noinclude>
{{#cargo_declare:_table=Medicines
{{#cargo_declare:_table=Medicines
| generic=String
| generic=String
Line 107: Line 87:
Medicine entry template. Fill in fields below; empty fields are auto-omitted.
Medicine entry template. Fill in fields below; empty fields are auto-omitted.


The <code>indications</code> 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).
The <code>problems</code> 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).


<pre>
<pre>
Line 129: Line 109:
| mechanism        =
| mechanism        =
| intro            =
| intro            =
| history          =
| indications      =
| indications      =
| dosing            =
| dosing            =
Line 148: Line 129:


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


This template also populates the '''Medicines''' Cargo table — see [[Special:CargoTables/Medicines]].
This template also populates the '''Medicines''' Cargo table. See [[Special:CargoTables/Medicines]].


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>