import React__default, { lazy, useEffect, Component, useState, useRef } from 'react';
import { mchcStore, mchcUtils } from '@lm_fe/env';
import 'antd/es/tabs/style';
import _Tabs from 'antd/es/tabs';
import _size from 'lodash/size';
import _get from 'lodash/get';
import { request, getSearchParamsValue, filter_obj_to_url_search, getFutureDate, formatDateTime } from '@lm_fe/utils';
import _orderBy from 'lodash/orderBy';
import _map from 'lodash/map';
import { LazyAntd, MyLazyComponent } from '@lm_fe/components';
import 'antd/es/collapse/style';
import _Collapse from 'antd/es/collapse';
import 'antd/es/badge/style';
import _Badge from 'antd/es/badge';
import 'antd/es/button/style';
import _Button from 'antd/es/button';
import _assign from 'lodash/assign';
import { CalendarOutlined } from '@ant-design/icons';
import { LoadingPlaceholder, DoctorEnd_SurveyReport_Report, formatTimeToDate } from '@lm_fe/components_m';
import { SMchc_Admission } from '@lm_fe/service';
import { mchcModal__ } from '@lm_fe/pages';
var DoctorEnd_Initial_ = /*#__PURE__*/lazy(function () {
  return import('./prenatal-visit.pregnancy.doctor-end.js');
});
function DoctorEnd_Initial(props) {
  return /*#__PURE__*/React__default.createElement(DoctorEnd_Initial_, props);
}
var DoctorEnd_Further_ = /*#__PURE__*/lazy(function () {
  return import('./DoctorEnd_FurtherPage.js').then(function (n) {
    return n.D;
  });
});
function DoctorEnd_Further(props) {
  useEffect(function () {
    mchcStore.state;
    return function () {};
  }, []);
  return /*#__PURE__*/React__default.createElement(DoctorEnd_Further_, props);
}

/******************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */

