Jump to content

Pharmacopedia:Problems repository: Difference between revisions

From Pharmacopedia
Create Pharmacopedia:Problems repository doc page (Phase 4 of indications-to-problems rebuild)
 
Em-dash sweep: replace em-dash with comma per project rule; PendellsCorner verbatim quotes preserved.
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
This page documents the '''Problems repository''' the controlled vocabulary that medicines on this wiki are tagged with via the <code>&lt;problem ref="..."/&gt;</code> parser tag.
This page documents the '''Problems repository''', the controlled vocabulary that medicines on this wiki are tagged with via the <code>&lt;problem ref="..."/&gt;</code> parser tag.


It is sysop- and contributor-facing reference, kept alongside the live data at [[Special:Problems]] (browse) and [[Special:ManageProblems]] (sysop curation).
It is sysop- and contributor-facing reference, kept alongside the live data at [[Special:Problems]] (browse) and [[Special:ManageProblems]] (sysop curation).
Line 5: Line 5:
== What a Problem is ==
== What a Problem is ==


A '''Problem''' is anything a medicine is used '''for''' a diagnosis, symptom, functional state, lab target, or any other pharmacological target. The category is deliberately broader than DSM-5/ICD-10 diagnoses because not everything a medicine is used for is a formal diagnosis: ''insomnia'', ''smoking cessation'', ''jet lag'', ''public speaking anxiety'', and ''recreational use'' are all valid Problems.
A '''Problem''' is anything a medicine is used '''for''', a diagnosis, symptom, functional state, lab target, or any other pharmacological target. The category is deliberately broader than DSM-5/ICD-10 diagnoses because not everything a medicine is used for is a formal diagnosis: ''insomnia'', ''smoking cessation'', ''jet lag'', ''public speaking anxiety'', and ''recreational use'' are all valid Problems.


== Problems ≠ Diagnoses ==
== Problems ≠ Diagnoses ==
Line 27: Line 27:
== Auto-approval ==
== Auto-approval ==


User submissions are '''auto-approved on submit'''. There is no pending queue. The reasoning: lowering friction matters more than gatekeeping at this stage. Sysops handle quality after the fact via [[Special:ManageProblems]] merging duplicates, retiring spam or low-quality entries, fixing category assignments.
User submissions are '''auto-approved on submit'''. There is no pending queue. The reasoning: lowering friction matters more than gatekeeping at this stage. Sysops handle quality after the fact via [[Special:ManageProblems]], merging duplicates, retiring spam or low-quality entries, fixing category assignments.


== Curation operations (sysop only) ==
== Curation operations (sysop only) ==
Line 33: Line 33:
[[Special:ManageProblems]] supports:
[[Special:ManageProblems]] supports:


* '''Edit''' change a Problem's name, description, category, or aliases. Slug is immutable (other pages reference it).
* '''Edit''', change a Problem's name, description, category, or aliases. Slug is immutable (other pages reference it).
* '''Retire''' soft-deletes a Problem. Existing <code>&lt;problem ref="..."/&gt;</code> tags referencing it will show "unknown ref" errors unless merged.
* '''Retire''', soft-deletes a Problem. Existing <code>&lt;problem ref="..."/&gt;</code> tags referencing it will show "unknown ref" errors unless merged.
* '''Retire and merge''' retires the duplicate AND points its <code>p_merged_into</code> field at the canonical entry. The <code>ProblemTag</code> renderer follows merge chains up to 5 hops, so all existing references continue resolving to the canonical Problem. This is the preferred way to handle duplicates.
* '''Retire and merge''', retires the duplicate AND points its <code>p_merged_into</code> field at the canonical entry. The <code>ProblemTag</code> renderer follows merge chains up to 5 hops, so all existing references continue resolving to the canonical Problem. This is the preferred way to handle duplicates.
* '''Unretire''' restores a previously-retired Problem.
* '''Unretire''', restores a previously-retired Problem.
* '''Create''' manually add a Problem without going through the suggest flow.
* '''Create''', manually add a Problem without going through the suggest flow.


