DCS/ruiyiweiUX/Assets/Scripts/Components/DataSource.cs

154 lines
5.9 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// 界面中模型的种类
public enum ModelType
{
organ,
brain
}
// 界面中六个主要的检测指标名称
public enum FeaturesName_Dial
{
BIS, // 脑电双频指数<麻醉深度> 正常范围40 - 60 总范围0 - 100
TOF, // 肌松 正常范围0-10 次/分
HR, // 心率 正常范围50 - 80 次/分 总范围0 - 130 次/分
SBP, // 收缩压 正常范围90 - 120 mmHg 总范围0 - 210 mmHg
DBP, // 舒张压 正常范围60 - 90 mmHg 总范围0 - 150 mmHg
MAP //平均压 60-110
}
public enum FeaturesName_Curve
{
BIS, // 脑电双频指数<麻醉深度> 正常范围40 - 60
HR, // 心率 正常范围50 - 80 次/分
SBP, // 收缩压 正常范围90 - 120 mmHg
DBP, // 舒张压 正常范围60 - 90 mmHg
ST, // ST段变异度 正常范围:-0.2mV - 0.2mV
CH1, // 脑电数据 通道1 正常范围:待确认
CH2, // 脑电数据 通道2 正常范围:待确认
}
// 其它生命指标最多写6个因为目前只准备了6个指标展示位置
public enum FeatureName_Other
{
TEMP, // 体温
SPO2, // 氧饱和度
PPG, // 指脉搏波形
EtCO2, // 血气分析
ST, // ST段变异度
UV // 尿量(没有实时检测设备) 正常范围:>1ml/kg/h
}
/// <summary>
/// 提取系统需要多处使用的变量
/// </summary>
public class DataSource
{
// 验证信息界面中的所有模块检测通过之后,系统才可以执行
// TODO 新设定的变量,还没有在其它类中使用
public static bool isExecuteSystem = false;
public static bool isSustainmentPhase = false;
///////////////////////////////////////////////////////////////////////
#region
// 通讯检测面板 检测结果,
// 检测异常时,说明有通讯异常,但是系统可以执行,比如有些体征检测没有,但是可以满足手术执行条件
public static string[] checkResult = { "未检测","检测成功", "检测异常", "检测失败" };
// 初始化给药面板中确定使用的药物名称,
// 系统启动前 点击验证信息面板中的确定按钮时 对该变量进行初始化
// key:pump1,pump2...pump8 val每个泵对应的药物名称
public static Dictionary<string, string> pumpMedicine = new Dictionary<string, string>();
//在 MySqlAccess 中初始化 数据库链接状态
public static bool MySqlConnState = false;
//在 PreconditionOfSystem 中初始化 远程网站/前端监测设备/输注泵的连接状态
public static bool webConnState = false;
public static bool monitorServicesConnState = false;
public static bool infuseionPumpConnState = false;
#endregion
// 诱导异常
public static bool Youdaoyichang = false;
// 一键终止按钮 AI给药状态
public static bool AIMedicineStatus = false;
// 记录给药模式切换的次数
public static int infusionSwitchTimes = 0;
// 生命体征名称
public static List<string> featuresName = new()
{ "BIS", "HR", "SBP", "DBP", "ST", "EtCO2", "TEMP", "SPO2", "PPG", "ABG", "TOF", "UV" };
// 在ProcessModelColorData中初始化
public static Dictionary<string, Vector3> regionColorDict = new Dictionary<string, Vector3>();
public static Dictionary<string, Vector3> organColorDict = new Dictionary<string, Vector3>();
// 在ProcessModelMatData中初始化
public static Dictionary<string, Material> regionMatDict = new Dictionary<string, Material>();
public static Dictionary<string, Material> organMatDict = new Dictionary<string, Material>();
// 在AddMaterialToBrainAndOrgans中初始化
public static List<Transform> regions = new List<Transform>();
public static List<Transform> organs = new List<Transform>();
// InitPumpPanel 中初始化 pump的名称是药物的名字
public static List<GameObject> pumps = new();//前四个泵
public static List<GameObject> pumps1 = new();//后四个泵
// 软件启动时输入的 患者基本信息,主要是为了获取 数据库名称 显示患者的主要信息
// key: 姓名Name住院号(admission number -> AD),性别(Gender),年龄(Age)
// 身高(Hight),体重(Weight)身份证号identity number -> IDNum
public static Dictionary<string, string> patientInfoDict = new();
//{
//{"Name", ""}, // 初始值可以是空字符串或默认值
//{"IDNum","" }
//};
// 医疗设备所检测的 生命体征的整体范围
public static Dictionary<string, List<float>> featureValueRange = new() {
{ "BIS", new() { 0.00f, 100.00f } }, // 正常范围40 - 60 总范围0 - 100
{ "HR", new() { 0.00f, 100.00f } }, // 正常范围50 - 80 次/分 总范围0 - 130 次/分
{ "SBP", new() { 0.00f, 150.00f } }, // 正常范围90 - 120 mmHg 总范围0 - 180 mmHg
{ "DBP", new() { 0.00f, 110.00f } }, // 正常范围60 - 90 mmHg 总范围0 - 140 mmHg
{ "ST", new() { -0.50f, 0.50f } }, // 正常范围:-0.2mV - 0.2mV 总范围:-0.5 - 0.5mV
{ "EtCO2", new() { 0.00f, 70.00f } }, // 正常范围30 - 45 mmHg 总范围0 - 90 mmHg
// 电压一般在正负100内不在这个范围的可以被看做是噪声为了能看到明显的变化把范围设置为 正负70
{ "EEG", new() { -100.00f, 100.00f } },
};
}