Template:MedTemplate: Difference between revisions
Template page
More actions
MDElliottMD (talk | contribs) No edit summary |
MDElliottMD (talk | contribs) 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) |
||
| (39 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>< | <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 | ||
< | | generic={{{generic|}}} | ||
| brand={{{brand|}}} | |||
| structure={{{structure|}}} | |||
{{#if:{{{brand|}}}|< | | classes={{{classes|}}} | ||
| mechanism={{{mechanism|}}} | |||
{{# | | uses={{{uses|}}} | ||
{{ | | starting_dose={{{starting_dose|}}} | ||
| preparations={{{preparations|}}} | |||
{{ | | fda_max={{{fda_max|}}} | ||
| pill_id={{{pill_id|}}} | |||
| routes={{{routes|}}} | |||
| onset={{{onset|}}} | |||
| duration={{{duration|}}} | |||
| halflife={{{halflife|}}} | |||
| bioavailability={{{bioavailability|}}} | |||
| pregnancy={{{pregnancy|}}} | |||
| legal={{{legal|}}} | |||
{{ | }}<div class="med-grid"><div class="med-main">{{#if:{{{intro|}}}| | ||
{{{intro}}} | {{{intro}}} | ||
}}{{#if:{{{ | }}{{#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/> | ||
<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>}} | |||
{{{ | |||
{{{anecdotes}}}}}{{#if:{{{seealso|}}}|<h2 id="SeeAlso">See also</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> | ||
{{{seealso}}}}}{{#if:{{{references|}}}|<h2 id="References">References</h2> | {{#if:{{{dosing|}}}|{{{dosing}}}|<p style="opacity:0.7; font-style:italic;">No titration strategies yet. Be the first to suggest one.</p>}} | ||
{{{references}}}}}[[Category: | |||
<span class="pcp-titration-suggest-wrap">[[Special:SuggestTitration/{{FULLPAGENAME}}|+ Add a titration strategy]]</span> | |||
<div class="med-sec-head"><h2 class="sec-title" id="Effects">Effects</h2></div> | |||
{{#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>}} | |||
<span class="pcp-effect-suggest-wrap">[[Special:SuggestEffect/{{FULLPAGENAME}}|+ Add an effect]]</span> | |||
{{#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 class="med-subhead" id="Absorption">Absorption</h3> | |||
{{{pk_absorption}}} | |||
}}{{#if:{{{pk_distribution|}}}|<h3 class="med-subhead" id="Distribution">Distribution</h3> | |||
{{{pk_distribution}}} | |||
}}{{#if:{{{pk_metabolism|}}}|<h3 class="med-subhead" id="Metabolism">Metabolism</h3> | |||
{{{pk_metabolism}}} | |||
}}{{#if:{{{pk_elimination|}}}|<h3 class="med-subhead" id="Elimination">Elimination</h3> | |||
{{{pk_elimination}}} | |||
}}{{#if:{{{pharmacokinetics|}}}| | |||
{{{pharmacokinetics}}}}} | |||
}}{{#if:{{{pharmacodynamics|}}}|<div class="med-sec-head"><h2 class="sec-title" id="Pharmacodynamics">Pharmacodynamics</h2></div> | |||
{{{pharmacodynamics}}}}}{{#if:{{{interactions|}}}|<div class="med-sec-head"><h2 class="sec-title" id="Interactions">Interactions</h2></div> | |||
{{{interactions}}}}}{{#if:{{{pregnancy_details|}}}|<div class="med-sec-head"><h2 class="sec-title" id="Pregnancy">Pregnancy and lactation</h2></div> | |||
{{{pregnancy_details}}}}}{{#if:{{{monitoring|}}}|<div class="med-sec-head"><h2 class="sec-title" id="Monitoring">Monitoring</h2></div> | |||
{{{monitoring}}}}}{{#if:{{{counseling|}}}|<div class="med-sec-head"><h2 class="sec-title" id="Counseling">Patient counseling</h2></div> | |||
{{{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>}} | |||
<span class="pcp-anecdote-suggest-wrap">[[Special:SuggestAnecdote/{{FULLPAGENAME}}|+ Add an anecdote]]</span> | |||
<div class="med-sec-head"><h2 class="sec-title" id="Literature">Relevant Literature</h2></div> | |||
<pharmaLiterature/> | |||
{{#if:{{{seealso|}}}|<div class="med-sec-head"><h2 class="sec-title" id="SeeAlso">See also</h2></div> | |||
{{{seealso}}}}}{{#if:{{{references|}}}|<div class="med-sec-head"><h2 class="sec-title" id="References">References</h2></div> | |||
{{{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 | |||
| generic=String | |||
| brand=String | |||
| structure=File | |||
| classes=List (,) of String | |||
| mechanism=String | |||
| uses=String | |||
| starting_dose=String | |||
| preparations=String | |||
| fda_max=String | |||
| pill_id=Text | |||
| routes=List (,) of String | |||
| onset=String | |||
| duration=String | |||
| halflife=String | |||
| bioavailability=String | |||
| pregnancy=String | |||
| legal=String | |||
}} | |||
== Usage == | == Usage == | ||
Medicine entry template. Fill in fields below; empty fields are auto-omitted. | |||
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> | ||
{{MedTemplate | {{MedTemplate | ||
| generic = | | generic = | ||
| brand = | | brand = | ||
| structure = | | structure = | ||
| | | classes = | ||
| uses = | |||
| uses = | | starting_dose = | ||
| | | preparations = | ||
| | | fda_max = | ||
| | | pill_id = | ||
| | | routes = | ||
| routes = | | onset = | ||
| onset = | | duration = | ||
| duration = | | halflife = | ||
| halflife = | | bioavailability = | ||
| bioavailability = | | pregnancy = | ||
| pregnancy = | | legal = | ||
| legal = | | mechanism = | ||
| | | intro = | ||
| | | history = | ||
| | | indications = | ||
| indications = | | dosing = | ||
| dosing = | | effects = | ||
| effects = | | pk_absorption = | ||
| | | pk_distribution = | ||
| | | pk_metabolism = | ||
| interactions = | | pk_elimination = | ||
| pregnancy_details = | | pharmacodynamics = | ||
| monitoring = | | interactions = | ||
| counseling = | | pregnancy_details = | ||
| anecdotes = | | monitoring = | ||
| seealso = | | counseling = | ||
| references = | | anecdotes = | ||
| seealso = | |||
| references = | |||
}} | }} | ||
</pre> | </pre> | ||
Notes: | |||
* ''The'' <code>problems</code> ''parameter feeds the "Problems" H2 section on the rendered page. Content typically consists of'' <code><problem ref="..."/></code> ''tags (formerly'' <code><problem ref="..."/></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>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>''.'' | ||
This template also populates the '''Medicines''' Cargo table. See [[Special:CargoTables/Medicines]]. | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||