0.0.23 • Published 10 days ago

@icreate/ics-temperature-chart v0.0.23

Weekly downloads
-
License
-
Repository
-
Last release
10 days ago

版本更新说明

  • 0.0.15 operaDaysValueColor/isHiddenTempScaleTitle/isHiddenTypesData
  • 0.0.13 1.敏感词从左侧断点 breakPointFromLeftSensitiveWordArr/painBreakFromLeftPointSensitiveWordArr 2.文字支持传入 hospDaysText/operaDaysText/postpartumDaysText /isHiddenPainLeftScale/isHiddenBreatheLeftScale/isHiddenPulseAndHeartRateLeftScale
  • 0.0.11-beta.1 1.新增 painBreakPointSensitiveWordArr(疼痛上下标敏感词,断点不连接)
  • 0.0.11-beta.0 1.可配置 temperatureTitle
  • 0.0.11 1.患者信息可配置内容和顺序 2.最左侧标注 P/T 位置调整 3.下标位置调整 4.局部打印
  • 0.0.10-beta.6 1.刻度尺显示脉搏心率 2.通过参数控制展示物理降温成功/失败 physicalCoolingSuccess,降疼痛成功/失败 dropPainSuccess
  • 0.0.10-beta.4 相交点 tooltipData 有重复项时,插入到中间位置(时间和护士分别在第一和最后)
  • 0.0.10-beta.3 物理降温/降疼痛的 tooltipData
  • 0.0.10-beta.2 相交点的 tooltip 去掉重复项
  • 0.0.10-beta.1 1.tooltip 数据动态传入(每条数据里添加 tooltipData)
  • 0.0.10-beta.0 1.tooltip 相交点提示
  • 0.0.10 1.术后天数/产后天数 2.虚线不能在图标内 3.非标时间点不连线时,标准时间点未连线 4.鼠标移入,提示框
  • 0.0.9-beta.6 1.新增属性 showOriginName(医院名称)/showTemperatureTitle(体温单标题)/showPatientInfo(患者信息)/showWeekNum(周数) 2.呼吸显示区域控制
  • 0.0.9-beta.3 显示上下标/呼吸显示位置调整
  • 0.0.9-beta.2 脉搏比例尺的问题/疼痛的非标准插入
  • 0.0.9-beta.0 补充 readMe: 增加属性 dropPainLineColor/dropPainLineWidth
  • 0.0.9 1.体温不升前后不连线 2.非标时间的展示位置(标准压线,非标居中)等
  • 0.0.8-beta.1 1.修复脉搏心率比例尺刻度问题
  • 0.0.8 1.手术日数 operaDays/产后日数 postpartumDays 分开,并添加参数 isShowOperaDays/isShowPostpartumDays 2.可传入其他类型的测量数据,参考 types 数据类型等
  • 0.0.7 1.新增字段 体温/脉搏/心率/呼吸/疼痛是否绘制,是否显示辅助呼吸图标 2.居中显示图标,上下标问题解决
  • 0.0.6 icons 实现:iconFont 改为 svg(icon 名字请参考 ics-ui 中的 icons)

说明

这是一个体温单组件

安装

npm i @icreate/ics-temperature-chart

在 vue 使用

  1. 在 vue 项目的 main.js 中引入
import TemperatureChart from '@icreate/ics-temperature-chart'
Vue.use(TemperatureChart)
  1. 在其他组件中使用
<!-- temperatureListData  初始值为null -->
<temperature-list
  v-if="temperatureListData"
  :temperatureListData="temperatureListData"
></temperature-list>

<!-- temperatureListData  初始值为{} -->
<temperature-list
  v-if="Object.keys(temperatureListData).length > 0"
  :temperatureListData="temperatureListData"
></temperature-list>

注意:通过 value 传值

数据格式:

