Browse Source

合作

master-admin
lzp 2 weeks ago
parent
commit
aea54cea2d
  1. 8
      ruisi_java/ruisi-cc-generator/src/main/resources/mbg.xml
  2. 22
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/RmsReport.java
  3. 140
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/RmsReportExample.java
  4. 122
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/RmsReportScaleScore.java
  5. 640
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/RmsReportScaleScoreExample.java
  6. 2
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/vo/AmsVo.java
  7. 44
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/vo/RmsVo.java
  8. 56
      ruisi_java/ruisi-system/src/main/resources/mapper/system/RmsReportMapper.xml
  9. 200
      ruisi_java/ruisi-system/src/main/resources/mapper/system/RmsReportScaleScoreMapper.xml
  10. 7
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/AmsReportTemplateController.java
  11. 9
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/RmsController.java
  12. 1
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/persist/dao/RmsDao.java
  13. 1
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/AmsReportService.java
  14. 2
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/IRmsService.java
  15. 211
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/AmsReportServiceImpl.java
  16. 163
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/AmsServiceImpl.java
  17. 273
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/RmsServiceImpl.java
  18. 2
      ruisi_java/ruisi-web-client/src/main/resources/application-dev.yml
  19. 1
      ruisi_java/ruisi-web-client/src/main/resources/mapper/dao/AmsDao.xml
  20. 43
      ruisi_java/ruisi-web-client/src/main/resources/mapper/dao/RmsDao.xml
  21. 2
      web_admin/adminapi/index.html
  22. BIN
      web_admin/adminapi/index.html.gz
  23. BIN
      web_admin/cga113v2admin03.02-2.zip
  24. 2
      web_admin/src/App.vue
  25. 7
      web_admin/src/api/report.js
  26. 1
      web_admin/src/views/largeScreen.vue
  27. 77
      web_admin/src/views/report/view copy.vue
  28. 187
      web_admin/src/views/report/view.vue
  29. 4
      web_admin/vue.config.js
  30. 3
      web_client/src/api/ams.js
  31. 2
      web_client/vue.config.js

8
ruisi_java/ruisi-cc-generator/src/main/resources/mbg.xml

@ -20,7 +20,7 @@
</commentGenerator> </commentGenerator>
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver" <jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/ruisi_cga_yf1?useUnicode=true&amp;characterEncoding=UTF-8&amp;serverTimezone=GMT%2B8&amp;tinyInt1isBit=false" connectionURL="jdbc:mysql://localhost:3306/ruisi_cga_whszxyjhyy?useUnicode=true&amp;characterEncoding=UTF-8&amp;serverTimezone=GMT%2B8&amp;tinyInt1isBit=false"
userId="root" userId="root"
password="q7510327"> password="q7510327">
<!--仅仅查询当前库的表,不查询其他库--> <!--仅仅查询当前库的表,不查询其他库-->
@ -70,7 +70,7 @@
<!-- <table tableName="pms_patient_parent_illness" domainObjectName="PmsPatientParentIllness"/>--> <!-- <table tableName="pms_patient_parent_illness" domainObjectName="PmsPatientParentIllness"/>-->
<!-- <table tableName="pms_patient_personal" domainObjectName="PmsPatientPersonal"/>--> <!-- <table tableName="pms_patient_personal" domainObjectName="PmsPatientPersonal"/>-->
<!-- <table tableName="pms_patient_diagnosis" domainObjectName="PmsPatientDiagnosis"/>--> <!-- <table tableName="pms_patient_diagnosis" domainObjectName="PmsPatientDiagnosis"/>-->
<table tableName="ems_evaluation_scale_cognitive_relevance" domainObjectName="EmsEvaluationScaleCognitiveRelevance"/> <!-- <table tableName="ems_evaluation_scale_cognitive_relevance" domainObjectName="EmsEvaluationScaleCognitiveRelevance"/>-->
<!-- <table tableName="hms_combo" domainObjectName="HmsCombo"/>--> <!-- <table tableName="hms_combo" domainObjectName="HmsCombo"/>-->
<!-- <table tableName="hms_combo_scale_relevance" domainObjectName="HmsComboScaleRelevance"/>--> <!-- <table tableName="hms_combo_scale_relevance" domainObjectName="HmsComboScaleRelevance"/>-->
<!-- <table tableName="hms_doctor" domainObjectName="HmsDoctor"/>--> <!-- <table tableName="hms_doctor" domainObjectName="HmsDoctor"/>-->
@ -85,7 +85,7 @@
<!-- <table tableName="ems_evaluation" domainObjectName="EmsEvaluation"/>--> <!-- <table tableName="ems_evaluation" domainObjectName="EmsEvaluation"/>-->
<!-- <table tableName="ems_evaluation_informed_consent" domainObjectName="EmsEvaluationInformedConsent"/>--> <!-- <table tableName="ems_evaluation_informed_consent" domainObjectName="EmsEvaluationInformedConsent"/>-->
<!-- <table tableName="ems_evaluation_question_version" domainObjectName="EmsEvaluationQuestionVersion"/>--> <!-- <table tableName="ems_evaluation_question_version" domainObjectName="EmsEvaluationQuestionVersion"/>-->
<table tableName="ems_evaluation_scale_relevance" domainObjectName="EmsEvaluationScaleRelevance"/> <!-- <table tableName="ems_evaluation_scale_relevance" domainObjectName="EmsEvaluationScaleRelevance"/>-->
<!-- <table tableName="ems_evaluation_step" domainObjectName="EmsEvaluationStep"/>--> <!-- <table tableName="ems_evaluation_step" domainObjectName="EmsEvaluationStep"/>-->
<!-- <table tableName="ems_patient_recording" domainObjectName="EmsPatientRecording"/>--> <!-- <table tableName="ems_patient_recording" domainObjectName="EmsPatientRecording"/>-->
<!-- <table tableName="ems_evaluation_aduit" domainObjectName="EmsEvaluationAduit"/>--> <!-- <table tableName="ems_evaluation_aduit" domainObjectName="EmsEvaluationAduit"/>-->
@ -115,7 +115,7 @@
<!-- <table tableName="ams_patient_question_record" domainObjectName="AmsPatientQuestionRecord"/>--> <!-- <table tableName="ams_patient_question_record" domainObjectName="AmsPatientQuestionRecord"/>-->
<!-- <table tableName="ams_patient_question_record_desc" domainObjectName="AmsPatientQuestionRecordDesc"/>--> <!-- <table tableName="ams_patient_question_record_desc" domainObjectName="AmsPatientQuestionRecordDesc"/>-->
<!-- <table tableName="rms_report" domainObjectName="RmsReport"/>--> <table tableName="rms_report" domainObjectName="RmsReport"/>
<!-- <table tableName="rms_report_basics_record" domainObjectName="RmsReportBasicsRecord"/>--> <!-- <table tableName="rms_report_basics_record" domainObjectName="RmsReportBasicsRecord"/>-->
<!-- <table tableName="rms_report_range" domainObjectName="RmsReportRange"/>--> <!-- <table tableName="rms_report_range" domainObjectName="RmsReportRange"/>-->
<!-- <table tableName="rms_report_scale_score" domainObjectName="RmsReportScaleScore"/>--> <!-- <table tableName="rms_report_scale_score" domainObjectName="RmsReportScaleScore"/>-->

22
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/RmsReport.java

