新增医案收集实体

This commit is contained in:
wuchunlei
2025-07-11 10:21:35 +08:00
parent adcb3d6506
commit 40ba3636d7
12 changed files with 203 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
package com.peanut.modules.common.dao;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.common.entity.MedicalRecords;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MedicalRecordsDao extends MPJBaseMapper<MedicalRecords> {
}

View File

@@ -0,0 +1,9 @@
package com.peanut.modules.common.dao;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.common.entity.MedicalRecordsLabel;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MedicalRecordsLabelDao extends MPJBaseMapper<MedicalRecordsLabel> {
}

View File

@@ -0,0 +1,9 @@
package com.peanut.modules.common.dao;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.common.entity.MedicalRecordsToLabel;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MedicalRecordsToLabelDao extends MPJBaseMapper<MedicalRecordsToLabel> {
}

View File

@@ -0,0 +1,52 @@
package com.peanut.modules.common.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName("medical_records")
public class MedicalRecords {
private static final long serialVersionUID = 1L;
@TableId
private Integer id;
//用户id
private Integer userId;
//标题
private String title;
//0暂存1有效
private Integer state;
//是否加入ai训练库0否1是
private Integer train;
//未加入训练库原因
private String trainReason;
//一般信息
private String information;
//主诉
private String chiefComplaint;
//现病史
private String historyOfPresentIllness;
//既往史
private String pastHistory;
//个人史与家族史
private String personalAndFamilyHistory;
//体格检查
private String physicaExamination;
//诊断
private String diagnosis;
//治疗方案
private String treatmentPlan;
//原始数据
private String data;
private Date createTime;
@TableLogic
private Integer delFlag;
}

View File

@@ -0,0 +1,36 @@
package com.peanut.modules.common.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
@TableName("medical_records_label")
public class MedicalRecordsLabel {
private static final long serialVersionUID = 1L;
@TableId
private Integer id;
//父id
private Integer pid;
//是否是最终节点0否1是
private Integer isLast;
//标题
private String title;
//排序
private Integer sort;
private Date createTime;
@TableLogic
private Integer delFlag;
@TableField(exist = false)
private List<MedicalRecordsLabel> children;
@TableField(exist = false)
private List<MedicalRecords> medicalRecordsList;
}

View File

@@ -0,0 +1,28 @@
package com.peanut.modules.common.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName("medical_records_to_label")
public class MedicalRecordsToLabel {
private static final long serialVersionUID = 1L;
@TableId
private Integer id;
//医案id
private Integer recordId;
//标签id
private Integer labelId;
//排序
private Integer sort;
private Date createTime;
@TableLogic
private Integer delFlag;
}

View File

@@ -0,0 +1,7 @@
package com.peanut.modules.common.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.common.entity.MedicalRecordsLabel;
public interface MedicalRecordsLabelService extends IService<MedicalRecordsLabel> {
}

View File

@@ -0,0 +1,7 @@
package com.peanut.modules.common.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.common.entity.MedicalRecords;
public interface MedicalRecordsService extends IService<MedicalRecords> {
}

View File

@@ -0,0 +1,7 @@
package com.peanut.modules.common.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.common.entity.MedicalRecordsToLabel;
public interface MedicalRecordsToLabelService extends IService<MedicalRecordsToLabel> {
}

View File

@@ -0,0 +1,13 @@
package com.peanut.modules.common.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.peanut.modules.common.dao.MedicalRecordsLabelDao;
import com.peanut.modules.common.entity.MedicalRecordsLabel;
import com.peanut.modules.common.service.MedicalRecordsLabelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Slf4j
@Service("commonMedicalRecordsLabelService")
public class MedicalRecordsLabelServiceImpl extends ServiceImpl<MedicalRecordsLabelDao, MedicalRecordsLabel> implements MedicalRecordsLabelService {
}

View File

@@ -0,0 +1,13 @@
package com.peanut.modules.common.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.peanut.modules.common.dao.MedicalRecordsDao;
import com.peanut.modules.common.entity.MedicalRecords;
import com.peanut.modules.common.service.MedicalRecordsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Slf4j
@Service("commonMedicalRecordsService")
public class MedicalRecordsServiceImpl extends ServiceImpl<MedicalRecordsDao, MedicalRecords> implements MedicalRecordsService {
}

View File

@@ -0,0 +1,13 @@
package com.peanut.modules.common.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.peanut.modules.common.dao.MedicalRecordsToLabelDao;
import com.peanut.modules.common.entity.MedicalRecordsToLabel;
import com.peanut.modules.common.service.MedicalRecordsToLabelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Slf4j
@Service("commonMedicalRecordsToLabelService")
public class MedicalRecordsToLabelServiceImpl extends ServiceImpl<MedicalRecordsToLabelDao, MedicalRecordsToLabel> implements MedicalRecordsToLabelService {
}