Difference between revisions of "MediaWiki:PatientCalculators/anatomy.js"

From WikiAnesthesia
(Created page with "'use strict'; export default { bmi: { abbreviation: 'bmi', calculate: function( patientData ) { console.log( 'Calculating BMI!' ); },...")
 
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
'use strict';
( function ( $, mw ) {
 
    mw.patientCalculators.addCalculations( {
export default {
        ibw: {
    bmi: {
            name: 'Ideal body weight',
        abbreviation: 'bmi',
            abbreviation: 'IBW',
        calculate: function( patientData ) {
            requiredData: [ 'height', 'gender' ],
            console.log( 'Calculating BMI!' );
            optionalData: [],
        },
            references: [
        name: 'Body mass index',
                'Devine BJ. Gentamicin therapy. Drug Intell Clin Pharm. 1974;8:650–655.'
        units: 'kg/m^2'
            ],
     }
            calculate: function( data ) {
};
                console.log( 'Calculating BMI!' );
                console.log( this.units );
            },
            units: 'kg/m^2',
            value: null
        }
     } );
}( jQuery, mediaWiki ) );

Latest revision as of 14:46, 15 July 2021

( function ( $, mw ) {
    mw.patientCalculators.addCalculations( {
        ibw: {
            name: 'Ideal body weight',
            abbreviation: 'IBW',
            requiredData: [ 'height', 'gender' ],
            optionalData: [],
            references: [
                'Devine BJ. Gentamicin therapy. Drug Intell Clin Pharm. 1974;8:650–655.'
            ],
            calculate: function( data ) {
                console.log( 'Calculating BMI!' );
                console.log( this.units );
            },
            units: 'kg/m^2',
            value: null
        }
    } );
}( jQuery, mediaWiki ) );