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
No edit summary
No edit summary
Line 40: Line 40:
{{{references}}}}}[[Category:Medications]]</includeonly><noinclude>
{{{references}}}}}[[Category:Medications]]</includeonly><noinclude>
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.
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.
[[Category:Templates]]
</noinclude>
<noinclude>
== Usage ==
<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>