Files
his/openhis-ui-vue3/src/action/nurseStation/temperatureSheet/config.js
zhangfei 9c3e603b94 Fix Bug #443: 手术计费:点击签发耗材时异常报错
当手术计费弹窗中点击"签发"耗材时,因耗材的locationId(发放库房)为空导致后端异常。
在DoctorStationAdviceAppServiceImpl.handDevice方法中,当locationId为null时,使用登录用户的科室ID作为默认值,
与NurseBillingAppService中的处理方式保持一致。
2026-05-08 09:14:18 +08:00

209 lines
5.4 KiB
JavaScript
Executable File
Raw 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.

import dayjs from 'dayjs';
import {getBottomKeys, getInfoKeys, HospitalName, showPainFlag, temperatureName,} from './template';
// 存放体温单的配置信息
export const Header = {
HospitalName,
temperatureName,
};
// 患者信息
export const INFO_KEYS = getInfoKeys();
// 头部信息标签
export const TOP_KEYS = [
{
name: '日 期',
getValue: (i, renderData) => {
const { beginDate, outdate = '', hospDate = '', dateClosed } = renderData.infoData;
const tieml = new Date();
const timeNew = new Date((tieml / 1000 + 86400) * 1000);
const todayDate = dayjs(timeNew).format('YYYY-MM-DD');
const endDate = dayjs(outdate).format('YYYY-MM-DD');
let eachDate = dayjs(beginDate).add(i, 'day');
const eachTime = eachDate.format('YYYY-MM-DD');
if (eachTime === endDate || eachTime === todayDate) {
dateClosed.stopTime = true;
}
// 统一补零格式:月份和日期都始终两位补零
const month = eachDate.format('MM'); // 月份始终两位补零
const date = eachDate.format('DD'); // 日期始终两位补零
// 每月1号显示 MM月DD日其他日期只显示 DD日
return `${month}${date}`;
},
},
{
name: '住院日数',
getValue: (i, renderData) => {
const { beginDate, hospDays, outdate = '', dateClosed } = renderData.infoData;
const beginDayjs = dayjs(beginDate);
let num = '';
// 只要 beginDate 有效,每一天都计算显示住院日数
if (beginDayjs.isValid()) {
if (hospDays !== undefined && hospDays !== null) {
num = hospDays + i + 1;
} else {
// hospDays 不存在时,从入院开始直接计算
num = i + 1;
}
}
let hosNum = '';
if (num !== '') {
hosNum = '第' + '\xa0\xa0\xa0' + num + '\xa0\xa0\xa0' + '日';
} else {
hosNum = '第' + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + '日';
}
return hosNum;
},
},
{
name: '术/娩后日数',
getValue: (i, renderData) => {
const { beginDate } = renderData.infoData;
const surgeryNumDays = renderData.surgeryNumDays;
const eachTime = dayjs(beginDate).add(i, 'day').format('YYYY-MM-DD');
let num = surgeryNumDays.filter((item) => item.date === eachTime);
let hosNum = '';
if (num.length > 0) {
hosNum = '第' + '\xa0\xa0\xa0' + num[0].typeValue + '\xa0\xa0\xa0' + '日';
} else {
hosNum = '第' + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + '日';
}
return hosNum;
},
},
];
// 最底部的字段绘制
export const BOTTOM_KEYS = getBottomKeys();
// 是否显示疼痛评分
export const showPain = showPainFlag;
/** *********** 以下是固定选项 **************************/
export const timeNumber = [2, 6, 10, 14, 18, 22]; // 时间展示
export const nightTime = [2, 18, 22]; // 夜间红色高亮时间
export const leftTEXT = [
['脉搏,(次/分),', '180', '160', '140', '120', '100', '80', '60', '40'],
['体温,(℃), ', '42', '41', '40', '39', '38', '37', '36', '35'],
];
export const painTEXT = [['疼 痛 强 度'], ['10', '8', '6', '4', '2', '0']];
export const inOutItem = ['入观', '分娩', '手术', '转入', '出观', '死亡'];
export const otherItem = ['外出', '请假', '拒测', '离院', '其他'];
export const sheetOptions = {
locations: [
{
code: '1',
display: '体温',
},
{
code: '2',
display: '口温',
},
{
code: '3',
display: '肛温',
},
{
code: '4',
display: '耳温',
},
],
breath: [
{
code: '',
display: '自主呼吸',
},
{
code: '®',
display: '机械通气',
},
],
poop: [
{
code: '',
display: '正常',
},
{
code: '※',
display: '失禁',
},
{
code: '☆',
display: '人工肛门',
},
{
code: '/E',
display: '灌肠',
},
],
pee: [
{
code: '',
display: '正常',
},
{
code: '※',
display: '失禁',
},
{
code: 'C+',
display: '导尿',
},
],
heart: ['窦性心律', '起搏心律', '房性心律', '异常心律'],
weight: ['正常', '卧床', '轮椅', '平车'],
};
// 此处是显示数字的 要和leftTEXT保持一直
export const bodyTemperature = [33, 43];
export const starNumEnv = bodyTemperature[0]; // 开始体温
export const endNumEnv = bodyTemperature[1]; // 结束体温
export const heartRange = [0, 200];
export const painScore = [0, 10];
// 中间图表字段对应
export const CHART_KEYS = [
{
key: '001',
code: 'breath',
name: '呼吸',
},
{
key: '002',
code: 'sphygmus',
name: '脉搏',
},
{
key: '003',
code: 'temperature',
name: '体温',
},
{
key: '012',
code: 'inOut',
name: '特殊标记',
},
{
key: '013',
code: 'refuse',
name: '标记内容',
},
{
key: '014',
code: 'heartRate',
name: '心率',
},
{
key: '015',
code: 'lowerTemp',
name: '物理降温',
},
{
key: '016',
code: 'painScore',
name: '疼痛评分',
},
];
export const HEAD_HEIGHT = 120; // 头部文字预留位置
export const LINE_HEIGHT = 20; // 一行的行高
export const textLeftMargin = 4; // 文字左边边距
export const TEXT_MARGIN_BOTTOM = 6; // 文字向上偏移量
export const symbolArrowHeight = 20;