@ -28,6 +28,10 @@ public class RmsReport implements Serializable {
private String url; private String url;
private String persionUrl;
private String positiveUrl;
private String qrCodeUrl; private String qrCodeUrl;
private String signUrl; private String signUrl;
@ -150,6 +154,22 @@ public class RmsReport implements Serializable {
this.url = url == null ? null : url.trim(); this.url = url == null ? null : url.trim();
} }
public String getPersionUrl() {
return persionUrl;
}
public void setPersionUrl(String persionUrl) {
this.persionUrl = persionUrl == null ? null : persionUrl.trim();
}
public String getPositiveUrl() {
return positiveUrl;
}
public void setPositiveUrl(String positiveUrl) {
this.positiveUrl = positiveUrl == null ? null : positiveUrl.trim();
}
public String getQrCodeUrl() { public String getQrCodeUrl() {
return qrCodeUrl; return qrCodeUrl;
} }
@ -264,6 +284,8 @@ public class RmsReport implements Serializable {
sb.append(", reportTime=").append(reportTime); sb.append(", reportTime=").append(reportTime);
sb.append(", evaluationCode=").append(evaluationCode); sb.append(", evaluationCode=").append(evaluationCode);
sb.append(", url=").append(url); sb.append(", url=").append(url);
sb.append(", persionUrl=").append(persionUrl);
sb.append(", positiveUrl=").append(positiveUrl);
sb.append(", qrCodeUrl=").append(qrCodeUrl); sb.append(", qrCodeUrl=").append(qrCodeUrl);
sb.append(", signUrl=").append(signUrl); sb.append(", signUrl=").append(signUrl);
sb.append(", remark=").append(remark); sb.append(", remark=").append(remark);

140
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/RmsReportExample.java

@ -895,6 +895,146 @@ public class RmsReportExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPersionUrlIsNull() {
addCriterion("persion_url is null");
return (Criteria) this;
}
public Criteria andPersionUrlIsNotNull() {
addCriterion("persion_url is not null");
return (Criteria) this;
}
public Criteria andPersionUrlEqualTo(String value) {
addCriterion("persion_url =", value, "persionUrl");
return (Criteria) this;
}
public Criteria andPersionUrlNotEqualTo(String value) {
addCriterion("persion_url <>", value, "persionUrl");
return (Criteria) this;
}
public Criteria andPersionUrlGreaterThan(String value) {
addCriterion("persion_url >", value, "persionUrl");
return (Criteria) this;
}
public Criteria andPersionUrlGreaterThanOrEqualTo(String value) {
addCriterion("persion_url >=", value, "persionUrl");
return (Criteria) this;
}
public Criteria andPersionUrlLessThan(String value) {
addCriterion("persion_url <", value, "persionUrl");
return (Criteria) this;
}
public Criteria andPersionUrlLessThanOrEqualTo(String value) {
addCriterion("persion_url <=", value, "persionUrl");
return (Criteria) this;
}
public Criteria andPersionUrlLike(String value) {
addCriterion("persion_url like", value, "persionUrl");
return (Criteria) this;
}
public Criteria andPersionUrlNotLike(String value) {
addCriterion("persion_url not like", value, "persionUrl");
return (Criteria) this;
}
public Criteria andPersionUrlIn(List<String> values) {
addCriterion("persion_url in", values, "persionUrl");
return (Criteria) this;
}
public Criteria andPersionUrlNotIn(List<String> values) {
addCriterion("persion_url not in", values, "persionUrl");
return (Criteria) this;
}
public Criteria andPersionUrlBetween(String value1, String value2) {
addCriterion("persion_url between", value1, value2, "persionUrl");
return (Criteria) this;
}
public Criteria andPersionUrlNotBetween(String value1, String value2) {
addCriterion("persion_url not between", value1, value2, "persionUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlIsNull() {
addCriterion("positive_url is null");
return (Criteria) this;
}
public Criteria andPositiveUrlIsNotNull() {
addCriterion("positive_url is not null");
return (Criteria) this;
}
public Criteria andPositiveUrlEqualTo(String value) {
addCriterion("positive_url =", value, "positiveUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlNotEqualTo(String value) {
addCriterion("positive_url <>", value, "positiveUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlGreaterThan(String value) {
addCriterion("positive_url >", value, "positiveUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlGreaterThanOrEqualTo(String value) {
addCriterion("positive_url >=", value, "positiveUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlLessThan(String value) {
addCriterion("positive_url <", value, "positiveUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlLessThanOrEqualTo(String value) {
addCriterion("positive_url <=", value, "positiveUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlLike(String value) {
addCriterion("positive_url like", value, "positiveUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlNotLike(String value) {
addCriterion("positive_url not like", value, "positiveUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlIn(List<String> values) {
addCriterion("positive_url in", values, "positiveUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlNotIn(List<String> values) {
addCriterion("positive_url not in", values, "positiveUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlBetween(String value1, String value2) {
addCriterion("positive_url between", value1, value2, "positiveUrl");
return (Criteria) this;
}
public Criteria andPositiveUrlNotBetween(String value1, String value2) {
addCriterion("positive_url not between", value1, value2, "positiveUrl");
return (Criteria) this;
}
public Criteria andQrCodeUrlIsNull() { public Criteria andQrCodeUrlIsNull() {
addCriterion("qr_code_url is null"); addCriterion("qr_code_url is null");
return (Criteria) this; return (Criteria) this;

122
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/RmsReportScaleScore.java

@ -15,15 +15,7 @@ public class RmsReportScaleScore implements Serializable {
private String impression; private String impression;
private Integer sort; private Long comboId;
private Long scaleAssConf;
private String result;
private String needPlan;
private String plan;
private String createBy; private String createBy;
@ -35,6 +27,18 @@ public class RmsReportScaleScore implements Serializable {
private Byte delFlag; private Byte delFlag;
private Long scaleAssConf;
private String result;
private String needPlan;
private String plan;
private Integer sort;
private Byte isShow;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
@ -77,44 +81,12 @@ public class RmsReportScaleScore implements Serializable {
this.impression = impression == null ? null : impression.trim(); this.impression = impression == null ? null : impression.trim();
} }
public Integer getSort() { public Long getComboId() {
return sort; return comboId;
}
public void setSort(Integer sort) {
this.sort = sort;
} }
public Long getScaleAssConf() { public void setComboId(Long comboId) {
return scaleAssConf; this.comboId = comboId;
}
public void setScaleAssConf(Long scaleAssConf) {
this.scaleAssConf = scaleAssConf;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result == null ? null : result.trim();
}
public String getNeedPlan() {
return needPlan;
}
public void setNeedPlan(String needPlan) {
this.needPlan = needPlan == null ? null : needPlan.trim();
}
public String getPlan() {
return plan;
}
public void setPlan(String plan) {
this.plan = plan == null ? null : plan.trim();
} }
public String getCreateBy() { public String getCreateBy() {
@ -157,6 +129,54 @@ public class RmsReportScaleScore implements Serializable {
this.delFlag = delFlag; this.delFlag = delFlag;
} }
public Long getScaleAssConf() {
return scaleAssConf;
}
public void setScaleAssConf(Long scaleAssConf) {
this.scaleAssConf = scaleAssConf;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result == null ? null : result.trim();
}
public String getNeedPlan() {
return needPlan;
}
public void setNeedPlan(String needPlan) {
this.needPlan = needPlan == null ? null : needPlan.trim();
}
public String getPlan() {
return plan;
}
public void setPlan(String plan) {
this.plan = plan == null ? null : plan.trim();
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Byte getIsShow() {
return isShow;
}
public void setIsShow(Byte isShow) {
this.isShow = isShow;
}
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -168,16 +188,18 @@ public class RmsReportScaleScore implements Serializable {
sb.append(", scaleCode=").append(scaleCode); sb.append(", scaleCode=").append(scaleCode);
sb.append(", score=").append(score); sb.append(", score=").append(score);
sb.append(", impression=").append(impression); sb.append(", impression=").append(impression);
sb.append(", sort=").append(sort); sb.append(", comboId=").append(comboId);
sb.append(", scaleAssConf=").append(scaleAssConf);
sb.append(", result=").append(result);
sb.append(", needPlan=").append(needPlan);
sb.append(", plan=").append(plan);
sb.append(", createBy=").append(createBy); sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy); sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime); sb.append(", updateTime=").append(updateTime);
sb.append(", delFlag=").append(delFlag); sb.append(", delFlag=").append(delFlag);
sb.append(", scaleAssConf=").append(scaleAssConf);
sb.append(", result=").append(result);
sb.append(", needPlan=").append(needPlan);
sb.append(", plan=").append(plan);
sb.append(", sort=").append(sort);
sb.append(", isShow=").append(isShow);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }

640
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/po/RmsReportScaleScoreExample.java

File diff suppressed because it is too large

2
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/vo/AmsVo.java

@ -685,6 +685,8 @@ public class AmsVo {
private Integer totalNum; private Integer totalNum;
@ApiModelProperty("已完成题数") @ApiModelProperty("已完成题数")
private Integer completedNum; private Integer completedNum;
private Integer sort;
@ApiModelProperty("各项分数") @ApiModelProperty("各项分数")
private List<ScoreScore> scaleScoreList; private List<ScoreScore> scaleScoreList;
@ApiModelProperty("试题详情") @ApiModelProperty("试题详情")

44
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/vo/RmsVo.java

@ -188,6 +188,7 @@ public class RmsVo {
private String deptName; private String deptName;
} }
@Data @Data
@ApiModel("PatientReportVoGenerate") @ApiModel("PatientReportVoGenerate")
public static class Generate { public static class Generate {
@ -274,6 +275,10 @@ public class RmsVo {
@ApiModelProperty("初步印象") @ApiModelProperty("初步印象")
private String initialImpression; private String initialImpression;
private String testerName; private String testerName;
@ApiModelProperty("出生日期")
private String birthday;
public List<PdfUtil.Row> toPdfRow() { public List<PdfUtil.Row> toPdfRow() {
List<PdfUtil.Row> rows = getInitRows(); List<PdfUtil.Row> rows = getInitRows();
//第四栏 //第四栏
@ -479,6 +484,8 @@ public class RmsVo {
private String result; private String result;
private String needPlan; private String needPlan;
@ApiModelProperty("套餐Id")
private Long comboId;
@ApiModelProperty("测评量表排序") @ApiModelProperty("测评量表排序")
private Integer ecrSort; private Integer ecrSort;
@ -487,6 +494,7 @@ public class RmsVo {
@ApiModelProperty("中医体质辨识养生建议") @ApiModelProperty("中医体质辨识养生建议")
private List<TzbsRmsReportYsjy> reportYsjyList; private List<TzbsRmsReportYsjy> reportYsjyList;
public void addSub(ReportScore score) { public void addSub(ReportScore score) {
this.subReport.add(score); this.subReport.add(score);
} }
@ -1203,6 +1211,42 @@ public class RmsVo {
private Integer optionNum; private Integer optionNum;
} }
@Data
public static class ExportInfo {
@ApiModelProperty("报告单ID")
private Long reporrtId;
@ApiModelProperty("量表CODE")
private String scaleCode;
@ApiModelProperty("量表名称")
private String scaleName;
@ApiModelProperty("得分")
private BigDecimal score;
@ApiModelProperty("初步印象")
private String impression;
@ApiModelProperty("套餐ID")
private Long comboId;
@ApiModelProperty("套餐名称")
private String comboName;
@ApiModelProperty("父级套餐名称")
private String comboParentName;
@ApiModelProperty("量表分值结论配置Id")
private String scaleAssConf;
@ApiModelProperty("当前分值段结论")
private String result;
@ApiModelProperty("需要防治(1需要,0不需要)")
private Integer needPlan;
@ApiModelProperty("防治计划")
private String plan;
@ApiModelProperty("排序")
private Integer sort;
@ApiModelProperty("中医体质辨识结论")
private List<TzbsRmsReportResult> reportResultList;
@ApiModelProperty("中医体质辨识养生建议")
private List<TzbsRmsReportYsjy> reportYsjyList;
}
@ApiModel("统计四列表之报告单-DTO") @ApiModel("统计四列表之报告单-DTO")
@Data @Data

56
ruisi_java/ruisi-system/src/main/resources/mapper/system/RmsReportMapper.xml

@ -14,6 +14,8 @@
<result column="report_time" jdbcType="BIGINT" property="reportTime" /> <result column="report_time" jdbcType="BIGINT" property="reportTime" />
<result column="evaluation_code" jdbcType="VARCHAR" property="evaluationCode" /> <result column="evaluation_code" jdbcType="VARCHAR" property="evaluationCode" />
<result column="url" jdbcType="VARCHAR" property="url" /> <result column="url" jdbcType="VARCHAR" property="url" />
<result column="persion_url" jdbcType="VARCHAR" property="persionUrl" />
<result column="positive_url" jdbcType="VARCHAR" property="positiveUrl" />
<result column="qr_code_url" jdbcType="VARCHAR" property="qrCodeUrl" /> <result column="qr_code_url" jdbcType="VARCHAR" property="qrCodeUrl" />
<result column="sign_url" jdbcType="VARCHAR" property="signUrl" /> <result column="sign_url" jdbcType="VARCHAR" property="signUrl" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
@ -87,9 +89,9 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, name, evaluation_id, initial_impression, clinical_diagnosis, pasi, patient_age, id, name, evaluation_id, initial_impression, clinical_diagnosis, pasi, patient_age,
department, bed_number, report_time, evaluation_code, url, qr_code_url, sign_url, department, bed_number, report_time, evaluation_code, url, persion_url, positive_url,
remark, show_status, hospital, working_score, create_by, create_time, update_by, qr_code_url, sign_url, remark, show_status, hospital, working_score, create_by, create_time,
update_time, del_flag, visit_no update_by, update_time, del_flag, visit_no
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.system.domain.po.RmsReportExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.system.domain.po.RmsReportExample" resultMap="BaseResultMap">
select select
@ -126,20 +128,20 @@
initial_impression, clinical_diagnosis, pasi, initial_impression, clinical_diagnosis, pasi,
patient_age, department, bed_number, patient_age, department, bed_number,
report_time, evaluation_code, url, report_time, evaluation_code, url,
qr_code_url, sign_url, remark, persion_url, positive_url, qr_code_url,
show_status, hospital, working_score, sign_url, remark, show_status,
create_by, create_time, update_by, hospital, working_score, create_by,
update_time, del_flag, visit_no create_time, update_by, update_time,
) del_flag, visit_no)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{evaluationId,jdbcType=BIGINT}, values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{evaluationId,jdbcType=BIGINT},
#{initialImpression,jdbcType=VARCHAR}, #{clinicalDiagnosis,jdbcType=VARCHAR}, #{pasi,jdbcType=TINYINT}, #{initialImpression,jdbcType=VARCHAR}, #{clinicalDiagnosis,jdbcType=VARCHAR}, #{pasi,jdbcType=TINYINT},
#{patientAge,jdbcType=INTEGER}, #{department,jdbcType=VARCHAR}, #{bedNumber,jdbcType=VARCHAR}, #{patientAge,jdbcType=INTEGER}, #{department,jdbcType=VARCHAR}, #{bedNumber,jdbcType=VARCHAR},
#{reportTime,jdbcType=BIGINT}, #{evaluationCode,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{reportTime,jdbcType=BIGINT}, #{evaluationCode,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
#{qrCodeUrl,jdbcType=VARCHAR}, #{signUrl,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{persionUrl,jdbcType=VARCHAR}, #{positiveUrl,jdbcType=VARCHAR}, #{qrCodeUrl,jdbcType=VARCHAR},
#{showStatus,jdbcType=TINYINT}, #{hospital,jdbcType=VARCHAR}, #{workingScore,jdbcType=INTEGER}, #{signUrl,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{showStatus,jdbcType=TINYINT},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{hospital,jdbcType=VARCHAR}, #{workingScore,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT}, #{visitNo,jdbcType=VARCHAR} #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
) #{delFlag,jdbcType=TINYINT}, #{visitNo,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.system.domain.po.RmsReport"> <insert id="insertSelective" parameterType="com.ccsens.system.domain.po.RmsReport">
insert into rms_report insert into rms_report
@ -180,6 +182,12 @@
<if test="url != null"> <if test="url != null">
url, url,
</if> </if>
<if test="persionUrl != null">
persion_url,
</if>
<if test="positiveUrl != null">
positive_url,
</if>
<if test="qrCodeUrl != null"> <if test="qrCodeUrl != null">
qr_code_url, qr_code_url,
</if> </if>
@ -254,6 +262,12 @@
<if test="url != null"> <if test="url != null">
#{url,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
</if> </if>
<if test="persionUrl != null">
#{persionUrl,jdbcType=VARCHAR},
</if>
<if test="positiveUrl != null">
#{positiveUrl,jdbcType=VARCHAR},
</if>
<if test="qrCodeUrl != null"> <if test="qrCodeUrl != null">
#{qrCodeUrl,jdbcType=VARCHAR}, #{qrCodeUrl,jdbcType=VARCHAR},
</if> </if>
@ -337,6 +351,12 @@
<if test="record.url != null"> <if test="record.url != null">
url = #{record.url,jdbcType=VARCHAR}, url = #{record.url,jdbcType=VARCHAR},
</if> </if>
<if test="record.persionUrl != null">
persion_url = #{record.persionUrl,jdbcType=VARCHAR},
</if>
<if test="record.positiveUrl != null">
positive_url = #{record.positiveUrl,jdbcType=VARCHAR},
</if>
<if test="record.qrCodeUrl != null"> <if test="record.qrCodeUrl != null">
qr_code_url = #{record.qrCodeUrl,jdbcType=VARCHAR}, qr_code_url = #{record.qrCodeUrl,jdbcType=VARCHAR},
</if> </if>
@ -392,6 +412,8 @@
report_time = #{record.reportTime,jdbcType=BIGINT}, report_time = #{record.reportTime,jdbcType=BIGINT},
evaluation_code = #{record.evaluationCode,jdbcType=VARCHAR}, evaluation_code = #{record.evaluationCode,jdbcType=VARCHAR},
url = #{record.url,jdbcType=VARCHAR}, url = #{record.url,jdbcType=VARCHAR},
persion_url = #{record.persionUrl,jdbcType=VARCHAR},
positive_url = #{record.positiveUrl,jdbcType=VARCHAR},
qr_code_url = #{record.qrCodeUrl,jdbcType=VARCHAR}, qr_code_url = #{record.qrCodeUrl,jdbcType=VARCHAR},
sign_url = #{record.signUrl,jdbcType=VARCHAR}, sign_url = #{record.signUrl,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
@ -444,6 +466,12 @@
<if test="url != null"> <if test="url != null">
url = #{url,jdbcType=VARCHAR}, url = #{url,jdbcType=VARCHAR},
</if> </if>
<if test="persionUrl != null">
persion_url = #{persionUrl,jdbcType=VARCHAR},
</if>
<if test="positiveUrl != null">
positive_url = #{positiveUrl,jdbcType=VARCHAR},
</if>
<if test="qrCodeUrl != null"> <if test="qrCodeUrl != null">
qr_code_url = #{qrCodeUrl,jdbcType=VARCHAR}, qr_code_url = #{qrCodeUrl,jdbcType=VARCHAR},
</if> </if>
@ -496,6 +524,8 @@
report_time = #{reportTime,jdbcType=BIGINT}, report_time = #{reportTime,jdbcType=BIGINT},
evaluation_code = #{evaluationCode,jdbcType=VARCHAR}, evaluation_code = #{evaluationCode,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR}, url = #{url,jdbcType=VARCHAR},
persion_url = #{persionUrl,jdbcType=VARCHAR},
positive_url = #{positiveUrl,jdbcType=VARCHAR},
qr_code_url = #{qrCodeUrl,jdbcType=VARCHAR}, qr_code_url = #{qrCodeUrl,jdbcType=VARCHAR},
sign_url = #{signUrl,jdbcType=VARCHAR}, sign_url = #{signUrl,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},

200
ruisi_java/ruisi-system/src/main/resources/mapper/system/RmsReportScaleScoreMapper.xml

@ -7,16 +7,18 @@
<result column="scale_code" jdbcType="VARCHAR" property="scaleCode" /> <result column="scale_code" jdbcType="VARCHAR" property="scaleCode" />
<result column="score" jdbcType="DECIMAL" property="score" /> <result column="score" jdbcType="DECIMAL" property="score" />
<result column="impression" jdbcType="VARCHAR" property="impression" /> <result column="impression" jdbcType="VARCHAR" property="impression" />
<result column="sort" jdbcType="INTEGER" property="sort" /> <result column="combo_id" jdbcType="BIGINT" property="comboId" />
<result column="scale_ass_conf" jdbcType="BIGINT" property="scaleAssConf" />
<result column="result" jdbcType="VARCHAR" property="result" />
<result column="need_plan" jdbcType="VARCHAR" property="needPlan" />
<result column="plan" jdbcType="VARCHAR" property="plan" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> <result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" /> <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
<result column="scale_ass_conf" jdbcType="BIGINT" property="scaleAssConf" />
<result column="result" jdbcType="VARCHAR" property="result" />
<result column="need_plan" jdbcType="VARCHAR" property="needPlan" />
<result column="plan" jdbcType="VARCHAR" property="plan" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="is_show" jdbcType="TINYINT" property="isShow" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -77,8 +79,8 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, report_id, scale_code, score, impression, sort, scale_ass_conf, result, need_plan, id, report_id, scale_code, score, impression, combo_id, create_by, create_time, update_by,
plan, create_by, create_time, update_by, update_time, del_flag update_time, del_flag, scale_ass_conf, result, need_plan, plan, sort, is_show
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.system.domain.po.RmsReportScaleScoreExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.system.domain.po.RmsReportScaleScoreExample" resultMap="BaseResultMap">
select select
@ -112,17 +114,17 @@
</delete> </delete>
<insert id="insert" parameterType="com.ccsens.system.domain.po.RmsReportScaleScore"> <insert id="insert" parameterType="com.ccsens.system.domain.po.RmsReportScaleScore">
insert into rms_report_scale_score (id, report_id, scale_code, insert into rms_report_scale_score (id, report_id, scale_code,
score, impression, sort, score, impression, combo_id,
scale_ass_conf, result, need_plan, create_by, create_time, update_by,
plan, create_by, create_time, update_time, del_flag, scale_ass_conf,
update_by, update_time, del_flag result, need_plan, plan,
) sort, is_show)
values (#{id,jdbcType=BIGINT}, #{reportId,jdbcType=BIGINT}, #{scaleCode,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{reportId,jdbcType=BIGINT}, #{scaleCode,jdbcType=VARCHAR},
#{score,jdbcType=DECIMAL}, #{impression,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{score,jdbcType=DECIMAL}, #{impression,jdbcType=VARCHAR}, #{comboId,jdbcType=BIGINT},
#{scaleAssConf,jdbcType=BIGINT}, #{result,jdbcType=VARCHAR}, #{needPlan,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{plan,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT}, #{scaleAssConf,jdbcType=BIGINT},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT} #{result,jdbcType=VARCHAR}, #{needPlan,jdbcType=VARCHAR}, #{plan,jdbcType=VARCHAR},
) #{sort,jdbcType=INTEGER}, #{isShow,jdbcType=TINYINT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.ccsens.system.domain.po.RmsReportScaleScore"> <insert id="insertSelective" parameterType="com.ccsens.system.domain.po.RmsReportScaleScore">
insert into rms_report_scale_score insert into rms_report_scale_score
@ -142,20 +144,8 @@
<if test="impression != null"> <if test="impression != null">
impression, impression,
</if> </if>
<if test="sort != null"> <if test="comboId != null">
sort, combo_id,
</if>
<if test="scaleAssConf != null">
scale_ass_conf,
</if>
<if test="result != null">
result,
</if>
<if test="needPlan != null">
need_plan,
</if>
<if test="plan != null">
plan,
</if> </if>
<if test="createBy != null"> <if test="createBy != null">
create_by, create_by,
@ -172,6 +162,24 @@
<if test="delFlag != null"> <if test="delFlag != null">
del_flag, del_flag,
</if> </if>
<if test="scaleAssConf != null">
scale_ass_conf,
</if>
<if test="result != null">
result,
</if>
<if test="needPlan != null">
need_plan,
</if>
<if test="plan != null">
plan,
</if>
<if test="sort != null">
sort,
</if>
<if test="isShow != null">
is_show,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -189,20 +197,8 @@
<if test="impression != null"> <if test="impression != null">
#{impression,jdbcType=VARCHAR}, #{impression,jdbcType=VARCHAR},
</if> </if>
<if test="sort != null"> <if test="comboId != null">
#{sort,jdbcType=INTEGER}, #{comboId,jdbcType=BIGINT},
</if>
<if test="scaleAssConf != null">
#{scaleAssConf,jdbcType=BIGINT},
</if>
<if test="result != null">
#{result,jdbcType=VARCHAR},
</if>
<if test="needPlan != null">
#{needPlan,jdbcType=VARCHAR},
</if>
<if test="plan != null">
#{plan,jdbcType=VARCHAR},
</if> </if>
<if test="createBy != null"> <if test="createBy != null">
#{createBy,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
@ -219,6 +215,24 @@
<if test="delFlag != null"> <if test="delFlag != null">
#{delFlag,jdbcType=TINYINT}, #{delFlag,jdbcType=TINYINT},
</if> </if>
<if test="scaleAssConf != null">
#{scaleAssConf,jdbcType=BIGINT},
</if>
<if test="result != null">
#{result,jdbcType=VARCHAR},
</if>
<if test="needPlan != null">
#{needPlan,jdbcType=VARCHAR},
</if>
<if test="plan != null">
#{plan,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="isShow != null">
#{isShow,jdbcType=TINYINT},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.ccsens.system.domain.po.RmsReportScaleScoreExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.ccsens.system.domain.po.RmsReportScaleScoreExample" resultType="java.lang.Long">
@ -245,20 +259,8 @@
<if test="record.impression != null"> <if test="record.impression != null">
impression = #{record.impression,jdbcType=VARCHAR}, impression = #{record.impression,jdbcType=VARCHAR},
</if> </if>
<if test="record.sort != null"> <if test="record.comboId != null">
sort = #{record.sort,jdbcType=INTEGER}, combo_id = #{record.comboId,jdbcType=BIGINT},
</if>
<if test="record.scaleAssConf != null">
scale_ass_conf = #{record.scaleAssConf,jdbcType=BIGINT},
</if>
<if test="record.result != null">
result = #{record.result,jdbcType=VARCHAR},
</if>
<if test="record.needPlan != null">
need_plan = #{record.needPlan,jdbcType=VARCHAR},
</if>
<if test="record.plan != null">
plan = #{record.plan,jdbcType=VARCHAR},
</if> </if>
<if test="record.createBy != null"> <if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR}, create_by = #{record.createBy,jdbcType=VARCHAR},
@ -275,6 +277,24 @@
<if test="record.delFlag != null"> <if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=TINYINT}, del_flag = #{record.delFlag,jdbcType=TINYINT},
</if> </if>
<if test="record.scaleAssConf != null">
scale_ass_conf = #{record.scaleAssConf,jdbcType=BIGINT},
</if>
<if test="record.result != null">
result = #{record.result,jdbcType=VARCHAR},
</if>
<if test="record.needPlan != null">
need_plan = #{record.needPlan,jdbcType=VARCHAR},
</if>
<if test="record.plan != null">
plan = #{record.plan,jdbcType=VARCHAR},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.isShow != null">
is_show = #{record.isShow,jdbcType=TINYINT},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -287,16 +307,18 @@
scale_code = #{record.scaleCode,jdbcType=VARCHAR}, scale_code = #{record.scaleCode,jdbcType=VARCHAR},
score = #{record.score,jdbcType=DECIMAL}, score = #{record.score,jdbcType=DECIMAL},
impression = #{record.impression,jdbcType=VARCHAR}, impression = #{record.impression,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER}, combo_id = #{record.comboId,jdbcType=BIGINT},
scale_ass_conf = #{record.scaleAssConf,jdbcType=BIGINT},
result = #{record.result,jdbcType=VARCHAR},
need_plan = #{record.needPlan,jdbcType=VARCHAR},
plan = #{record.plan,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR}, create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR}, update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
del_flag = #{record.delFlag,jdbcType=TINYINT} del_flag = #{record.delFlag,jdbcType=TINYINT},
scale_ass_conf = #{record.scaleAssConf,jdbcType=BIGINT},
result = #{record.result,jdbcType=VARCHAR},
need_plan = #{record.needPlan,jdbcType=VARCHAR},
plan = #{record.plan,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER},
is_show = #{record.isShow,jdbcType=TINYINT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -316,20 +338,8 @@
<if test="impression != null"> <if test="impression != null">
impression = #{impression,jdbcType=VARCHAR}, impression = #{impression,jdbcType=VARCHAR},
</if> </if>
<if test="sort != null"> <if test="comboId != null">
sort = #{sort,jdbcType=INTEGER}, combo_id = #{comboId,jdbcType=BIGINT},
</if>
<if test="scaleAssConf != null">
scale_ass_conf = #{scaleAssConf,jdbcType=BIGINT},
</if>
<if test="result != null">
result = #{result,jdbcType=VARCHAR},
</if>
<if test="needPlan != null">
need_plan = #{needPlan,jdbcType=VARCHAR},
</if>
<if test="plan != null">
plan = #{plan,jdbcType=VARCHAR},
</if> </if>
<if test="createBy != null"> <if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR},
@ -346,6 +356,24 @@
<if test="delFlag != null"> <if test="delFlag != null">
del_flag = #{delFlag,jdbcType=TINYINT}, del_flag = #{delFlag,jdbcType=TINYINT},
</if> </if>
<if test="scaleAssConf != null">
scale_ass_conf = #{scaleAssConf,jdbcType=BIGINT},
</if>
<if test="result != null">
result = #{result,jdbcType=VARCHAR},
</if>
<if test="needPlan != null">
need_plan = #{needPlan,jdbcType=VARCHAR},
</if>
<if test="plan != null">
plan = #{plan,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="isShow != null">
is_show = #{isShow,jdbcType=TINYINT},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
@ -355,16 +383,18 @@
scale_code = #{scaleCode,jdbcType=VARCHAR}, scale_code = #{scaleCode,jdbcType=VARCHAR},
score = #{score,jdbcType=DECIMAL}, score = #{score,jdbcType=DECIMAL},
impression = #{impression,jdbcType=VARCHAR}, impression = #{impression,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER}, combo_id = #{comboId,jdbcType=BIGINT},
scale_ass_conf = #{scaleAssConf,jdbcType=BIGINT},
result = #{result,jdbcType=VARCHAR},
need_plan = #{needPlan,jdbcType=VARCHAR},
plan = #{plan,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR}, update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=TINYINT} del_flag = #{delFlag,jdbcType=TINYINT},
scale_ass_conf = #{scaleAssConf,jdbcType=BIGINT},
result = #{result,jdbcType=VARCHAR},
need_plan = #{needPlan,jdbcType=VARCHAR},
plan = #{plan,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
is_show = #{isShow,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

7
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/AmsReportTemplateController.java

@ -61,6 +61,13 @@ public class AmsReportTemplateController {
return JsonResponse.ok(amsReportService.exportYs(dto)); return JsonResponse.ok(amsReportService.exportYs(dto));
} }
@Anonymous
@ApiOperation("导出医生版报告")
@PostMapping("/exportYs1")
public JsonResponse<AmsReportVo.Result> exportYs1(@RequestBody @Validated RmsDto.ExportReport1Dto dto){
return JsonResponse.ok(amsReportService.exportYs1(dto));
}
@Anonymous @Anonymous
@ApiOperation("导出阳性版报告") @ApiOperation("导出阳性版报告")
@PostMapping("/exportYx") @PostMapping("/exportYx")

9
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/RmsController.java

@ -57,6 +57,15 @@ public class RmsController extends BaseController {
return JsonResponse.ok(detail); return JsonResponse.ok(detail);
} }
@Anonymous
@ApiOperation(value = "查询报告单详情",notes = "根据测评ID查询报告单详情")
@PostMapping(value="/queryReport")
public JsonResponse<RmsVo.ReportDetail> queryReport(@RequestBody @ApiParam @Valid RmsDto.QueryDetail dto){
log.info("生成报告单请求参数:{}", dto);
RmsVo.ReportDetail detail = rmsService.queryReport(dto);
return JsonResponse.ok(detail);
}
//查询报告单列表 //查询报告单列表
@ApiOperation(value = "查询报告单列表(按日期)",notes = "根据测评ID查询报告单列表") @ApiOperation(value = "查询报告单列表(按日期)",notes = "根据测评ID查询报告单列表")
@PostMapping(value="/queryReportListByTime") @PostMapping(value="/queryReportListByTime")

1
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/persist/dao/RmsDao.java

@ -136,4 +136,5 @@ public interface RmsDao {
List<RmsVo.ReportScore> queryEmsScaleScore(@Param("evaluationId") Long evaluationId, List<RmsVo.ReportScore> queryEmsScaleScore(@Param("evaluationId") Long evaluationId,
@Param("scaleCodeList") List<String> scaleCodeList); @Param("scaleCodeList") List<String> scaleCodeList);
List<RmsVo.ExportInfo> queryReportExportInfo(@Param("evaluationId") Long evaluationId);
} }

1
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/AmsReportService.java

@ -29,6 +29,7 @@ public interface AmsReportService {
*/ */
AmsReportVo.Result exportYs(RmsDto.ExportReport1Dto dto); AmsReportVo.Result exportYs(RmsDto.ExportReport1Dto dto);
AmsReportVo.Result exportYs1(RmsDto.ExportReport1Dto dto);
/** /**
* 导出阳性报告 * 导出阳性报告
* @param dto * @param dto

2
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/IRmsService.java

@ -15,6 +15,8 @@ import java.util.List;
public interface IRmsService { public interface IRmsService {
RmsVo.ReportDetail queryReportDetail(RmsDto.QueryDetail dto); RmsVo.ReportDetail queryReportDetail(RmsDto.QueryDetail dto);
RmsVo.ReportDetail queryReport(RmsDto.QueryDetail dto);
List<RmsVo.ReportScore> buildReportScoreTree(List<RmsVo.ReportScore> allReportScores, Long rootParentId); List<RmsVo.ReportScore> buildReportScoreTree(List<RmsVo.ReportScore> allReportScores, Long rootParentId);
/** /**

211
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/AmsReportServiceImpl.java

@ -608,6 +608,13 @@ public class AmsReportServiceImpl implements AmsReportService {
@Override @Override
public AmsReportVo.Result exportGr(RmsDto.ExportReport1Dto dto) throws IOException { public AmsReportVo.Result exportGr(RmsDto.ExportReport1Dto dto) throws IOException {
RmsReport report = rmsReportMapper.selectByPrimaryKey(dto.getReportId());
if (ObjectUtil.isNotNull(report) && StrUtil.isNotBlank(report.getPersionUrl())) {
AmsReportVo.Result result = new AmsReportVo.Result();
result.setPath(report.getPersionUrl());
return result;
}
RmsDto.QueryDetail queryDetail = new RmsDto.QueryDetail(); RmsDto.QueryDetail queryDetail = new RmsDto.QueryDetail();
queryDetail.setEvaluationId(dto.getEvaluationId()); queryDetail.setEvaluationId(dto.getEvaluationId());
RmsVo.ReportDetail detail = rmsService.queryReportDetail(queryDetail); RmsVo.ReportDetail detail = rmsService.queryReportDetail(queryDetail);
@ -910,7 +917,11 @@ public class AmsReportServiceImpl implements AmsReportService {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
//将生成的文件路径保存到报告单内
if (ObjectUtil.isNotNull(report)) {
report.setPersionUrl(pdfPath);
rmsReportMapper.updateByPrimaryKeySelective(report);
}
AmsReportVo.Result result = new AmsReportVo.Result(); AmsReportVo.Result result = new AmsReportVo.Result();
result.setWord(filePath); result.setWord(filePath);
result.setPath(pdfPath); result.setPath(pdfPath);
@ -977,7 +988,6 @@ public class AmsReportServiceImpl implements AmsReportService {
return result; return result;
} }
RmsDto.QueryDetail queryDetail = new RmsDto.QueryDetail(); RmsDto.QueryDetail queryDetail = new RmsDto.QueryDetail();
queryDetail.setEvaluationId(dto.getEvaluationId()); queryDetail.setEvaluationId(dto.getEvaluationId());
RmsVo.ReportDetail detail = rmsService.queryReportDetail(queryDetail); RmsVo.ReportDetail detail = rmsService.queryReportDetail(queryDetail);
@ -1212,8 +1222,199 @@ public class AmsReportServiceImpl implements AmsReportService {
return result; return result;
} }
@Override
public AmsReportVo.Result exportYs1(RmsDto.ExportReport1Dto dto) {
RmsReport report = rmsReportMapper.selectByPrimaryKey(dto.getReportId());
if (ObjectUtil.isNotNull(report) && StrUtil.isNotBlank(report.getUrl())) {
AmsReportVo.Result result = new AmsReportVo.Result();
result.setPath(report.getUrl());
return result;
}
RmsDto.QueryDetail queryDetail = new RmsDto.QueryDetail();
queryDetail.setEvaluationId(dto.getEvaluationId());
RmsVo.ReportDetail detail = rmsService.queryReportDetail(queryDetail);
//查询测评量表
List<RmsVo.ReportScore> scores = rmsDao.queryEmsScaleScore(dto.getEvaluationId(), CollectionUtil.newArrayList());
if (CollUtil.isNotEmpty(scores)) {
//组装成父子级关系
scores = rmsService.buildReportScoreTree(scores, 0L);
}
if (detail == null) {
return null;
}
EmsEvaluation emsEvaluation = emsEvaluationMapper.selectByPrimaryKey(dto.getEvaluationId());
if (emsEvaluation == null) {
return null;
}
//查询
RmsVo.ReportPatient patientInfo = detail.getPatient();
HashMap<String, Object> params = new HashMap<>();
XWPFTemplate template = XWPFTemplate.compile(ysPath);
params.put("h_name", patientInfo.getHospitalName());
// params.put("qrcode_img_url", Pictures.ofLocal(reportPath + patientInfo.getQrCodeUrl()).size(130, 130).create());
params.put("p_name", patientInfo.getPatientName());
params.put("p_sex", patientInfo.getSex() == 0 ? "男" : "女");
params.put("p_age", patientInfo.getPatientAge());
CultureEnum cultureEnum = null;
if (dto.getSignId() != null) {
HmsDoctorSign emsEvaluationInformedConsent = hmsDoctorSignMapper.selectByPrimaryKey(dto.getSignId());
if (emsEvaluationInformedConsent != null) {
params.put("cpy_img_url", Pictures.ofLocal(prefixWord + emsEvaluationInformedConsent.getPath()).size(80, 40).create());
}
} else {
//签名信息
Long userId = SecurityUtils.getUserId();
List<HmsVo.QuerySign> querySigns = hmsDoctorDao.querySign(userId);
if (CollUtil.isNotEmpty(querySigns)) {
HmsVo.QuerySign querySign = querySigns.get(0);
if (ObjectUtil.isNotNull(querySign) && StrUtil.isNotEmpty(querySign.getSignUrl())) {
params.put("cpy_img_url", Pictures.ofLocal(prefixWord + querySign.getSignUrl()).size(80, 40).create());
}
}
}
try {
cultureEnum = BaseEnum.codeOf(CultureEnum.class, patientInfo.getEducationalStatus().intValue());
} catch (Exception e) {
//处理educationStatus为null的情况,后台导入的数据educationStatus为null
//默认为初中
cultureEnum = CultureEnum.YW;
}
if (cultureEnum != null) {
params.put("p_grade", cultureEnum.getDesc());
}
if (patientInfo.getCareer() != null) {
JobEnum jobEnum = BaseEnum.codeOf(JobEnum.class, patientInfo.getCareer().intValue());
// params.put("p_no", patientInfo.getSerialNumber());
if (jobEnum != null) {
params.put("p_Career", jobEnum.getDesc());
}
}
params.put("p_dept", patientInfo.getDepartment());
params.put("p_bedno", patientInfo.getBedNumber());
params.put("p_Patient_number", patientInfo.getHospitalNumber());
params.put("p_Clinical_diagnosis", patientInfo.getClinicalDiagnosis());
params.put("p_Inspection_date", DateUtil.format(new Date(patientInfo.getReportTime()), "yyyy-MM-dd"));
// params.put("score", detail.getScore());
//AD8
// params.put("cpy_img_url", patientInfo.getName());
params.put("report_date", DateUtil.date(patientInfo.getReportTime()));
//生成表格
// 创建带有样式的文本
TextRenderData text1 = Texts.of("评估结论").bold().fontSize(12).create();
TextRenderData text2 = Texts.of("评估结论").bold().fontSize(12).create();
TextRenderData text3 = Texts.of("评估结论").bold().fontSize(12).create();
TextRenderData text4 = Texts.of("评估结论").bold().fontSize(12).create();
// TextRenderData text5 = Texts.of("评估结论").bold().fontSize(12).create();
RowRenderData headerRow = Rows.of(text1, text2, text3, text4).create();
//查询
List<RmsVo.ExportInfo> exportInfos = rmsDao.queryReportExportInfo(dto.getEvaluationId());
if (CollUtil.isEmpty(exportInfos)) {
return null;
}
RowRenderData titleRow = Rows.of("一级指标/二级指标", "量表名称", "得分", "结论").create();
Tables.TableBuilder of = Tables.of(headerRow, titleRow);
for (int i = 0; i < exportInfos.size(); i++) {
params.put("yjzb", exportInfos.get(i).getComboParentName());
params.put("ejzb", exportInfos.get(i).getComboName());
if (exportInfos.get(i).getNeedPlan() != null && exportInfos.get(i).getNeedPlan() == 1) {
TextRenderData textStr = Texts.of(exportInfos.get(i).getComboParentName() + "/" + exportInfos.get(i).getComboName()).bold().color("FF0000").create();
TextRenderData textName = Texts.of(scores.get(i).getName()).bold().color("FF0000").create();
TextRenderData textScore = Texts.of(scores.get(i).getScore() == null ? "" : scores.get(i).getScore() + "").bold().color("FF0000").create();
TextRenderData textImpression = Texts.of(StrUtil.isEmpty(exportInfos.get(i).getImpression()) ? exportInfos.get(i).getResult() : exportInfos.get(i).getImpression()).bold().color("FF0000").create();
//查询一二级套餐
RowRenderData row1 = Rows.of(
textStr,
textName,
textScore,
textImpression
).create();
// if (StrUtil.isNotEmpty(exportInfos.get(i).getComboName() + "/" + exportInfos.get(i).getComboParentName())) {
// of.mergeRule(MergeCellRule.builder().map(MergeCellRule.Grid.of(i + 1, i + 1), MergeCellRule.Grid.of(0, 1)).build());
// }
of.addRow(row1);
} else {
TextRenderData textStr = Texts.of(exportInfos.get(i).getComboParentName() + "/" + exportInfos.get(i).getComboName()).bold().color("FF0000").create();
TextRenderData textName = Texts.of("JI_SHAO".equals(exportInfos.get(i).getScaleCode()) ? "肌少总结论" : exportInfos.get(i).getScaleName()).bold().create();
TextRenderData textScore = Texts.of(exportInfos.get(i).getScore() == null ? "" : exportInfos.get(i).getScore() + "").bold().create();
//中医体质辨识添加结论 结论为初步印象
TextRenderData textImpression = Texts.of(
exportInfos.get(i).getImpression() == null ? exportInfos.get(i).getResult() : exportInfos.get(i).getImpression()).bold().create();
//查询一二级套餐
RowRenderData row1 = Rows.of(
textStr,
textName,
textScore,
textImpression
).create();
// if (StrUtil.isNotEmpty(exportInfos.get(i).getComboName() + "/" + exportInfos.get(i).getComboParentName())) {
// of.mergeRule(MergeCellRule.builder().map(MergeCellRule.Grid.of(i + 1, i + 1), MergeCellRule.Grid.of(0, 1)).build());
// }
of.addRow(row1);
}
}
if (emsEvaluation.getVersion() != null) {
HmsVersion hmsVersion = hmsVersionMapper.selectByPrimaryKey(Long.parseLong(emsEvaluation.getVersion()));
if (hmsVersion != null) {
params.put("type", hmsVersion.getVersion() + "评估报告");
}
}
TableRenderData tableData = of
.create();
params.put("table", tableData);
String s = IdUtil.randomUUID();
try {
template.render(params);
} catch (
Exception e) {
e.printStackTrace(); // 输出详细的异常信息
}
String filePath = "/profile/" + "/report/" + "老年综合评估_" + s + ".docx";
String pdfPath = "/profile/" + "/report/" + "老年综合评估_" + s + ".pdf";
String aPath = path + "/" + "/report/" + "老年综合评估_" + s + ".docx";
String pPath = path + "/" + "/report/" + "老年综合评估_" + s + ".pdf";
try {
template.writeAndClose(Files.newOutputStream(Paths.get(reportDomain + "/" + "/report/" + "老年综合评估_" + s + ".docx")));
AsposeUtils.doc2pdf(aPath, pPath);
} catch (
Exception e) {
e.printStackTrace();
}
AmsReportVo.Result result = new AmsReportVo.Result();
result.setWord(filePath);
result.setPath(pdfPath);
//将生成的文件路径保存到报告单内
if (ObjectUtil.isNotNull(report)) {
report.setUrl(pdfPath);
rmsReportMapper.updateByPrimaryKeySelective(report);
}
return result;
}
@Override @Override
public AmsReportVo.Result exportYx(RmsDto.ExportReport1Dto dto) { public AmsReportVo.Result exportYx(RmsDto.ExportReport1Dto dto) {
RmsReport report = rmsReportMapper.selectByPrimaryKey(dto.getReportId());
if (ObjectUtil.isNotNull(report) && StrUtil.isNotBlank(report.getPositiveUrl())) {
AmsReportVo.Result result = new AmsReportVo.Result();
result.setPath(report.getPositiveUrl());
return result;
}
RmsDto.QueryDetail queryDetail = new RmsDto.QueryDetail(); RmsDto.QueryDetail queryDetail = new RmsDto.QueryDetail();
queryDetail.setEvaluationId(dto.getEvaluationId()); queryDetail.setEvaluationId(dto.getEvaluationId());
RmsVo.ReportDetail detail = rmsService.queryReportDetail(queryDetail); RmsVo.ReportDetail detail = rmsService.queryReportDetail(queryDetail);
@ -1385,7 +1586,11 @@ public class AmsReportServiceImpl implements AmsReportService {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
//将生成的文件路径保存到报告单内
if (ObjectUtil.isNotNull(report)) {
report.setPositiveUrl(pdfPath);
rmsReportMapper.updateByPrimaryKeySelective(report);
}
AmsReportVo.Result result = new AmsReportVo.Result(); AmsReportVo.Result result = new AmsReportVo.Result();
result.setWord(filePath); result.setWord(filePath);
result.setPath(pdfPath); result.setPath(pdfPath);

163
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/AmsServiceImpl.java

@ -452,11 +452,6 @@ public class AmsServiceImpl implements IAmsService {
resultVo.setCodeEnum(ErrorConstant.PARAM_ERROR); resultVo.setCodeEnum(ErrorConstant.PARAM_ERROR);
return resultVo; return resultVo;
} }
// if (CollectionUtil.isEmpty(dto.getOptions())) {
// //没有选项 返回报错 修改于 2023-07-27
// resultVo.setCodeEnum(ErrorConstant.QUESTION_SAVE_ERROR);
// return resultVo;
//
if (CollectionUtil.isEmpty(dto.getOptions()) && CollectionUtil.isEmpty(dto.getPaths())) { if (CollectionUtil.isEmpty(dto.getOptions()) && CollectionUtil.isEmpty(dto.getPaths())) {
List<AmsPatientAnswerScore> scores = new ArrayList<>(); List<AmsPatientAnswerScore> scores = new ArrayList<>();
@ -483,7 +478,6 @@ public class AmsServiceImpl implements IAmsService {
//没有选项和画图录音等,不进行保存 //没有选项和画图录音等,不进行保存
resultVo.setCodeEnum(ErrorConstant.SUCCESS); resultVo.setCodeEnum(ErrorConstant.SUCCESS);
} else { } else {
// String parentCode = question.getCognitiveCode().contains("-") ? question.getCognitiveCode().split("-")[0] : question.getCognitiveCode();
String parentCode = question.getCognitiveCode(); String parentCode = question.getCognitiveCode();
//查询报告单 //查询报告单
EmsEvaluation report = emsEvaluationMapper.selectByPrimaryKey(dto.getPatientReportId()); EmsEvaluation report = emsEvaluationMapper.selectByPrimaryKey(dto.getPatientReportId());
@ -552,21 +546,9 @@ public class AmsServiceImpl implements IAmsService {
// 保存答案 // 保存答案
saveAnswerRecord(dto, question); saveAnswerRecord(dto, question);
//修改报告单是否完成一次测评 // //修改报告单是否完成一次测评
changeShowStatus(report, question); // changeShowStatus(report, question);
// //保存自动录音文件
// if (StrUtil.isNotEmpty(dto.getPath())) {
// //自动录音
// QmsQuestionRecording htQuestionRecording = new QmsQuestionRecording();
// htQuestionRecording.setQuestionId(question.getId());
// htQuestionRecording.setReportId(report.getId());
// htQuestionRecording.setDelFlag(GenConstants.Ht.NO_DEL);
// htQuestionRecording.setId(IDGenerator.nextSnowflakeId());
// htQuestionRecording.setPath(score.getPath());
// htQuestionRecording.setPatientId(scores.get(0).getPatientId());
// questionRecordingMapper.insertSelective(htQuestionRecording);
// }
} }
//进入延迟回忆,先删除已存在的倒计时 //进入延迟回忆,先删除已存在的倒计时
@ -599,7 +581,6 @@ public class AmsServiceImpl implements IAmsService {
} }
if (!(dto.getStatus() != null && (dto.getStatus() == 1 || dto.getStatus() == 2))) { if (!(dto.getStatus() != null && (dto.getStatus() == 1 || dto.getStatus() == 2))) {
//由MQ变为Redis
if (CollectionUtil.isNotEmpty(shows) if (CollectionUtil.isNotEmpty(shows)
// && dto.getIsSubmit() == 1 // && dto.getIsSubmit() == 1
) { ) {
@ -661,68 +642,6 @@ public class AmsServiceImpl implements IAmsService {
resultVo.setRecallQuestion(0); resultVo.setRecallQuestion(0);
} }
} }
//最后一题判断量表是否已全部完成
if (ObjectUtil.isNotEmpty(dto.getLast())) {
if (dto.getLast()) {
switch (question.getScaleCode()) {
case "AD8":
BigDecimal ad8Score = getRealFinish(dto.getPatientReportId(), "AD8");
resultVo.setRealFinish(ad8Score.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "PJS":
BigDecimal pjsScore = getRealFinish(dto.getPatientReportId(), "PJS");
resultVo.setRealFinish(pjsScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "MINIC":
BigDecimal minicScore = getMinicScore(dto.getPatientReportId());
resultVo.setRealFinish(minicScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "NP":
BigDecimal npScore = getRealFinish(dto.getPatientReportId(), "NP");
resultVo.setRealFinish(npScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "HIS":
BigDecimal hisScore = getRealFinish(dto.getPatientReportId(), "HIS");
resultVo.setRealFinish(hisScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "GDS":
BigDecimal gdsScore = getRealFinish(dto.getPatientReportId(), "GDS");
resultVo.setRealFinish(gdsScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "MMSE":
BigDecimal mmseScore = getMmseScore(dto.getPatientReportId(), "MMSE");
resultVo.setRealFinish(mmseScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "ADL":
BigDecimal adlScore = getRealFinish(dto.getPatientReportId(), "ADL");
resultVo.setRealFinish(adlScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "CDR":
BigDecimal cdrScore = getRealFinish(dto.getPatientReportId(), "CDR");
resultVo.setRealFinish(cdrScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "SCD":
BigDecimal scdScore = getRealFinish(dto.getPatientReportId(), "SCD");
resultVo.setRealFinish(scdScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "WEBSTER":
BigDecimal websterScore = getRealFinish(dto.getPatientReportId(), "WEBSTER");
resultVo.setRealFinish(websterScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "SE":
BigDecimal seScore = getRealFinish(dto.getPatientReportId(), "SE");
resultVo.setRealFinish(seScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
case "NMSA":
BigDecimal nmsaScore = getMmseScore(dto.getPatientReportId(), "NMSA");
resultVo.setRealFinish(nmsaScore.compareTo(new BigDecimal(-1)) == 0 ? 0 : 1);
break;
default:
resultVo.setRealFinish(1);
}
}
}
return resultVo; return resultVo;
} }
@ -969,26 +888,26 @@ public class AmsServiceImpl implements IAmsService {
}); });
} }
/** // /**
* 修改报告单显示状态 // * 修改报告单显示状态
*/ // */
private void changeShowStatus(EmsEvaluation evaluation, QmsQuestion question) { // private void changeShowStatus(EmsEvaluation evaluation, QmsQuestion question) {
//根据测评id查找报告单信息 // //根据测评id查找报告单信息
RmsReportExample rmsReportExample = new RmsReportExample(); // RmsReportExample rmsReportExample = new RmsReportExample();
rmsReportExample.createCriteria().andEvaluationIdEqualTo(evaluation.getId()); // rmsReportExample.createCriteria().andEvaluationIdEqualTo(evaluation.getId());
List<RmsReport> rmsReports = rmsReportMapper.selectByExample(rmsReportExample); // List<RmsReport> rmsReports = rmsReportMapper.selectByExample(rmsReportExample);
if (CollUtil.isNotEmpty(rmsReports)) { // if (CollUtil.isNotEmpty(rmsReports)) {
RmsReport report = rmsReports.get(0); // RmsReport report = rmsReports.get(0);
if (report.getShowStatus() != null && report.getShowStatus() == GenConstants.Ht.Report.SHOW_HISTORY) { // if (report.getShowStatus() != null && report.getShowStatus() == GenConstants.Ht.Report.SHOW_HISTORY) {
return; // return;
} // }
Integer maxSort = questionDao.selectMaxSort(question.getScaleCode()); // Integer maxSort = questionDao.selectMaxSort(question.getScaleCode());
if (question.getSort() != null && maxSort != null && question.getSort() >= maxSort) { // if (question.getSort() != null && maxSort != null && question.getSort() >= maxSort) {
report.setShowStatus(GenConstants.Ht.Report.SHOW_HISTORY); // report.setShowStatus(GenConstants.Ht.Report.SHOW_HISTORY);
rmsReportMapper.updateByPrimaryKeySelective(report); // rmsReportMapper.updateByPrimaryKeySelective(report);
} // }
} // }
} // }
@Override @Override
public BigDecimal getRealFinish(Long reportId, String code) { public BigDecimal getRealFinish(Long reportId, String code) {
@ -1180,6 +1099,7 @@ public class AmsServiceImpl implements IAmsService {
emsEvaluationScaleCognitiveRelevance2.setDelFlag(GenConstants.Ht.IS_DEL); emsEvaluationScaleCognitiveRelevance2.setDelFlag(GenConstants.Ht.IS_DEL);
emsEvaluationScaleCognitiveRelevanceMapper.updateByExampleSelective(emsEvaluationScaleCognitiveRelevance2, emsEvaluationScaleCognitiveRelevanceExample); emsEvaluationScaleCognitiveRelevanceMapper.updateByExampleSelective(emsEvaluationScaleCognitiveRelevance2, emsEvaluationScaleCognitiveRelevanceExample);
int i = 0;
scaleAchievementList.forEach(scaleAchievement -> { scaleAchievementList.forEach(scaleAchievement -> {
//查询测评量表分数 //查询测评量表分数
List<RmsVo.ReportScore> reportScore = rmsDao.queryReportScore(queryDto.getEvaluationId(), scaleAchievement.getScaleCode()); List<RmsVo.ReportScore> reportScore = rmsDao.queryReportScore(queryDto.getEvaluationId(), scaleAchievement.getScaleCode());
@ -1195,14 +1115,15 @@ public class AmsServiceImpl implements IAmsService {
evaluationScaleCognitiveRelevance.setScore(score.getScore()); evaluationScaleCognitiveRelevance.setScore(score.getScore());
evaluationScaleCognitiveRelevance.setParentId(0L); evaluationScaleCognitiveRelevance.setParentId(0L);
evaluationScaleCognitiveRelevance.setTotalScore(scaleAchievement.getTotalScore()); evaluationScaleCognitiveRelevance.setTotalScore(scaleAchievement.getTotalScore());
evaluationScaleCognitiveRelevance.setSort(scaleAchievement.getSort());
evaluationScaleCognitiveRelevance.setCreateTime(new Date()); evaluationScaleCognitiveRelevance.setCreateTime(new Date());
evaluationScaleCognitiveRelevance.setId(IdUtil.getSnowflake().nextId()); evaluationScaleCognitiveRelevance.setId(IdUtil.getSnowflake().nextId());
evaluationScaleCognitiveRelevance.setComboId(score.getComboId());
evaluationScaleCognitiveRelevance.setCreateBy(SecurityUtils.getUsername()); evaluationScaleCognitiveRelevance.setCreateBy(SecurityUtils.getUsername());
emsEvaluationScaleCognitiveRelevanceMapper.insert(evaluationScaleCognitiveRelevance); emsEvaluationScaleCognitiveRelevanceMapper.insert(evaluationScaleCognitiveRelevance);
//保存认知域得分 //保存认知域得分
if (CollectionUtil.isNotEmpty(score.getSubReport())) { if (CollectionUtil.isNotEmpty(score.getSubReport())) {
//保存测评量表认知域分数 //保存测评量表认知域分数
if (CollectionUtil.isNotEmpty(score.getSubReport())) {
score.getSubReport().forEach(subReport -> { score.getSubReport().forEach(subReport -> {
EmsEvaluationScaleCognitiveRelevance emsEvaluationScaleCognitiveRelevance = new EmsEvaluationScaleCognitiveRelevance(); EmsEvaluationScaleCognitiveRelevance emsEvaluationScaleCognitiveRelevance = new EmsEvaluationScaleCognitiveRelevance();
emsEvaluationScaleCognitiveRelevance.setEvaluationId(queryDto.getEvaluationId()); emsEvaluationScaleCognitiveRelevance.setEvaluationId(queryDto.getEvaluationId());
@ -1212,7 +1133,9 @@ public class AmsServiceImpl implements IAmsService {
emsEvaluationScaleCognitiveRelevance.setParentId(evaluationScaleCognitiveRelevance.getId()); emsEvaluationScaleCognitiveRelevance.setParentId(evaluationScaleCognitiveRelevance.getId());
emsEvaluationScaleCognitiveRelevance.setTotalScore(scaleAchievement.getTotalScore()); emsEvaluationScaleCognitiveRelevance.setTotalScore(scaleAchievement.getTotalScore());
emsEvaluationScaleCognitiveRelevance.setCreateTime(new Date()); emsEvaluationScaleCognitiveRelevance.setCreateTime(new Date());
emsEvaluationScaleCognitiveRelevance.setComboId(score.getComboId());
emsEvaluationScaleCognitiveRelevance.setDelFlag(GenConstants.Ht.NO_DEL); emsEvaluationScaleCognitiveRelevance.setDelFlag(GenConstants.Ht.NO_DEL);
emsEvaluationScaleCognitiveRelevance.setSort(subReport.getSort());
emsEvaluationScaleCognitiveRelevance.setTotalScore(new BigDecimal(subReport.getTotalScore())); emsEvaluationScaleCognitiveRelevance.setTotalScore(new BigDecimal(subReport.getTotalScore()));
emsEvaluationScaleCognitiveRelevance.setId(IdUtil.getSnowflake().nextId()); emsEvaluationScaleCognitiveRelevance.setId(IdUtil.getSnowflake().nextId());
emsEvaluationScaleCognitiveRelevance.setCreateBy(SecurityUtils.getUsername()); emsEvaluationScaleCognitiveRelevance.setCreateBy(SecurityUtils.getUsername());
@ -1236,18 +1159,32 @@ public class AmsServiceImpl implements IAmsService {
} }
}); });
} }
}
}); });
} }
//NPI特殊处理总分
if ("NPI".equals(scaleAchievement.getScaleCode())) { //CGA内没有NPI和CTT量表
scaleAchievement.setScore(amsDao.getTotalScoreByNPI(queryDto.getEvaluationId())); // //NPI特殊处理总分
// if ("NPI".equals(scaleAchievement.getScaleCode())) {
// scaleAchievement.setScore(amsDao.getTotalScoreByNPI(queryDto.getEvaluationId()));
// }
// //CTT不返回分数信息
// if ("CTT".equals(scaleAchievement.getScaleCode())) {
// scaleAchievement.setScore(null);
// }
});
} }
//CTT不返回分数信息
if ("CTT".equals(scaleAchievement.getScaleCode())) {
scaleAchievement.setScore(null); //删除延迟回忆
Object objects = redisUtil.get("message_" + queryDto.getEvaluationId());
if (objects != null) {
Set<MessageDto.QuestionInform> set = (Set<MessageDto.QuestionInform>) objects;
if (CollectionUtil.isNotEmpty(set)) {
MessageDto.QuestionInform questionInform = new MessageDto.QuestionInform();
questionInform.setQuestionId(0L);
set.remove(questionInform);
} }
}); redisUtil.deleteObject("message_" + queryDto.getEvaluationId());
} }
return scaleAchievementList; return scaleAchievementList;
} }

273
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/RmsServiceImpl.java

@ -53,7 +53,9 @@ import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.time.Duration; import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalTime; import java.time.LocalTime;
import java.time.Period;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
@ -106,16 +108,22 @@ public class RmsServiceImpl implements IRmsService {
private TzbsRmsReportYsjyMapper rmsReportYsjyMapper; private TzbsRmsReportYsjyMapper rmsReportYsjyMapper;
public int getAge(PmsPatient pmsPatient) { public int getAge(String birthday) {
if (pmsPatient.getBirthYear() != null) { if (birthday == null || birthday.trim().isEmpty()) {
Calendar instance = Calendar.getInstance(); return 0;
return instance.get(Calendar.YEAR) - pmsPatient.getBirthYear();
} }
try {
LocalDate birthDate = LocalDate.parse(birthday);
return Period.between(birthDate, LocalDate.now()).getYears();
} catch (Exception e) {
log.error("计算年龄失败", e);
return 0; return 0;
} }
}
/** /**
* 递归组装ReportScore的父子级树形结构 * 递归组装ReportScore的父子级树形结构
*
* @param allReportScores 所有未组装的ReportScore列表 * @param allReportScores 所有未组装的ReportScore列表
* @param rootParentId 根节点的parentId比如0或null根据业务定义 * @param rootParentId 根节点的parentId比如0或null根据业务定义
* @return 组装好的树形结构根节点列表 * @return 组装好的树形结构根节点列表
@ -154,6 +162,7 @@ public class RmsServiceImpl implements IRmsService {
/** /**
* 递归为单个节点组装子节点 * 递归为单个节点组装子节点
*
* @param parentNode 父节点 * @param parentNode 父节点
* @param scoreMap 所有节点的Mapkey=scaleId * @param scoreMap 所有节点的Mapkey=scaleId
*/ */
@ -192,6 +201,7 @@ public class RmsServiceImpl implements IRmsService {
/** /**
* 对ReportScore列表按排序字段排序优先sort其次ecrSort * 对ReportScore列表按排序字段排序优先sort其次ecrSort
*
* @param reportScores 待排序的列表 * @param reportScores 待排序的列表
*/ */
private static void sortReportScoreTree(List<RmsVo.ReportScore> reportScores) { private static void sortReportScoreTree(List<RmsVo.ReportScore> reportScores) {
@ -211,40 +221,55 @@ public class RmsServiceImpl implements IRmsService {
@Override @Override
public RmsVo.ReportDetail queryReportDetail(RmsDto.QueryDetail dto) { public RmsVo.ReportDetail queryReportDetail(RmsDto.QueryDetail dto) {
//查找测评信息
EmsEvaluation emsEvaluation = emsEvaluationMapper.selectByPrimaryKey(dto.getEvaluationId());
if(ObjectUtil.isNull(emsEvaluation)){
throw new RuntimeException("未找到测评信息");
}
//查找患者信息
PmsPatient pmsPatient = pmsPatientMapper.selectByPrimaryKey(emsEvaluation.getPatientId());
if(ObjectUtil.isNull(pmsPatient)){
throw new RuntimeException("未找到患者信息");
}
//根据测评id查找报告单 //根据测评id查找报告单
RmsReportExample reportExample = new RmsReportExample(); RmsReportExample reportExample = new RmsReportExample();
reportExample.createCriteria().andEvaluationIdEqualTo(dto.getEvaluationId()).andDelFlagEqualTo((byte) 0); reportExample.createCriteria().andEvaluationIdEqualTo(dto.getEvaluationId()).andDelFlagEqualTo((byte) 0);
List<RmsReport> rmsReports = rmsReportMapper.selectByExample(reportExample); List<RmsReport> rmsReports = rmsReportMapper.selectByExample(reportExample);
RmsReport report; if (CollUtil.isNotEmpty(rmsReports)) {
//查询测评量表 RmsReport rmsReport = new RmsReport();
rmsReport.setDelFlag((byte) 1);
rmsReportMapper.updateByExampleSelective(rmsReport, reportExample);
//删除报告单分数
RmsReportScaleScore reportScaleScore = new RmsReportScaleScore();
reportScaleScore.setDelFlag((byte) 1);
RmsReportScaleScoreExample reportScaleScoreExample = new RmsReportScaleScoreExample();
reportScaleScoreExample.createCriteria().andReportIdEqualTo(dto.getEvaluationId());
rmsReportScaleScoreMapper.updateByExampleSelective(reportScaleScore, reportScaleScoreExample);
}
//查询测评量表及分数
List<RmsVo.ReportScore> scores = rmsDao.queryEmsScaleScore(dto.getEvaluationId(), CollectionUtil.newArrayList()); List<RmsVo.ReportScore> scores = rmsDao.queryEmsScaleScore(dto.getEvaluationId(), CollectionUtil.newArrayList());
if (CollUtil.isNotEmpty(scores)) { if (CollUtil.isNotEmpty(scores)) {
//组装成父子级关系 //组装成父子级关系
scores = buildReportScoreTree(scores, 0L); scores = buildReportScoreTree(scores, 0L);
} }
Map<String, RmsReportScaleScore> reportScaleScoreMap = new HashMap<>(); Map<String, RmsReportScaleScore> reportScaleScoreMap = new HashMap<>();
if (CollUtil.isEmpty(rmsReports)) { // RmsReportScaleScoreExample rmsReportScaleScoreExample = new RmsReportScaleScoreExample();
// rmsReportScaleScoreExample.createCriteria().andReportIdEqualTo(dto.getEvaluationId());
//生成报告单 //生成报告单
report = new RmsReport(); RmsReport report = new RmsReport();
report.setId(IDGenerator.nextSnowflakeId()); report.setId(IDGenerator.nextSnowflakeId());
report.setName(GenConstants.Ht.Report.PARENT_NAME + DateUtil.today()); report.setName(GenConstants.Ht.Report.PARENT_NAME + DateUtil.today());
report.setEvaluationId(dto.getEvaluationId()); report.setEvaluationId(dto.getEvaluationId());
report.setReportTime(System.currentTimeMillis()); report.setReportTime(System.currentTimeMillis());
//查找测评信息 report.setPatientAge(getAge(pmsPatient.getBirthday()));
EmsEvaluation emsEvaluation = emsEvaluationMapper.selectByPrimaryKey(dto.getEvaluationId());
if (ObjectUtil.isNotNull(emsEvaluation)) {
//查找病人信息
PmsPatient pmsPatient = pmsPatientMapper.selectByPrimaryKey(emsEvaluation.getPatientId());
if (ObjectUtil.isNotNull(pmsPatient)) {
report.setPatientAge(getAge(pmsPatient));
}
//修改测评的状态 //修改测评的状态
if (dto.getComplateStatus() != null) { if (dto.getComplateStatus() != null) {
emsEvaluation.setCompleteStatus(dto.getComplateStatus()); emsEvaluation.setCompleteStatus(dto.getComplateStatus());
} }
emsEvaluationMapper.updateByPrimaryKeySelective(emsEvaluation); emsEvaluationMapper.updateByPrimaryKeySelective(emsEvaluation);
report.setVisitNo(emsEvaluation.getVisitNo()); report.setVisitNo(emsEvaluation.getVisitNo());
}
rmsReportMapper.insertSelective(report); rmsReportMapper.insertSelective(report);
if (CollUtil.isNotEmpty(scores)) { if (CollUtil.isNotEmpty(scores)) {
@ -273,42 +298,42 @@ public class RmsServiceImpl implements IRmsService {
reportScaleScore.setId(IDGenerator.nextSnowflakeId()); reportScaleScore.setId(IDGenerator.nextSnowflakeId());
reportScaleScore.setReportId(report.getId()); reportScaleScore.setReportId(report.getId());
reportScaleScore.setScaleCode(score.getCode()); reportScaleScore.setScaleCode(score.getCode());
reportScaleScore.setImpression(score.getImpression()); reportScaleScore.setResult(score.getImpression());
reportScaleScore.setScore(score.getScore()); reportScaleScore.setScore(score.getScore());
reportScaleScore.setIsShow((byte) 1);
reportScaleScore.setComboId(score.getComboId());
reportScaleScore.setSort(score.getSort());
rmsReportScaleScoreMapper.insertSelective(reportScaleScore); rmsReportScaleScoreMapper.insertSelective(reportScaleScore);
reportScaleScoreMap.put(score.getCode(), reportScaleScore); reportScaleScoreMap.put(score.getCode(), reportScaleScore);
}); });
} }
} else { //肌少结论生成
report = rmsReports.get(0); //处理肌少
//查找测评信息 String jishaoResult = addJs(scores);
EmsEvaluation emsEvaluation = emsEvaluationMapper.selectByPrimaryKey(dto.getEvaluationId()); if (StrUtil.isNotEmpty(jishaoResult)) {
if (ObjectUtil.isNotNull(emsEvaluation)) { RmsReportScaleScore reportScaleScore = new RmsReportScaleScore();
//修改测评的状态 reportScaleScore.setId(IDGenerator.nextSnowflakeId());
if (dto.getComplateStatus() != null) { reportScaleScore.setReportId(report.getId());
emsEvaluation.setCompleteStatus(dto.getComplateStatus()); reportScaleScore.setScaleCode("JI_SHAO");
emsEvaluationMapper.updateByPrimaryKeySelective(emsEvaluation); reportScaleScore.setImpression(jishaoResult);
} reportScaleScore.setSort(scores.size() + 1);
} reportScaleScore.setIsShow((byte) 0);
rmsReportScaleScoreMapper.insertSelective(reportScaleScore);
} }
RmsVo.ReportDetail detail = new RmsVo.ReportDetail(); RmsVo.ReportDetail detail = new RmsVo.ReportDetail();
//查询报告单信息和病人信息
RmsVo.ReportPatient reportPatient = rmsDao.queryReportResult(report.getId());
//查找患者做过的测评的最早和最晚的时间 //查找患者做过的测评的最早和最晚的时间
RmsVo.PatientEvaluationTime time = new RmsVo.PatientEvaluationTime(); RmsVo.PatientEvaluationTime time = new RmsVo.PatientEvaluationTime();
if (ObjectUtil.isNotNull(reportPatient)) { time = rmsDao.getTimeByPatientId(pmsPatient.getId());
time = rmsDao.getTimeByPatientId(reportPatient.getPatientId());
if (ObjectUtil.isNull(time)) { if (ObjectUtil.isNull(time)) {
time = new RmsVo.PatientEvaluationTime(); time = new RmsVo.PatientEvaluationTime();
time.setMinTime(new Date()); time.setMinTime(new Date());
time.setMaxTime(new Date()); time.setMaxTime(new Date());
} }
}
EmsEvaluation emsEvaluation = emsEvaluationMapper.selectByPrimaryKey(dto.getEvaluationId()); // PmsPatient pmsPatient = pmsPatientMapper.selectByPrimaryKey(emsEvaluation.getPatientId());
PmsPatient pmsPatient = pmsPatientMapper.selectByPrimaryKey(emsEvaluation.getPatientId());
if (ObjectUtil.isNotNull(emsEvaluation) && CollUtil.isNotEmpty(scores)) { if (ObjectUtil.isNotNull(emsEvaluation) && CollUtil.isNotEmpty(scores)) {
for (RmsVo.ReportScore score : scores) { for (RmsVo.ReportScore score : scores) {
//查询量表试题 //查询量表试题
@ -372,23 +397,117 @@ public class RmsServiceImpl implements IRmsService {
} }
} }
//删除延迟回忆 //查询报告单信息和病人信息
Object objects = redisUtil.get("message_" + dto.getEvaluationId()); RmsVo.ReportPatient reportPatient = rmsDao.queryReportResult(report.getId());
if (objects != null) { detail.setPatient(reportPatient);
Set<MessageDto.QuestionInform> set = (Set<MessageDto.QuestionInform>) objects; detail.setScores(scores);
if (CollectionUtil.isNotEmpty(set)) { return detail;
MessageDto.QuestionInform questionInform = new MessageDto.QuestionInform();
questionInform.setQuestionId(0L);
set.remove(questionInform);
} }
redisUtil.deleteObject("message_" + dto.getEvaluationId());
@Override
public RmsVo.ReportDetail queryReport(RmsDto.QueryDetail dto) {
//根据测评id查找报告单
RmsReportExample reportExample = new RmsReportExample();
reportExample.createCriteria().andEvaluationIdEqualTo(dto.getEvaluationId()).andDelFlagEqualTo((byte) 0);
List<RmsReport> rmsReports = rmsReportMapper.selectByExample(reportExample);
if (CollUtil.isEmpty(rmsReports)) {
return queryReportDetail(dto);
} }
RmsReport report = rmsReports.get(0);
RmsVo.ReportDetail detail = new RmsVo.ReportDetail();
//查询报告单信息和病人信息
RmsVo.ReportPatient reportPatient = rmsDao.queryReportResult(report.getId());
//查找患者做过的测评的最早和最晚的时间
RmsVo.PatientEvaluationTime time = new RmsVo.PatientEvaluationTime();
if (ObjectUtil.isNotNull(reportPatient)) {
time = rmsDao.getTimeByPatientId(reportPatient.getPatientId());
if (ObjectUtil.isNull(time)) {
time = new RmsVo.PatientEvaluationTime();
time.setMinTime(new Date());
time.setMaxTime(new Date());
}
}
//查询测评量表
List<RmsVo.ReportScore> scores = rmsDao.queryEmsScaleScore(dto.getEvaluationId(), CollectionUtil.newArrayList());
if (CollUtil.isNotEmpty(scores)) {
//组装成父子级关系
scores = buildReportScoreTree(scores, 0L);
}
detail.setPatient(reportPatient); detail.setPatient(reportPatient);
detail.setScores(scores); detail.setScores(scores);
return detail; return detail;
} }
/**
* 添加肌少套餐结论
* 判断是否添加肌少总结论
* 如果四项测试有一项没做则跳过
*
* @param scores
* @return
*/
//
//
private String addJs(List<RmsVo.ReportScore> scores) {
//指定套餐才会触发,暂定写死套餐id
scores = scores.stream().filter(score -> score.getComboId() != null && score.getComboId() == 1982986055883821056L).collect(Collectors.toList());
if (CollUtil.isEmpty(scores)) {
return null;
}
String str = "";
List<RmsVo.ReportScore> sarcCalf = scores.stream().filter(
score -> score.getCode().equals("SARC-Calf")
).collect(Collectors.toList());
List<RmsVo.ReportScore> wczl = scores.stream().filter(
score -> score.getCode().equals("5CZLSY")
).collect(Collectors.toList());
List<RmsVo.ReportScore> szggj = scores.stream().filter(
score -> score.getCode().equals("SZGGJ")
).collect(Collectors.toList());
List<RmsVo.ReportScore> wlcd = scores.stream().filter(
score -> score.getCode().equals("WLCD")
).collect(Collectors.toList());
List<RmsVo.ReportScore> lmbs = scores.stream().filter(
score -> score.getCode().equals("LMBS")
).collect(Collectors.toList());
if (CollUtil.isNotEmpty(sarcCalf)) {
QmsScaleAssConf sarcCalfConf = amsDao.queryScaleAssConf1(sarcCalf.get(0).getCode(), sarcCalf.get(0).getScore(), null);
if (sarcCalfConf != null) {
str = sarcCalfConf.getResult();
}
}
if (CollUtil.isEmpty(wczl) || CollUtil.isEmpty(szggj) || CollUtil.isEmpty(wlcd) || CollUtil.isEmpty(lmbs)) {
return str;
}
QmsScaleAssConf wczlConf = amsDao.queryScaleAssConf1(wczl.get(0).getCode(), wczl.get(0).getScore(), null);
QmsScaleAssConf szggjConf = amsDao.queryScaleAssConf1(szggj.get(0).getCode(), szggj.get(0).getScore(), null);
QmsScaleAssConf wlcdConf = amsDao.queryScaleAssConf1(wlcd.get(0).getCode(), wlcd.get(0).getScore(), null);
QmsScaleAssConf lmbsConf = amsDao.queryScaleAssConf1(lmbs.get(0).getCode(), lmbs.get(0).getScore(), null);
if (wczlConf != null && szggjConf != null && wlcdConf != null && lmbsConf != null) {
// *四项测试结果都正常,说明没有肌少症风险
// *如果四肢骨骼肌身高质量指数(ASMI)正常,肌肉力量或(及)躯体功能下降,则有肌少症风险;
// *如果四项测试值全部低于标准值,则诊断为严重肌少症。
// *如果四肢骨骼肌身高质量指数(ASMI)低于标准值,肌肉力量或躯体功能其中有一项低于标准值,则诊断为肌少症;
// *否则有肌少症风险
if (!"1".equals(wczlConf.getNeedPlan()) && !"1".equals(szggjConf.getNeedPlan()) && !"1".equals(wlcdConf.getNeedPlan()) && !"1".equals(lmbsConf.getNeedPlan())) {
//没有肌少症风险
return StrUtil.isEmpty(str) ? "没有肌少症风险" : str + "\n" + "没有肌少症风险";
} else if (!"1".equals(szggjConf.getNeedPlan()) && "1".equals(wlcdConf.getNeedPlan()) && "1".equals(lmbsConf.getNeedPlan()) && "1".equals(wczlConf.getNeedPlan())) {
return StrUtil.isEmpty(str) ? "有肌少症风险" : str + "\n" + "有肌少症风险";
} else if ("1".equals(wczlConf.getNeedPlan()) && "1".equals(wlcdConf.getNeedPlan()) && "1".equals(lmbsConf.getNeedPlan()) && "1".equals(szggjConf.getNeedPlan())) {
return StrUtil.isEmpty(str) ? "严重肌少症" : str + "\n" + "严重肌少症";
} else if ("1".equals(szggjConf.getNeedPlan()) && ("1".equals(wlcdConf.getNeedPlan()) || "1".equals(lmbsConf.getNeedPlan()) || "1".equals(wczlConf.getNeedPlan()))) {
return StrUtil.isEmpty(str) ? "肌少症" : str + "\n" + "肌少症";
} else {
return StrUtil.isEmpty(str) ? "有肌少症风险" : str + "\n" + "有肌少症风险";
}
}
return null;
}
@Override @Override
public ClientEvaVo.ReportView reportView(Long evaluationId, String code) { public ClientEvaVo.ReportView reportView(Long evaluationId, String code) {
ClientEvaVo.ReportView vo = clientEvaDao.getTzbsResult(evaluationId, code); ClientEvaVo.ReportView vo = clientEvaDao.getTzbsResult(evaluationId, code);
@ -837,9 +956,9 @@ public class RmsServiceImpl implements IRmsService {
// 记忆指数:自由回忆*3+分类提示*2+多选提示*1 范围0-15分 // 记忆指数:自由回忆*3+分类提示*2+多选提示*1 范围0-15分
if (sortScoreMap.containsKey(huiyi) || sortScoreMap.containsKey(fenlei) || sortScoreMap.containsKey(duoxuan)) { if (sortScoreMap.containsKey(huiyi) || sortScoreMap.containsKey(fenlei) || sortScoreMap.containsKey(duoxuan)) {
jiYi = sortScoreMap.getOrDefault(huiyi, zero).multiply(new BigDecimal(3)) jiYi = getOrDefaultSafe(sortScoreMap,huiyi, zero).multiply(new BigDecimal(3))
.add(sortScoreMap.getOrDefault(fenlei, zero).multiply(new BigDecimal(2))) .add(getOrDefaultSafe(sortScoreMap,fenlei, zero).multiply(new BigDecimal(2)))
.add(sortScoreMap.getOrDefault(duoxuan, zero)); .add(getOrDefaultSafe(sortScoreMap,duoxuan, zero));
} }
RmsVo.ScoreDistribution jiYiScore = new RmsVo.ScoreDistribution("jiYi", "记忆指数", ObjectUtil.isNull(jiYi) ? BigDecimal.ZERO : jiYi); RmsVo.ScoreDistribution jiYiScore = new RmsVo.ScoreDistribution("jiYi", "记忆指数", ObjectUtil.isNull(jiYi) ? BigDecimal.ZERO : jiYi);
cognitiveDomainList.add(jiYiScore); cognitiveDomainList.add(jiYiScore);
@ -849,26 +968,26 @@ public class RmsServiceImpl implements IRmsService {
|| sortScoreMap.containsKey(daobei) || sortScoreMap.containsKey(jingjuexing) || sortScoreMap.containsKey(jianfa) || sortScoreMap.containsKey(daobei) || sortScoreMap.containsKey(jingjuexing) || sortScoreMap.containsKey(jianfa)
|| sortScoreMap.containsKey(dongwu) || sortScoreMap.containsKey(xiangsixing) || sortScoreMap.containsKey(dongwu) || sortScoreMap.containsKey(xiangsixing)
) { ) {
zhiXing = sortScoreMap.getOrDefault(lianxian, zero).add(sortScoreMap.getOrDefault(huazhong, zero)) zhiXing = getOrDefaultSafe(sortScoreMap,lianxian, zero).add(getOrDefaultSafe(sortScoreMap,huazhong, zero))
.add(sortScoreMap.getOrDefault(shunbei, zero)).add(sortScoreMap.getOrDefault(daobei, zero)) .add(getOrDefaultSafe(sortScoreMap,shunbei, zero)).add(getOrDefaultSafe(sortScoreMap,daobei, zero))
.add(sortScoreMap.getOrDefault(jingjuexing, zero)).add(sortScoreMap.getOrDefault(jianfa, zero)) .add(getOrDefaultSafe(sortScoreMap,jingjuexing, zero)).add(getOrDefaultSafe(sortScoreMap,jianfa, zero))
.add(sortScoreMap.getOrDefault(dongwu, zero)).add(sortScoreMap.getOrDefault(xiangsixing, zero)); .add(getOrDefaultSafe(sortScoreMap,dongwu, zero)).add(getOrDefaultSafe(sortScoreMap,xiangsixing, zero));
} }
RmsVo.ScoreDistribution zhiXingScore = new RmsVo.ScoreDistribution("zhiXing", "执行指数", ObjectUtil.isNull(zhiXing) ? BigDecimal.ZERO : zhiXing); RmsVo.ScoreDistribution zhiXingScore = new RmsVo.ScoreDistribution("zhiXing", "执行指数", ObjectUtil.isNull(zhiXing) ? BigDecimal.ZERO : zhiXing);
cognitiveDomainList.add(zhiXingScore); cognitiveDomainList.add(zhiXingScore);
// 视空间指数:立方体+画钟+命名 0-7分 // 视空间指数:立方体+画钟+命名 0-7分
if (sortScoreMap.containsKey(lifangti) || sortScoreMap.containsKey(huazhong) if (sortScoreMap.containsKey(lifangti) || sortScoreMap.containsKey(huazhong)
|| sortScoreMap.containsKey(mingming1) || sortScoreMap.containsKey(mingming2) || sortScoreMap.containsKey(mingming3)) { || sortScoreMap.containsKey(mingming1) || sortScoreMap.containsKey(mingming2) || sortScoreMap.containsKey(mingming3)) {
kongJian = sortScoreMap.getOrDefault(lifangti, zero).add(sortScoreMap.getOrDefault(huazhong, zero)) kongJian = getOrDefaultSafe(sortScoreMap,lifangti, zero).add(getOrDefaultSafe(sortScoreMap,huazhong, zero))
.add(sortScoreMap.getOrDefault(mingming1, zero)).add(sortScoreMap.getOrDefault(mingming2, zero)).add(sortScoreMap.getOrDefault(mingming3, zero)); .add(getOrDefaultSafe(sortScoreMap,mingming1, zero)).add(getOrDefaultSafe(sortScoreMap,mingming2, zero)).add(getOrDefaultSafe(sortScoreMap,mingming3, zero));
} }
RmsVo.ScoreDistribution kongJianScore = new RmsVo.ScoreDistribution("kongJian", "视空间指数", ObjectUtil.isNull(kongJian) ? BigDecimal.ZERO : kongJian); RmsVo.ScoreDistribution kongJianScore = new RmsVo.ScoreDistribution("kongJian", "视空间指数", ObjectUtil.isNull(kongJian) ? BigDecimal.ZERO : kongJian);
cognitiveDomainList.add(kongJianScore); cognitiveDomainList.add(kongJianScore);
// 语言指数:命名+句子复述+词语流畅性 0-6分 // 语言指数:命名+句子复述+词语流畅性 0-6分
if (sortScoreMap.containsKey(mingming1) || sortScoreMap.containsKey(mingming2) || sortScoreMap.containsKey(mingming3) if (sortScoreMap.containsKey(mingming1) || sortScoreMap.containsKey(mingming2) || sortScoreMap.containsKey(mingming3)
|| sortScoreMap.containsKey(fushu1) || sortScoreMap.containsKey(fushu2) || sortScoreMap.containsKey(dongwu)) { || sortScoreMap.containsKey(fushu1) || sortScoreMap.containsKey(fushu2) || sortScoreMap.containsKey(dongwu)) {
yuYan = sortScoreMap.getOrDefault(mingming1, zero).add(sortScoreMap.getOrDefault(mingming2, zero)).add(sortScoreMap.getOrDefault(mingming3, zero)) yuYan = getOrDefaultSafe(sortScoreMap,mingming1, zero).add(getOrDefaultSafe(sortScoreMap,mingming2, zero)).add(getOrDefaultSafe(sortScoreMap,mingming3, zero))
.add(sortScoreMap.getOrDefault(chongfu1, zero)).add(sortScoreMap.getOrDefault(chongfu2, zero)).add(sortScoreMap.getOrDefault(dongwu, zero)); .add(getOrDefaultSafe(sortScoreMap,chongfu1, zero)).add(getOrDefaultSafe(sortScoreMap,chongfu2, zero)).add(getOrDefaultSafe(sortScoreMap,dongwu, zero));
} }
RmsVo.ScoreDistribution yuYanScore = new RmsVo.ScoreDistribution("yuYan", "语言指数", ObjectUtil.isNull(yuYan) ? BigDecimal.ZERO : yuYan); RmsVo.ScoreDistribution yuYanScore = new RmsVo.ScoreDistribution("yuYan", "语言指数", ObjectUtil.isNull(yuYan) ? BigDecimal.ZERO : yuYan);
cognitiveDomainList.add(yuYanScore); cognitiveDomainList.add(yuYanScore);
@ -876,15 +995,15 @@ public class RmsServiceImpl implements IRmsService {
if (sortScoreMap.containsKey(shunbei) || sortScoreMap.containsKey(daobei) || sortScoreMap.containsKey(jingjuexing) if (sortScoreMap.containsKey(shunbei) || sortScoreMap.containsKey(daobei) || sortScoreMap.containsKey(jingjuexing)
|| sortScoreMap.containsKey(jianfa) || sortScoreMap.containsKey(chongfu1) || sortScoreMap.containsKey(chongfu2) || sortScoreMap.containsKey(jianfa) || sortScoreMap.containsKey(chongfu1) || sortScoreMap.containsKey(chongfu2)
|| sortScoreMap.containsKey(fushu1) || sortScoreMap.containsKey(fushu2)) { || sortScoreMap.containsKey(fushu1) || sortScoreMap.containsKey(fushu2)) {
zhuYi = sortScoreMap.getOrDefault(shunbei, zero).add(sortScoreMap.getOrDefault(daobei, zero)).add(sortScoreMap.getOrDefault(jingjuexing, zero)) zhuYi = getOrDefaultSafe(sortScoreMap,shunbei, zero).add(getOrDefaultSafe(sortScoreMap,daobei, zero)).add(getOrDefaultSafe(sortScoreMap,jingjuexing, zero))
.add(sortScoreMap.getOrDefault(jianfa, zero)).add(sortScoreMap.getOrDefault(chongfu1, zero)).add(sortScoreMap.getOrDefault(chongfu2, zero)) .add(getOrDefaultSafe(sortScoreMap,jianfa, zero)).add(getOrDefaultSafe(sortScoreMap,chongfu1, zero)).add(getOrDefaultSafe(sortScoreMap,chongfu2, zero))
.add(sortScoreMap.getOrDefault(fushu1, zero)).add(sortScoreMap.getOrDefault(fushu2, zero)); .add(getOrDefaultSafe(sortScoreMap,fushu1, zero)).add(getOrDefaultSafe(sortScoreMap,fushu2, zero));
} }
RmsVo.ScoreDistribution zhuYiScore = new RmsVo.ScoreDistribution("zhuYi", "注意指数", ObjectUtil.isNull(zhuYi) ? BigDecimal.ZERO : zhuYi); RmsVo.ScoreDistribution zhuYiScore = new RmsVo.ScoreDistribution("zhuYi", "注意指数", ObjectUtil.isNull(zhuYi) ? BigDecimal.ZERO : zhuYi);
cognitiveDomainList.add(zhuYiScore); cognitiveDomainList.add(zhuYiScore);
// 定向指数:定向 0-6分 // 定向指数:定向 0-6分
if (sortScoreMap.containsKey(shijian) || sortScoreMap.containsKey(didian)) { if (sortScoreMap.containsKey(shijian) || sortScoreMap.containsKey(didian)) {
dingXiang = sortScoreMap.getOrDefault(shijian, zero).add(sortScoreMap.getOrDefault(didian, zero)); dingXiang = getOrDefaultSafe(sortScoreMap,shijian, zero).add(getOrDefaultSafe(sortScoreMap,didian, zero));
} }
RmsVo.ScoreDistribution dingXiangScore = new RmsVo.ScoreDistribution("dingXiang", "定向指数", ObjectUtil.isNull(dingXiang) ? BigDecimal.ZERO : dingXiang); RmsVo.ScoreDistribution dingXiangScore = new RmsVo.ScoreDistribution("dingXiang", "定向指数", ObjectUtil.isNull(dingXiang) ? BigDecimal.ZERO : dingXiang);
cognitiveDomainList.add(dingXiangScore); cognitiveDomainList.add(dingXiangScore);
@ -894,6 +1013,10 @@ public class RmsServiceImpl implements IRmsService {
return scoreDistributions; return scoreDistributions;
} }
public static <K, V> V getOrDefaultSafe(Map<K, V> map, K key, V defaultValue) {
return map.containsKey(key) && map.get(key) != null ? map.get(key) : defaultValue;
}
/** /**
* @param score * @param score
* @param educationalStatus 教育程度1文盲 2小学 3初中 4高中 5大学 6大学以上 7其他 * @param educationalStatus 教育程度1文盲 2小学 3初中 4高中 5大学 6大学以上 7其他
@ -2499,43 +2622,43 @@ public class RmsServiceImpl implements IRmsService {
BigDecimal zero = new BigDecimal(0); BigDecimal zero = new BigDecimal(0);
// 记忆指数:自由回忆*3+分类提示*2+多选提示*1 范围0-15分 // 记忆指数:自由回忆*3+分类提示*2+多选提示*1 范围0-15分
if (sortScoreMap.containsKey(huiyi) || sortScoreMap.containsKey(fenlei) || sortScoreMap.containsKey(duoxuan)) { if (sortScoreMap.containsKey(huiyi) || sortScoreMap.containsKey(fenlei) || sortScoreMap.containsKey(duoxuan)) {
jiYi = sortScoreMap.getOrDefault(huiyi, zero).multiply(new BigDecimal(3)) jiYi = getOrDefaultSafe(sortScoreMap,huiyi, zero).multiply(new BigDecimal(3))
.add(sortScoreMap.getOrDefault(fenlei, zero).multiply(new BigDecimal(2))) .add(getOrDefaultSafe(sortScoreMap,fenlei, zero).multiply(new BigDecimal(2)))
.add(sortScoreMap.getOrDefault(duoxuan, zero)); .add(getOrDefaultSafe(sortScoreMap,duoxuan, zero));
} }
// 执行指数:连线测验+画钟+数字广度顺+数字广度逆+警觉性(听1敲桌子)+连续减7+词语流畅性(1分钟说动物)+抽象(词语相似性) 0-13分   1+3+1+1+1+3+1+2=13 // 执行指数:连线测验+画钟+数字广度顺+数字广度逆+警觉性(听1敲桌子)+连续减7+词语流畅性(1分钟说动物)+抽象(词语相似性) 0-13分   1+3+1+1+1+3+1+2=13
if (sortScoreMap.containsKey(lianxian) || sortScoreMap.containsKey(huazhong) || sortScoreMap.containsKey(shunbei) if (sortScoreMap.containsKey(lianxian) || sortScoreMap.containsKey(huazhong) || sortScoreMap.containsKey(shunbei)
|| sortScoreMap.containsKey(daobei) || sortScoreMap.containsKey(jingjuexing) || sortScoreMap.containsKey(jianfa) || sortScoreMap.containsKey(daobei) || sortScoreMap.containsKey(jingjuexing) || sortScoreMap.containsKey(jianfa)
|| sortScoreMap.containsKey(dongwu) || sortScoreMap.containsKey(xiangsixing) || sortScoreMap.containsKey(dongwu) || sortScoreMap.containsKey(xiangsixing)
) { ) {
zhiXing = sortScoreMap.getOrDefault(lianxian, zero).add(sortScoreMap.getOrDefault(huazhong, zero)) zhiXing = getOrDefaultSafe(sortScoreMap,lianxian, zero).add(getOrDefaultSafe(sortScoreMap,huazhong, zero))
.add(sortScoreMap.getOrDefault(shunbei, zero)).add(sortScoreMap.getOrDefault(daobei, zero)) .add(getOrDefaultSafe(sortScoreMap,shunbei, zero)).add(getOrDefaultSafe(sortScoreMap,daobei, zero))
.add(sortScoreMap.getOrDefault(jingjuexing, zero)).add(sortScoreMap.getOrDefault(jianfa, zero)) .add(getOrDefaultSafe(sortScoreMap,jingjuexing, zero)).add(getOrDefaultSafe(sortScoreMap,jianfa, zero))
.add(sortScoreMap.getOrDefault(dongwu, zero)).add(sortScoreMap.getOrDefault(xiangsixing, zero)); .add(getOrDefaultSafe(sortScoreMap,dongwu, zero)).add(getOrDefaultSafe(sortScoreMap,xiangsixing, zero));
} }
// 视空间指数:立方体+画钟+命名 0-7分 // 视空间指数:立方体+画钟+命名 0-7分
if (sortScoreMap.containsKey(lifangti) || sortScoreMap.containsKey(huazhong) if (sortScoreMap.containsKey(lifangti) || sortScoreMap.containsKey(huazhong)
|| sortScoreMap.containsKey(mingming1) || sortScoreMap.containsKey(mingming2) || sortScoreMap.containsKey(mingming3)) { || sortScoreMap.containsKey(mingming1) || sortScoreMap.containsKey(mingming2) || sortScoreMap.containsKey(mingming3)) {
kongJian = sortScoreMap.getOrDefault(lifangti, zero).add(sortScoreMap.getOrDefault(huazhong, zero)) kongJian = getOrDefaultSafe(sortScoreMap,lifangti, zero).add(getOrDefaultSafe(sortScoreMap,huazhong, zero))
.add(sortScoreMap.getOrDefault(mingming1, zero)).add(sortScoreMap.getOrDefault(mingming2, zero)).add(sortScoreMap.getOrDefault(mingming3, zero)); .add(getOrDefaultSafe(sortScoreMap,mingming1, zero)).add(getOrDefaultSafe(sortScoreMap,mingming2, zero)).add(getOrDefaultSafe(sortScoreMap,mingming3, zero));
} }
// 语言指数:命名+句子复述+词语流畅性 0-6分 // 语言指数:命名+句子复述+词语流畅性 0-6分
if (sortScoreMap.containsKey(mingming1) || sortScoreMap.containsKey(mingming2) || sortScoreMap.containsKey(mingming3) if (sortScoreMap.containsKey(mingming1) || sortScoreMap.containsKey(mingming2) || sortScoreMap.containsKey(mingming3)
|| sortScoreMap.containsKey(fushu1) || sortScoreMap.containsKey(fushu2) || sortScoreMap.containsKey(dongwu)) { || sortScoreMap.containsKey(fushu1) || sortScoreMap.containsKey(fushu2) || sortScoreMap.containsKey(dongwu)) {
yuYan = sortScoreMap.getOrDefault(mingming1, zero).add(sortScoreMap.getOrDefault(mingming2, zero)).add(sortScoreMap.getOrDefault(mingming3, zero)) yuYan = getOrDefaultSafe(sortScoreMap,mingming1, zero).add(getOrDefaultSafe(sortScoreMap,mingming2, zero)).add(getOrDefaultSafe(sortScoreMap,mingming3, zero))
.add(sortScoreMap.getOrDefault(chongfu1, zero)).add(sortScoreMap.getOrDefault(chongfu2, zero)).add(sortScoreMap.getOrDefault(dongwu, zero)); .add(getOrDefaultSafe(sortScoreMap,chongfu1, zero)).add(getOrDefaultSafe(sortScoreMap,chongfu2, zero)).add(getOrDefaultSafe(sortScoreMap,dongwu, zero));
} }
// 注意指数:数字广度顺+数字广度逆+警觉性+连续减7+句子重复+即刻记忆2次  0-18分 // 注意指数:数字广度顺+数字广度逆+警觉性+连续减7+句子重复+即刻记忆2次  0-18分
if (sortScoreMap.containsKey(shunbei) || sortScoreMap.containsKey(daobei) || sortScoreMap.containsKey(jingjuexing) if (sortScoreMap.containsKey(shunbei) || sortScoreMap.containsKey(daobei) || sortScoreMap.containsKey(jingjuexing)
|| sortScoreMap.containsKey(jianfa) || sortScoreMap.containsKey(chongfu1) || sortScoreMap.containsKey(chongfu2) || sortScoreMap.containsKey(jianfa) || sortScoreMap.containsKey(chongfu1) || sortScoreMap.containsKey(chongfu2)
|| sortScoreMap.containsKey(fushu1) || sortScoreMap.containsKey(fushu2)) { || sortScoreMap.containsKey(fushu1) || sortScoreMap.containsKey(fushu2)) {
zhuYi = sortScoreMap.getOrDefault(shunbei, zero).add(sortScoreMap.getOrDefault(daobei, zero)).add(sortScoreMap.getOrDefault(jingjuexing, zero)) zhuYi = getOrDefaultSafe(sortScoreMap,shunbei, zero).add(getOrDefaultSafe(sortScoreMap,daobei, zero)).add(getOrDefaultSafe(sortScoreMap,jingjuexing, zero))
.add(sortScoreMap.getOrDefault(jianfa, zero)).add(sortScoreMap.getOrDefault(chongfu1, zero)).add(sortScoreMap.getOrDefault(chongfu2, zero)) .add(getOrDefaultSafe(sortScoreMap,jianfa, zero)).add(getOrDefaultSafe(sortScoreMap,chongfu1, zero)).add(getOrDefaultSafe(sortScoreMap,chongfu2, zero))
.add(sortScoreMap.getOrDefault(fushu1, zero)).add(sortScoreMap.getOrDefault(fushu2, zero)); .add(getOrDefaultSafe(sortScoreMap,fushu1, zero)).add(getOrDefaultSafe(sortScoreMap,fushu2, zero));
} }
// 定向指数:定向 0-6分 // 定向指数:定向 0-6分
if (sortScoreMap.containsKey(shijian) || sortScoreMap.containsKey(didian)) { if (sortScoreMap.containsKey(shijian) || sortScoreMap.containsKey(didian)) {
dingXiang = sortScoreMap.getOrDefault(shijian, zero).add(sortScoreMap.getOrDefault(didian, zero)); dingXiang = getOrDefaultSafe(sortScoreMap,shijian, zero).add(getOrDefaultSafe(sortScoreMap,didian, zero));
} }
PdfUtil.Row titleRow = new PdfUtil.Row(); PdfUtil.Row titleRow = new PdfUtil.Row();

2
ruisi_java/ruisi-web-client/src/main/resources/application-dev.yml

@ -11,7 +11,7 @@ spring:
# password: po3OynBO[M3579p6L7)o # password: po3OynBO[M3579p6L7)o
url: jdbc:mysql://127.0.0.1:3306/ruisi_cga?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://127.0.0.1:3306/ruisi_cga?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: q7510327 password: 123456
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

1
ruisi_java/ruisi-web-client/src/main/resources/mapper/dao/AmsDao.xml

@ -29,6 +29,7 @@
qs.`name` AS scaleName, qs.`name` AS scaleName,
qs.total_score AS totalScore, qs.total_score AS totalScore,
sum(q.score) as score, sum(q.score) as score,
esr.sort,
count( DISTINCT q.questionId ) AS totalNum, count( DISTINCT q.questionId ) AS totalNum,
count( DISTINCT q.answerQuestionId ) AS completedNum count( DISTINCT q.answerQuestionId ) AS completedNum
FROM FROM

43
ruisi_java/ruisi-web-client/src/main/resources/mapper/dao/RmsDao.xml

@ -43,7 +43,8 @@
b.department, b.department,
b.doctor, b.doctor,
ee.version, ee.version,
h.version AS versionName h.version AS versionName,
pp.birthday
FROM FROM
ems_evaluation ee ems_evaluation ee
LEFT JOIN rms_report rr on ee.id = rr.evaluation_id LEFT JOIN rms_report rr on ee.id = rr.evaluation_id
@ -86,7 +87,8 @@ group by ee.id
qs.remark, qs.remark,
qs.type AS type, qs.type AS type,
qs.parent_code, qs.parent_code,
qs.sort qs.sort,
ecr.combo_id AS comboId
FROM qms_scale qs LEFT JOIN ems_evaluation_scale_relevance ecr ON ecr.scale_code = qs.`code` FROM qms_scale qs LEFT JOIN ems_evaluation_scale_relevance ecr ON ecr.scale_code = qs.`code`
WHERE WHERE
ecr.evaluation_id = #{evaluationId} ecr.evaluation_id = #{evaluationId}
@ -105,7 +107,8 @@ group by ee.id
qcd.remark, qcd.remark,
qcd.type, qcd.type,
qcd.parent_code, qcd.parent_code,
qcd.sort qcd.sort,
"" as comboId
FROM t LEFT JOIN qms_cognitive_domain qcd on qcd.parent_code = t.CODE FROM t LEFT JOIN qms_cognitive_domain qcd on qcd.parent_code = t.CODE
WHERE WHERE
qcd.is_show = 1 qcd.is_show = 1
@ -1793,9 +1796,37 @@ group by ee.id
rt.evaluation_id AS evaluationId, rt.evaluation_id AS evaluationId,
rt.scale_code AS code, rt.scale_code AS code,
rt.level_score AS score, rt.level_score AS score,
rt.sort as ecrSort, rt.sort as sort,
rt.total_score as totalScore rt.total_score as totalScore,
r.combo_id as comboId
FROM cognitive_relevance_tree rt FROM cognitive_relevance_tree rt
ORDER BY evaluation_id, level, sort left join ems_evaluation_scale_relevance r on r.evaluation_id = rt.evaluation_id and r.scale_code = rt.scale_code
group by rt.scale_code
ORDER BY rt.evaluation_id, rt.level, rt.sort
</select>
<select id="queryReportExportInfo" resultType="com.ccsens.system.domain.vo.RmsVo$ExportInfo">
SELECT
r.report_id as reportId,
r.scale_code as scaleCode,
r.score as score,
r.combo_id as comboId,
r.impression as impression,
r.need_plan as needPlan,
r.plan as plan,
r.sort as sort,
r.result as result,
r.scale_ass_conf as scaleAssConf,
q.name as scaleName,
h.`name` as comboName,
h1.name as comboParentName
FROM
rms_report rr
LEFT JOIN rms_report_scale_score r on rr.id = r.report_id and r.del_flag = 0
LEFT JOIN qms_scale q on r.scale_code = q.`code`
LEFT JOIN hms_combo h on h.id = r.combo_id
LEFT JOIN hms_combo h1 on h.parent_id = h1.id
WHERE
rr.del_flag = 0 and rr.evaluation_id = #{evaluationId}
</select> </select>
</mapper> </mapper>

2
web_admin/adminapi/index.html

File diff suppressed because one or more lines are too long

BIN
web_admin/adminapi/index.html.gz

Binary file not shown.

BIN
web_admin/cga113v2admin03.03-2.zip → web_admin/cga113v2admin03.02-2.zip

Binary file not shown.

2
web_admin/src/App.vue

@ -11,7 +11,7 @@ export default {
name: "App", name: "App",
components: { ThemePicker }, components: { ThemePicker },
created() { created() {
console.log("部署111`"); console.log("部署2");
}, },
metaInfo() { metaInfo() {

7
web_admin/src/api/report.js

@ -6,10 +6,3 @@ export function exportPdf(data) {
data: data, data: data,
}); });
} }
export function queryPdfUrl(data) {
return request({
url: "/queryPdfUrl",
method: "post",
data: data,
});
}

1
web_admin/src/views/largeScreen.vue

@ -256,7 +256,6 @@ export default {
mounted() { mounted() {
// 180 // 180
// 106 // 106
// 178
let deptId = this.$route.query.deptId || 106; let deptId = this.$route.query.deptId || 106;
localStorage.setItem("hospitalId", deptId); localStorage.setItem("hospitalId", deptId);
this.getNnicd(); // this.getNnicd(); //

77
web_admin/src/views/report/view copy.vue

@ -1,77 +0,0 @@
<template>
<div class="container" v-loading="loading">
<div v-if="pdfPath">
<pdf :pdfPath="pdfPath"></pdf>
</div>
<div v-else class="zw">未查询到报告单</div>
</div>
</template>
<script>
import { exportPdf } from "@/api/report.js";
import pdf from "./components/pdf.vue";
export default {
components: {
pdf,
},
data() {
return {
loading: false,
qzUrl: process.env.VUE_APP_BASE_API,
pdfPath: null,
};
},
methods: {
//
handleDownload() {
if (this.pdfPath) {
window.open(this.pdfPath);
}
},
//
async getExportPdf() {
this.loading = true;
exportPdf({
patientNo: this.$route.query.patient_no,
emplCode: this.$route.query.empl_code,
})
.then((res) => {
this.loading = false;
this.pdfPath = null;
if (res.data) {
this.$modal.msgSuccess("查询成功");
this.pdfPath = this.qzUrl + res.data;
}
})
.catch((error) => {
this.loading = false;
this.$modal.msgError("查询失败");
});
},
},
created() {
let deptId = this.$route.query.deptId || 106;
localStorage.setItem("hospitalId", deptId);
this.getExportPdf();
},
};
</script>
<style scoped>
.zw {
font-size: 100px;
color: #b0b0b0;
}
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
padding: 16px;
background: url("./back.png");
background-size: cover;
background-repeat: no-repeat;
}
</style>
<style></style>

187
web_admin/src/views/report/view.vue

@ -1,174 +1,77 @@
<template> <template>
<div class="app-container"> <div class="container" v-loading="loading">
<div class="patient-info"> <div v-if="pdfPath">
<span> {{ patientInfo.patientName || "未知" }}</span> <pdf :pdfPath="pdfPath"></pdf>
<span class="fg">/</span>
<span>
<span v-if="patientInfo.sex === 0"></span
><span v-if="patientInfo.sex === 1"></span><span v-else>-</span>
</span>
<span class="fg">/</span>
<span>{{ patientInfo.birthday || "-" }}</span>
<span class="fg">/</span>
<span>{{ patientInfo.idCard || "-" }}</span>
</div> </div>
<el-table v-loading="loading" :data="tableList" empty-text="未查询到报告单"> <div v-else class="zw">未查询到报告单</div>
<el-table-column
label="就诊类型"
align="center"
prop="visitType"
minWidth="100"
>
<template slot-scope="scope">
<span v-if="scope.row.visitType === 0">门诊</span>
<span v-else-if="scope.row.visitType === 1">住院</span>
</template>
</el-table-column>
<el-table-column
label="就诊号"
align="center"
prop="visitNo"
minWidth="100"
/>
<el-table-column
label="部门"
align="center"
prop="department"
minWidth="100"
/>
<el-table-column
label="评估医生"
align="center"
prop="assessor"
minWidth="100"
/>
<el-table-column
label="评估时间"
align="center"
prop="assessTime"
minWidth="100"
/>
<el-table-column label="操作" align="center" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleReport(scope.row)"
>
查看报告单
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div> </div>
</template> </template>
<script> <script>
import { exportPdf, queryPdfUrl } from "@/api/report.js"; import { exportPdf } from "@/api/report.js";
import pdf from "./components/pdf.vue";
export default { export default {
name: "Notice", components: {
pdf,
},
data() { data() {
return { return {
loading: true, loading: false,
total: 0,
patientInfo: {},
tableList: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
param: {},
},
qzUrl: process.env.VUE_APP_BASE_API, qzUrl: process.env.VUE_APP_BASE_API,
pdfPath: null,
}; };
}, },
created() {
let deptId = this.$route.query.hid || 106;
localStorage.setItem("hospitalId", deptId);
//
this.queryParams.param = {
patientNo: this.$route.query.patient_no,
visitNo: this.$route.query.visit_no,
};
this.getList();
},
methods: { methods: {
// //
handleReport(row) { handleDownload() {
queryPdfUrl({ if (this.pdfPath) {
reportId: row.reportId, window.open(this.pdfPath);
evaluationId: row.evaluationId,
version: 0, // 0 1 2
assessorId: row.assessorId,
}).then((res) => {
if (!row.data) {
this.$modal.msgError("未查询到报告单");
return;
} }
window.open(this.qzUrl + row.data);
});
}, },
/** 查询公告列表 */ //
getList() { async getExportPdf() {
this.loading = true; this.loading = true;
exportPdf(this.queryParams) exportPdf({
patientNo: this.$route.query.patient_no,
emplCode: this.$route.query.empl_code,
})
.then((res) => { .then((res) => {
this.tableList = res.data.list || [];
this.patientInfo = res.data.list[0] || {};
this.total = res.data.total || 0;
this.loading = false; this.loading = false;
this.pdfPath = null;
if (res.data) {
this.$modal.msgSuccess("查询成功");
this.pdfPath = this.qzUrl + res.data;
}
}) })
.catch(() => { .catch((error) => {
console.log("导出失败");
this.loading = false; this.loading = false;
this.$modal.msgError("查询失败");
}); });
}, },
}, },
created() {
let deptId = 176;
localStorage.setItem("hospitalId", deptId);
this.getExportPdf();
},
}; };
</script> </script>
<style scoped> <style scoped>
.app-container { .zw {
width: 80%; font-size: 100px;
margin: 0 auto; color: #b0b0b0;
margin-top: 100px;
/* height: 100vh;
display: flex;
flex-direction: column;
justify-content: center; */
} }
.container {
.patient-info {
width: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
line-height: 120px; align-items: center;
margin-bottom: 20px; height: 100vh;
font-size: 20px; padding: 16px;
color: #222; background: url("./back.png");
/* background: #f8f8f9; */ background-size: cover;
border: 1px solid #dfe6ec; background-repeat: no-repeat;
}
.fg {
margin: 0 10px;
}
/*屏蔽表头单元格背景色(背景设置为透明)*/
>>> .el-table .el-table__header-wrapper th,
>>> .el-table .el-table__fixed-header-wrapper th {
background-color: #409eff;
color: #fff;
} }
</style> </style>
<style lang="less"></style> <style></style>

4
web_admin/vue.config.js

@ -36,11 +36,9 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8080`, target: `http://localhost:19330`,
// target: `http://192.168.1.116:19330`,
// target: "https://nnzjpt.ylinno.com/ruisiCgaAdmin/", // target: "https://nnzjpt.ylinno.com/ruisiCgaAdmin/",
// target: "https://www.ylinno.com/cga/v2/api/admin/", // target: "https://www.ylinno.com/cga/v2/api/admin/",
target: "http://113.45.159.249:59001/cga/v2/api/admin/",
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",

3
web_client/src/api/ams.js

@ -219,4 +219,5 @@ export const furtherEvaluation = (params) =>
export const deletePatient = (params) => export const deletePatient = (params) =>
axios.post(`${proxyUrl}/ems/delete`, params); axios.post(`${proxyUrl}/ems/delete`, params);
// 撤回评估 // 撤回评估
export const revok = (params) => axios.post(`${proxyUrl}/ems/revok`, params); export const revok = (params) =>
axios.post(`${proxyUrl}/ems/revoke`, params);

2
web_client/vue.config.js

@ -37,7 +37,7 @@ module.exports = {
[settings.proxyUrl]: { [settings.proxyUrl]: {
// target: "https://www.ylinno.com/cga/v2/api/client/", // target: "https://www.ylinno.com/cga/v2/api/client/",
// target: "http://113.45.159.249:59001/cga/v2/api/client/", // target: "http://113.45.159.249:59001/cga/v2/api/client/",
target: "http://192.168.1.136:19331", target: "http://127.0.0.1:19331",
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + settings.proxyUrl]: "", ["^" + settings.proxyUrl]: "",

Loading…
Cancel
Save