| | |
| | | import { tryConvertToInt, deepClone } from "@/utils/utils"; |
| | | import { Local } from "@/utils/storage"; |
| | | import dayjs from "dayjs"; |
| | | import type { DeviceLoginRecord } from './user.type'; |
| | | export interface IotInfo { |
| | | 属性历史列表: any[]; |
| | | 床号: string; |
| | |
| | | 管路: string[]; |
| | | 透析器: string[]; |
| | | 透析模式: string[]; |
| | | 透析单编号: string; |
| | | } |
| | | |
| | | enum EPushType { |
| | |
| | | 自定义配置项: Customconfiguration; |
| | | 服务端版本号: string; |
| | | 是否需要立即刷新: 0 | 1; |
| | | 当前登录状态: DeviceLoginRecord | null; |
| | | } |
| | | |
| | | interface Customconfiguration { |
| | |
| | | sphygmomanometer: Sphygmomanometer; |
| | | customConfiguration: Customconfiguration; |
| | | 患者出生日期: string; |
| | | 客户编号: string; |
| | | } |
| | | |
| | | export const defaultSphygmomanometer = () :Sphygmomanometer => { |
| | |
| | | carePackage: any[]; |
| | | punctureNeedle: PunctureNeedle[]; |
| | | vascularAccess: VascularAccess[]; |
| | | 透析单编号: string; |
| | | } |
| | | |
| | | export const defaultconsumablesCollection = (): ConsumablesCollection => { |
| | |
| | | 管路: [], |
| | | 透析器: [], |
| | | 透析模式: [], |
| | | 透析单编号: '', |
| | | }; |
| | | }; |
| | | |
| | |
| | | carePackage: [], // 一次性使用透析护理包列表 |
| | | punctureNeedle: [], // 穿刺针列表 |
| | | vascularAccess: [], // 血管通路列表 |
| | | 透析单编号: '' |
| | | }; |
| | | }; |
| | | |
| | |
| | | 体重增长_透前_上次透后: number | null; // 体重增长(透前-上次透后) |
| | | 体重增持_透前_干体重: number | null; // 体重增长(透前-干体重) |
| | | 四点血压图数据: 四点血压图数据[]; |
| | | 透析单编号: string; |
| | | } |
| | | |
| | | export const defaultSignedIn = (): SignedIn => { |
| | |
| | | 体重增长_透前_上次透后: null, // 体重增长(透前-上次透后) |
| | | 体重增持_透前_干体重: null, // 体重增长(透前-干体重) |
| | | 四点血压图数据: [], |
| | | 透析单编号: '', |
| | | }; |
| | | }; |
| | | |
| | |
| | | venousPressure2: number | null; // 静脉压 |
| | | transmembranePressure2: number | null; // 跨膜压 |
| | | 处方脱水量: number | null; // 处方脱水量 |
| | | 透析单编号: string; |
| | | } |
| | | |
| | | export interface MonitoringRecord { |
| | |
| | | venousPressure2: null, // 静脉压 |
| | | transmembranePressure2: null, // 跨膜压 |
| | | 处方脱水量: null, |
| | | 透析单编号: '' |
| | | }; |
| | | }; |
| | | |
| | |
| | | // @ts-ignore |
| | | pageType, // 当前要展示的页面 |
| | | treatmentStatus: EMedStatus.NOT_CHECKED_IN, // 透析状态 |
| | | 客户编号: "", |
| | | consumablesCollection: defaultconsumablesCollection(), // 未排班时需要的数据 |
| | | notSignedIn: defalutNotSignedIn(), // 未签到时需要的数据 |
| | | signedIn: defaultSignedIn(), // 已签到时需要的数据 |
| | |
| | | // 默认床号(设备号) |
| | | result.devicdeNo = seeMsg.IOT信息?.床号; |
| | | result.deviceCode = seeMsg.IOT信息?.设备唯一编号; |
| | | |
| | | |
| | | // 自定义配置项 |
| | | result.customConfiguration = seeMsg.自定义配置项 ?? defaultCustomconfiguration(); |
| | |
| | | result.patFormNumber = seeMsg.透析状态?.患者门诊住院号; |
| | | result.患者出生日期 = seeMsg.透析状态?.患者出生日期 || ""; |
| | | |
| | | result.客户编号 = seeMsg.透析状态?.clientCode; |
| | | |
| | | |
| | | // 未签到页面需要显示的 |
| | | if (treatmentStatus === EMedStatus.NOT_CHECKED_IN) { |
| | | result.pageType = EPageType.NOT_SIGNED_IN; |
| | |
| | | notSignedIn.punctureNeedle = seeMsg.透析状态?.穿刺针列表 ?? []; |
| | | notSignedIn.vascularAccess = seeMsg.透析状态?.血管通路列表 ?? []; |
| | | notSignedIn.anticoagulant = seeMsg.透析状态?.抗凝剂列表 ?? []; |
| | | notSignedIn.透析单编号 = seeMsg.透析状态?.透析单编号; |
| | | |
| | | result.notSignedIn = notSignedIn; |
| | | } |
| | |
| | | signedIn.上次透析单所属日期 = dayjs(signedIn.四点血压图数据[0].透析日期).format("YYYY-MM-DD"); |
| | | // signedIn.本次透析单所属日期 = dayjs(signedIn.四点血压图数据[0].透析日期).format("YYYY-MM-DD"); |
| | | } |
| | | signedIn.透析单编号 = seeMsg.透析状态?.透析单编号; |
| | | result.signedIn = signedIn; |
| | | } |
| | | // 剩下的全使用治疗中的页面 |
| | |
| | | ?.realTimeKtvCalcDetailResultInfo ?? []; |
| | | underTreatment.dialysisAge = seeMsg.透析状态?.透析龄 ?? null; |
| | | underTreatment.处方脱水量 = seeMsg.透析状态?.处方脱水量 ?? null; |
| | | underTreatment.透析单编号 = seeMsg.透析状态?.透析单编号; |
| | | |
| | | result.underTreatment = underTreatment; |
| | | } |