diff --git a/README.md b/README.md
index fccf5dc13a7156c056135bdef5772f9b66d027be..c94794bfa8b226570ef12f45ca82fea232eaca1b 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,3 @@
-# hphy
+# hpgp
-黄浦高血压精准导医
\ No newline at end of file
+黄浦全科导医
diff --git a/cloud-auth/src/main/resources/bootstrap-dev.yml b/cloud-auth/src/main/resources/bootstrap-dev.yml
index c0d208c7aa3272b717746a2bcfe67226b976427f..8d99621b29a9d8c65e793e9ffffcfb9b3a8b4151 100644
--- a/cloud-auth/src/main/resources/bootstrap-dev.yml
+++ b/cloud-auth/src/main/resources/bootstrap-dev.yml
@@ -11,9 +11,9 @@ spring:
nacos:
server-addr: 127.0.0.1:8848
discovery:
- namespace: bbe7ca0d-f409-4e68-bf95-5f2adad168e7
+ namespace: be9383c3-e535-4e9c-81ab-a8c6b7ecdc82
config:
- namespace: bbe7ca0d-f409-4e68-bf95-5f2adad168e7
+ namespace: be9383c3-e535-4e9c-81ab-a8c6b7ecdc82
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
shared-configs:
diff --git a/cloud-gateway/src/main/resources/bootstrap-dev.yml b/cloud-gateway/src/main/resources/bootstrap-dev.yml
index c5477f9e81b09629f388ad2a4862d50755fa82a7..bed3b1e3c2fa3dc52473bfacb9b234450166a651 100644
--- a/cloud-gateway/src/main/resources/bootstrap-dev.yml
+++ b/cloud-gateway/src/main/resources/bootstrap-dev.yml
@@ -9,9 +9,9 @@ spring:
nacos:
server-addr: 127.0.0.1:8848
discovery:
- namespace: bbe7ca0d-f409-4e68-bf95-5f2adad168e7
+ namespace: be9383c3-e535-4e9c-81ab-a8c6b7ecdc82
config:
- namespace: bbe7ca0d-f409-4e68-bf95-5f2adad168e7
+ namespace: be9383c3-e535-4e9c-81ab-a8c6b7ecdc82
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
@@ -20,4 +20,4 @@ spring:
logging:
config: classpath:logback-spring.xml
file:
- name: ../logs/${spring.application.name}/console.log
\ No newline at end of file
+ name: ../logs/${spring.application.name}/console.log
diff --git a/smart-health-modules/cloud-upms/cloud-upms-biz/src/main/resources/bootstrap-dev.yml b/smart-health-modules/cloud-upms/cloud-upms-biz/src/main/resources/bootstrap-dev.yml
index 32afb699954d73405537acb92e26512d5e81b75f..eb62c6fac4056896d6189ccbb1d50900ebb27dc6 100644
--- a/smart-health-modules/cloud-upms/cloud-upms-biz/src/main/resources/bootstrap-dev.yml
+++ b/smart-health-modules/cloud-upms/cloud-upms-biz/src/main/resources/bootstrap-dev.yml
@@ -11,9 +11,9 @@ spring:
nacos:
server-addr: 127.0.0.1:8848
discovery:
- namespace: bbe7ca0d-f409-4e68-bf95-5f2adad168e7
+ namespace: be9383c3-e535-4e9c-81ab-a8c6b7ecdc82
config:
- namespace: bbe7ca0d-f409-4e68-bf95-5f2adad168e7
+ namespace: be9383c3-e535-4e9c-81ab-a8c6b7ecdc82
file-extension: yml
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles:
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java
new file mode 100644
index 0000000000000000000000000000000000000000..5996d2fddc754f4e3f2749f1db365e1946c6a383
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java
@@ -0,0 +1,64 @@
+package cn.sh.stc.sict.theme.hpgp.controller.mobile;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.map.MapUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.core.util.XmlUtil;
+import cn.hutool.http.HttpRequest;
+import cn.sh.stc.sict.cloud.common.core.util.R;
+import cn.sh.stc.sict.cloud.common.security.util.SecurityUtils;
+import cn.sh.stc.sict.cloud.upms.dto.CurrentUser;
+import cn.sh.stc.sict.theme.hpgp.vo.IntelligentAnswerVO;
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * @author F_xh
+ */
+@Slf4j
+@RestController
+@AllArgsConstructor
+@Api(tags = "[C]黄浦精准预约——智能问答")
+@RequestMapping("/hpgp/c/intelligent/qa")
+public class HpGpIntelligentQAController {
+ private final static String CONTENT = "Content";
+
+ @ApiOperation("智能问答")
+ @PostMapping
+ public R> qa(String question) {
+ CurrentUser current = SecurityUtils.getCurrentUser();
+ String from = StrUtil.isNotBlank(current.getOpenId()) ? current.getOpenId() : current.getId().toString();
+
+ String xml = "\n" +
+ " \n" +
+ " \n" +
+ " " + DateUtil.now() + "\n" +
+ " \n" +
+ " \n" +
+ " " + IdWorker.getId() + "\n" +
+ "";
+ // 162 为黄浦高血压专病导医机器人
+ // 51 黄浦高血压全科导诊机器人
+ String body = HttpRequest.post("http://30.30.5.74:9988/qa/jqrsvr.ashx?Command=talk_51")
+ .body(xml)
+ .execute()
+ .body();
+ log.error("孙总接口请求 xml = {}", xml);
+ log.error("孙总接口返回 body = {}", body);
+ IntelligentAnswerVO answerVO = new IntelligentAnswerVO();
+ Map result = XmlUtil.xmlToMap(body);
+ if(result.containsKey(CONTENT)){
+ answerVO.setAnswer(MapUtil.getStr(result, CONTENT));
+ }
+
+ return new R<>(answerVO);
+ }
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpgpBusyIdlePredictionController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpgpBusyIdlePredictionController.java
new file mode 100644
index 0000000000000000000000000000000000000000..c968cb394f1fa3dfe5966cb02f6a07d92d866a14
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpgpBusyIdlePredictionController.java
@@ -0,0 +1,34 @@
+package cn.sh.stc.sict.theme.hpgp.controller.mobile;
+
+
+import cn.sh.stc.sict.cloud.common.core.util.R;
+import cn.sh.stc.sict.theme.hpgp.service.HpgpBusyIdlePredictionService;
+import com.baomidou.mybatisplus.extension.api.ApiController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 黄浦全科导诊——忙闲预测(HpgpBusyIdlePrediction)维护接口
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:44
+ */
+@Api(value = "[C] 黄浦全科导诊——忙闲预测维护接口", tags = "[C] 黄浦全科导诊——忙闲预测维护接口")
+@RestController
+@RequestMapping("/hpgp/c/busyidleprediction")
+@AllArgsConstructor
+public class HpgpBusyIdlePredictionController extends ApiController {
+ /**
+ * 服务对象
+ */
+ private final HpgpBusyIdlePredictionService hpgpBusyIdlePredictionService;
+
+ public R> busyIdlePrediction(@ApiParam("标准") @RequestParam("deptName") String deptName){
+ return new R<>().success(hpgpBusyIdlePredictionService.busyIdlePrediction(deptName));
+ }
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpgpDiagnosticExperienceController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpgpDiagnosticExperienceController.java
new file mode 100644
index 0000000000000000000000000000000000000000..e7ce66de9e9fe6e0e98ed43d98a18734b2691062
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpgpDiagnosticExperienceController.java
@@ -0,0 +1,57 @@
+package cn.sh.stc.sict.theme.hpgp.controller.mobile;
+
+
+import cn.sh.stc.sict.cloud.common.core.util.R;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpDiagnosticExperience;
+import cn.sh.stc.sict.theme.hpgp.service.HpgpDiagnosticExperienceService;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.api.ApiController;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 黄浦全科导诊——诊断经验云词(HpgpDiagnosticExperience)维护接口
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:49
+ */
+@Api(value = "[C] 黄浦全科导诊——诊断经验云词维护接口", tags = "[C] 黄浦全科导诊——诊断经验云词维护接口")
+@RestController
+@RequestMapping("/hpgp/c/dia/exp")
+@AllArgsConstructor
+public class HpgpDiagnosticExperienceController extends ApiController {
+ /**
+ * 服务对象
+ */
+ private final HpgpDiagnosticExperienceService hpgpDiagnosticExperienceService;
+
+ /**
+ * 分页查询
+ *
+ * @param page 分页对象
+ * @param hpgpDiagnosticExperience 黄浦全科导诊——诊断经验云词
+ * @return
+ */
+ @ApiOperation("分页查询")
+ @GetMapping("/page")
+ public R> getHpgpDiagnosticExperiencePage(Page page, HpgpDiagnosticExperience hpgpDiagnosticExperience) {
+ page = hpgpDiagnosticExperienceService.page(page, Wrappers.query(hpgpDiagnosticExperience));
+ return new R<>(page);
+ }
+
+ /**
+ * 新增机构信息表
+ * 黄浦全科导诊——诊断经验云词
+ * @param hpgpDiagnosticExperience
+ * @return R
+ */
+ @ApiOperation("新增/修改")
+ @PostMapping
+ public R> save(@RequestBody HpgpDiagnosticExperience hpgpDiagnosticExperience) {
+ hpgpDiagnosticExperienceService.saveOrUpdate(hpgpDiagnosticExperience);
+ return new R<>(hpgpDiagnosticExperience);
+ }
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpBusyIdlePredictionMapper.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpBusyIdlePredictionMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..9176e03769e1ea7983cf4ac91ffc67258b344d66
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpBusyIdlePredictionMapper.java
@@ -0,0 +1,14 @@
+package cn.sh.stc.sict.theme.hpgp.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpBusyIdlePrediction;
+
+/**
+ * 黄浦全科导诊——忙闲预测(HpgpBusyIdle_ prediction)表数据库访问层
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:41
+ */
+public interface HpgpBusyIdlePredictionMapper extends BaseMapper {
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpDepartmentRankMapper.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpDepartmentRankMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..8c1bb8512a945a2ce2b7d8044b5092a915e4eb29
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpDepartmentRankMapper.java
@@ -0,0 +1,23 @@
+package cn.sh.stc.sict.theme.hpgp.dao;
+
+import cn.sh.stc.sict.theme.hpgp.model.HpgpDepartmentRank;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 黄浦全科导诊——科室排名(HpgpDepartmentRank)表数据库访问层
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:47
+ */
+public interface HpgpDepartmentRankMapper extends BaseMapper {
+ /**
+ * 根据标准科室名称查询医院科室排名
+ * @param deptName 标准科室名称
+ * @param size 查询记录数 默认3条
+ * @return
+ */
+ List getRankByStandardDept(@Param("deptName") String deptName, @Param("size") int size);
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpDiagnosticExperienceMapper.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpDiagnosticExperienceMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..3b2d2796425da1ecc9e808252507916ceac0862d
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpDiagnosticExperienceMapper.java
@@ -0,0 +1,14 @@
+package cn.sh.stc.sict.theme.hpgp.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpDiagnosticExperience;
+
+/**
+ * 黄浦全科导诊——诊断经验云词(HpgpDiagnosticExperience)表数据库访问层
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:48
+ */
+public interface HpgpDiagnosticExperienceMapper extends BaseMapper {
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpInspectionCheckMapper.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpInspectionCheckMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..0a5a36aa597c8a0f7093f54b6fe2b573794e1d74
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/dao/HpgpInspectionCheckMapper.java
@@ -0,0 +1,14 @@
+package cn.sh.stc.sict.theme.hpgp.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpInspectionCheck;
+
+/**
+ * 黄浦全科导诊——检验检查云词(HpgpInspectionCheck)表数据库访问层
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:49
+ */
+public interface HpgpInspectionCheckMapper extends BaseMapper {
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpBusyIdlePrediction.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpBusyIdlePrediction.java
new file mode 100644
index 0000000000000000000000000000000000000000..a6cf4f6321b14a400042cf6a54ef2b87c2e14970
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpBusyIdlePrediction.java
@@ -0,0 +1,41 @@
+package cn.sh.stc.sict.theme.hpgp.model;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+/**
+ * 黄浦全科导诊——忙闲预测(HpgpBusyIdle_ prediction)表实体类
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:39
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class HpgpBusyIdlePrediction extends Model {
+//医院代码
+@ApiModelProperty(hidden = false, value = "医院代码")
+private String hospitalCode;
+//医院名称
+@ApiModelProperty(hidden = false, value = "医院名称")
+private String hospitalName;
+//科室代码
+@ApiModelProperty(hidden = false, value = "科室代码")
+private String deptCode;
+//科室名称
+@ApiModelProperty(hidden = false, value = "科室名称")
+private String deptName;
+//预测日期
+@ApiModelProperty(hidden = false, value = "预测日期")
+private Date predictionDate;
+//忙闲评分
+@ApiModelProperty(hidden = false, value = "忙闲评分")
+private Integer score;
+
+
+ }
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpDepartmentRank.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpDepartmentRank.java
new file mode 100644
index 0000000000000000000000000000000000000000..66f13797241acf248e7b8ec50a4f7a05a48eed4a
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpDepartmentRank.java
@@ -0,0 +1,39 @@
+package cn.sh.stc.sict.theme.hpgp.model;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+/**
+ * 黄浦全科导诊——科室排名(HpgpDepartmentRank)表实体类
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:47
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class HpgpDepartmentRank extends Model {
+ //标准科室
+ @ApiModelProperty(hidden = false, value = "标准科室")
+ private String standardDept;
+ //医院代码
+ @ApiModelProperty(hidden = false, value = "医院代码")
+ private String hospitalCode;
+ //医院名称
+ @ApiModelProperty(hidden = false, value = "医院名称")
+ private String hospitalName;
+ //科室代码
+ @ApiModelProperty(hidden = false, value = "科室代码")
+ private String deptCode;
+ //科室名称
+ @ApiModelProperty(hidden = false, value = "科室名称")
+ private String deptName;
+ //科室排名
+ @ApiModelProperty(hidden = false, value = "科室排名")
+ private Integer rankScore;
+
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpDiagnosticExperience.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpDiagnosticExperience.java
new file mode 100644
index 0000000000000000000000000000000000000000..a55b2a82f36bc1176a31c03ceb92e52f969f69e1
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpDiagnosticExperience.java
@@ -0,0 +1,39 @@
+package cn.sh.stc.sict.theme.hpgp.model;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+/**
+ * 黄浦全科导诊——诊断经验云词(HpgpDiagnosticExperience)表实体类
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:48
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class HpgpDiagnosticExperience extends Model {
+ //医院代码
+ @ApiModelProperty(hidden = false, value = "医院代码")
+ private String hospitalCode;
+ //医院名称
+ @ApiModelProperty(hidden = false, value = "医院名称")
+ private String hospitalName;
+ //科室代码
+ @ApiModelProperty(hidden = false, value = "科室代码")
+ private String deptCode;
+ //科室名称
+ @ApiModelProperty(hidden = false, value = "科室名称")
+ private String deptName;
+ //诊断名称
+ @ApiModelProperty(hidden = false, value = "诊断名称")
+ private String diagnoses;
+ //诊断总数
+ @ApiModelProperty(hidden = false, value = "诊断总数")
+ private Integer total;
+
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpInspectionCheck.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpInspectionCheck.java
new file mode 100644
index 0000000000000000000000000000000000000000..7211486abdd507694045970fb2241d49924a8221
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/model/HpgpInspectionCheck.java
@@ -0,0 +1,36 @@
+package cn.sh.stc.sict.theme.hpgp.model;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+/**
+ * 黄浦全科导诊——检验检查云词(HpgpInspectionCheck)表实体类
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:49
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class HpgpInspectionCheck extends Model {
+ //医院代码
+ @ApiModelProperty(hidden = false, value = "医院代码")
+ private String hospitalCode;
+ //医院名称
+ @ApiModelProperty(hidden = false, value = "医院名称")
+ private String hospitalName;
+ //科室代码
+ @ApiModelProperty(hidden = false, value = "科室代码")
+ private String deptCode;
+ //科室名称
+ @ApiModelProperty(hidden = false, value = "科室名称")
+ private String deptName;
+ //检验检查项目名称
+ @ApiModelProperty(hidden = false, value = "检验检查项目名称")
+ private String itemName;
+
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpBusyIdlePredictionService.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpBusyIdlePredictionService.java
new file mode 100644
index 0000000000000000000000000000000000000000..f83447fbf39a5f1b284b99e754b634e9745b166f
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpBusyIdlePredictionService.java
@@ -0,0 +1,23 @@
+package cn.sh.stc.sict.theme.hpgp.service;
+
+import cn.sh.stc.sict.theme.hpgp.model.HpgpBusyIdlePrediction;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 黄浦全科导诊——忙闲预测(HpgpBusyIdle_ prediction)表服务接口
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:42
+ */
+
+public interface HpgpBusyIdlePredictionService extends IService {
+
+ /**
+ * 忙闲预测
+ * @param deptName 标准科室名称
+ * @return 忙闲医院科室
+ */
+ List busyIdlePrediction(String deptName);
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpDepartmentRankService.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpDepartmentRankService.java
new file mode 100644
index 0000000000000000000000000000000000000000..05b51a8547a59b1557554e7da6c615d41dff302a
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpDepartmentRankService.java
@@ -0,0 +1,14 @@
+package cn.sh.stc.sict.theme.hpgp.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpDepartmentRank;
+
+/**
+ * 黄浦全科导诊——科室排名(HpgpDepartmentRank)表服务接口
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:47
+ */
+public interface HpgpDepartmentRankService extends IService {
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpDiagnosticExperienceService.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpDiagnosticExperienceService.java
new file mode 100644
index 0000000000000000000000000000000000000000..c44c65ffff5271d458c4fa70e023d3ee009fdfff
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpDiagnosticExperienceService.java
@@ -0,0 +1,14 @@
+package cn.sh.stc.sict.theme.hpgp.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpDiagnosticExperience;
+
+/**
+ * 黄浦全科导诊——诊断经验云词(HpgpDiagnosticExperience)表服务接口
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:48
+ */
+public interface HpgpDiagnosticExperienceService extends IService {
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpInspectionCheckService.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpInspectionCheckService.java
new file mode 100644
index 0000000000000000000000000000000000000000..ce54c7e1572e73dd2a237f003f53b9b510532d1b
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpInspectionCheckService.java
@@ -0,0 +1,14 @@
+package cn.sh.stc.sict.theme.hpgp.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpInspectionCheck;
+
+/**
+ * 黄浦全科导诊——检验检查云词(HpgpInspectionCheck)表服务接口
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:49
+ */
+public interface HpgpInspectionCheckService extends IService {
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpBusyIdlePredictionServiceImpl.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpBusyIdlePredictionServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..5953ca070fca372d61e120b5217c77168253c70d
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpBusyIdlePredictionServiceImpl.java
@@ -0,0 +1,47 @@
+package cn.sh.stc.sict.theme.hpgp.service.impl;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.sh.stc.sict.theme.hpgp.dao.HpgpBusyIdlePredictionMapper;
+import cn.sh.stc.sict.theme.hpgp.dao.HpgpDepartmentRankMapper;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpBusyIdlePrediction;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpDepartmentRank;
+import cn.sh.stc.sict.theme.hpgp.service.HpgpBusyIdlePredictionService;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * 黄浦全科导诊——忙闲预测(HpgpBusyIdle_ prediction)表服务实现类
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:43
+ */
+@AllArgsConstructor
+@Service("hpgpBusyIdlPredictionService")
+public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl implements HpgpBusyIdlePredictionService {
+ private final HpgpDepartmentRankMapper departmentRankMapper;
+
+ @Override
+ public List busyIdlePrediction(String deptName) {
+ // 查询科室排名
+ // 组装医院代码、科室代码
+ // 查询医院忙闲
+ List deptRank = departmentRankMapper.getRankByStandardDept(deptName, 3);
+ if (CollectionUtil.isEmpty(deptRank)) {
+ return null;
+ }
+ Set hospitalCodes = deptRank.stream().map(HpgpDepartmentRank::getHospitalCode).collect(Collectors.toSet());
+ Set deptCodes = deptRank.stream().map(HpgpDepartmentRank::getDeptCode).collect(Collectors.toSet());
+
+ return this.list(
+ new LambdaQueryWrapper()
+ .in(HpgpBusyIdlePrediction::getHospitalCode, hospitalCodes)
+ .in(HpgpBusyIdlePrediction::getDeptCode, deptCodes)
+ );
+ }
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpDepartmentRankServiceImpl.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpDepartmentRankServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..1b20e69c87807117b213358753042b78a4e9aa83
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpDepartmentRankServiceImpl.java
@@ -0,0 +1,18 @@
+package cn.sh.stc.sict.theme.hpgp.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import cn.sh.stc.sict.theme.hpgp.dao.HpgpDepartmentRankMapper;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpDepartmentRank;
+import cn.sh.stc.sict.theme.hpgp.service.HpgpDepartmentRankService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 黄浦全科导诊——科室排名(HpgpDepartmentRank)表服务实现类
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:47
+ */
+@Service("hpgpDepartmentRankService")
+public class HpgpDepartmentRankServiceImpl extends ServiceImpl implements HpgpDepartmentRankService {
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpDiagnosticExperienceServiceImpl.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpDiagnosticExperienceServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..146aa8310b150c46bac19ac47ceef78da0256737
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpDiagnosticExperienceServiceImpl.java
@@ -0,0 +1,18 @@
+package cn.sh.stc.sict.theme.hpgp.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import cn.sh.stc.sict.theme.hpgp.dao.HpgpDiagnosticExperienceMapper;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpDiagnosticExperience;
+import cn.sh.stc.sict.theme.hpgp.service.HpgpDiagnosticExperienceService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 黄浦全科导诊——诊断经验云词(HpgpDiagnosticExperience)表服务实现类
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:48
+ */
+@Service("hpgpDiagnosticExperienceService")
+public class HpgpDiagnosticExperienceServiceImpl extends ServiceImpl implements HpgpDiagnosticExperienceService {
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpInspectionCheckServiceImpl.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpInspectionCheckServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..34b602c89db5866508062acce21dbb891b9c6b91
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpInspectionCheckServiceImpl.java
@@ -0,0 +1,18 @@
+package cn.sh.stc.sict.theme.hpgp.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import cn.sh.stc.sict.theme.hpgp.dao.HpgpInspectionCheckMapper;
+import cn.sh.stc.sict.theme.hpgp.model.HpgpInspectionCheck;
+import cn.sh.stc.sict.theme.hpgp.service.HpgpInspectionCheckService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 黄浦全科导诊——检验检查云词(HpgpInspectionCheck)表服务实现类
+ *
+ * @author zhangly
+ * @since 2022-01-14 09:56:49
+ */
+@Service("hpgpInspectionCheckService")
+public class HpgpInspectionCheckServiceImpl extends ServiceImpl implements HpgpInspectionCheckService {
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/vo/IntelligentAnswerVO.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/vo/IntelligentAnswerVO.java
new file mode 100644
index 0000000000000000000000000000000000000000..d45ce1b0dea46bf99dca1bbcefd65e11191d3b42
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/vo/IntelligentAnswerVO.java
@@ -0,0 +1,50 @@
+package cn.sh.stc.sict.theme.hpgp.vo;
+
+import cn.hutool.core.util.StrUtil;
+import lombok.Data;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author zhangly
+ * @Description
+ * @Date 2022/1/14 10:50
+ **/
+@Data
+public class IntelligentAnswerVO {
+
+ public void setAnswer(String answer) {
+ this.answer = answer;
+ if (StrUtil.isNotBlank(answer)){
+ parseDept();
+ }
+ }
+
+ public IntelligentAnswerVO(String answer) {
+ this.answer = answer;
+ if (StrUtil.isNotBlank(answer)){
+ parseDept();
+ }
+ }
+
+ public IntelligentAnswerVO(String answer, String deptName) {
+ this.answer = answer;
+ this.deptName = deptName;
+ }
+
+ public IntelligentAnswerVO() {
+ }
+
+ private String answer;
+ private String deptName;
+
+ private void parseDept() {
+ String reg = "分析和推荐的就诊科室为:(.*)\\n?(";
+ Pattern p = Pattern.compile(reg);
+ Matcher m = p.matcher(answer);
+ if(m.find()){
+ deptName = m.group(1);
+ }
+ }
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/constant/DataConstant.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/constant/DataConstant.java
new file mode 100644
index 0000000000000000000000000000000000000000..d2832604da33f3e682f5322596664b776a3c589f
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/constant/DataConstant.java
@@ -0,0 +1,11 @@
+package cn.sh.stc.sict.theme.hphy.constant;
+
+/**
+ * @author zhangly
+ * @Description
+ * @Date 2022/1/14 14:13
+ **/
+public class DataConstant {
+ public static final Byte TOP_DEPT = 1;
+ public static final Byte TWO_DEPT = 2;
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/AppointmentGuideController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/AppointmentGuideController.java
new file mode 100644
index 0000000000000000000000000000000000000000..468d950f81906e12bd126736b8077a8ba6398c61
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/AppointmentGuideController.java
@@ -0,0 +1,15 @@
+package cn.sh.stc.sict.theme.hphy.controller.mp;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author zhangly
+ * @Description
+ * @Date 2022/1/11 16:44
+ **/
+@RestController
+@RequestMapping("/c/guide")
+public class AppointmentGuideController {
+
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpDeptInfoController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpDeptInfoController.java
new file mode 100644
index 0000000000000000000000000000000000000000..96851c45cf0c7b920d2d83ba09fc58e84c0315e6
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpDeptInfoController.java
@@ -0,0 +1,36 @@
+package cn.sh.stc.sict.theme.hphy.controller.mp;
+
+
+import cn.sh.stc.sict.cloud.common.core.util.R;
+import cn.sh.stc.sict.theme.hphy.service.HpDeptInfoService;
+import com.baomidou.mybatisplus.extension.api.ApiController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * (HpDeptInfo)维护接口
+ *
+ * @author makejava
+ * @since 2021-01-28 10:35:58
+ */
+@Api(value = "[C] 黄浦预约——科室信息接口", tags = "[C] 黄浦预约——科室信息接口")
+@RestController
+@RequestMapping("/hphy/c/dept")
+@AllArgsConstructor
+public class HpDeptInfoController extends ApiController {
+ /**
+ * 服务对象
+ */
+ private final HpDeptInfoService hpDeptInfoService;
+
+ @ApiOperation("科室医生查询接口")
+ public R> getDeptDoctors(@ApiParam("医院代码") @RequestParam("hospitalCode") String hospitalCode,
+ @ApiParam("科室代码") @RequestParam("deptCode") String deptCode){
+ return new R<>(hpDeptInfoService.getDeptDoctors(hospitalCode, deptCode));
+ }
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/IntelligentQAController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpHyIntelligentQAController.java
similarity index 83%
rename from smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/IntelligentQAController.java
rename to smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpHyIntelligentQAController.java
index 7ec8935a17452e953d5c8ba241a176f4dafbeec8..51202527586a7c1d73bd7533fc797d7631291076 100644
--- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/IntelligentQAController.java
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpHyIntelligentQAController.java
@@ -22,16 +22,16 @@ import java.util.Map;
@Slf4j
@RestController
@AllArgsConstructor
-@Api(tags = "[C]智能问答")
-@RequestMapping("/c/intelligent/qa")
-public class IntelligentQAController {
+@Api(tags = "[C]黄浦高血压专病导医——智能问答")
+@RequestMapping("/hphy/c/intelligent/qa")
+public class HpHyIntelligentQAController {
private final static String CONTENT = "Content";
@ApiOperation("智能问答")
@PostMapping
public R qa(String question) {
CurrentUser current = SecurityUtils.getCurrentUser();
- String from = null != current ? (StrUtil.isNotBlank(current.getOpenId()) ? current.getOpenId() : current.getId().toString()) : IdWorker.getIdStr();
+ String from = StrUtil.isNotBlank(current.getOpenId()) ? current.getOpenId() : current.getId().toString();
String xml = "\n" +
" \n" +
@@ -41,6 +41,8 @@ public class IntelligentQAController {
" \n" +
" " + IdWorker.getId() + "\n" +
"";
+ // 162 为黄浦高血压专病导医机器人
+ // 51 黄浦高血压全科导诊机器人
String body = HttpRequest.post("http://30.30.5.74:9988/qa/jqrsvr.ashx?Command=talk_162")
.body(xml)
.execute()
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HphyPatientBaseController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HphyPatientBaseController.java
index a89c68914279defaac02cb916850e0703144db88..645ab6ca6cd2bfe6c51a0852172fe04fc6611782 100644
--- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HphyPatientBaseController.java
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HphyPatientBaseController.java
@@ -54,6 +54,8 @@ public class HphyPatientBaseController {
if (base != null) {
patient.setId(base.getId());
+ } else {
+ patient.setPhone(current.getPhone());
}
// 身份证验证
if (StrUtil.isBlank(patient.getCertId())) {
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/web/HpDeptInfoController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/web/HpDeptInfoController.java
deleted file mode 100644
index 2dab6a9c3cf621cdd9035783c8288cfa49d0d31b..0000000000000000000000000000000000000000
--- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/web/HpDeptInfoController.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package cn.sh.stc.sict.theme.hphy.controller.web;
-
-
-import cn.sh.stc.sict.theme.hphy.service.HpDeptInfoService;
-import com.baomidou.mybatisplus.extension.api.ApiController;
-import io.swagger.annotations.Api;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * (HpDeptInfo)维护接口
- *
- * @author makejava
- * @since 2021-01-28 10:35:58
- */
-@Api(value = "维护接口", tags = "维护接口")
-@RestController
-@RequestMapping("hpDeptInfo")
-@AllArgsConstructor
-public class HpDeptInfoController extends ApiController {
- /**
- * 服务对象
- */
- private final HpDeptInfoService hpDeptInfoService;
-}
\ No newline at end of file
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/schedule/RefreshJob.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/schedule/RefreshJob.java
index 1e454a63e2a3cec6d59a832b5544a353eea342af..122f41ac1b1cedc07f5cc5142e613c2a2ce0bc10 100644
--- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/schedule/RefreshJob.java
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/schedule/RefreshJob.java
@@ -1,6 +1,7 @@
package cn.sh.stc.sict.theme.hphy.schedule;
import cn.hutool.core.collection.CollectionUtil;
+import cn.sh.stc.sict.theme.hphy.constant.DataConstant;
import cn.sh.stc.sict.theme.hphy.model.HpDeptInfo;
import cn.sh.stc.sict.theme.hphy.model.HpDocInfo;
import cn.sh.stc.sict.theme.hphy.model.HpHosInfo;
@@ -38,9 +39,6 @@ public class RefreshJob {
private final HpDeptInfoService deptInfoService;
private final HpDocInfoService docInfoService;
- private static final byte TOP_DEPT = 1;
- private static final byte TWO_DEPT = 2;
-
/**
* 每月一日0点 更新医院信息
*/
@@ -150,7 +148,7 @@ public class RefreshJob {
new LambdaQueryWrapper()
.eq(HpDeptInfo::getHosOrgCode, hpDeptInfo.getHosOrgCode())
.eq(HpDeptInfo::getOneDeptCode, hpDeptInfo.getOneDeptCode())
- .eq(HpDeptInfo::getDeptLevel, TOP_DEPT)
+ .eq(HpDeptInfo::getDeptLevel, DataConstant.TOP_DEPT)
);
if (deptInfo != null) {
hpDeptInfo.setId(deptInfo.getId());
@@ -172,7 +170,7 @@ public class RefreshJob {
List hpDeptInfos = factory.getMapperFacade().mapAsList(deptInfos, HpDeptInfo.class);
for (HpDeptInfo hpDeptInfo : hpDeptInfos) {
- hpDeptInfo.setDeptLevel(TWO_DEPT);
+ hpDeptInfo.setDeptLevel(DataConstant.TWO_DEPT);
saveOrUpdateTwoDept(hpDeptInfo);
}
}
@@ -183,7 +181,7 @@ public class RefreshJob {
new LambdaQueryWrapper()
.eq(HpDeptInfo::getHosOrgCode, hpDeptInfo.getHosOrgCode())
.eq(HpDeptInfo::getDeptCode, hpDeptInfo.getDeptCode())
- .eq(HpDeptInfo::getDeptLevel, TWO_DEPT)
+ .eq(HpDeptInfo::getDeptLevel, DataConstant.TWO_DEPT)
);
if (deptInfo != null) {
hpDeptInfo.setId(deptInfo.getId());
@@ -208,7 +206,7 @@ public class RefreshJob {
hpDeptInfo.setNormdeptCode(deptInfo.getNormdeptCode());
hpDeptInfo.setNormdeptName(deptInfo.getNormdeptName());
hpDeptInfo.setDeptDesc(deptInfo.getDeptDesc());
- hpDeptInfo.setDeptLevel(TOP_DEPT);
+ hpDeptInfo.setDeptLevel(DataConstant.TOP_DEPT);
hpDeptInfo.setIndexNo(deptInfo.getIndexNo());
hpDeptInfos.add(hpDeptInfo);
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/HpDeptInfoService.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/HpDeptInfoService.java
index 42e0d5871921017eb656fec2abcaaaa6973acba7..4cd0a849e1c7d5c8c2c55087f12faf0e5b79cfef 100644
--- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/HpDeptInfoService.java
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/HpDeptInfoService.java
@@ -1,6 +1,7 @@
package cn.sh.stc.sict.theme.hphy.service;
import cn.sh.stc.sict.theme.hphy.model.HpDeptInfo;
+import cn.sh.stc.sict.theme.hphy.vo.DeptDoctorsVO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
@@ -11,6 +12,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface HpDeptInfoService extends IService {
-
-
-}
\ No newline at end of file
+ /**
+ * 根据医院代码和科室代码查询医生信息
+ * @param hospitalCode
+ * @param deptCode
+ * @return
+ */
+ DeptDoctorsVO getDeptDoctors(String hospitalCode, String deptCode);
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpDeptInfoServiceImpl.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpDeptInfoServiceImpl.java
index 761ad5e613d6fd233ff49787a0a8319c7f6c1d9c..ac1c0f5439e28cbdb9743261e4f92fd16feb6e75 100644
--- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpDeptInfoServiceImpl.java
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpDeptInfoServiceImpl.java
@@ -1,18 +1,58 @@
package cn.sh.stc.sict.theme.hphy.service.impl;
+import cn.sh.stc.sict.theme.hphy.constant.DataConstant;
import cn.sh.stc.sict.theme.hphy.dao.HpDeptInfoMapper;
+import cn.sh.stc.sict.theme.hphy.dao.HpDocInfoMapper;
import cn.sh.stc.sict.theme.hphy.model.HpDeptInfo;
+import cn.sh.stc.sict.theme.hphy.model.HpDocInfo;
import cn.sh.stc.sict.theme.hphy.service.HpDeptInfoService;
+import cn.sh.stc.sict.theme.hphy.vo.DeptDoctorsVO;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
+import java.util.List;
+
/**
* (HpDeptInfo)表服务实现类
*
* @author makejava
* @since 2021-01-28 10:35:58
*/
+@Slf4j
+@AllArgsConstructor
@Service("hpDeptInfoService")
public class HpDeptInfoServiceImpl extends ServiceImpl implements HpDeptInfoService {
+ private final HpDocInfoMapper hpDocInfoMapper;
+
+ @Override
+ public DeptDoctorsVO getDeptDoctors(String hospitalCode, String deptCode) {
+ // 查询科室信息
+ // 查询医生信息
+ HpDeptInfo deptInfo = this.getOne(
+ new LambdaQueryWrapper()
+ .eq(HpDeptInfo::getHosOrgCode, hospitalCode)
+ .and(i -> i.eq(HpDeptInfo::getOneDeptCode, deptCode)
+ .or().eq(HpDeptInfo::getDeptCode, deptCode))
+ .orderByDesc(HpDeptInfo::getDeptLevel)
+ );
+ if (deptInfo == null){
+ log.error("根据医院编码:{} 和科室编码:{} 未查出科室信息", hospitalCode, deptCode);
+ return null;
+ }
+
+ LambdaQueryWrapper docWrapper = new LambdaQueryWrapper<>();
+ docWrapper.eq(HpDocInfo::getHosOrgCode, hospitalCode);
+ docWrapper.eq(HpDocInfo::getOneDeptCode, deptInfo.getOneDeptCode());
+ if (DataConstant.TWO_DEPT.equals(deptInfo.getDeptLevel())){
+ docWrapper.eq(HpDocInfo::getDeptCode, deptInfo.getDeptCode());
+ }
+ docWrapper.orderByAsc(HpDocInfo::getIndexNo);
+
+ List doctors = hpDocInfoMapper.selectList(docWrapper);
-}
\ No newline at end of file
+ return new DeptDoctorsVO(deptInfo, doctors);
+ }
+}
diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/vo/DeptDoctorsVO.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/vo/DeptDoctorsVO.java
new file mode 100644
index 0000000000000000000000000000000000000000..546ee0904638b91b86077a36027bf6d4464c3a73
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/vo/DeptDoctorsVO.java
@@ -0,0 +1,22 @@
+package cn.sh.stc.sict.theme.hphy.vo;
+
+import cn.sh.stc.sict.theme.hphy.model.HpDeptInfo;
+import cn.sh.stc.sict.theme.hphy.model.HpDocInfo;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * @author zhangly
+ * @Description
+ * @Date 2022/1/14 14:43
+ **/
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class DeptDoctorsVO {
+ private HpDeptInfo deptInfo;
+ private List doctors;
+}
diff --git a/smart-health-modules/theme-schema/src/main/resources/bootstrap-dev.yml b/smart-health-modules/theme-schema/src/main/resources/bootstrap-dev.yml
index 99dbf7bcb70704a939ac632b0f49934628d2c320..7cc253e7f6da49ad3c35ce60dc3bccaafba4a8ec 100644
--- a/smart-health-modules/theme-schema/src/main/resources/bootstrap-dev.yml
+++ b/smart-health-modules/theme-schema/src/main/resources/bootstrap-dev.yml
@@ -11,8 +11,8 @@ spring:
nacos:
server-addr: 127.0.0.1:8848
discovery:
- namespace: bbe7ca0d-f409-4e68-bf95-5f2adad168e7
+ namespace: be9383c3-e535-4e9c-81ab-a8c6b7ecdc82
config:
- namespace: bbe7ca0d-f409-4e68-bf95-5f2adad168e7
+ namespace: be9383c3-e535-4e9c-81ab-a8c6b7ecdc82
file-extension: yml
- shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
\ No newline at end of file
+ shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
diff --git a/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpBusyIdlePredictionMapper.xml b/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpBusyIdlePredictionMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3d2d7c0c2bf4d75132fbc0947eb214c11639565f
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpBusyIdlePredictionMapper.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hospital_code
+ , hospital_name, dept_code, dept_name, prediction_date, score
+
diff --git a/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpDepartmentRankMapper.xml b/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpDepartmentRankMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..822165c27c807aee179fb9baef3cf3737b723c2f
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpDepartmentRankMapper.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ standard_dept , hospital_code, hospital_name, dept_code, dept_name, rank_score
+
+
+
diff --git a/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpDiagnosticExperienceMapper.xml b/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpDiagnosticExperienceMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..7ed8800955705d57e9007203311cb11f6a3c8403
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpDiagnosticExperienceMapper.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hospital_code
+ , hospital_name, dept_code, dept_name, diagnoses, total
+
diff --git a/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpInspectionCheckMapper.xml b/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpInspectionCheckMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..8a982b314a7b97b4c1afe665fc4011eeea7a49c4
--- /dev/null
+++ b/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpInspectionCheckMapper.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ hospital_code, hospital_name, dept_code, dept_name, item_name
+