patient.dart 942 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // ignore_for_file: non_constant_identifier_names
  2. import 'dart:math' as math;
  3. import 'package:fis_measure/interfaces/enums/species.dart';
  4. import 'package:fis_measure/process/calcuators/formulas/cardiac.dart';
  5. abstract class GlobalPatientConfig {
  6. static double weight = 0;
  7. static double height = 0;
  8. /// 人体表面积
  9. ///
  10. /// - Mosteller 公式:一个最经常使用的公式,发布于1987年。BSA (m²) = ( [身高(cm) x 体重(kg) ]/ 3600 )^½。
  11. ///
  12. /// - https://blog.csdn.net/qq_15560295/article/details/105025073
  13. static double bsa = 0;
  14. static updateBSAbyWH() {
  15. if (weight == 0 || height == 0) {
  16. bsa = 0;
  17. }
  18. bsa = math.sqrt((height * weight) / 3600);
  19. }
  20. /// 心率
  21. static int? hr;
  22. /// 物种类型
  23. static SpeciesType speciesType = SpeciesType.animals;
  24. /// 切换物种
  25. static switchSpecies(SpeciesType type) {
  26. speciesType = type;
  27. CardiacFormulas.reinitialize();
  28. }
  29. }