var _extendStatics = function extendStatics(d, b) {
  _extendStatics = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (d, b) {
    d.__proto__ = b;
  } || function (d, b) {
    for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
  };
  return _extendStatics(d, b);
};
function __extends(d, b) {
  if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  _extendStatics(d, b);
  function __() {
    this.constructor = d;
  }
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var _assign2 = function __assign() {
  _assign2 = Object.assign || function __assign(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];
      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
    }
    return t;
  };
  return _assign2.apply(this, arguments);
};
function __rest(s, e) {
  var t = {};
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  }
  return t;
}
function __awaiter(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }
  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator(thisArg, body) {
  var _ = {
      label: 0,
      sent: function sent() {
        if (t[0] & 1) throw t[1];
        return t[1];
      },
      trys: [],
      ops: []
    },
    f,
    y,
    t,
    g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
  return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function () {
    return this;
  }), g;
  function verb(n) {
    return function (v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f) throw new TypeError("Generator is already executing.");
    while (g && (g = 0, op[0] && (_ = 0)), _) try {
      if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
      if (y = 0, t) op = [op[0] & 2, t.value];
      switch (op[0]) {
        case 0:
        case 1:
          t = op;
          break;
        case 4:
          _.label++;
          return {
            value: op[1],
            done: false
          };
        case 5:
          _.label++;
          y = op[1];
          op = [0];
          continue;
        case 7:
          op = _.ops.pop();
          _.trys.pop();
          continue;
        default:
          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
            _ = 0;
            continue;
          }
          if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
            _.label = op[1];
            break;
          }
          if (op[0] === 6 && _.label < t[1]) {
            _.label = t[1];
            t = op;
            break;
          }
          if (t && _.label < t[2]) {
            _.label = t[2];
            _.ops.push(op);
            break;
          }
          if (t[2]) _.ops.pop();
          _.trys.pop();
          continue;
      }
      op = body.call(thisArg, _);
    } catch (e) {
      op = [6, e];
      y = 0;
    } finally {
      f = t = 0;
    }
    if (op[0] & 5) throw op[1];
    return {
      value: op[0] ? op[1] : void 0,
      done: true
    };
  }
}
function __spreadArray(to, from, pack) {
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
    if (ar || !(i in from)) {
      if (!ar) ar = Array.prototype.slice.call(from, 0, i);
      ar[i] = from[i];
    }
  }
  return to.concat(ar || Array.prototype.slice.call(from));
}
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
  var e = new Error(message);
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
var tabToModuleName = {
  'tab-0': 'prenatal-examination-present',
  'tab-1': 'prenatal-examination-past',
  'tab-2': 'prenatal-examination-other',
  'tab-3': 'prenatal-examination-pregnancy-history',
  'tab-4': 'prenatal-examination-physical',
  'tab-5': 'prenatal-examination-special',
  'tab-6': 'prenatal-examination-survey',
  'tab-7': 'prenatal-examination-diagnoses'
};
var initial = {
  getFormConfig: function getFormConfig() {
    return __awaiter(void 0, void 0, void 0, function () {
      var formPresent, _a, formPast, _b, formOther, _c, formPregnancyHistory, _d, formPhysical, _e, formSpecial, _f, formSurvey, _g, formDiagnoses, _h;
      return __generator(this, function (_j) {
        switch (_j.label) {
          case 0:
            _a = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-present")];
          case 1:
            formPresent = _a.apply(void 0, [_j.sent().data, 0]) || {};
            _b = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-past")];
          case 2:
            formPast = _b.apply(void 0, [_j.sent().data, 0]) || {};
            _c = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-other")];
          case 3:
            formOther = _c.apply(void 0, [_j.sent().data, 0]) || {};
            _d = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-pregnancy-history")];
          case 4:
            formPregnancyHistory = _d.apply(void 0, [_j.sent().data, 0]) || {};
            _e = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-physical")];
          case 5:
            formPhysical = _e.apply(void 0, [_j.sent().data, 0]) || {};
            _f = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-special")];
          case 6:
            formSpecial = _f.apply(void 0, [_j.sent().data, 0]) || {};
            _g = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-survey")];
          case 7:
            formSurvey = _g.apply(void 0, [_j.sent().data, 0]) || {};
            _h = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-diagnoses")];
          case 8:
            formDiagnoses = _h.apply(void 0, [_j.sent().data, 0]) || {};
            return [2, {
              formPresent: formPresent,
              formPast: formPast,
              formOther: formOther,
              formPregnancyHistory: formPregnancyHistory,
              formPhysical: formPhysical,
              formSpecial: formSpecial,
              formSurvey: formSurvey,
              formDiagnoses: formDiagnoses
            }];
        }
      });
    });
  },
  getFormConfigByTab: function getFormConfigByTab(tab) {
    return __awaiter(void 0, void 0, void 0, function () {
      var res;
      return __generator(this, function (_a) {
        switch (_a.label) {
          case 0:
            return [4, request.get("/api/form-descriptions?moduleName=" + tabToModuleName[tab])];
          case 1:
            res = _a.sent().data;
            return [2, _get(res, "[0]")];
        }
      });
    });
  },
  getPregnancyAnalysisResult: function getPregnancyAnalysisResult(pregnancyId) {
    return __awaiter(void 0, void 0, void 0, function () {
      return __generator(this, function (_a) {
        switch (_a.label) {
          case 0:
            return [4, request.get("/api/getPregnancyAnalysisResult?id=".concat(pregnancyId))];
          case 1:
            return [2, _a.sent().data];
        }
      });
    });
  },
  calcEddByLmp: function calcEddByLmp(lmp) {
    return request.get("/api/pregnancyCalc-calcEddByLmp?lmp=".concat(lmp)).then(function (r) {
      return r.data;
    });
  },
  calcSureEdd: function calcSureEdd(edd, menopause, gestationalWeek) {
    return request.get("/api/pregnancyCalc-calcSureEdd?edd=".concat(edd, "&menopause=").concat(menopause, "&gestationalWeek=").concat(gestationalWeek)).then(function (r) {
      return r.data;
    });
  },
  updateGesweekAlert: function updateGesweekAlert(pregnancyId, sureEdd) {
    return request.get("/api/updateGesweekAlert?pregnancyId=".concat(pregnancyId, "&sureEdd=").concat(sureEdd)).then(function (r) {
      return r.data;
    });
  },
  updateGesweekBysureEdd: function updateGesweekBysureEdd(data) {
    return request.post("/api/updateGesweekBysureEdd", data).then(function (r) {
      return r.data;
    });
  },
  autoCaseRecognition: function autoCaseRecognition(pregnancyId) {
    return request.get("/api/autoCaseRecognition?pregnancyId=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  findFirstVisitOperatingRecord: function findFirstVisitOperatingRecord(pregnancyId) {
    return request.get("/api/findFirstVisitOperatingRecord?pregnancyId=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  }
};
var further = {
  getSurveyFormConfig: function getSurveyFormConfig() {
    return __awaiter(void 0, void 0, void 0, function () {
      var formSurvey, _a;
      return __generator(this, function (_b) {
        switch (_b.label) {
          case 0:
            _a = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-survey")];
          case 1:
            formSurvey = _a.apply(void 0, [_b.sent().data, 0]) || {};
            return [2, formSurvey];
        }
      });
    });
  },
  getFurtherFormConfig: function getFurtherFormConfig() {
    return __awaiter(void 0, void 0, void 0, function () {
      var formFurther, _a;
      return __generator(this, function (_b) {
        switch (_b.label) {
          case 0:
            _a = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-further")];
          case 1:
            formFurther = _a.apply(void 0, [_b.sent().data, 0]) || {};
            return [2, formFurther];
        }
      });
    });
  },
  getUltrasoundFormConfig: function getUltrasoundFormConfig() {
    return __awaiter(void 0, void 0, void 0, function () {
      var formUltrasound, _a;
      return __generator(this, function (_b) {
        switch (_b.label) {
          case 0:
            _a = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-further-ultrasound")];
          case 1:
            formUltrasound = _a.apply(void 0, [_b.sent().data, 0]) || {};
            return [2, formUltrasound];
        }
      });
    });
  },
  syncPatientReport: function syncPatientReport(pregnancyId) {
    return request.get("/api/syncPatientReport?pregnancyId=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  checkReportSync: function checkReportSync(pregnancyId) {
    return request.get("/api/checkReportSync?pregnancyId=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  findDiagnosisOperatingRecord: function findDiagnosisOperatingRecord(pregnancyId) {
    return request.get("/api/findDiagnosisOperatingRecord?pregnancyId=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  findLackReports: function findLackReports(pregnancyId) {
    return request.get("/api/findLackReports?pregnancyId=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  buildExamTimeAxis: function buildExamTimeAxis(pregnancyId) {
    return request.get("/api/buildExamTimeAxis?pregnancyId=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  getPrenatalVisitPlans: function getPrenatalVisitPlans(pregnancyId) {
    return request.get("/api/prenatal-visit-plans?pregnancyId.equals=".concat(pregnancyId, "&sort=gestationalWeek,desc")).then(function (r) {
      return r.data;
    });
  },
  getPrenatalVisitPlanTypes: function getPrenatalVisitPlanTypes() {
    return request.get("/api/prenatal-visit-plan-types?pageSize=50&pageNumber=1").then(function (r) {
      return r.data;
    });
  },
  updatePrenatalVisitPlanTypes: function updatePrenatalVisitPlanTypes(data) {
    return request.put("/api/prenatal-visit-plan-types", data).then(function (r) {
      return r.data;
    });
  },
  addPrenatalVisitPlanTypes: function addPrenatalVisitPlanTypes(data) {
    return request.post("/api/prenatal-visit-plan-types", data).then(function (r) {
      return r.data;
    });
  },
  deletePrenatalVisitPlanTypes: function deletePrenatalVisitPlanTypes(id) {
    return request["delete"]("/api/prenatal-visit-plan-types/".concat(id)).then(function (r) {
      return r.data;
    });
  },
  newAddDiagnosis: function newAddDiagnosis(data) {
    return request.post("/api/doctor/newOrSaveDiagnosisOfOutpatient", data).then(function (r) {
      return r.data;
    });
  }
};
var postpartum = {
  getPostpartumFormConfig: function getPostpartumFormConfig() {
    return __awaiter(void 0, void 0, void 0, function () {
      var formPostpartum, _a;
      return __generator(this, function (_b) {
        switch (_b.label) {
          case 0:
            _a = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-postpartum")];
          case 1:
            formPostpartum = _a.apply(void 0, [_b.sent().data, 0]) || {};
            return [2, formPostpartum];
        }
      });
    });
  }
};
var curve = {
  getBmi: function getBmi(pregnancyId, queryType) {
    return request.get("/api/curve/bmi?pregnancyId=".concat(pregnancyId, "&queryType=").concat(queryType)).then(function (r) {
      return r.data;
    });
  },
  getFundalHeight: function getFundalHeight(pregnancyId) {
    return request.get("/api/curve/fundalHeight?pregnancyId=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  getGrowth: function getGrowth(pregnancyId) {
    return request.get("/api/curve/growth?pregnancyId=".concat(pregnancyId), {
      headers: {
        isLoading: false
      }
    }).then(function (r) {
      return r.data;
    });
  },
  updateUltrasounds: function updateUltrasounds(data) {
    return request.put("/api/ultrasounds", data, {
      headers: {
        isLoading: false
      }
    }).then(function (r) {
      return r.data;
    });
  },
  createUltrasounds: function createUltrasounds(data) {
    return request.post("/api/ultrasounds", data).then(function (r) {
      return r.data;
    });
  },
  deleteUltrasounds: function deleteUltrasounds(id) {
    return request["delete"]("/api/ultrasounds/".concat(id)).then(function (r) {
      return r.data;
    });
  }
};
var home = {
  getBloodGlucoseInHome: function getBloodGlucoseInHome(pregnancyId) {
    return request.get("/api/getBloodGlucoseInHome?pregnancyId.equals=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  getBloodPressureInHome: function getBloodPressureInHome(pregnancyId) {
    return request.get("/api/getBloodPressureInHome?pregnancyId.equals=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  getFetalMovementInHome: function getFetalMovementInHome(pregnancyId) {
    return request.get("/api/getFetalMovementInHome?pregnancyId.equals=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  }
};
var image = {
  getReportList: function getReportList(preg, type, iu) {
    var _a;
    if (type === void 0) {
      type = 1;
    }
    if (iu === void 0) {
      iu = false;
    }
    var id = (_a = preg === null || preg === void 0 ? void 0 : preg.id) !== null && _a !== void 0 ? _a : getSearchParamsValue('id');
    var filter_obj = filter_obj_to_url_search(preg);
    if (type === 1) {
      return request.get("/api/getImageExam", {
        params: _assign2(_assign2({}, filter_obj), {
          pregnancyId: id,
          count: 100,
          page: 0
        }),
        ignore_usr: iu
      }).then(function (r) {
        return r.data;
      });
    } else if (type === 2) {
      return request.get("/api/getImageExamByPrenatal", {
        params: _assign2(_assign2({}, filter_obj), {
          prenatalPatientId: id
        }),
        ignore_usr: iu
      }).then(function (r) {
        return r.data;
      });
    }
    return [];
  },
  getOuterReports: function getOuterReports(params, ignore_usr) {
    return __awaiter(this, void 0, void 0, function () {
      var OuterReports, finalData;
      return __generator(this, function (_a) {
        switch (_a.label) {
          case 0:
            return [4, request.get("/api/outer-reports", {
              ignore_usr: ignore_usr,
              params: params
            })];
          case 1:
            OuterReports = _a.sent().data || [];
            finalData = [];
            _map(OuterReports, function (report) {
              finalData.push({
                id: _get(report, 'id'),
                title: _get(report, 'title'),
                reportDate: _get(report, 'reportDate'),
                uploadDate: _get(report, 'uploadDate'),
                name: _get(report, 'name'),
                recorder: _get(report, 'recorder'),
                url: _get(report, 'path')
              });
            });
            finalData = _orderBy(finalData, function (o) {
              return Date.parse(o.reportDate);
            }, ['desc']);
            return [2, finalData];
        }
      });
    });
  }
};
var survey = {
  getLabExamGroup: function getLabExamGroup(id, type) {
    if (type === void 0) {
      type = 1;
    }
    if (type === 1) {
      return request.get("/api/getLabExamGroup?pregnancyId=".concat(id)).then(function (r) {
        return r.data;
      });
    } else if (type === 2) {
      return request.get("/api/getLabExamGroupByPrenatal?prenatalPatientId=".concat(id)).then(function (r) {
        return r.data;
      });
    }
    return [];
  },
  saveFirstReader: function saveFirstReader(data) {
    return request.post("/api/saveFirstReader", data).then(function (r) {
      return r.data;
    });
  },
  getOutReportFileBase64: function getOutReportFileBase64(path) {
    return request.get("/api/getOutReportFileBase64?path=".concat(path)).then(function (r) {
      return r.data;
    });
  }
};
var base = {
  getFormConfig: function getFormConfig() {
    return __awaiter(void 0, void 0, void 0, function () {
      var formWife, _a, formHusband, _b;
      return __generator(this, function (_c) {
        switch (_c.label) {
          case 0:
            _a = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-wife")];
          case 1:
            formWife = _a.apply(void 0, [_c.sent().data, 0]) || {};
            _b = _get;
            return [4, request.get("/api/form-descriptions?moduleName=prenatal-examination-husband")];
          case 2:
            formHusband = _b.apply(void 0, [_c.sent().data, 0]) || {};
            return [2, {
              formWife: formWife,
              formHusband: formHusband
            }];
        }
      });
    });
  }
};
var components = {
  getDiagnosesTemplate: function getDiagnosesTemplate(value, page) {
    if (page === void 0) {
      page = 0;
    }
    var code = encodeURIComponent(value);
    var code2 = encodeURIComponent(code);
    return request.get("/api/template-trees?type.equals=1&code.contains=".concat(code2, "&mnemonic.contains=").concat(code2, "&val.contains=").concat(code2), {
      params: {
        page: page,
        size: 99
      }
    }).then(function (r) {
      return r.data;
    });
  },
  getTemplateTree: function getTemplateTree(type) {
    return request.get("/api/template-trees?type.equals=".concat(type, "&page=0&size=500")).then(function (r) {
      return r.data;
    });
  },
  deleteHighrisk: function deleteHighrisk(data) {
    return request["delete"]("/api/deleteAlertAssessment", {
      params: data
    }).then(function (r) {
      return r.data;
    });
  },
  addTemplateTree: function addTemplateTree(item) {
    return request.post("/api/template-trees", item).then(function (r) {
      return r.data;
    });
  },
  findAlertAssessment: function findAlertAssessment(type, pregnancyId) {
    return request.get("/api/findAlertAssessment?type=".concat(type, "&pregnancyId=").concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  saveAlertAssessment: function saveAlertAssessment(data) {
    return request.post("/api/saveAlertAssessment", data).then(function (r) {
      return r.data;
    });
  },
  getHighriskColor: function getHighriskColor(module) {
    return request.get("/api/dictionaries?module.equals=".concat(module)).then(function (r) {
      return r.data;
    });
  },
  saveCaseIgnore: function saveCaseIgnore(data) {
    return request.post("/api/saveCaseIgnore", data).then(function (r) {
      return r.data;
    });
  },
  getLabExamImportTree: function getLabExamImportTree(pregnancyId) {
    return request.get("/api/getLabExamImportTree?pregnancyId=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  getImageExamImportTree: function getImageExamImportTree(pregnancyId) {
    return request.get("/api/getImageExamImportTree?pregnancyId=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  getSyphilisManagers: function getSyphilisManagers(pregnancyId) {
    return request.get("/api/syphilis-managers?pregnancyId.equals=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  createSyphilisManagers: function createSyphilisManagers(data) {
    return request.post("/api/syphilis-managers", data).then(function (r) {
      return r.data;
    });
  },
  updateSyphilisManagers: function updateSyphilisManagers(data) {
    return request.put("/api/syphilis-managers", data).then(function (r) {
      return r.data;
    });
  },
  getPreAssessmentInfo: function getPreAssessmentInfo(id) {
    return request.get("/api/doctor/getPreRiskAssessmentInfo?id=".concat(id)).then(function (r) {
      return r.data;
    });
  }
};
var api = {
  getAllPregnancies: function getAllPregnancies(idNO) {
    return request.get("/api/pregnancies?idNO.equals=".concat(idNO)).then(function (r) {
      return r.data;
    });
  },
  updatePregnancy: function updatePregnancy(data) {
    return request.put("/api/pregnancies", data).then(function (r) {
      return r.data;
    });
  },
  getDiagnosisHistories: function getDiagnosisHistories(pregnancyId) {
    return request.get("/api/getDiagnosisHistories?pregnancyId=".concat(pregnancyId)).then(function (r) {
      return r.data;
    });
  },
  getPrenatalVisits: function getPrenatalVisits(pregnancyId, visitType) {
    return __awaiter(void 0, void 0, void 0, function () {
      var data;
      return __generator(this, function (_a) {
        switch (_a.label) {
          case 0:
            return [4, request.get("/api/prenatal-visits?visitType.equals=".concat(visitType, "&pregnancyId.equals=").concat(pregnancyId))];
          case 1:
            data = _a.sent().data;
            if (visitType === 0) return [2, _get(data, 0)];
            return [2, data];
        }
      });
    });
  },
  getPrenatalVisitsAll: function getPrenatalVisitsAll(pregnancyId) {
    return __awaiter(void 0, void 0, void 0, function () {
      var data;
      return __generator(this, function (_a) {
        switch (_a.label) {
          case 0:
            return [4, request.get("/api/prenatal-visits?pregnancyId.equals=".concat(pregnancyId))];
          case 1:
            data = _a.sent().data;
            return [2, data];
        }
      });
    });
  },
  createPrenatalVisits: function createPrenatalVisits(data) {
    return request.post('/api/prenatal-visits', data).then(function (r) {
      return r.data;
    });
  },
  updatePrenatalVisits: function updatePrenatalVisits(data) {
    return request.put('/api/prenatal-visits', data).then(function (r) {
      return r.data;
    });
  },
  uploadPrenatalVisits: function uploadPrenatalVisits(data) {
    return request.post('/api/prenatal-visits/upload', data).then(function (r) {
      return r.data;
    });
  },
  getMeasures: function getMeasures(outpatientNO, type) {
    return request.get("/api/measures?outpatientNO.equals=".concat(outpatientNO, "&sort=id,asc")).then(function (r) {
      return r.data;
    });
  },
  getNewDataByDate: function getNewDataByDate(pregnancyId) {
    return request.get("/api/measures/getNewDataByDate?pregnancyId.equals=".concat(pregnancyId, "&createDate.equals=").concat(getFutureDate(0))).then(function (r) {
      return r.data;
    });
  },
  getPatientByOutpatientNO: function getPatientByOutpatientNO(outpatientNO) {
    return request.get("/api/prenatal-patients?outpatientNO.equals=".concat(outpatientNO)).then(function (r) {
      return r.data;
    });
  },
  calcGesWeek: function calcGesWeek(data) {
    if (data === void 0) {
      data = {};
    }
    return request.put("/api/doctor/getGestationalWeek", data).then(function (r) {
      return r.data;
    });
  },
  initial: initial,
  further: further,
  postpartum: postpartum,
  curve: curve,
  home: home,
  image: image,
  survey: survey,
  base: base,
  components: components
};
LazyAntd.Tree;
LazyAntd.TreeSelect;
LazyAntd.Select;
var Table$2 = LazyAntd.Table;
LazyAntd.Dropdown;
LazyAntd.Pagination;
var _symbol = '-';
function getRemark(note, Exercise) {
  if (note && !Exercise) {
    return note;
  } else if (!note && Exercise) {
    return Exercise;
  } else if (note && Exercise) {
    return note + _symbol + Exercise;
  } else {
    return '';
  }
}
var Index$2 = function (_super) {
  __extends(Index, _super);
  function Index() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    _this.tableColumns = [{
      title: '日期',
      dataIndex: 'monitorDate',
      key: 'monitorDate',
      render: function render(text) {
        return formatDateTime(text);
      }
    }, {
      title: '孕周',
      dataIndex: 'gw',
      key: 'gw'
    }, {
      title: '早餐前',
      dataIndex: 'preBreakfast',
      key: 'preBreakfast',
      render: function render(text, record) {
        return _this.getText(text, record, '餐前');
      }
    }, {
      title: '备注',
      dataIndex: 'preBreakfastNoteNote',
      key: 'preBreakfastNoteNote',
      render: function render(text, record) {
        return getRemark(record['preBreakfastNote'], record['preBreakfastExercise']);
      }
    }, {
      title: '早餐后2h',
      dataIndex: 'pastBreakfast',
      key: 'pastBreakfast',
      render: function render(text, record) {
        return _this.getText(text, record, '餐后');
      }
    }, {
      title: '备注',
      dataIndex: 'pastBreakfastNote',
      key: 'pastBreakfastNote',
      render: function render(text, record) {
        return getRemark(record['pastBreakfastNote'], record['pastBreakfastExercise']);
      }
    }, {
      title: '午餐前',
      dataIndex: 'preLunch',
      key: 'preLunch',
      render: function render(text, record) {
        return _this.getText(text, record, '餐前');
      }
    }, {
      title: '备注',
      dataIndex: 'preLunchNote',
      key: 'preLunchNote',
      render: function render(text, record) {
        return getRemark(record['preLunchNote'], record['preLunchExercise']);
      }
    }, {
      title: '午餐后2h',
      dataIndex: 'pastLunch',
      key: 'pastLunch',
      render: function render(text, record) {
        return _this.getText(text, record, '餐后');
      }
    }, {
      title: '备注',
      dataIndex: 'pastLunchNote',
      key: 'pastLunchNote',
      render: function render(text, record) {
        return getRemark(record['pastLunchNote'], record['pastLunchExercise']);
      }
    }, {
      title: '晚餐前',
      dataIndex: 'preDinner',
      key: 'preDinner',
      render: function render(text, record) {
        return _this.getText(text, record, '餐前');
      }
    }, {
      title: '备注',
      dataIndex: 'preDinnerNote',
      key: 'preDinnerNote',
      render: function render(text, record) {
        return getRemark(record['preDinnerNote'], record['preDinnerExercise']);
      }
    }, {
      title: '晚餐后2h',
      dataIndex: 'pastDinner',
      key: 'pastDinner',
      render: function render(text, record) {
        return _this.getText(text, record, '餐后');
      }
    }, {
      title: '备注',
      dataIndex: 'pastDinnerNote',
      key: 'pastDinnerNote',
      render: function render(text, record) {
        return getRemark(record['pastDinnerNote'], record['pastDinnerExercise']);
      }
    }, {
      title: '睡前',
      dataIndex: 'preSleep',
      key: 'preSleep',
      render: function render(text, record) {
        return _this.getText(text, record, '空腹');
      }
    }, {
      title: '备注',
      dataIndex: 'preSleepNote',
      key: 'preSleepNote',
      render: function render(text, record) {
        return getRemark(record['preSleepNote'], record['preSleepExercise']);
      }
    }];
    _this.getText = function (text, record, index) {
      if (index === '空腹' && Number(text) > 5.3) {
        return /*#__PURE__*/React__default.createElement("span", {
          style: {
            color: 'red'
          }
        }, text, "\u21E7");
      }
      if (index === '餐前' && Number(text) > 5.6) {
        return /*#__PURE__*/React__default.createElement("span", {
          style: {
            color: 'red'
          }
        }, text, "\u21E7");
      }
      if (index === '餐后' && Number(text) > 6.7) {
        return /*#__PURE__*/React__default.createElement("span", {
          style: {
            color: 'red'
          }
        }, text, "\u21E7");
      }
      return text;
    };
    return _this;
  }
  Index.prototype.render = function () {
    var bloodGlucose = this.props.bloodGlucose;
    return /*#__PURE__*/React__default.createElement(Table$2, {
      className: "prenatal-visit-main-table",
      columns: this.tableColumns,
      dataSource: bloodGlucose,
      pagination: false
    });
  };
  return Index;
}(Component);
LazyAntd.Tree;
LazyAntd.TreeSelect;
LazyAntd.Select;
var Table$1 = LazyAntd.Table;
LazyAntd.Dropdown;
LazyAntd.Pagination;
var Index$1 = function (_super) {
  __extends(Index, _super);
  function Index() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    _this.tableColumns = [{
      title: '日期',
      dataIndex: 'monitorDate',
      key: 'monitorDate',
      render: function render(text, record) {
        return formatDateTime(text);
      }
    }, {
      title: '孕周',
      dataIndex: 'gw',
      key: 'gw'
    }, {
      title: '血压',
      dataIndex: 'bloodPressure',
      key: 'bloodPressure',
      render: function render(text, record) {
        return _this.getText(text, record);
      }
    }, {
      title: '脉搏',
      dataIndex: 'pulse',
      key: 'pulse',
      render: function render(text, record) {
        return /*#__PURE__*/React__default.createElement("span", {
          style: {
            color: text < 60 || text > 100 ? 'red' : ''
          }
        }, text);
      }
    }];
    _this.getText = function (text, record) {
      var systolic = _get(record, 'systolic') || '';
      var diastolic = _get(record, 'diastolic') || '';
      return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
        style: {
          color: systolic < 90 || systolic > 130 ? 'red' : ''
        }
      }, systolic), "/", /*#__PURE__*/React__default.createElement("span", {
        style: {
          color: diastolic < 60 || diastolic > 90 ? 'red' : ''
        }
      }, diastolic));
    };
    return _this;
  }
  Index.prototype.render = function () {
    var bloodPressure = this.props.bloodPressure;
    return /*#__PURE__*/React__default.createElement(Table$1, {
      className: "prenatal-visit-main-table",
      columns: this.tableColumns,
      dataSource: bloodPressure,
      pagination: false
    });
  };
  return Index;
}(Component);
LazyAntd.Tree;
LazyAntd.TreeSelect;
LazyAntd.Select;
var Table = LazyAntd.Table;
LazyAntd.Dropdown;
LazyAntd.Pagination;
var Index = function (_super) {
  __extends(Index, _super);
  function Index() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    _this.tableColumns = [{
      title: '日期',
      dataIndex: 'monitorDate',
      key: 'monitorDate',
      render: function render(text, record) {
        return formatDateTime(text);
      }
    }, {
      title: '孕周',
      dataIndex: 'gw',
      key: 'gw'
    }, {
      title: '第一次数胎动',
      children: [{
        title: '时长（分钟）',
        dataIndex: 'firstDuration',
        key: 'firstDuration'
      }, {
        title: '次数（次）',
        dataIndex: 'firstCount',
        key: 'firstCount'
      }]
    }, {
      title: '第二次数胎动',
      children: [{
        title: '时长（分钟）',
        dataIndex: 'secondDuration',
        key: 'secondDuration'
      }, {
        title: '次数（次）',
        dataIndex: 'secondCount',
        key: 'secondCount'
      }]
    }, {
      title: '第三次数胎动',
      children: [{
        title: '时长（分钟）',
        dataIndex: 'thirdDuration',
        key: 'thirdDuration'
      }, {
        title: '次数（次）',
        dataIndex: 'thirdCount',
        key: 'thirdCount'
      }]
    }, {
      title: '总次数（次）',
      dataIndex: 'sumCount',
      key: 'sumCount'
    }, {
      title: '12小时评估结果',
      dataIndex: 'result',
      key: 'result',
      render: function render(text, record) {
        return _this.getText(text);
      }
    }];
    _this.getText = function (text) {
      if (text === '异常') {
        return /*#__PURE__*/React__default.createElement("span", {
          style: {
            color: 'red'
          }
        }, text);
      }
      return /*#__PURE__*/React__default.createElement("span", null, text);
    };
    return _this;
  }
  Index.prototype.render = function () {
    var fetalMovement = this.props.fetalMovement;
    return /*#__PURE__*/React__default.createElement(Table, {
      className: "prenatal-visit-main-table",
      columns: this.tableColumns,
      dataSource: fetalMovement,
      pagination: false
    });
  };
  return Index;
}(Component);
function styleInject(css, ref) {
  if (ref === void 0) ref = {};
  var insertAt = ref.insertAt;
  if (!css || typeof document === 'undefined') {
    return;
  }
  var head = document.head || document.getElementsByTagName('head')[0];
  var style = document.createElement('style');
  style.type = 'text/css';
  if (insertAt === 'top') {
    if (head.firstChild) {
      head.insertBefore(style, head.firstChild);
    } else {
      head.appendChild(style);
    }
  } else {
    head.appendChild(style);
  }
  if (style.styleSheet) {
    style.styleSheet.cssText = css;
  } else {
    style.appendChild(document.createTextNode(css));
  }
}
var css_248z$1 = ".prenatal-visit-main_home {\n  height: 100%;\n  overflow-y: auto;\n  padding: 10px 20px;\n  background-color: #fff;\n}\n.prenatal-visit-main_home .ant-table .ant-table-cell {\n  text-align: center;\n  word-break: keep-all;\n}\n";
styleInject(css_248z$1);
var DoctorEnd_HomeCare = function (_super) {
  __extends(DoctorEnd_HomeCare, _super);
  function DoctorEnd_HomeCare() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    _this.state = {
      defaultActiveKey: null,
      bloodGlucose: [],
      bloodPressure: [],
      fetalMovement: []
    };
    return _this;
  }
  DoctorEnd_HomeCare.prototype.componentDidMount = function () {
    return __awaiter(this, void 0, void 0, function () {
      var pregnancyId, bloodGlucose, bloodPressure, fetalMovement;
      return __generator(this, function (_a) {
        switch (_a.label) {
          case 0:
            pregnancyId = mchcUtils.getDoctorEndId(this.props);
            return [4, api.home.getBloodGlucoseInHome(pregnancyId)];
          case 1:
            bloodGlucose = _a.sent();
            return [4, api.home.getBloodPressureInHome(pregnancyId)];
          case 2:
            bloodPressure = _a.sent();
            return [4, api.home.getFetalMovementInHome(pregnancyId)];
          case 3:
            fetalMovement = _a.sent();
            this.setState({
              bloodGlucose: bloodGlucose,
              bloodPressure: bloodPressure,
              fetalMovement: fetalMovement
            });
            if (_size(bloodGlucose) > 0) {
              this.setState({
                defaultActiveKey: 'bloodGlucose'
              });
            } else if (_size(bloodPressure) > 0) {
              this.setState({
                defaultActiveKey: 'bloodPressure'
              });
            } else if (_size(fetalMovement) > 0) {
              this.setState({
                defaultActiveKey: 'fetalMovement'
              });
            } else {
              this.setState({
                defaultActiveKey: 'bloodGlucose'
              });
            }
            return [2];
        }
      });
    });
  };
  DoctorEnd_HomeCare.prototype.render = function () {
    var _a = this.state,
      defaultActiveKey = _a.defaultActiveKey,
      bloodGlucose = _a.bloodGlucose,
      bloodPressure = _a.bloodPressure,
      fetalMovement = _a.fetalMovement;
    return defaultActiveKey ? /*#__PURE__*/React__default.createElement("div", {
      className: "prenatal-visit-main_home"
    }, /*#__PURE__*/React__default.createElement(_Tabs, {
      defaultActiveKey: defaultActiveKey
    }, /*#__PURE__*/React__default.createElement(_Tabs.TabPane, {
      tab: "\u8840\u7CD6",
      key: "bloodGlucose"
    }, /*#__PURE__*/React__default.createElement(Index$2, {
      bloodGlucose: bloodGlucose
    })), /*#__PURE__*/React__default.createElement(_Tabs.TabPane, {
      tab: "\u8840\u538B",
      key: "bloodPressure"
    }, /*#__PURE__*/React__default.createElement(Index$1, {
      bloodPressure: bloodPressure
    })), /*#__PURE__*/React__default.createElement(_Tabs.TabPane, {
      tab: "\u80CE\u52A8",
      key: "fetalMovement"
    }, /*#__PURE__*/React__default.createElement(Index, {
      fetalMovement: fetalMovement
    })))) : null;
  };
  return DoctorEnd_HomeCare;
}(Component);
var Inner$3 = /*#__PURE__*/lazy(function () {
  return import('./prenatal-visit.pregnancy.doctor-end2.js');
});
function DoctorEnd_ImageReport(props) {
  return /*#__PURE__*/React__default.createElement(Inner$3, props);
}
var StatisticsManagementInner = /*#__PURE__*/lazy(function () {
  return import('./prenatal-visit.pregnancy.doctor-end7.js');
});
function StatisticsManagement(props) {
  return /*#__PURE__*/React__default.createElement(React__default.Suspense, {
    fallback: null
  }, /*#__PURE__*/React__default.createElement(StatisticsManagementInner, props));
}
var css_248z = ".prenatal-visit-main_survey {\n  height: 100%;\n}\n.prenatal-visit-main_survey .survey-left-wrapper {\n  width: 256px;\n  height: 100%;\n  float: left;\n}\n.prenatal-visit-main_survey .survey-right-wrapper {\n  margin-left: 256px;\n  height: 100%;\n  overflow: auto;\n}\n.prenatal-visit-main_survey .survey-left {\n  padding: 0 8px;\n  height: 100%;\n  background-color: #fff;\n  margin-right: 12px;\n}\n.prenatal-visit-main_survey .survey-left .left-title {\n  height: 48px;\n  line-height: 48px;\n  border-bottom: 1px solid #d7dce7;\n  margin-bottom: 12px;\n}\n.prenatal-visit-main_survey .survey-left .ant-collapse {\n  max-height: 600px;\n  overflow-y: auto;\n  border-top: 1px solid #c9cfda;\n}\n.prenatal-visit-main_survey .survey-left .ant-collapse .ant-collapse-item > .ant-collapse-header {\n  padding-left: 36px;\n  background-color: #f5f6fa;\n  font-weight: 500;\n}\n.prenatal-visit-main_survey .survey-left .ant-collapse .ant-collapse-item > .ant-collapse-header .anticon-calendar {\n  margin-right: 6px;\n}\n.prenatal-visit-main_survey .survey-left .ant-collapse .ant-collapse-content {\n  padding: 0;\n  border-top: none;\n}\n.prenatal-visit-main_survey .survey-left .ant-collapse .ant-collapse-content-box {\n  padding: 0;\n}\n.prenatal-visit-main_survey .survey-left .ant-collapse .left-item {\n  color: #25265e;\n  border-top: 1px solid #c9cfda;\n  padding: 10px 0;\n  position: relative;\n}\n.prenatal-visit-main_survey .survey-left .ant-collapse .left-item-title {\n  width: 208px;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  margin-left: 18px;\n  margin-bottom: 0;\n  cursor: pointer;\n}\n.prenatal-visit-main_survey .survey-left .ant-collapse .left-item-state {\n  position: absolute;\n  left: 3px;\n  top: 3px;\n  font-size: 12px;\n  color: #7569ff;\n}\n.prenatal-visit-main_survey .survey-left .ant-collapse .left-item-lable {\n  position: absolute;\n  right: 5px;\n  top: 11px;\n  font-size: 14px;\n  color: #68cda0;\n}\n.prenatal-visit-main_survey .survey-left .no-data {\n  height: 370px;\n  border: 1px solid #c9cfda;\n}\n.prenatal-visit-main_survey .survey-left .no-data .no-data-title {\n  height: 36px;\n  line-height: 36px;\n  text-align: center;\n  background-color: #fafafa;\n}\n";
styleInject(css_248z);
function DoctorEnd_SurveyReport(props) {
  var _a;
  var _b = props.headerInfoOfInpatientData,
    headerInfoOfInpatientData = _b === void 0 ? {} : _b,
    _c = props.headerInfo,
    headerInfo = _c === void 0 ? {} : _c;
  var combinded = _assign({}, headerInfoOfInpatientData, headerInfo);
  var _d = useState([]),
    reportList = _d[0],
    set_reportList = _d[1];
  var _e = useState(),
    detailData = _e[0],
    set_detailData = _e[1];
  var _f = useState(false),
    isShowCurve = _f[0],
    set_isShowCurve = _f[1];
  var _g = useState(''),
    itemName = _g[0];
  _g[1];
  var _h = useState(false),
    loading = _h[0],
    setLoading = _h[1];
  var inited = useRef(false);
  useEffect(function () {
    getLabExamGroup();
    return function () {};
  }, []);
  function getLabExamGroup() {
    return __awaiter(this, void 0, void 0, function () {
      var list, first;
      var _a, _b;
      return __generator(this, function (_c) {
        switch (_c.label) {
          case 0:
            return [4, SMchc_Admission.listPatientLabExamReport({
              params: combinded,
              ignore_usr: true
            })];
          case 1:
            list = _c.sent();
            set_reportList(list);
            first = (_b = (_a = list === null || list === void 0 ? void 0 : list[0]) === null || _a === void 0 ? void 0 : _a.examReport) === null || _b === void 0 ? void 0 : _b[0];
            if (first && !inited.current) {
              inited.current = true;
              handleItemClick(first);
            }
            return [2];
        }
      });
    });
  }
  function handleItemClick(item) {
    return __awaiter(this, void 0, void 0, function () {
      var id, type, detailData;
      return __generator(this, function (_a) {
        switch (_a.label) {
          case 0:
            id = item.id, type = item.type;
            setLoading(true);
            return [4, request.get("/api/getLabExamReport?id=".concat(id, "&type=").concat(type), {
              ignore_usr: true
            })];
          case 1:
            detailData = _a.sent().data;
            setLoading(false);
            set_detailData(detailData);
            getLabExamGroup();
            return [2];
        }
      });
    });
  }
  function closeModal() {
    set_isShowCurve(false);
  }
  function renderLeft() {
    return /*#__PURE__*/React__default.createElement("div", {
      className: "survey-left"
    }, /*#__PURE__*/React__default.createElement("div", {
      style: {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'space-between',
        padding: 4
      }
    }, /*#__PURE__*/React__default.createElement("span", null, "\u68C0\u9A8C\u62A5\u544A\u5217\u8868"), /*#__PURE__*/React__default.createElement(_Button.Group, null, /*#__PURE__*/React__default.createElement(_Button, {
      size: "small",
      onClick: function onClick() {
        return request.post('/api/syncReport', combinded, {
          successText: '成功'
        }).then(getLabExamGroup);
      }
    }, "\u540C\u6B65"), /*#__PURE__*/React__default.createElement(_Button, {
      size: "small",
      onClick: function onClick() {
        return request.post('/api/examineReport', combinded, {
          successText: '成功'
        }).then(getLabExamGroup);
      }
    }, "\u5BA1\u6838"), /*#__PURE__*/React__default.createElement(_Button, {
      size: "small",
      onClick: function onClick() {
        mchcModal__.open('print_modal', {
          modal_data: {
            requestData: _assign2({
              url: '/api/printReport'
            }, combinded)
          }
        });
      }
    }, "\u6253\u5370"))), _size(reportList) > 0 ? /*#__PURE__*/React__default.createElement(_Collapse, {
      defaultActiveKey: ['0'],
      expandIcon: function expandIcon() {
        return /*#__PURE__*/React__default.createElement(CalendarOutlined, null);
      }
    }, _map(reportList, function (item, idx) {
      return /*#__PURE__*/React__default.createElement(_Collapse.Panel, {
        header: !item.gesWeek ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, formatTimeToDate(item.date), /*#__PURE__*/React__default.createElement("div", {
          style: {
            position: 'absolute',
            right: 6,
            top: 6
          }
        }, /*#__PURE__*/React__default.createElement(_Badge, {
          count: item.unread ? item.unread : item.total,
          style: !item.unread ? {
            backgroundColor: 'green'
          } : {}
        }))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, "`$", formatTimeToDate(item.date), " (\u5B55\u5468\uFF1A$", item.gesWeek, ")`", /*#__PURE__*/React__default.createElement("div", {
          style: {
            position: 'absolute',
            right: 6,
            top: 6
          }
        }, /*#__PURE__*/React__default.createElement(_Badge, {
          count: item.unread ? item.unread : item.total,
          style: !item.unread ? {
            backgroundColor: 'green'
          } : {}
        }))),
        key: idx
      }, _map(item.examReport, function (subItem) {
        return /*#__PURE__*/React__default.createElement("div", {
          className: "left-item",
          onClick: function onClick() {
            return handleItemClick(subItem);
          }
        }, subItem.unread ? /*#__PURE__*/React__default.createElement("span", {
          className: "left-item-state"
        }, "\u65B0") : null, /*#__PURE__*/React__default.createElement("p", {
          className: "left-item-title",
          title: subItem.title,
          style: !subItem.normal ? {
            color: 'red'
          } : {}
        }, subItem.id === (detailData === null || detailData === void 0 ? void 0 : detailData.id) ? /*#__PURE__*/React__default.createElement("span", null, "\uD83D\uDD35") : '', subItem.title), subItem.type === 2 ? /*#__PURE__*/React__default.createElement("span", {
          className: "left-item-lable"
        }, "\u5916\u9662") : null);
      }));
    })) : /*#__PURE__*/React__default.createElement("div", {
      className: "no-data"
    }, /*#__PURE__*/React__default.createElement("p", {
      className: "no-data-title"
    }, "\u6682\u65E0\u6570\u636E")));
  }
  return /*#__PURE__*/React__default.createElement("div", {
    className: "prenatal-visit-main_survey"
  }, /*#__PURE__*/React__default.createElement("div", {
    className: "survey-left-wrapper"
  }, renderLeft()), /*#__PURE__*/React__default.createElement("div", {
    className: "survey-right-wrapper"
  }, loading ? /*#__PURE__*/React__default.createElement(LoadingPlaceholder, null) : /*#__PURE__*/React__default.createElement(DoctorEnd_SurveyReport_Report, {
    detailData: detailData
  })), isShowCurve && /*#__PURE__*/React__default.createElement(StatisticsManagement, {
    itemName: itemName,
    onClose: closeModal,
    id: (_a = combinded === null || combinded === void 0 ? void 0 : combinded.id) !== null && _a !== void 0 ? _a : 0
  }));
}
var SurveyReport = DoctorEnd_SurveyReport;
var DoctorEnd_Base_ = /*#__PURE__*/lazy(function () {
  return import('./prenatal-visit.pregnancy.doctor-end3.js');
});
function DoctorEnd_Base(props) {
  return /*#__PURE__*/React__default.createElement(DoctorEnd_Base_, props);
}
var Inner$2 = /*#__PURE__*/lazy(function () {
  return import('./prenatal-visit.pregnancy.doctor-end4.js');
});
function DoctorEnd_TemplateTree(props) {
  return /*#__PURE__*/React__default.createElement(MyLazyComponent, null, /*#__PURE__*/React__default.createElement(Inner$2, props));
}
var Inner$1 = /*#__PURE__*/lazy(function () {
  return import('./prenatal-visit.pregnancy.doctor-end5.js');
});
function DoctorEnd_Diagnoses(props) {
  return /*#__PURE__*/React__default.createElement(MyLazyComponent, null, /*#__PURE__*/React__default.createElement(Inner$1, props));
}
var Inner = /*#__PURE__*/lazy(function () {
  return import('./prenatal-visit.pregnancy.doctor-end6.js');
});
function DoctorEnd_DiagnosesTemplate(props) {
  return /*#__PURE__*/React__default.createElement(MyLazyComponent, null, /*#__PURE__*/React__default.createElement(Inner, props));
}
var routesData = {
  "/config-table": /*#__PURE__*/lazy(function () {
    return import('./src.pages.config-table.js');
  }),
  "/config-table/list": /*#__PURE__*/lazy(function () {
    return import('./pages.config-table.list.js');
  }),
  "/config-table/list2": /*#__PURE__*/lazy(function () {
    return import('./pages.config-table.list2.js');
  }),
  "/config-table/panel": /*#__PURE__*/lazy(function () {
    return import('./pages.config-table.panel.js');
  }),
  "/data-report/admission-visit": /*#__PURE__*/lazy(function () {
    return import('./pages.data-report.admission-visit.js');
  }),
  "/data-report/breast-cancer": /*#__PURE__*/lazy(function () {
    return import('./pages.data-report.breast-cancer.js');
  }),
  "/data-report/cervical-cancer": /*#__PURE__*/lazy(function () {
    return import('./pages.data-report.cervical-cancer.js');
  }),
  "/data-report/first-visit": /*#__PURE__*/lazy(function () {
    return import('./pages.data-report.first-visit.js');
  }),
  "/data-report/labour-record": /*#__PURE__*/lazy(function () {
    return import('./pages.data-report.labour-record.js');
  }),
  "/data-report/labour-record-common": /*#__PURE__*/lazy(function () {
    return import('./pages.data-report.labour-record-common.js');
  }),
  "/data-report/premarital-checkup": /*#__PURE__*/lazy(function () {
    return import('./pages.data-report.premarital-checkup.js');
  }),
  "/data-report/progestation-checkup": /*#__PURE__*/lazy(function () {
    return import('./pages.data-report.progestation-checkup.js');
  }),
  "/data-report/second-visit": /*#__PURE__*/lazy(function () {
    return import('./pages.data-report.second-visit.js');
  }),
  "/data-report/two-cancer": /*#__PURE__*/lazy(function () {
    return import('./pages.data-report.two-cancer.js');
  }),
  "/deliver-management/bgg-record": /*#__PURE__*/lazy(function () {
    return import('./pages.deliver-management.bgg-record.js');
  }),
  "/deliver-management/disease-screening": /*#__PURE__*/lazy(function () {
    return import('./pages.deliver-management.disease-screening.js');
  }),
  "/deliver-management/hbig-record": /*#__PURE__*/lazy(function () {
    return import('./pages.deliver-management.hbig-record.js');
  }),
  "/deliver-management/hbvac-record": /*#__PURE__*/lazy(function () {
    return import('./pages.deliver-management.hbvac-record.js');
  }),
  "/deliver-management/labour-record": /*#__PURE__*/lazy(function () {
    return import('./pages.deliver-management.labour-record.js');
  }),
  "/deliver-management-v2/admission/list": /*#__PURE__*/lazy(function () {
    return import('./deliver-management-v2.admission.list.js');
  }),
  "/deliver-management-v2": /*#__PURE__*/lazy(function () {
    return import('./src.pages.deliver-management-v2.js');
  }),
  "/fetal-custom-analyse": /*#__PURE__*/lazy(function () {
    return import('./src.pages.fetal-custom-analyse.js');
  }),
  "/fetal-custom-analyse-entry": /*#__PURE__*/lazy(function () {
    return import('./src.pages.fetal-custom-analyse-entry.js');
  }),
  "/fetal-custom-analyse-list": /*#__PURE__*/lazy(function () {
    return import('./src.pages.fetal-custom-analyse-list.js');
  }),
  "/follow-up/questionnaire3": /*#__PURE__*/lazy(function () {
    return import('./pages.follow-up.questionnaire3.js');
  }),
  "/follow-up/test": /*#__PURE__*/lazy(function () {
    return import('./pages.follow-up.test.js');
  }),
  "/gynecological-diseases/test": /*#__PURE__*/lazy(function () {
    return import('./pages.gynecological-diseases.test.js');
  }),
  "/gynecological-diseases/women/edit": /*#__PURE__*/lazy(function () {
    return import('./gynecological-diseases.women.edit.js');
  }),
  "/gynecological-diseases/women": /*#__PURE__*/lazy(function () {
    return import('./pages.gynecological-diseases.women.js');
  }),
  "/gynecological-diseases/women/list": /*#__PURE__*/lazy(function () {
    return import('./gynecological-diseases.women.list.js');
  }),
  "/gynecological-diseases/women/women-exam-records/add": /*#__PURE__*/lazy(function () {
    return import('./women.women-exam-records.add.js');
  }),
  "/gynecological-diseases/women/women-exam-records/edit": /*#__PURE__*/lazy(function () {
    return import('./index3.js').then(function (n) {
      return n.i;
    });
  }),
  "/gynecological-diseases/women/women-exam-records": /*#__PURE__*/lazy(function () {
    return import('./gynecological-diseases.women.women-exam-records.js');
  }),
  "/highrisk-management/list": /*#__PURE__*/lazy(function () {
    return import('./pages.highrisk-management.list.js');
  }),
  "/my-knowledge/list": /*#__PURE__*/lazy(function () {
    return import('./pages.my-knowledge.list.js');
  }),
  "/pregnant-school/lessons": /*#__PURE__*/lazy(function () {
    return import('./pages.pregnant-school.lessons.js');
  }),
  "/pregnant-school/midwifery-lessons": /*#__PURE__*/lazy(function () {
    return import('./pages.pregnant-school.midwifery-lessons.js');
  }),
  "/pregnant-school/midwifery-ordered": /*#__PURE__*/lazy(function () {
    return import('./pages.pregnant-school.midwifery-ordered.js');
  }),
  "/pregnant-school/ordered": /*#__PURE__*/lazy(function () {
    return import('./pages.pregnant-school.ordered.js');
  }),
  "/pregnant-school/personal-records": /*#__PURE__*/lazy(function () {
    return import('./pages.pregnant-school.personal-records.js');
  }),
  "/pregnant-school/personal-statistics": /*#__PURE__*/lazy(function () {
    return import('./pages.pregnant-school.personal-statistics.js');
  }),
  "/pregnant-school/statistics": /*#__PURE__*/lazy(function () {
    return import('./pages.pregnant-school.statistics.js');
  }),
  "/prenatal-visit/fetal-monitor": /*#__PURE__*/lazy(function () {
    return import('./pages.prenatal-visit.fetal-monitor.js');
  }),
  "/prenatal-visit/gbs": /*#__PURE__*/lazy(function () {
    return import('./pages.prenatal-visit.gbs.js');
  }),
  "/prenatal-visit/physical-sign/list": /*#__PURE__*/lazy(function () {
    return import('./prenatal-visit.physical-sign.list.js');
  }),
  "/prenatal-visit/pregnancy/add": /*#__PURE__*/lazy(function () {
    return import('./prenatal-visit.pregnancy.add.js');
  }),
  "/prenatal-visit/pregnancy/check": /*#__PURE__*/lazy(function () {
    return import('./prenatal-visit.pregnancy.check.js');
  }),
  "/prenatal-visit/pregnancy/list": /*#__PURE__*/lazy(function () {
    return import('./prenatal-visit.pregnancy.list.js');
  }),
  "/prenatal-visit/pregnancy/nurse-end": /*#__PURE__*/lazy(function () {
    return import('./prenatal-visit.pregnancy.nurse-end.js');
  }),
  "/prenatal-visit/report/list": /*#__PURE__*/lazy(function () {
    return import('./prenatal-visit.report.list.js');
  }),
  "/referral-management/referral-in/add": /*#__PURE__*/lazy(function () {
    return import('./referral-management.referral-in.add.js');
  }),
  "/referral-management/referral-in/list": /*#__PURE__*/lazy(function () {
    return import('./referral-management.referral-in.list.js');
  }),
  "/referral-management/referral-out/add": /*#__PURE__*/lazy(function () {
    return import('./referral-management.referral-out.add.js');
  }),
  "/referral-management/referral-out/list": /*#__PURE__*/lazy(function () {
    return import('./referral-management.referral-out.list.js');
  }),
  "/statistics/archives/list": /*#__PURE__*/lazy(function () {
    return import('./statistics.archives.list.js');
  }),
  "/system/configuration": /*#__PURE__*/lazy(function () {
    return import('./pages.system.configuration.js');
  }),
  "/system/request-log": /*#__PURE__*/lazy(function () {
    return import('./pages.system.request-log.js');
  }),
  "/system/role": /*#__PURE__*/lazy(function () {
    return import('./pages.system.role.js');
  }),
  "/system/user": /*#__PURE__*/lazy(function () {
    return import('./pages.system.user.js');
  }),
  "/system-config": /*#__PURE__*/lazy(function () {
    return import('./index6.js').then(function (n) {
      return n.i;
    });
  }),
  "/task-logs": /*#__PURE__*/lazy(function () {
    return import('./src.pages.task-logs.js');
  }),
  "/tasks/list": /*#__PURE__*/lazy(function () {
    return import('./pages.tasks.list.js');
  }),
  "/tasks/test": /*#__PURE__*/lazy(function () {
    return import('./pages.tasks.test.js');
  }),
  "/test": /*#__PURE__*/lazy(function () {
    return import('./src.pages.test.js');
  }),
  "/visit-management/remind-record": /*#__PURE__*/lazy(function () {
    return import('./pages.visit-management.remind-record.js');
  }),
  "/visit-management/telephone-followup-record": /*#__PURE__*/lazy(function () {
    return import('./pages.visit-management.telephone-followup-record.js');
  }),
  "/visit-management/timeout-remind-record": /*#__PURE__*/lazy(function () {
    return import('./pages.visit-management.timeout-remind-record.js');
  })
};
var mchcRoutes = routesData;
export { DoctorEnd_Diagnoses as D, SurveyReport as S, __extends as _, __spreadArray as a, __awaiter as b, __generator as c, _assign2 as d, api as e, __rest as f, DoctorEnd_DiagnosesTemplate as g, DoctorEnd_TemplateTree as h, DoctorEnd_ImageReport as i, DoctorEnd_SurveyReport as j, DoctorEnd_Initial as k, DoctorEnd_Further as l, DoctorEnd_HomeCare as m, DoctorEnd_Base as n, mchcRoutes as o, styleInject as s };
//# sourceMappingURL=index.js.map
