MediaWiki:PatientCalculators/common.js

From WikiAnesthesia
< MediaWiki:PatientCalculators
Revision as of 14:51, 1 July 2021 by Chris Rishel (talk | contribs) (Created page with "( function ( $, mw ) { mw.patientCalculators.addCalculationData( { age: { type: "number", defaultValue: "40", units: [...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
( function ( $, mw ) {
    mw.patientCalculators.addCalculationData( {
        age: {
            type: "number",
            defaultValue: "40",
            units: [
                "yr",
                "mo",
                "wk"
            ]
            defaultUnits: "yr",
        },
        gender: {
            type: "string",
            options: [
                "F",
                "M"
            ]
        },
        height: {
            type: "number"
            defaultValue: "175",
            units: [
                "cm",
                "m",
                "in",
                "ft"
            ],
            defaultUnits: "cm"
        },
        weight: {
            type: "number",
            defaultValue: "75",
            units: [
                "kgwt",
                "lbwt",
                "gwt"
            ],
            defaultUnits: "kgwt"
        }
    } );
}( jQuery, mediaWiki ) );