import { d as __assign } from './index.js';
import { rt_ctx } from '@lm_fe/env';
import 'react';
import 'antd/es/tabs/style';
import 'antd/es/tabs';
import 'lodash/size';
import 'lodash/get';
import '@lm_fe/utils';
import 'lodash/orderBy';
import 'lodash/map';
import '@lm_fe/components';
import 'antd/es/collapse/style';
import 'antd/es/collapse';
import 'antd/es/badge/style';
import 'antd/es/badge';
import 'antd/es/button/style';
import 'antd/es/button';
import 'lodash/assign';
import '@ant-design/icons';
import '@lm_fe/components_m';
import '@lm_fe/service';
import '@lm_fe/pages';
var ctx = rt_ctx;
var React = ctx.React;
React.createElement;
function get_table_columns_广三() {
  return [{
    title: '日期',
    width: 70,
    dataIndex: 'visitDate',
    align: 'center'
  }, {
    title: '孕周',
    dataIndex: 'gestationalWeek',
    width: 40,
    align: 'center'
  }, {
    title: '主诉',
    dataIndex: ['chiefComplaint'],
    align: 'center'
  }, {
    title: function title() {
      return /*#__PURE__*/React.createElement("span", null, "\u8840\u538B", /*#__PURE__*/React.createElement("em", null, "mmHg"));
    },
    width: 100,
    dataIndex: 'physicalExam',
    align: 'center',
    ellipsis: true,
    render: function render(pe) {
      if (!pe) return '';
      var x1 = pe.systolic && pe.diastolic ? "\u9996:".concat(pe.systolic, "/").concat(pe.diastolic, "\uFF1B") : '';
      var x2 = pe.systolic2 && pe.diastolic2 ? "\u4E8C:".concat(pe.systolic2, "/").concat(pe.diastolic2, "\uFF1B") : '';
      var x3 = pe.systolic3 && pe.diastolic3 ? "\u4E09:".concat(pe.systolic3, "/").concat(pe.diastolic3, "\uFF1B") : '';
      return "".concat(x1, " ").concat(x2, " ").concat(x3);
    }
  }, {
    title: function title() {
      return /*#__PURE__*/React.createElement("span", null, "\u8109\u640F", /*#__PURE__*/React.createElement("em", null, "\u6B21/\u5206"));
    },
    width: 40,
    dataIndex: ['physicalExam', 'pulse'],
    align: 'center'
  }, {
    title: function title() {
      return /*#__PURE__*/React.createElement("span", null, "\u4F53\u91CD", /*#__PURE__*/React.createElement("em", null, "kg"));
    },
    dataIndex: ['physicalExam', 'weight'],
    width: 40,
    align: 'center'
  }, ctx.mchcEnv["in"](['广三']) ? {
    title: function title() {
      return /*#__PURE__*/React.createElement("em", null, "\u5B55\u671F\u4F53\u91CD\u589E\u52A0");
    },
    dataIndex: ['physicalExam', 'weightGain'],
    width: 60,
    align: 'center'
  } : undefined, {
    title: function title() {
      return /*#__PURE__*/React.createElement("span", null, "\u5BAB\u9AD8", /*#__PURE__*/React.createElement("em", null, "cm"));
    },
    dataIndex: ['gynExam', 'fundalHeight'],
    width: 40,
    align: 'center'
  }, {
    title: function title() {
      return /*#__PURE__*/React.createElement("span", null, "\u8179\u56F4", /*#__PURE__*/React.createElement("em", null, "cm"));
    },
    dataIndex: ['gynExam', 'waistHip'],
    width: 40,
    align: 'center'
  }, __assign(__assign({}, gen_fetal_info('胎动')), {
    render: function render(value) {
      var arr = value || [];
      return arr.map(function (_) {
        return _['fetalMovement'];
      }).join('/');
    }
  }), __assign(__assign({}, gen_fetal_info('胎心率')), {
    render: function render(value) {
      var arr = value || [];
      return arr.map(function (_) {
        return _['fetalHeartRate'];
      }).join('/');
    }
  }), __assign(__assign({}, gen_fetal_info('位置')), {
    render: function render(value) {
      var arr = value || [];
      return arr.map(function (_) {
        return _['position'];
      }).join('/');
    }
  }), __assign(__assign({}, gen_fetal_info('胎方位')), {
    render: function render(value) {
      var arr = value || [];
      return arr.map(function (_) {
        return _['fetalPosition'];
      }).join('/');
    }
  }), __assign(__assign({}, gen_fetal_info('先露')), {
    render: function render(value) {
      var arr = value || [];
      return arr.map(function (_) {
        return _['presentation'];
      }).join('/');
    }
  }), {
    title: '处置',
    width: 80,
    ellipsis: true,
    dataIndex: ['prescription'],
    align: 'center'
  }, {
    title: '辅助检查',
    width: 80,
    ellipsis: true,
    dataIndex: ['exam'],
    align: 'center'
  }, {
    title: '其他体征',
    dataIndex: ['cardiacDisease', 'otherNote'],
    width: 80,
    ellipsis: true,
    align: 'center'
  }, {
    title: '嘱托',
    dataIndex: ['advice'],
    width: 80,
    ellipsis: true,
    align: 'center'
  }].filter(function (_) {
    return _;
  });
}
function get_table_columns_default() {
  return [{
    title: '日期',
    width: 90,
    dataIndex: 'visitDate',
    align: 'center'
  }, {
    title: '孕周',
    dataIndex: 'gestationalWeek',
    width: 40,
    align: 'center'
  }, {
    title: '主诉',
    dataIndex: ['chiefComplaint'],
    width: 140
  }, {
    title: function title() {
      return /*#__PURE__*/React.createElement("span", null, "\u8840\u538B", /*#__PURE__*/React.createElement("em", null, "mmHg"));
    },
    width: 100,
    dataIndex: 'physicalExam',
    align: 'center',
    ellipsis: true,
    render: function render(pe) {
      if (!pe) return '';
      var x1 = pe.systolic && pe.diastolic ? "\u9996:".concat(pe.systolic, "/").concat(pe.diastolic, ";") : '';
      var x2 = pe.systolic2 && pe.diastolic2 ? "\u4E8C:".concat(pe.systolic2, "/").concat(pe.diastolic2, ";") : '';
      var x3 = pe.systolic3 && pe.diastolic3 ? "\u4E09:".concat(pe.systolic3, "/").concat(pe.diastolic3, ";") : '';
      return "".concat(x1, " ").concat(x2, " ").concat(x3);
    }
  }, {
    title: function title() {
      return /*#__PURE__*/React.createElement("span", null, "\u8109\u640F", /*#__PURE__*/React.createElement("em", null, "\u6B21/\u5206"));
    },
    width: 40,
    dataIndex: ['physicalExam', 'pulse'],
    align: 'center'
  }, {
    title: function title() {
      return /*#__PURE__*/React.createElement("span", null, "\u8EAB\u9AD8", /*#__PURE__*/React.createElement("em", null, "cm"));
    },
    dataIndex: ['physicalExam', 'height'],
    width: 50,
    align: 'center'
  }, {
    title: function title() {
      return /*#__PURE__*/React.createElement("span", null, "\u4F53\u91CD", /*#__PURE__*/React.createElement("em", null, "kg"));
    },
    dataIndex: ['physicalExam', 'weight'],
    width: 50,
    align: 'center'
  }, {
    title: 'bmi',
    width: 50,
    hidden: !ctx.mchcEnv["in"](['广州市八']),
    dataIndex: ['physicalExam', 'bmi'],
    align: 'center'
  }, {
    title: function title() {
      return /*#__PURE__*/React.createElement("span", null, "\u5BAB\u9AD8", /*#__PURE__*/React.createElement("em", null, "cm"));
    },
    dataIndex: ['gynExam', 'fundalHeight'],
    width: 40,
    align: 'center'
  }, {
    title: function title() {
      return /*#__PURE__*/React.createElement("span", null, "\u8179\u56F4", /*#__PURE__*/React.createElement("em", null, "cm"));
    },
    dataIndex: ['gynExam', 'waistHip'],
    width: 40,
    align: 'center'
  }, __assign(__assign({}, gen_fetal_info('胎心率')), {
    render: function render(value) {
      var arr = value || [];
      return arr.map(function (_) {
        return _['fetalHeartRate'];
      }).join('/');
    }
  }), __assign(__assign({}, gen_fetal_info('先露')), {
    render: function render(value) {
      var arr = value || [];
      return arr.map(function (_) {
        return _['presentation'];
      }).join('/');
    }
  }), {
    title: '下肢水肿',
    dataIndex: ['edema'],
    width: 40,
    align: 'center',
    render: function render(value, record, index) {
      return {
        "null": '',
        '': '',
        1: '-',
        2: '+',
        3: '++',
        4: '+++',
        5: '++++'
      }[value];
    }
  }, {
    title: '其他体征',
    dataIndex: ['cardiacDisease', 'otherNote'],
    width: 120,
    ellipsis: true,
    align: 'center'
  }, {
    title: '辅助检查',
    width: 80,
    ellipsis: true,
    hidden: ctx.mchcEnv["in"](['广州市八']),
    dataIndex: ['exam'],
    align: 'center'
  }, {
    title: '处理措施',
    dataIndex: ['prescription'],
    align: 'center'
  }, {
    title: '下次复诊',
    dataIndex: ['resetAppoint'],
    width: 80,
    ellipsis: true,
    align: 'center',
    render: function render(value, record, index) {
      var appointmentDate = record.appointmentDate,
        appointmentPeriod = record.appointmentPeriod,
        appointmentType = record.appointmentType;
      if (!appointmentDate) return '-';
      var str1 = appointmentDate.slice(5),
        str2 = '',
        str3 = '';
      if (appointmentPeriod) {
        var period = appointmentPeriod === '1' ? '上午' : '下午';
        str2 = period.slice(0, 1);
      }
      if (appointmentType) {
        var options = ctx.mchcEnv.get_other_options('appointmentTypeOptions').find(function (_) {
          return _.value == appointmentType;
        });
        str3 = options ? options.label || '' : '';
      }
      return "".concat(str1, " ").concat(str2, " ").concat(str3.slice(0, 1));
    }
  }, {
    title: '医生',
    dataIndex: ['doctorName'],
    ellipsis: true,
    width: 50,
    align: 'center'
  }];
}
function get_table_columns() {
  var arr = ctx.mchcEnv.is('广三') ? get_table_columns_广三() : get_table_columns_default();
  return arr.filter(function (_) {
    return !_.hidden;
  });
}
function gen_fetal_info(title, key) {
  return {
    title: title,
    dataIndex: ['fetusExam'],
    width: 60,
    align: 'center'
  };
}
export { get_table_columns as default };
//# sourceMappingURL=prenatal-visit.pregnancy.doctor-end14.js.map
