import { rt_ctx } from '@lm_fe/env';
import { defineFormConfig } from '@lm_fe/service';
var React = rt_ctx.React;
var mchcEnv = rt_ctx.mchcEnv;
var form_config = defineFormConfig([{
  title: '姓名',
  dataIndex: ['admission', 'name'],
  ellipsis: true,
  width: 64
}, {
  title: '住院号',
  dataIndex: ['admission', 'inpatientNO'],
  ellipsis: true
}, {
  title: '证件号码',
  dataIndex: ['admission', 'idNO'],
  width: 168,
  render: function render(text) {
    if (mchcEnv.is_primary) return text;
    var reg = /(\w{4})\w*(\w{4})/g;
    if (text) {
      return text.replace(reg, '$1****$2');
    }
    return '';
  }
}, {
  title: '分娩孕周',
  dataIndex: 'labourWeek',
  width: 80
}, {
  title: '分娩日期',
  dataIndex: 'labourDate',
  width: 90
}, {
  title: '分娩时间',
  dataIndex: 'labourTime',
  width: 90
}, {
  title: '第一产程',
  dataIndex: 'firststage',
  width: 90,
  render: function render(value, rowData) {
    return "".concat(Number(rowData.firststageh), " \u65F6 ").concat(Number(rowData.firststagem), "\u5206");
  }
}, {
  title: '第二产程',
  dataIndex: 'secondstage',
  width: 90,
  render: function render(value, rowData) {
    return "".concat(Number(rowData.secondstageh), " \u65F6 ").concat(Number(rowData.secondstagem), "\u5206");
  }
}, {
  title: '第三产程',
  dataIndex: 'thirdstage',
  width: 90,
  render: function render(value, rowData) {
    return "".concat(Number(rowData.thirdstageh), " \u65F6 ").concat(Number(rowData.thirdstagem), "\u5206");
  }
}, {
  title: '胎儿信息',
  align: 'center',
  children: [{
    title: '性别',
    dataIndex: ['admission', 'noenateRecords'],
    key: 'admission.noenateRecords.gender',
    width: 40,
    align: 'center',
    render: function render(text) {
      if (mchcEnv.is_primary) return mchcEnv.expect_array(text).map(function (_) {
        return mchcEnv.get_option_label('性别3', _ === null || _ === void 0 ? void 0 : _.gender);
      });
      var obj = {
        1: '男',
        2: '女',
        3: '不详'
      };
      return text === null || text === void 0 ? void 0 : text.map(function (item) {
        return /*#__PURE__*/React.createElement("div", {
          key: item.id
        }, obj[item.gender]);
      });
    }
  }, {
    title: '体重(g)',
    dataIndex: ['admission', 'noenateRecords'],
    key: 'admission.noenateRecords.weight',
    width: 60,
    render: function render(text) {
      return text === null || text === void 0 ? void 0 : text.map(function (item) {
        return /*#__PURE__*/React.createElement("div", null, item.weight);
      });
    }
  }, {
    title: '身长(cm)',
    dataIndex: ['admission', 'noenateRecords'],
    key: 'admission.noenateRecords.height',
    width: 60,
    render: function render(text) {
      return text === null || text === void 0 ? void 0 : text.map(function (item) {
        return /*#__PURE__*/React.createElement("div", null, item.height);
      });
    }
  }, {
    title: '阿氏评分1',
    dataIndex: ['admission', 'noenateRecords'],
    key: 'admission.noenateRecords.apgar1',
    width: 60,
    render: function render(text) {
      return text === null || text === void 0 ? void 0 : text.map(function (item) {
        return /*#__PURE__*/React.createElement("div", null, item.apgar1);
      });
    }
  }, {
    title: '阿氏评分2',
    dataIndex: ['admission', 'noenateRecords'],
    key: 'admission.noenateRecords.apgar5',
    width: 60,
    render: function render(text) {
      return text === null || text === void 0 ? void 0 : text.map(function (item) {
        return /*#__PURE__*/React.createElement("div", null, item.apgar5);
      });
    }
  }, {
    title: '阿氏评分3',
    dataIndex: ['admission', 'noenateRecords'],
    key: 'admission.noenateRecords.apgar10',
    width: 60,
    render: function render(text) {
      return text === null || text === void 0 ? void 0 : text.map(function (item) {
        return /*#__PURE__*/React.createElement("div", null, item.apgar10);
      });
    }
  }, {
    title: '出生缺陷',
    dataIndex: ['admission', 'noenateRecords'],
    key: 'admission.noenateRecords.birthInjury',
    width: 100,
    render: function render(text) {
      return text === null || text === void 0 ? void 0 : text.map(function (item) {
        return /*#__PURE__*/React.createElement("div", null, item.birthInjury);
      });
    }
  }, {
    title: '分娩方式',
    dataIndex: ['admission', 'noenateRecords'],
    key: 'admission.noenateRecords.deliverytype',
    width: 100,
    render: function render(text) {
      if (mchcEnv.is_primary) return mchcEnv.expect_array(text).map(function (_) {
        return mchcEnv.get_option_label('分娩方式', _ === null || _ === void 0 ? void 0 : _.deliverytype);
      }).join(',');
      var obj = mchcEnv.is('郫都') ? {
        1: '顺产',
        2: '剖宫产',
        3: '胎吸',
        4: '钳产',
        5: '臀助产',
        6: '臀牵引',
        7: '阴道助产',
        8: '人工引产',
        9: '人工流产',
        10: '药物流产',
        11: '自然流产'
      } : {
        1: '自然产',
        2: '剖宫产',
        3: '吸引产',
        4: '钳产',
        5: '臀助产',
        6: '臀引产',
        7: '其他'
      };
      return text === null || text === void 0 ? void 0 : text.map(function (item, index) {
        return /*#__PURE__*/React.createElement("div", {
          key: item.id
        }, obj[item.deliverytype]);
      });
    }
  }, {
    title: '胎方位',
    dataIndex: ['admission', 'noenateRecords'],
    key: 'admission.noenateRecords.fetalposition',
    inputType: 'MS',
    inputProps: {
      uniqueKey: 'NoenateRecord.fetalposition'
    },
    width: 100,
    render: function render(text) {
      if (mchcEnv.is_primary) return mchcEnv.expect_array(text).map(function (_) {
        return mchcEnv.get_option_label('胎方位22', +(_ === null || _ === void 0 ? void 0 : _.fetalposition));
      }).join(',');
      var obj = {
        1: '左枕前(LOA)',
        2: '左枕横(LOT)',
        3: '左枕后(LOP)',
        4: '右枕前(ROA)'
      };
      return text === null || text === void 0 ? void 0 : text.map(function (item, index) {
        return /*#__PURE__*/React.createElement("div", {
          key: item.id
        }, obj[item.fetalposition]);
      });
    }
  }]
}]);
export { form_config as default };
//# sourceMappingURL=pages.deliver-management.labour-record2.js.map
