parent
a52230abe0
commit
b5fde8deea
@ -1,41 +0,0 @@
|
||||
package com.ann.demo.entity.interfaceEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: LeiJiaXin
|
||||
* @Date: 2019/9/10 10:04
|
||||
*/
|
||||
@Data
|
||||
public class EMRData {
|
||||
// 2019-9-28 新增id
|
||||
private String applyId;
|
||||
|
||||
private Date xmlCreateTime;
|
||||
|
||||
private String inpNo;
|
||||
|
||||
private String visitId;
|
||||
|
||||
private String patientId;
|
||||
|
||||
// 病历文书
|
||||
private String type;
|
||||
|
||||
private String reportAddress;
|
||||
|
||||
private String lastModifyTime;
|
||||
|
||||
private String commitTime;
|
||||
|
||||
// 知情同意
|
||||
private String subType;
|
||||
|
||||
// 知情同意下面的类型
|
||||
private String detailType;
|
||||
|
||||
//排序的时间
|
||||
private String captionDateTime;
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
package com.ann.demo.entity.interfaceEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 检查申请单
|
||||
*
|
||||
* @Author: LeiJiaXin
|
||||
* @Date: 2019/8/22 15:42
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
@Entity
|
||||
public class ExamApply {
|
||||
|
||||
@Id
|
||||
private String applyId;
|
||||
|
||||
private Date xmlCreateTime;
|
||||
|
||||
private String inpNo;
|
||||
|
||||
private String visitId;
|
||||
|
||||
private String patientId;
|
||||
|
||||
private Date authorReportTime;
|
||||
|
||||
private String result;
|
||||
|
||||
private Integer isValid = 0;
|
||||
|
||||
/**
|
||||
* 病理、放射、心电、超声、内镜
|
||||
*/
|
||||
private String reportType;
|
||||
|
||||
|
||||
/**
|
||||
* 2019-10-21 新增是否开立接口 E 检查 F 取消检查
|
||||
*/
|
||||
private String isOpen = "0";
|
||||
|
||||
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
package com.ann.demo.entity.interfaceEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 检验申请单
|
||||
*
|
||||
* @Author: LeiJiaXin
|
||||
* @Date: 2019/12/23 15:42
|
||||
*/
|
||||
@Data
|
||||
public class InspectionApply {
|
||||
|
||||
private String applyId;
|
||||
|
||||
private Date xmlCreateTime;
|
||||
|
||||
private String inpNo;
|
||||
|
||||
private String visitId;
|
||||
|
||||
private String patientId;
|
||||
|
||||
private Date authorReportTime;
|
||||
|
||||
private String result;
|
||||
|
||||
private Integer isValid = 0;
|
||||
|
||||
/**
|
||||
* 2019-10-21 新增是否开立接口 E 检查 F 取消检查
|
||||
*/
|
||||
private String isOpen;
|
||||
|
||||
|
||||
}
|
@ -1,97 +0,0 @@
|
||||
package com.ann.demo.entity.interfaceEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description 超声报告
|
||||
* @Date 2019/6/24 21:58
|
||||
* @Created by ljx
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class UltrasonicReport {
|
||||
|
||||
/*
|
||||
* 文档流水号
|
||||
* */
|
||||
private String id;
|
||||
|
||||
/*
|
||||
* 住院号标识号
|
||||
* */
|
||||
private String inpNo;
|
||||
|
||||
/*
|
||||
* 检查报告单号
|
||||
* */
|
||||
private String checkReportId;
|
||||
|
||||
/**
|
||||
* 电子申请单号
|
||||
*/
|
||||
private String applyId;
|
||||
|
||||
/**
|
||||
* 就诊次数
|
||||
*/
|
||||
private String visitId;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
|
||||
/*检查报告医师(文档创作者)*/
|
||||
|
||||
/**
|
||||
* 检查报告日期
|
||||
*/
|
||||
private String authorReportTime;
|
||||
|
||||
|
||||
/**
|
||||
* 医师标识
|
||||
*/
|
||||
private String assignedAuthorId;
|
||||
|
||||
/**
|
||||
* 医师姓名
|
||||
*/
|
||||
private String assignedPersonName;
|
||||
|
||||
|
||||
/* 审核医师签名 */
|
||||
|
||||
/**
|
||||
* 审核医师Id
|
||||
*/
|
||||
private String examineId;
|
||||
|
||||
/**
|
||||
* 审核医师姓名
|
||||
*/
|
||||
private String examineAssignedPersonName;
|
||||
|
||||
/**
|
||||
* 检查报告地址
|
||||
*/
|
||||
private String reportAddress;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UltrasonicReport{" +
|
||||
"id='" + id + '\'' +
|
||||
", inpNo='" + inpNo + '\'' +
|
||||
", checkReportId='" + checkReportId + '\'' +
|
||||
", applyId='" + applyId + '\'' +
|
||||
", visitId='" + visitId + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", authorReportTime='" + authorReportTime + '\'' +
|
||||
", assignedAuthorId='" + assignedAuthorId + '\'' +
|
||||
", assignedPersonName='" + assignedPersonName + '\'' +
|
||||
", examineId='" + examineId + '\'' +
|
||||
", examineAssignedPersonName='" + examineAssignedPersonName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package com.ann.demo.repository;
|
||||
|
||||
import com.ann.demo.entity.normalEntity.Department;
|
||||
import com.ann.demo.entity.normalEntity.User;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Author: LeiJiaXin
|
||||
* @Date: 2019/7/16 9:53
|
||||
*/
|
||||
@Repository
|
||||
public interface DepartmentRepository extends JpaRepository<Department, String> {
|
||||
|
||||
@Query("select o from Department o where o.DEPT_CODE = ?1 and o.isValid = ?2 ")
|
||||
public Department findDepartmentByDeptCodeAndIsValid(String deptCode, Integer isValid);
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package com.ann.demo.repository;
|
||||
|
||||
import com.ann.demo.entity.normalEntity.Department;
|
||||
import com.ann.demo.entity.normalEntity.EMRDictionary;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Author: LeiJiaXin
|
||||
* @Date: 2019/9/21 16:04
|
||||
*/
|
||||
@Repository
|
||||
public interface EMRDictionaryRepository extends JpaRepository<EMRDictionary, Integer> {
|
||||
|
||||
@Query("select o from EMRDictionary o where o.DEPT_CODE = ?1 and o.isValid = ?2 ")
|
||||
public EMRDictionary findEMRDictionaryByCodeAndIsValid(String code, Integer isValid);
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
package com.ann.demo.repository;
|
||||
|
||||
import com.ann.demo.entity.interfaceEntity.ExamApply;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @Author: LeiJiaXin
|
||||
* @Date: 2019/8/22 16:22
|
||||
*/
|
||||
@Repository
|
||||
public interface ExamApplyRepository extends JpaRepository<ExamApply, String> {
|
||||
|
||||
@Transactional
|
||||
@Modifying
|
||||
@Query("update ExamApply o set o.isValid = 1 where o.applyId = ?1 and o.isValid = 0 ")
|
||||
public Integer updateExamApplyIsValidById(String applyId);
|
||||
|
||||
@Query("select count(o) from ExamApply o where o.applyId = ?1 and o.isValid = 0")
|
||||
public Integer countExamApply(String applyId);
|
||||
|
||||
public ExamApply findByApplyId(String applyId);
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package com.ann.demo.repository;
|
||||
|
||||
import com.ann.demo.entity.normalEntity.User;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Author: LeiJiaXin
|
||||
* @Date: 2019/7/16 9:53
|
||||
*/
|
||||
@Repository
|
||||
public interface UserRepository extends JpaRepository<User, String> {
|
||||
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package com.ann.demo.service;
|
||||
|
||||
import com.ann.demo.entity.normalEntity.Department;
|
||||
import com.ann.demo.entity.normalEntity.User;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Date 2019/7/16 9:56
|
||||
* @Created by ljx
|
||||
*/
|
||||
|
||||
public interface DepartmentService {
|
||||
|
||||
public void save(Department department);
|
||||
|
||||
public void delete(Department department);
|
||||
|
||||
public Department findDepartment(String user_dept);
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package com.ann.demo.service;
|
||||
|
||||
import com.ann.demo.entity.normalEntity.EMRDictionary;
|
||||
|
||||
/**
|
||||
* @Author: LeiJiaXin
|
||||
* @Date: 2019/9/21 16:08
|
||||
*/
|
||||
public interface EMRDictionaryService {
|
||||
|
||||
public void save(EMRDictionary emrDictionary);
|
||||
|
||||
public void delete(EMRDictionary emrDictionary);
|
||||
|
||||
public EMRDictionary findEMRDictionary(String code);
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package com.ann.demo.service;
|
||||
|
||||
import com.ann.demo.entity.interfaceEntity.ExamApply;
|
||||
|
||||
/**
|
||||
* @Author: LeiJiaXin
|
||||
* @Date: 2019/8/22 16:20
|
||||
*/
|
||||
public interface ExamApplyService {
|
||||
|
||||
public void save(ExamApply examApply);
|
||||
|
||||
/* public boolean updateExamApplyIsValidById(String id);*/
|
||||
|
||||
//public String findId(String applyId,String inpNo,String visitId,String patientId);
|
||||
|
||||
public ExamApply findExamApply(String applyId);
|
||||
|
||||
Integer countExamApply(String applyId);
|
||||
|
||||
boolean updateExamApplyIsValid(String applyId);
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.ann.demo.service;
|
||||
|
||||
import com.ann.demo.entity.normalEntity.User;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Date 2019/7/16 9:56
|
||||
* @Created by ljx
|
||||
*/
|
||||
|
||||
public interface UserService {
|
||||
|
||||
public void save(User user);
|
||||
|
||||
public void delete(User user);
|
||||
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package com.ann.demo.service.impl;
|
||||
|
||||
import com.ann.demo.entity.normalEntity.Department;
|
||||
import com.ann.demo.entity.normalEntity.User;
|
||||
import com.ann.demo.repository.DepartmentRepository;
|
||||
import com.ann.demo.repository.UserRepository;
|
||||
import com.ann.demo.service.DepartmentService;
|
||||
import com.ann.demo.service.UserService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Date 2019/7/9 16:43
|
||||
* @Created by ljx
|
||||
*/
|
||||
@Service
|
||||
public class DepartmentServiceImpl implements DepartmentService {
|
||||
|
||||
static final Logger logger = LoggerFactory.getLogger(DepartmentServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
DepartmentRepository departmentRepository;
|
||||
|
||||
@Override
|
||||
public void save(Department department) {
|
||||
//打日志信息
|
||||
try {
|
||||
departmentRepository.save(department);
|
||||
} catch (Exception e) {
|
||||
logger.error("出错咯!错误信息:" + e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(Department department) {
|
||||
//打日志信息
|
||||
try {
|
||||
departmentRepository.delete(department);
|
||||
} catch (Exception e) {
|
||||
logger.error("出错咯!错误信息:" + e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Department findDepartment(String user_dept) {
|
||||
// ------------------确认 isValid 0是正常 1是停用
|
||||
return departmentRepository.findDepartmentByDeptCodeAndIsValid(user_dept, 0);
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
package com.ann.demo.service.impl;
|
||||
|
||||
import com.ann.demo.entity.normalEntity.EMRDictionary;
|
||||
import com.ann.demo.repository.DepartmentRepository;
|
||||
import com.ann.demo.repository.EMRDictionaryRepository;
|
||||
import com.ann.demo.service.EMRDictionaryService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Author: LeiJiaXin
|
||||
* @Date: 2019/9/21 16:08
|
||||
*/
|
||||
@Service
|
||||
public class EMRDictionaryServiceImpl implements EMRDictionaryService {
|
||||
|
||||
static final Logger logger = LoggerFactory.getLogger(EMRDictionaryServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
EMRDictionaryRepository emrDictionaryRepository;
|
||||
|
||||
@Override
|
||||
public void save(EMRDictionary emrDictionary) {
|
||||
//打日志信息
|
||||
try {
|
||||
emrDictionaryRepository.save(emrDictionary);
|
||||
} catch (Exception e) {
|
||||
logger.error("出错咯!错误信息:" + e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(EMRDictionary emrDictionary) {
|
||||
//打日志信息
|
||||
try {
|
||||
emrDictionaryRepository.delete(emrDictionary);
|
||||
} catch (Exception e) {
|
||||
logger.error("出错咯!错误信息:" + e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EMRDictionary findEMRDictionary(String code) {
|
||||
// ------------------确认 isValid 0是正常 1是停用
|
||||
return emrDictionaryRepository.findEMRDictionaryByCodeAndIsValid(code, 0);
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
package com.ann.demo.service.impl;
|
||||
|
||||
import com.ann.demo.entity.interfaceEntity.ExamApply;
|
||||
import com.ann.demo.repository.ExamApplyRepository;
|
||||
import com.ann.demo.service.ExamApplyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Author: LeiJiaXin
|
||||
* @Date: 2019/8/22 16:20
|
||||
*/
|
||||
@Service
|
||||
public class ExamApplyServiceImpl implements ExamApplyService {
|
||||
|
||||
@Autowired
|
||||
ExamApplyRepository examApplyRepository;
|
||||
|
||||
@Override
|
||||
public void save(ExamApply examApply) {
|
||||
examApplyRepository.save(examApply);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamApply findExamApply(String applyId) {
|
||||
return examApplyRepository.findByApplyId(applyId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countExamApply(String applyId) {
|
||||
return examApplyRepository.countExamApply(applyId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateExamApplyIsValid(String applyId) {
|
||||
if (examApplyRepository.updateExamApplyIsValidById(applyId) > 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
package com.ann.demo.service.impl;
|
||||
|
||||
import com.ann.demo.entity.filing.MessageSubordinate;
|
||||
import com.ann.demo.entity.normalEntity.Department;
|
||||
import com.ann.demo.entity.normalEntity.EMRDictionary;
|
||||
import com.ann.demo.entity.normalEntity.User;
|
||||
import com.ann.demo.repository.MessageSubordinateRepository;
|
||||
import com.ann.demo.repository.UserRepository;
|
||||
import com.ann.demo.service.DepartmentService;
|
||||
import com.ann.demo.service.MessageSubordinateService;
|
||||
import com.ann.demo.service.UserService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Date 2019/7/9 16:43
|
||||
* @Created by ljx
|
||||
*/
|
||||
@Service
|
||||
public class UserServiceImpl implements UserService {
|
||||
|
||||
static final Logger logger = LoggerFactory.getLogger(UserServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
UserRepository userRepository;
|
||||
|
||||
@Autowired
|
||||
EMRDictionaryServiceImpl emrDictionaryService;
|
||||
|
||||
@Override
|
||||
public void save(User user) {
|
||||
//打日志信息
|
||||
try {
|
||||
// 获取科室 根据科室类型区分临床和非临床,临床的然后有资质的就是医生,没有资质的就是护士
|
||||
Integer roleId = 0;
|
||||
if (user.getUSER_DEPT() != null) {
|
||||
EMRDictionary emrDictionary = emrDictionaryService.findEMRDictionary(user.getUSER_DEPT());
|
||||
if (emrDictionary != null) {
|
||||
if (emrDictionary.getCLINIC_ATTR() == 0) {
|
||||
if (user.getEDUCATION_FLAG() == 0) { // 无资质 护士
|
||||
roleId = 1;
|
||||
} else { // 有资质 为 1 医生
|
||||
roleId = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
user.setUSER_TYPE(roleId);
|
||||
userRepository.save(user);
|
||||
} catch (Exception e) {
|
||||
logger.error("出错咯!错误信息:" + e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(User user) {
|
||||
//打日志信息
|
||||
try {
|
||||
userRepository.delete(user);
|
||||
} catch (Exception e) {
|
||||
logger.error("出错咯!错误信息:" + e);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue