ORIGINAL WORDPRESS LOGIC / RESTORED OCTOBER 25, 2026
WordPress logic restoration
The current calculator uses the original medcalc plugin’s arithmetic and the actual WordPress medication records. The assistant-added directional-only rules, cross-class heuristics, total-daily-dose lookup adaptation, frequency assumptions, whole-source-unit restrictions and 40 mg/day Adderall tool boundary have been removed from the active calculation path.
| Check | Result |
|---|---|
| Original database records / fields | 25 records; 300/300 field values retained unchanged |
| Original PHP conversion cases with defined numeric factors | 20,216 exact matches; zero differences |
| Original current-dose notes | 1,064 exact matches |
| UI checks | 72 checks; pair and dose only; both lists contain50 entries |
| Other listed formulations | 25 reference-only entries; no invented conversion factors |
What is restored
- Original source-dose / source-factor × target-factor arithmetic.
- Original six-point Vyvanse mapping, normalized through the source or target factor.
- Original target numeric ceilings, available-strength combinations, and partial-dose / crushing flags.
- Original current-dose notes, which do not automatically block the separate conversion calculation.
- Original input convention: a medication pair and an unqualified mg dose. No frequency or total-daily-dose adjustment is introduced.
Worked source comparisons
| Original medication input | Target | Restored result |
|---|---|---|
| Ritalin10mg | Vyvanse | 30mg |
| Ritalin20mg | Vyvanse | 50mg |
| Ritalin30mg | Vyvanse | 70mg |
| Vyvanse70mg | Ritalin | 30mg |
| Ritalin7.5mg | Concerta | 27mg |
| Concerta54mg | Ritalin | 15mg |
| Adderall2.5mg | AdderallXR | 5mg |
These results reproduce the original calculator’s input/output convention; no daily schedule is inferred.
Undefined or corrupt records are flagged
The original Methylin Oral Solution conversion-factor field contains formulation text instead of one numeric factor. Non-Vyvanse records with a factor of “n/a” do not define a numeric conversion. Those cases are flagged as unavailable rather than using PHP’s text-to-number coercion or showing a zero-dose result. The raw original fields remain visible and unchanged; no replacement factor is invented.
These guards cover14,784 cases in the original35,000-case fixture matrix. That count includes many originally invalid inputs/pairs; it is not a count of valid clinical conversions withheld. The separate archival test still reproduces all35,000 legacy fixtures, including their documented runtime defects, for forensic comparison.
Scope and evidence
The original plugin PHP, knapsack helper, complete recovered Medicine theme and medication SQL were downloaded from HostGator and inspected. Original public content credits physician contributors. The complete WordPress document-root ZIP has not yet been retrieved; it still requires HostGator sign-in. Calculator logic and all25 medication records are already available.
The comparison oracle was captured using PHP8.3 with documented legacy numeric-coercion compatibility. Original PHP7.4 is unavailable in this environment. Matching software behavior is not clinical validation. Historical record values and administration messages are reproduced as source evidence; verify current product instructions separately.
Current prescribing-label references are supplemental and do not overwrite the restored conversion factors. Read the original migration audit.