| | |
| | | import { tryConvertToInt } from "@/utils/utils"; |
| | | import cache from '@/utils/cache'; |
| | | export interface IotInfo { |
| | | 属性历史列表: any[]; |
| | | 床号: string; |
| | |
| | | 使用耗材字典: ConsumablesCollection | null; // 当透析状态为治疗中时该字段为null |
| | | 倒计时: ""; |
| | | 推送类型: PushType; |
| | | 透析状态: ""; |
| | | 透析状态: DialysisStatus | null; |
| | | } |
| | | |
| | | export interface BedsideAuxiliaryScreen { |
| | |
| | | | EPageType.SPHYGMOMANOMETER; |
| | | |
| | | export enum EMedStatus { |
| | | NOT_CHECKED_IN = 0, // 未签到 |
| | | SIGNED_IN = 1, // 已签到 |
| | | DURING_DIALYSIS = 2, // 透析中 |
| | | END = 2.5, // 已结束 |
| | | CHECKED = 3, // 已检查 |
| | | ARCHIVED = 4, // 已归档 |
| | | /** 未签到 */ |
| | | NOT_CHECKED_IN = 0, |
| | | /** 已签到 */ |
| | | SIGNED_IN = 1, |
| | | /** 透析中 */ |
| | | DURING_DIALYSIS = 2, |
| | | /** 已结束 */ |
| | | END = 2.5, |
| | | /** 已检查 */ |
| | | CHECKED = 3, |
| | | /** 已归档 */ |
| | | ARCHIVED = 4, |
| | | } |
| | | |
| | | export type MedStatus = |
| | |
| | | unit: string; |
| | | firstAndAddition: string; |
| | | total: string; |
| | | }; |
| | | }[]; |
| | | carePackage: any[]; |
| | | punctureNeedle: PunctureNeedle[]; |
| | | vascularAccess: VascularAccess[]; |
| | |
| | | dialyzerList: [], // 透析器列表 |
| | | pipingList: [], // 一次性使用管路列表 |
| | | dialysateList: [], // 透析液列表 |
| | | anticoagulant: { |
| | | name: "", // 抗凝剂名称 |
| | | unit: "", // 抗凝剂单位 |
| | | firstAndAddition: "", // 维持/追加剂量 |
| | | total: "", // 总量 |
| | | }, // 抗凝剂信息 |
| | | anticoagulant: [], // 抗凝剂列表 |
| | | carePackage: [], // 一次性使用透析护理包列表 |
| | | punctureNeedle: [], // 穿刺针列表 |
| | | vascularAccess: [], // 血管通路列表 |
| | |
| | | }; |
| | | |
| | | export const defaultDeviceData = (): BedsideAuxiliaryScreen => { |
| | | const pageType = cache.get('devcieCode') ? EPageType.LOADING : EPatForm.OUTPATIENT_SERVICE; |
| | | return { |
| | | devicdeNo: "", // 设备号 |
| | | recordCode: "", // 透析单code |
| | |
| | | gender: "", // 性别 |
| | | patForm: EPatForm.OUTPATIENT_SERVICE, // 患者来源 |
| | | patFormNumber: "", // 住院门诊号 |
| | | pageType: EPageType.NOT_INIT, // 当前要展示的页面 |
| | | // @ts-ignore |
| | | pageType, // 当前要展示的页面 |
| | | treatmentStatus: EMedStatus.NOT_CHECKED_IN, // 透析状态 |
| | | consumablesCollection: defaultconsumablesCollection(), // 未排班时需要的数据 |
| | | notSignedIn: defalutNotSignedIn(), // 未签到时需要的数据 |
| | |
| | | // 判断是否存在透析状态,如果不存在就是没有排班 |
| | | if (seeMsg.透析状态 === null || !seeMsg.透析状态) { |
| | | result.pageType = EPageType.UNPLANNED_SCHEDULE; |
| | | result.consumablesCollection = seeMsg?.使用耗材字典 || defaultconsumablesCollection() |
| | | result.consumablesCollection = |
| | | seeMsg?.使用耗材字典 || defaultconsumablesCollection(); |
| | | } else { |
| | | |
| | | const treatmentStatus = tryConvertToInt(seeMsg.透析状态?.透析状态) as MedStatus; |
| | | |
| | | // 这里就是有排班的 |
| | | result.treatmentStatus = treatmentStatus; |
| | | result.recordCode = seeMsg.透析状态?.透析单编号; |
| | | result.patientCode = seeMsg.透析状态?.患者编号; |
| | | result.patientName = seeMsg.透析状态?.患者姓名; |
| | | result.patientPhone = seeMsg.透析状态?.患者头像; |
| | | result.age = seeMsg.透析状态?.年龄 + ''; |
| | | result.gender = seeMsg.透析状态?.性别 + ''; |
| | | result.patForm = seeMsg.透析状态?.患者来源; |
| | | result.patFormNumber = seeMsg.透析状态?.患者门诊住院号; |
| | | |
| | | switch(treatmentStatus) { |
| | | case EMedStatus.NOT_CHECKED_IN: |
| | | result.pageType = EPageType.NOT_SIGNED_IN; |
| | | const notSignedIn = { |
| | | dialysisMode: seeMsg.透析状态?.透析方案, |
| | | dialyzerList: seeMsg.透析状态?.透析器列表, |
| | | pipingList: seeMsg.透析状态?.管路列表, |
| | | dialysateList: seeMsg.透析状态?.透析液列表, |
| | | carePackage: seeMsg.透析状态?.护理包列表, |
| | | punctureNeedle: seeMsg.透析状态?.穿刺针列表, |
| | | vascularAccess: seeMsg.透析状态?.血管通路列表, |
| | | anticoagulant: [], |
| | | } |
| | | result.notSignedIn = notSignedIn; |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | return result; |