When in doubt, '''merge rather than retire'''. Merging preserves the slug's resolvability; bare retirement breaks references.
When in doubt, '''merge rather than retire'''. Merging preserves the slug's resolvability; bare retirement breaks references.
Line 78: Line 78:
| <code>addiction</code> || AUD, OUD, CUD, smoking cessation, opioid maintenance
| <code>addiction</code> || AUD, OUD, CUD, smoking cessation, opioid maintenance
|-
|-
| <code>functional</code> || RSD, HSP, misophonia, SPD things that don't fit DSM cleanly
| <code>functional</code> || RSD, HSP, misophonia, SPD, things that don't fit DSM cleanly
|-
|-
| <code>symptomatic</code> || Symptoms not yet rising to disorder level (low mood, anxiety, nausea, fatigue, itch, fever, agitation)
| <code>symptomatic</code> || Symptoms not yet rising to disorder level (low mood, anxiety, nausea, fatigue, itch, fever, agitation)
Line 89: Line 89:
== Slug conventions ==
== Slug conventions ==


Slugs are lowercase, hyphenated, ASCII-only, with no leading/trailing hyphens (enforced by <code>ProblemStore::normalizeSlug</code>). They are derived from the Problem's canonical name on creation but become '''immutable''' afterward renames go through the merge mechanism, not slug edits.
Slugs are lowercase, hyphenated, ASCII-only, with no leading/trailing hyphens (enforced by <code>ProblemStore::normalizeSlug</code>). They are derived from the Problem's canonical name on creation but become '''immutable''' afterward, renames go through the merge mechanism, not slug edits.


Examples:
Examples:
Line 98: Line 98:
== Internal note on the legacy tag and votable-element prefix ==
== Internal note on the legacy tag and votable-element prefix ==


The pre-rename <code>&lt;indication&gt;</code> tag is still registered as a deprecated back-compat shim that delegates to <code>ProblemTag</code>. Likewise, the internal <code>pcp_votable_elements.ve_slug</code> prefix is still <code>indication-&lt;slug&gt;</code> rather than <code>problem-&lt;slug&gt;</code>. This preserves every pre-rename efficacy/likert rating users have already submitted. Both will be migrated in a future cleanup pass (Phase 5 of the indications-to-problems rebuild), at which point the back-compat shim can drop.
The pre-rename <code>&lt;problem&gt;</code> tag is still registered as a deprecated back-compat shim that delegates to <code>ProblemTag</code>. Likewise, the internal <code>pcp_votable_elements.ve_slug</code> prefix is still <code>problem-&lt;slug&gt;</code> rather than <code>problem-&lt;slug&gt;</code>. This preserves every pre-rename efficacy/likert rating users have already submitted. Both will be migrated in a future cleanup pass (Phase 5 of the problems-to-problems rebuild), at which point the back-compat shim can drop.


== See also ==
== See also ==


* [[Special:Problems]] browse the live repository
* [[Special:Problems]], browse the live repository
* [[Special:ManageProblems]] sysop curation
* [[Special:ManageProblems]], sysop curation
* [[Special:SuggestProblem]] propose a new Problem
* [[Special:SuggestProblem]], propose a new Problem
* [[Pharmacopedia:Citation needed]] sitewide citation rule
* [[Pharmacopedia:Citation needed]], sitewide citation rule


[[Category:Pharmacopedia]]
[[Category:Pharmacopedia]]
[[Category:Documentation]]
[[Category:Documentation]]

Latest revision as of 03:16, 19 May 2026

This page documents the Problems repository, the controlled vocabulary that medicines on this wiki are tagged with via the <problem ref="..."/> parser tag.

It is sysop- and contributor-facing reference, kept alongside the live data at Special:Problems (browse) and Special:ManageProblems (sysop curation).

What a Problem is

A Problem is anything a medicine is used for, a diagnosis, symptom, functional state, lab target, or any other pharmacological target. The category is deliberately broader than DSM-5/ICD-10 diagnoses because not everything a medicine is used for is a formal diagnosis: insomnia, smoking cessation, jet lag, public speaking anxiety, and recreational use are all valid Problems.

Problems ≠ Diagnoses

The two systems are intentionally separate.

  • Diagnoses live in pcp_profile_diagnoses and describe what a user has. They use DSM-5/ICD-10/somatic systems with optional codes, and are entered as free text via Special:MyProfile. A 95-row abbreviation table (pcp_diagnosis_abbreviations) provides typeahead expansion (e.g. typing mdd expands to "Major Depressive Disorder").
  • Problems live in pcp_problem + pcp_problem_alias and describe what a medicine is used for. They are appended to medicine pages via the <problem ref="slug"/> tag. There are currently 165 Problems across 18 categories.

The dx abbreviations were used as seed material when the Problems repository was first populated (May 2026), but the two tables are independent. A user's diagnosis does not automatically create a Problem, and vice versa.

Entry points

Anyone with an account can propose a new Problem from any of four entry points:

  1. From a medicine page: the "+ Add a problem" link under the Problems section of any medicine renders SuggestProblem/<MedPage>. This both creates the Problem in the repo and inserts a <problem ref="..."/> tag into the medicine page.
  2. Standalone: Special:SuggestProblem (no subpage) creates a Problem in the repo only, with no medicine-page anchor.
  3. From the profile dx-entry form on Special:MyProfile: when typing a diagnosis description, the typeahead surfaces matching Problems with a "Suggest as a new Problem" fallback when nothing matches.
  4. From the browse empty state on Special:Problems: when a search returns no results, the page surfaces "Add '<typed>' as a new Problem".

Auto-approval

User submissions are auto-approved on submit. There is no pending queue. The reasoning: lowering friction matters more than gatekeeping at this stage. Sysops handle quality after the fact via Special:ManageProblems, merging duplicates, retiring spam or low-quality entries, fixing category assignments.

Curation operations (sysop only)

Special:ManageProblems supports:

  • Edit, change a Problem's name, description, category, or aliases. Slug is immutable (other pages reference it).
  • Retire, soft-deletes a Problem. Existing <problem ref="..."/> tags referencing it will show "unknown ref" errors unless merged.
  • Retire and merge, retires the duplicate AND points its p_merged_into field at the canonical entry. The ProblemTag renderer follows merge chains up to 5 hops, so all existing references continue resolving to the canonical Problem. This is the preferred way to handle duplicates.
  • Unretire, restores a previously-retired Problem.
  • Create, manually add a Problem without going through the suggest flow.

When in doubt, merge rather than retire. Merging preserves the slug's resolvability; bare retirement breaks references.

Categories (as of 2026-05-17)

The 18 categories used to facet the repository:

Category Roughly covers
psychiatric DSM-5 mental disorders (depression, anxiety, OCD, PTSD, schizophrenia, ED, ASD, ADHD, personality disorders, etc.)
neurological Migraine, epilepsy, MS, Parkinson, Alzheimer, TBI, FND, tic disorders, dyslexia
cardiometabolic T2DM, hypertension, hyperlipidemia, obesity, HF, AFib, CKD, weight loss
endocrine T1D, thyroid, PCOS, endometriosis
gi IBS, IBD, GERD, peptic ulcer, constipation, diarrhea
respiratory Asthma, COPD, allergic rhinitis
dermatologic Acne, eczema, psoriasis, rosacea
sexual-reproductive Erectile dysfunction, low libido, contraception, menopause symptoms, dysmenorrhea, endometriosis, premature ejaculation
genitourinary BPH, overactive bladder, urinary incontinence
ophthalmic Glaucoma, dry eye
otolaryngologic Vertigo, motion sickness
pain Acute, chronic, neuropathic, back, head, fibromyalgia, menstrual
sleep Insomnia, OSA, narcolepsy, RLS, jet lag, shift work
autoimmune RA, PsA, EDS, MCAS, lupus (when added)
addiction AUD, OUD, CUD, smoking cessation, opioid maintenance
functional RSD, HSP, misophonia, SPD, things that don't fit DSM cleanly
symptomatic Symptoms not yet rising to disorder level (low mood, anxiety, nausea, fatigue, itch, fever, agitation)
life-circumstance Cognitive enhancement, public speaking anxiety, recreational use, exam performance

Uncategorized Problems are allowed (the category column is nullable). Sysops should assign a category when reasonable.

Slug conventions

Slugs are lowercase, hyphenated, ASCII-only, with no leading/trailing hyphens (enforced by ProblemStore::normalizeSlug). They are derived from the Problem's canonical name on creation but become immutable afterward, renames go through the merge mechanism, not slug edits.

Examples:

  • diabetes-type-2 (canonical: "Type 2 diabetes mellitus")
  • cv-risk-obesity (canonical: "Cardiovascular risk reduction in obesity")
  • mash-fibrosis (canonical: "MASH with stage 2-3 fibrosis")

Internal note on the legacy tag and votable-element prefix

The pre-rename <problem> tag is still registered as a deprecated back-compat shim that delegates to ProblemTag. Likewise, the internal pcp_votable_elements.ve_slug prefix is still problem-<slug> rather than problem-<slug>. This preserves every pre-rename efficacy/likert rating users have already submitted. Both will be migrated in a future cleanup pass (Phase 5 of the problems-to-problems rebuild), at which point the back-compat shim can drop.

See also