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

From WikiAnesthesia
Line 1: Line 1:
( function ( $, mw ) {
( function ( $, mw ) {
     mw.patientCalculators.addCalculations( {
     mw.patientCalculators.addCalculations( {
         bmi: {
         ibw: {
             name: 'Body mass index',
             name: 'Ideal body weight',
             abbreviation: 'BMI',
             abbreviation: 'IBW',
             requiredData: [ 'height', 'weight' ],
             requiredData: [ 'height', 'gender ],
             optionalData: [],
             optionalData: [],
            references: [
                'Devine BJ. Gentamicin therapy. Drug Intell Clin Pharm. 1974;8:650–655.'
            ],
             calculate: function( data ) {
             calculate: function( data ) {
                 console.log( 'Calculating BMI!' );
                 console.log( 'Calculating BMI!' );

Revision as of 02:31, 2 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 ) );