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

From WikiAnesthesia
Line 1: Line 1:
( function ( $, mw ) {
( function ( $, mw ) {
     mw.patientCalculators.addCalculations( 'anatomy', {
     mw.patientCalculators.addCalculations( {
         bmi: {
         bmi: {
             name: 'Body mass index',
             name: 'Body mass index',

Revision as of 14:50, 1 July 2021

( function ( $, mw ) {
    mw.patientCalculators.addCalculations( {
        bmi: {
            name: 'Body mass index',
            abbreviation: 'BMI',
            requiredData: [ 'height', 'weight' ],
            calculate: function( data ) {
                console.log( 'Calculating BMI!' );
                console.log( this.units );
            },
            units: 'kg/m^2'
        }
    } );
}( jQuery, mediaWiki ) );