patient.dart 575 B

12345678910111213141516171819202122
  1. // ignore_for_file: non_constant_identifier_names
  2. import 'dart:math' as math;
  3. abstract class GlobalPatientConfig {
  4. static double weight = 0;
  5. static double height = 0;
  6. /// 人体表面积
  7. ///
  8. /// - Mosteller 公式:一个最经常使用的公式,发布于1987年。BSA (m²) = ( [身高(cm) x 体重(kg) ]/ 3600 )^½。
  9. ///
  10. /// - https://blog.csdn.net/qq_15560295/article/details/105025073
  11. static double bsa = 0;
  12. static updateBSAbyWH() {
  13. if (weight == 0 || height == 0) {
  14. bsa = 0;
  15. }
  16. bsa = math.sqrt((height * weight) / 3600);
  17. }
  18. }