|
|
| Line 1: |
Line 1: |
| <includeonly>{| class="wikitable" style="float:right; clear:right; max-width:28em; margin:0 0 1em 1em; font-size:92%;" | | <includeonly><table class="wikitable" style="float:right; clear:right; max-width:28em; margin:0 0 1em 1em; font-size:92%;"> |
| |+ style="font-size:120%; padding:0.4em;" | '''{{{generic|{{PAGENAME}}}}}'''
| | <caption style="font-size:120%; padding:0.4em; font-weight:bold;">{{{generic|{{PAGENAME}}}}}</caption> |
| {{#if:{{{structure|}}}|! colspan="2" style="padding:0.8em; text-align:center;" {{!}} [[File:{{{structure}}}|frameless|{{{structuresize|240px}}}|alt=Structure of {{{generic|{{PAGENAME}}}}}]]<br><small>'''Structure'''</small> | | {{#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> |
| }}! colspan="2" style="background:#2563eb; color:#fff; padding:0.4em; text-align:left;" | Summary
| | {{#if:{{{brand|}}}|<tr><th style="text-align:left; width:9em;">Brand name(s)</th><td>{{{brand}}}</td></tr>}} |
| {{#if:{{{brand|}}}|{{!}}- | | {{#if:{{{class|}}}|<tr><th style="text-align:left;">Class</th><td>{{{class}}}</td></tr>}} |
| ! style="text-align:left; width:9em;" {{!}} Brand name(s)
| | {{#if:{{{mechanism|}}}|<tr><th style="text-align:left;">Mechanism</th><td>{{{mechanism}}}</td></tr>}} |
| {{!}} {{{brand}}}
| | {{#if:{{{uses|}}}|<tr><th style="text-align:left;">Common uses</th><td>{{{uses}}}</td></tr>}} |
| }}{{#if:{{{class|}}}|{{!}}- | | <tr><th colspan="2" style="background:#16a34a; color:#fff; padding:0.4em; text-align:left;">Chemistry</th></tr> |
| ! style="text-align:left;" {{!}} Class
| | {{#if:{{{formula|}}}|<tr><th style="text-align:left;">Formula</th><td>{{{formula}}}</td></tr>}} |
| {{!}} {{{class}}}
| | {{#if:{{{mass|}}}|<tr><th style="text-align:left;">Molar mass</th><td>{{{mass}}}</td></tr>}} |
| }}{{#if:{{{mechanism|}}}|{{!}}- | | {{#if:{{{cas|}}}|<tr><th style="text-align:left;">CAS number</th><td>{{{cas}}}</td></tr>}} |
| ! style="text-align:left;" {{!}} Mechanism
| | {{#if:{{{atc|}}}|<tr><th style="text-align:left;">ATC code</th><td>{{{atc}}}</td></tr>}} |
| {{!}} {{{mechanism}}}
| | <tr><th colspan="2" style="background:#7c3aed; color:#fff; padding:0.4em; text-align:left;">Pharmacology</th></tr> |
| }}{{#if:{{{uses|}}}|{{!}}- | | {{#if:{{{routes|}}}|<tr><th style="text-align:left;">Routes</th><td>{{{routes}}}</td></tr>}} |
| ! style="text-align:left;" {{!}} Common uses
| | {{#if:{{{onset|}}}|<tr><th style="text-align:left;">Onset</th><td>{{{onset}}}</td></tr>}} |
| {{!}} {{{uses}}}
| | {{#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>}} |
| ! colspan="2" style="background:#16a34a; color:#fff; padding:0.4em; text-align:left;" | Chemistry
| | {{#if:{{{pregnancy|}}}|<tr><th style="text-align:left;">Pregnancy</th><td>{{{pregnancy}}}</td></tr>}} |
| {{#if:{{{formula|}}}|{{!}}- | | {{#if:{{{legal|}}}|<tr><th style="text-align:left;">Legal status</th><td>{{{legal}}}</td></tr>}} |
| ! style="text-align:left;" {{!}} Formula
| | </table>{{#if:{{{intro|}}}| |
| {{!}} {{{formula}}}
| |
| }}{{#if:{{{mass|}}}|{{!}}- | |
| ! style="text-align:left;" {{!}} Molar mass
| |
| {{!}} {{{mass}}}
| |
| }}{{#if:{{{cas|}}}|{{!}}- | |
| ! style="text-align:left;" {{!}} CAS number
| |
| {{!}} {{{cas}}}
| |
| }}{{#if:{{{atc|}}}|{{!}}- | |
| ! style="text-align:left;" {{!}} ATC code
| |
| {{!}} {{{atc}}}
| |
| }} | |
| |-
| |
| ! colspan="2" style="background:#7c3aed; color:#fff; padding:0.4em; text-align:left;" | Pharmacology
| |
| {{#if:{{{routes|}}}|{{!}}- | |
| ! style="text-align:left;" {{!}} Routes
| |
| {{!}} {{{routes}}}
| |
| }}{{#if:{{{onset|}}}|{{!}}- | |
| ! style="text-align:left;" {{!}} Onset
| |
| {{!}} {{{onset}}}
| |
| }}{{#if:{{{duration|}}}|{{!}}- | |
| ! style="text-align:left;" {{!}} Duration
| |
| {{!}} {{{duration}}}
| |
| }}{{#if:{{{halflife|}}}|{{!}}- | |
| ! style="text-align:left;" {{!}} Half-life
| |
| {{!}} {{{halflife}}}
| |
| }}{{#if:{{{bioavailability|}}}|{{!}}- | |
| ! style="text-align:left;" {{!}} Bioavailability
| |
| {{!}} {{{bioavailability}}}
| |
| }}{{#if:{{{pregnancy|}}}|{{!}}- | |
| ! style="text-align:left;" {{!}} Pregnancy
| |
| {{!}} {{{pregnancy}}}
| |
| }}{{#if:{{{legal|}}}|{{!}}- | |
| ! style="text-align:left;" {{!}} Legal status
| |
| {{!}} {{{legal}}}
| |
| }} | |
| |}{{#if:{{{intro|}}}|
| |
| {{{intro}}}}}{{#if:{{{pharmacology|}}}| | | {{{intro}}}}}{{#if:{{{pharmacology|}}}| |
|
| |
|
| Line 102: |
Line 66: |
| == References == | | == References == |
| {{{references}}}}}[[Category:Medications]]</includeonly><noinclude> | | {{{references}}}}}[[Category:Medications]]</includeonly><noinclude> |
| == Usage ==
| | Usage docs and TemplateData go here — keep what you already have, or copy the TemplateData block from the earlier message if you want VisualEditor integration. |
| <pre>
| |
| {{MedTemplate
| |
| | generic =
| |
| | brand =
| |
| | structure =
| |
| | class =
| |
| | mechanism =
| |
| | uses =
| |
| | formula =
| |
| | mass =
| |
| | cas =
| |
| | atc =
| |
| | routes =
| |
| | onset =
| |
| | duration =
| |
| | halflife =
| |
| | bioavailability =
| |
| | pregnancy =
| |
| | legal =
| |
| | intro =
| |
| | pharmacology =
| |
| | pharmacokinetics =
| |
| | indications =
| |
| | dosing =
| |
| | effects =
| |
| | adverse =
| |
| | contraindications =
| |
| | interactions =
| |
| | pregnancy_details =
| |
| | monitoring =
| |
| | counseling =
| |
| | anecdotes =
| |
| | seealso =
| |
| | references =
| |
| }}
| |
| </pre>
| |
| | |
| Three groups of fields:
| |
| | |
| * '''Infobox (right column)''': short, label-style values — name, brand, class, formula, half-life, etc.
| |
| * '''Body sections''': prose; renders as full-width <code>== Section ==</code> headings only when filled.
| |
| * '''Auto-omitted''' rows/sections: any empty parameter is skipped (no empty boxes or stray headings).
| |
| | |
| <templatedata>
| |
| {
| |
| "description": "Full page template for a medicine entry. Renders a tri-section infobox (Summary / Chemistry / Pharmacology) plus auto-suppressed body sections.",
| |
| "params": {
| |
| "generic": { "label": "Generic name(s)", "description": "Comma-separated. Defaults to page name.", "type": "string" },
| |
| "brand": { "label": "Brand name(s)", "type": "string" },
| |
| "structure": { "label": "Structure image", "description": "Filename only, no 'File:' prefix.", "type": "wiki-file-name" },
| |
| "structuresize": { "label": "Structure size", "description": "Defaults to 240px.", "type": "string", "default": "240px" },
| |
| "class": { "label": "Class", "description": "Pharmacological class, e.g. SSRI.", "type": "string" },
| |
| "mechanism": { "label": "Mechanism (1 line)","description": "One-line summary for infobox; expand in 'Pharmacology' body section.", "type": "string" },
| |
| "uses": { "label": "Common uses", "type": "string" },
| |
| "formula": { "label": "Chemical formula", "type": "string" },
| |
| "mass": { "label": "Molar mass", "type": "string" },
| |
| "cas": { "label": "CAS number", "type": "string" },
| |
| "atc": { "label": "ATC code", "type": "string" },
| |
| "routes": { "label": "Routes of administration", "type": "string" },
| |
| "onset": { "label": "Onset", "type": "string" },
| |
| "duration": { "label": "Duration", "type": "string" },
| |
| "halflife": { "label": "Half-life", "type": "string" },
| |
| "bioavailability": { "label": "Bioavailability", "type": "string" },
| |
| "pregnancy": { "label": "Pregnancy (short)", "description": "Short tag for infobox, e.g. 'Category C'. Detailed prose goes in 'pregnancy_details'.", "type": "string" },
| |
| "legal": { "label": "Legal status", "description": "e.g. 'Rx-only', 'Schedule IV'.", "type": "string" },
| |
| "intro": { "label": "Intro paragraph", "description": "Free wikitext above the first heading.", "type": "content" },
| |
| "pharmacology": { "label": "Pharmacology", "type": "content" },
| |
| "pharmacokinetics": { "label": "Pharmacokinetics", "description": "ADME — absorption, distribution, metabolism, excretion.", "type": "content" },
| |
| "indications": { "label": "Indications", "type": "content" },
| |
| "dosing": { "label": "Dosing and titration", "type": "content" },
| |
| "effects": { "label": "Effects", "description": "Therapeutic + common adverse effects.", "type": "content" },
| |
| "adverse": { "label": "Adverse effects", "description": "Serious / less common adverse effects, warnings.", "type": "content" },
| |
| "contraindications": { "label": "Contraindications", "type": "content" },
| |
| "interactions": { "label": "Interactions", "description": "Medicine-medicine, medicine-food, etc.", "type": "content" },
| |
| "pregnancy_details": { "label": "Pregnancy & lactation (body section)", "type": "content" },
| |
| "monitoring": { "label": "Monitoring", "description": "Labs, vitals, or signs to watch.", "type": "content" },
| |
| "counseling": { "label": "Patient counseling","type": "content" },
| |
| "anecdotes": { "label": "Personal experience", "type": "content" },
| |
| "seealso": { "label": "See also", "type": "content" },
| |
| "references": { "label": "References", "type": "content" }
| |
| },
| |
| "paramOrder": [
| |
| "generic", "brand", "structure", "structuresize",
| |
| "class", "mechanism", "uses",
| |
| "formula", "mass", "cas", "atc",
| |
| "routes", "onset", "duration", "halflife", "bioavailability", "pregnancy", "legal",
| |
| "intro", "pharmacology", "pharmacokinetics", "indications", "dosing",
| |
| "effects", "adverse", "contraindications", "interactions",
| |
| "pregnancy_details", "monitoring", "counseling", "anecdotes",
| |
| "seealso", "references"
| |
| ],
| |
| "format": "block"
| |
| }
| |
| </templatedata>
| |
|
| |
|
| [[Category:Templates]] | | [[Category:Templates]] |
| </noinclude> | | </noinclude> |