// grParamBOS 是基础信息(例如患者信息以及表格其他数据等)
// rows 是体温/脉搏/心率/呼吸/疼痛的数据
//types 数组中  是每日一次的各类检查(例如:血压/出水量等等)
temperatureListData: {
  grParamBOS: [
    {
      originName: '测试医院名称', //医院名称
      temperatureTitle:'体温单标题',
      patientInfoData: [        //患者信息(支持顺序和内容配置)
            {
              name: 'name',   //name可自定义
              label: '姓名',
              value: '李浩'
            },
            {
              name: 'age',
              label: '年龄',
              value: '18'
            },
            {
              name: 'sex',
              label: '性别',
              value: '男'
            },
            {
              name: 'inDiagName',
              label: '诊断',
              value: '-/-'
            },
            {
              name: 'cwh',
              label: '床号',
              value: '19'
            },
            {
              name: 'hospCode',
              label: '住院号',
              value: '1001000'
            },
            {
              name: 'officeName',
              label: '科室',
              value: '内分泌科'
            }
          ],
      // name: '患者9',   //患者姓名
      // age: 66, //年龄
      // sex: '男',  //性别
      // cwh: '1011', //床号
      // hospCode: '0000000006',//住院号
      // inDiagName: '上呼吸道感染', //诊断
      // officeName: '住院科室', //科室
      beginDate: '2020-10-27', //住院开始日期  []
      hospDaysText:"自定义文本", // 住院天数改为其他文字
      operaDaysText:'自定义文本2', // 术后天数改为其他文字
      postpartumDaysText:'自定义文本3', // 产后天数改为其他文字
      hospDays: [],    //住院天数 []
      operaDays: [], //术后天数 []
      postpartumDays: [], //产后天数 []
      isShowOperaDays: true, //是否显示手术日数
      isShowPostpartumDays: true, //是否显示产后日数
      timeArr: [3, 7, 11, 15, 19, 23],   // 时间类型 [2, 6, 10, 14, 18, 22]
      weekNo: 1, //第几周
      iconDrawPosition: 'inline',   // 图标绘制位置  inline/center
      temperatureIsDraw: true, //体温是否绘制
      pulseIsDraw: true, //脉搏是否绘制
      heartRateIsDraw: true, //心率是否绘制
      breatheIsDraw: true, //呼吸是否绘制
      painIsDraw: true, //疼痛评分是否绘制
      assistedBreatheIconIsShow: true, //是否显示辅助呼吸图标
      axillaryTemperatureIconClass: "c-yewen1", //腋温图标 001
      foreheadTemperatureIconClass: "c-yewen2", //额温图标  002
      earTemperatureIconClass: "c-erwen", //耳温图标  003
      mouthTemperatureIconClass: "c-kouwen1", //口温图标 004
      analTemperatureIconClass: "c-gangwen1", //肛温图标  005
      nonStandardTemperatureIconClass: "c-gangwen1", //非标准点插入体温 图标
      pulseIconClass: "c-maibo4", //脉搏图标
      nonStandardPulseIconClass: "c-maibo1", //非标准点插入脉搏图标
      heartRateIconClass: "c-xinlv", //心率
      nonStandardHeartRateIconClass: "c-xinlv", //非标准心率图标
      breatheIconClass: "c-huxi3", //呼吸
      nonStandardBreatheIconClass: "c-huxi3", //非标准呼吸图标
      painIconClass: "c-tengtongpingfen", //疼痛
      nonStandardPainIconClass: "c-tengtongpingfen", //非标准疼痛图标
      tempMax: 40, //体温上限
      tempMin: 33, //体温下限
      pulseMax: 200, //脉搏上限
      pulseMin: 20, //脉搏下限
      breatheMax: 100, //呼吸上限
      breatheMin: 10, //呼吸下限
      painMax: 10, //疼痛上限
      painMin: 0, //疼痛下限
      tempBreakpointIsConnected: true, //体温   断点是否连线
      tempNonStandardTimeEnterIsConnected: true, //非标准时间录入体温,是否连接
      tempNonStandardTimeEnterConnectedLineType: "dashed", // 非标准时间录入体温的连线类型(solid实线/dashed虚线)
      breakPointSensitiveWordArr: ["住院", "分娩", "手术"], // 上下标敏感词,断点不连接  【默认断右侧】
      breakPointFromLeftSensitiveWordArr: ["转科"], // 上下标敏感词,断点不连接 【断左侧】
      painBreakPointSensitiveWordArr:[],// 疼痛上下标敏感词,断点不连接  【默认断右侧】
      painBreakFromLeftPointSensitiveWordArr:[], // 疼痛上下标敏感词,断点不连接 【断左侧】
      pulseBreakpointIsConnected: true, //脉搏 断点是否连线
      pulseNonStandardTimeEnterIsConnected: true, //非标准时间录入脉搏,是否连接
      pulseNonStandardTimeEnterConnectedLineType: "dashed", //非标准时间录入脉搏的连线类型(solid实线/dashed虚线)
      heartRateBreakpointIsConnected: true, //心率 断点是否连线
      heartRateNonStandardTimeEnterIsConnected: true, //非标准时间录入心率,是否连接
      heartRateNonStandardTimeEnterConnectedLineType: "dashed", //非标准时间录入心率的连线类型(solid实线/dashed虚线)
      breatheBreakpointIsConnected: true, //呼吸 断点是否连线
      breatheNonStandardTimeEnterIsConnected: true, //非标准时间录入呼吸,是否连接
      breatheNonStandardTimeEnterConnectedLineType: "dashed", //非标准时间录入呼吸的连线类型(solid实线/dashed虚线)
      painNonStandardTimeEnterIsConnected: true, //非标准时间录入疼痛,是否连接
      painNonStandardTimeEnterConnectedLineType: "dashed", //非标准时间录入疼痛的连线类型(solid实线/dashed虚线)
      pulseEqualHeartRateIconClass: "icon-maibo2", //脉搏和心率相交的图标
      isBreakPulseCrossHeartRate: true, // 脉搏心率交叉录入是否断开不连线
      arrhythmiaIsRegionalMapping: false, //心率不齐是否区域绘图
      arrhythmiaIsRegionalMappingType: "bias", //心率不齐区域绘图的绘图类型(vertical竖线/bias斜线)
      differentTypeTempIsConnected: true, // 不同体温类型之间是否连线
      tempNotRiseIsConnected: false, //体温不升是否连线
      tempSuddenRiseThresholdSet: "38", //体温突然升高 临界值设置
      tempSuddenRiseIcon: "c-tiwenmaiboxiangjiao3", //体温突然升高 图标
      tempLinePulseLineIsAddRemark: true, //体温线 脉搏线 是否增加标注
      physicalCoolingSuccessIconClass: "c-wulijiangwen1", //物理降温图标
      physicalCoolingFailedIconClass: "c-wulijiangwenshibai1", //物理降温失败图标
      assistedBreatheIconClass: "c-fuzhuhuxi", //辅助呼吸图标
      pacemakerHeartRateIconClass: "c-qiboxinlv1", //起搏心率图标
      dropPainSuccessIconClass: "c-jiangtengtongpingfen1", //降疼痛成功图标
      dropPainFailedIconClass: "c-jiangtengtongpingfen2", //降疼痛失败图标
      tempEqualBreatheIconClass: "c-tiwenhuxixiangjiao", //体温呼吸相交图标
      tempEqualHeartRateIconClass: "c-tiwenhuxixiangjiao1", //体温心率相交图标
      axillaryTempEqualPulseIconClass: "c-tiwenmaiboxiangjiao1", //腋温脉搏相交图标
      mouthTempEqualPulseIconClass: "c-tiwenmaiboxiangjiao2", //口温脉搏相交图标
      earTempEqualPulseIconClass: "c-tiwenmaiboxiangjiao3", //耳温脉搏相交图标
      analTempEqualPulseIconClass: "c-tiwenmaiboxiangjiao4", //肛温脉搏相交图标
      foreheadTempEqualPulseIconClass: "c-tiwenmaiboxiangjiao5", //额温脉搏相交图标
      pulseEqualBreatheIconClass: "c-huximaiboxiangjiao1", //脉搏呼吸相交
      tempNotRiseIconClass: "c-tiwenmaiboxiangjiao2", //体温不升图标showTemperatureTitle
      tempLineColor: "blue",//体温线条颜色
      tempLineWidth: "1px",//体温线条粗细
      physicalCoolingLineColor: "red",//物理降温线条颜色
      physicalCoolingLineWidth: "1px",//物理降温线条粗细
      pulseLineColor: "red",//脉搏线条颜色
      pulseLineWidth: "1px",//脉搏线条粗细
      heartRateLineColor: "red", //心率线条颜色
      heartRateLineWidth: '1px',//心率线条粗细
      breatheLineColor: "black", //呼吸线条颜色
      breatheLineWidth: "1px",//呼吸线条粗细
      painLineColor: "black", //疼痛线条颜色
      painLineWidth: "1px",//疼痛线条粗细
      dropPainLineColor: "red", //降疼痛线条颜色
      dropPainLineWidth: "1px", //降疼痛线条粗细
      showOriginName: false, //是否显示医院名称
      showTemperatureTitle:false,//是否显示体温单标题(即体温单三个字)
      showPatientInfo: false, //是否显示患者信息
      showWeekNum: false, //是否显示第几周
      tempNonStandardTimeIsDraw:true,//非标时间点是否绘制
      pulseNonStandardTimeIsDraw:true,
      heartRateNonStandardTimeIsDraw:true,
      breatheNonStandardTimeIsDraw:true,
      painNonStandardTimeIsDraw:true,
      isHiddenPainLeftScale: true, // 隐藏疼痛左侧比例尺
      isHiddenBreatheLeftScale: true, // 隐藏呼吸左侧比例尺
      isHiddenPulseAndHeartRateLeftScale: true ,// 隐藏脉搏心率左侧比例尺
      operaDaysValueColor: 'red', // 术后天数的天数颜色
      isHiddenTempScaleTitle: true, // 隐藏体温单比例尺的头部
      isHiddenTypesData: true ,// 隐藏体温单底部数据(例如:血压、出入量等)
      isHiddenAmAndPm:true // 隐藏上午跟下午
}
  ],
  rows: [
    //每条数据的属性值可以是空值,但每条数据都必须有
    // {
    //   date: "",//日期
    //   times: "",//时间
    //   typeCode: "",//体温类型  001腋温 002额温  003耳温 004口温 005肛温 006脉搏 007心率 008呼吸 009疼痛
    //   typeValue: "",// 体温值  脉搏值 心率值 呼吸值  疼痛值
    //   physicalCoolingVal: "",//物理降温值
    //   physicalCoolingSuccess:true ,//物理降温成功/失败
    //   pacemakerHeartRate: false,//是否是起搏心率
    //   assistedBreathe: false,//是否辅助呼吸
    //   dropPainVal: '',//降疼痛值
    //   dropPainSuccess:true,//降疼痛成功/失败
    //   superscript: "",//上标
    //   subscript: '',//下标
      // tooltipData: [        //tooltipData 支持动态传入
      //           {
      //             label: "日期",
      //             value: "2022-09-23",
      //           },
      //           {
      //             label: "口温",
      //             value: "38.4℃",
      //           },
      //           {
      //             label: "护士姓名",
      //             value: "小洁",
      //           },
      //         ],
    // }
    {
      //体温数据
      tempData: [
        {
          date: '2020-12-25',
          times: '03:00:00',
          typeCode: '001',  //腋温
          typeValue: '37'
        },
        {
          date: '2020-12-25',
          times: '07:00:00',
          typeCode: '001',
          typeValue: '36.5'
        },
        {
          date: '2020-12-25',
          times: '11:00:00',
          typeCode: '004',  //口温
          typeValue: '37'
        }
        ...
      ],
      //脉搏
      pulseData: [
        {
          date: '2020-12-25',
          times: '03:00:00',
          typeCode: '006',
          typeValue: '72'
        }
        ...
      ],
      //心率
      heartRateData: [
        {
          date: '2020-12-25',
          times: '03:00:00',
          typeCode: '007',
          typeValue: '72'
        }
        ...
      ],
      //呼吸
      breatheData: [
        {
          date: '2020-12-25',
          times: '03:00:00',
          typeCode: '008',
          typeValue: '16'
        }
        ...
      ],
      //疼痛
      painData: [
        {
          date: '2020-12-25',
          times: '03:00:00',
          typeCode: '009',
          typeValue: '7'
        }
        ...
      ],
      //上下标
      remarkList: [
        {
          date: '2020-12-25',
          times: '03:00:00',
          superscript: "住院",
          subscript: ""
        }
        ...
      ]
    },
  ],
  types: [
    //每日一次的测量数据(血压/出量/入量/大便...)
    // {
    //   date: '2020-12-25 00:00:00', //日期时间
    //   times: null,
    //   typeCode: '016',   //数据类型
    //   typeLabel: "血压(mmHg)",  //数据名称
    //   typeValue: null   //数据值
    // },

// 血压(mmHg)  01(typeCode)
// 入量(ml)   02
// 出量(ml)  03
// 大便(次)   04
// 小便(次)   05
// 身高(cm)   06
// 体重(kg)   07
// 过敏药物   08
//-------------后面按typeCode顺序,可以添加数据
//例如
//饮食(次)  09

        {
          date: "2020-12-25 00:00:00",
          times: null,
          typeCode: "01",
          typeLabel: "血压(mmHg)",
          typeValue: "110/70",
        },
        {
          date: "2020-12-25 00:00:00",
          times: null,
          typeCode: "02",
          typeLabel: "入量(ml)",
          typeValue: "1000",
        },
    ...
  ]
}