diff --git a/docker/v3.1.0/step1.sql b/docker/v3.1.0/step1.sql index e73e7095..822c3e76 100644 --- a/docker/v3.1.0/step1.sql +++ b/docker/v3.1.0/step1.sql @@ -2,4 +2,12 @@ alter table vp_medical_rec modify status integer default 0 null comment '上线状态 0:未上线 1:已经上线 状态为未上线且病历未出现在vp_process表中使用可以进行删除'; alter table vp_ask_template_question_library - add type int default 1 null comment '问题类型 1标准问 2自定义问题' after standard_question \ No newline at end of file + add type int default 1 null comment '问题类型 1标准问 2自定义问题' after standard_question + +-- 在诊断关联表中添加关系类型字段 +alter table vp_disease_ancillary + add relation_type integer default 0 null comment '关系类型 0:关联疾病 1:关联病历 当类型为1是 disease_id代表的是vp_medical_rec表中的id' after require_check_flag; +alter table vp_disease_physical + add relation_type integer default 0 null comment '关系类型 0:关联疾病 1:关联病历 当类型为1是 disease_id代表的是vp_medical_rec表中的id' after require_check_flag; +alter table vp_disease_treatment_plan + add relation_type integer default 0 null comment '关系类型 0:关联疾病 1:关联病历 当类型为1是 disease_id代表的是vp_medical_rec表中的id' after treatment_plan_id; \ No newline at end of file diff --git a/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseaseTreatmentPlanManageServiceImpl.java b/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseaseTreatmentPlanManageServiceImpl.java index b036c47d..071880b4 100644 --- a/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseaseTreatmentPlanManageServiceImpl.java +++ b/virtual-patient-manage/src/main/java/com/supervision/manage/service/impl/DiseaseTreatmentPlanManageServiceImpl.java @@ -102,7 +102,7 @@ public class DiseaseTreatmentPlanManageServiceImpl implements DiseaseTreatmentPl assertDiseaseTreatmentPlan(diseaseTreatmentPlan); - // note: 如果diseaseTreatmentPlan.getDiseaseId()不为空,则表示处置计划为药品,需要进行手动矫正,统一设置为20 + // note: 如果diseaseTreatmentPlan.getDrugIds()不为空,则表示处置计划为药品,需要进行手动矫正,统一设置为20 if (CollUtil.isNotEmpty(diseaseTreatmentPlan.getDrugIds())){ diseaseTreatmentPlan.setTreatmentPlanId(mapDrugTreatPlanId(diseaseTreatmentPlan.getDisposalMethod())); } diff --git a/virtual-patient-model/src/main/java/com/supervision/model/DiseaseAncillary.java b/virtual-patient-model/src/main/java/com/supervision/model/DiseaseAncillary.java index 365cf051..6fa059a9 100644 --- a/virtual-patient-model/src/main/java/com/supervision/model/DiseaseAncillary.java +++ b/virtual-patient-model/src/main/java/com/supervision/model/DiseaseAncillary.java @@ -80,6 +80,10 @@ public class DiseaseAncillary implements Serializable { @Schema(description = "说明") private String description; + + @Schema(description = "关系类型 0:关联疾病 1:关联病历") + private String relationType; + /** * 创建人ID */ diff --git a/virtual-patient-model/src/main/java/com/supervision/model/DiseasePhysical.java b/virtual-patient-model/src/main/java/com/supervision/model/DiseasePhysical.java index 7d2b57dc..ff587099 100644 --- a/virtual-patient-model/src/main/java/com/supervision/model/DiseasePhysical.java +++ b/virtual-patient-model/src/main/java/com/supervision/model/DiseasePhysical.java @@ -86,6 +86,9 @@ public class DiseasePhysical implements Serializable { @Schema(description = "表征 默认诊断结果") private String trait; + @Schema(description = "关系类型 0:关联疾病 1:关联病历") + private String relationType; + /** * 创建人ID */ diff --git a/virtual-patient-model/src/main/java/com/supervision/model/DiseaseTreatmentPlan.java b/virtual-patient-model/src/main/java/com/supervision/model/DiseaseTreatmentPlan.java index 06fc2e5c..b4a04265 100644 --- a/virtual-patient-model/src/main/java/com/supervision/model/DiseaseTreatmentPlan.java +++ b/virtual-patient-model/src/main/java/com/supervision/model/DiseaseTreatmentPlan.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serializable; @@ -38,6 +39,9 @@ public class DiseaseTreatmentPlan implements Serializable { */ private String treatmentPlanId; + @Schema(description = "关系类型 0:关联疾病 1:关联病历") + private String relationType; + /** * 创建人ID */ diff --git a/virtual-patient-model/src/main/resources/mapper/DiseaseAncillaryMapper.xml b/virtual-patient-model/src/main/resources/mapper/DiseaseAncillaryMapper.xml index 138feab9..6e2dac0e 100644 --- a/virtual-patient-model/src/main/resources/mapper/DiseaseAncillaryMapper.xml +++ b/virtual-patient-model/src/main/resources/mapper/DiseaseAncillaryMapper.xml @@ -19,6 +19,7 @@ + @@ -29,7 +30,7 @@ id ,disease_id,item_id,require_check_flag,basis_confirm_flag,primarily_diagnosis_criteria_flag,basis_identification_flag ,full_check_flag,diagnosis_assessment_flag,expected_diagnosis_result, - result,normal_result,symptom_image_file_ids,description,create_user_id, + result,normal_result,symptom_image_file_ids,description,relation_type,create_user_id, create_time,update_user_id,update_time diff --git a/virtual-patient-model/src/main/resources/mapper/DiseasePhysicalMapper.xml b/virtual-patient-model/src/main/resources/mapper/DiseasePhysicalMapper.xml index e54125da..281e38e5 100644 --- a/virtual-patient-model/src/main/resources/mapper/DiseasePhysicalMapper.xml +++ b/virtual-patient-model/src/main/resources/mapper/DiseasePhysicalMapper.xml @@ -20,6 +20,7 @@ + @@ -30,7 +31,7 @@ id,tool_id,location_id,disease_id, require_check_flag,primarily_diagnosis_criteria_flag,basis_confirm_flag, diagnosis_assessment_flag,expected_diagnosis_result,full_check_flag, - basis_identification_flag,result,normal_result,trait, + basis_identification_flag,result,normal_result,trait,relation_type, create_user_id,create_time,update_user_id, update_time diff --git a/virtual-patient-model/src/main/resources/mapper/DiseaseTreatmentPlanMapper.xml b/virtual-patient-model/src/main/resources/mapper/DiseaseTreatmentPlanMapper.xml index f2fb490d..990dd464 100644 --- a/virtual-patient-model/src/main/resources/mapper/DiseaseTreatmentPlanMapper.xml +++ b/virtual-patient-model/src/main/resources/mapper/DiseaseTreatmentPlanMapper.xml @@ -8,6 +8,7 @@ + @@ -16,7 +17,7 @@ id - ,disease_id,treatment_plan_id,create_user_id, + ,disease_id,treatment_plan_id,relation_type,create_user_id, create_time,update_user_id,update_time