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

From WikiAnesthesia
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
( function ( $, mw ) {
( function ( $, mw ) {
     mw.patientCalculators.calculations = {
     mw.patientCalculators.addCalculations( {
         anatomy: {
         ibw: {
             bmi: {
             name: 'Ideal body weight',
                name: 'Body mass index',
            abbreviation: 'IBW',
                abbreviation: 'bmi',
            requiredData: [ 'height', 'gender' ],
                requiredData: [ 'height', 'weight' ],
            optionalData: [],
                 calculate: function( patientData ) {
            references: [
                    console.log( 'Calculating BMI!' );
                 'Devine BJ. Gentamicin therapy. Drug Intell Clin Pharm. 1974;8:650–655.'
                    console.log( this );
            ],
                },
            calculate: function( data ) {
                units: 'kg/m^2'
                console.log( 'Calculating BMI!' );
             }
                console.log( this.units );
            },
            units: 'kg/m^2',
             value: null
         }
         }
     }
     } );
}( jQuery, mediaWiki ) );
}( 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 ) );