JAVA全系列 教程
3762个小节阅读:7089.8k
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
序号 | 接口名称 | 接口地址 | 请求类型 |
---|---|---|---|
1 | 查询待就诊的挂号信息 | /doctor/care/queryToBeSeenRegistration/{scheudlingType} | get |
2 | 查询就诊中的挂号信息 | /doctor/care/queryVisitingRegistration/{scheudlingType} | get |
3 | 查询就诊完成的挂号信息 | /doctor/care/queryVisitCompletedRegistration/{scheudlingType} | get |
4 | 接诊 | /doctor/care/receivePatient/{regId} | post |
5 | 根据患者ID获取患者信息、档案信息、病历信息 | /doctor/care/getPatientAllMessageByPatientId/{patientId} | get |
参数名称 | 备注 |
---|---|
scheudlingType | 挂号类型 1 2 |
返回JSON数据
名称 | 类型 | 其他信息 |
---|---|---|
msg | String | |
code | int | |
data | Object [] | item 类型: object |
├─ regId | String | |
├─ patientId | String | |
├─ patientName | String | |
├─ deptId | int | |
├─ regItemId | int | |
├─ regItemAmount | int | |
├─ regNumber | int | |
├─ regStatus | String | |
├─ visitDate | String | |
├─ schedulingType | String | |
├─ subsectionType | String | |
├─ createTime | String | |
├─ updateTime | String | |
├─ createBy | String |
创建CareHistory值对象
xxxxxxxxxx
package com.bjsxt.dto;
import ...
/**
*
*/
/**
* 病历表
*/
value="com-bjsxt-dto-CareHistoryDto") (
public class CareHistoryDto implements Serializable {
/**
* 病历ID
*/
value="病历ID") (
private String chId;
/**
* 医生id
*/
value="医生id") (
private Long userId;
/**
* 医生姓名
*/
value="医生姓名") (
private String userName;
/**
* 患者id
*/
message = "患者id不能为空") (
value="患者id") (
private String patientId;
/**
* 患者姓名
*/
message = "患者姓名能为空") (
value="患者姓名") (
private String patientName;
/**
* 科室id
*/
value="科室id") (
private Long deptId;
/**
* 科室名称
*/
value="科室名称") (
private String deptName;
/**
* 接诊类型:0初诊,1复诊 字典表属性his_receive_type
*/
message = "接诊类型能为空") (
value="接诊类型:0初诊,1复诊 字典表属性his_receive_type") (
private String receiveType;
/**
* 是否传染,0否,1是 字典表属性his_contagious_status
*/
message = "是否传染能为空") (
value="是否传染,0否,1是 字典表属性his_contagious_status") (
private String isContagious;
/**
* 就诊时间
*/
value = "care_date") (
value="就诊时间") (
private Date careDate;
/**
* 发病日期
*/
message = "发病日期能为空") (
value="发病日期") (
private String caseDate;
/**
* 挂号单号
*/
message = "挂号单号能为空") (
value="挂号单号") (
private String regId;
/**
* 主诉
*/
value="主诉") (
private String caseTitle;
/**
* 诊断信息
*/
value="诊断信息") (
private String caseResult;
/**
* 医生建议
*/
value="医生建议") (
private String doctorTips;
/**
* 备注
*/
value="备注") (
private String remark;
}
xxxxxxxxxx
package com.bjsxt.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bjsxt.domain.CareHistory;
/**
*
*/
public interface CareHistoryMapper extends BaseMapper<CareHistory> {
}
创建CareHistoryMapper.xml
xxxxxxxxxx
<mapper namespace="com.bjsxt.mapper.CareHistoryMapper">
<resultMap id="BaseResultMap" type="com.bjsxt.domain.CareHistory">
<!--@mbg.generated-->
<!--@Table his_care_history-->
<id column="ch_id" jdbcType="VARCHAR" property="chId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<result column="patient_id" jdbcType="VARCHAR" property="patientId" />
<result column="patient_name" jdbcType="VARCHAR" property="patientName" />
<result column="dept_id" jdbcType="BIGINT" property="deptId" />
<result column="dept_name" jdbcType="VARCHAR" property="deptName" />
<result column="receive_type" jdbcType="CHAR" property="receiveType" />
<result column="is_contagious" jdbcType="CHAR" property="isContagious" />
<result column="care_date" jdbcType="TIMESTAMP" property="careDate" />
<result column="case_date" jdbcType="VARCHAR" property="caseDate" />
<result column="reg_id" jdbcType="VARCHAR" property="regId" />
<result column="case_title" jdbcType="VARCHAR" property="caseTitle" />
<result column="case_result" jdbcType="VARCHAR" property="caseResult" />
<result column="doctor_tips" jdbcType="VARCHAR" property="doctorTips" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
ch_id, user_id, user_name, patient_id, patient_name, dept_id, dept_name, receive_type,
is_contagious, care_date, case_date, reg_id, case_title, case_result, doctor_tips,
remark
</sql>
</mapper>
处方Dto
xxxxxxxxxx
package com.bjsxt.dto;
import ...
/**
*
*/
value="com-bjsxt-dto-CareOrderDto") (
callSuper=true) (
public class CareOrderDto extends BaseDto {
/**
* 处方ID
*/
value="处方ID") (
private String coId;
/**
* 处方类型0药用处方1检查处方
*/
message = "处方类型不能为空") (
value="处方类型0药用处方1检查处方") (
private String coType;
/**
* 医生id
*/
value="医生id") (
private Long userId;
/**
* 患者id
*/
value="患者id") (
private String patientId;
/**
* 患者姓名
*/
value="患者姓名") (
private String patientName;
/**
* 关联病历id
*/
message = "病历ID不能为空") (
value="关联病历id") (
private String chId;
/**
* 处方全额
*/
message = "处方全额不能为空") (
value="处方全额") (
private BigDecimal allAmount;
}
xxxxxxxxxx
package com.bjsxt.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bjsxt.domain.CareOrder;
/**
*
*/
public interface CareOrderMapper extends BaseMapper<CareOrder> {
}
创建CareOrderMapp.xml
xxxxxxxxxx
<mapper namespace="com.bjsxt.mapper.CareOrderMapper">
<resultMap id="BaseResultMap" type="com.bjsxt.domain.CareOrder">
<!--@mbg.generated-->
<!--@Table his_care_order-->
<id column="co_id" jdbcType="VARCHAR" property="coId" />
<result column="co_type" jdbcType="CHAR" property="coType" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="patient_id" jdbcType="VARCHAR" property="patientId" />
<result column="patient_name" jdbcType="VARCHAR" property="patientName" />
<result column="ch_id" jdbcType="VARCHAR" property="chId" />
<result column="all_amount" jdbcType="DECIMAL" property="allAmount" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
co_id, co_type, user_id, patient_id, patient_name, ch_id, all_amount, create_by,
create_time, update_by, update_time
</sql>
</mapper>
CareOrderItem
xxxxxxxxxx
package com.bjsxt.dto;
import ...
/**
*
*/
value="com-bjsxt-dto-CareOrderItemDto") (
public class CareOrderItemDto implements Serializable {
/**
* 开诊明细ID
*/
value="开诊明细ID") (
private String itemId;
/**
* 所属处方id
*/
value="所属处方id") (
private String coId;
/**
* 药品或者检查项目id
*/
message = "药品或检查项目ID不能为空") (
value="药品或者检查项目id") (
private String itemRefId;
/**
* 药品或检查项目名称
*/
message = "药品或检查项目名称不能为空") (
value="药品或检查项目名称") (
private String itemName;
/**
* 项目类型0药品 还是1检查项
*/
message = "项目类型不能为空") (
value="项目类型0药品 还是1检查项") (
private String itemType;
/**
* 数量
*/
message = "数量不能为空") (
value="数量") (
private BigDecimal num;
/**
* 单价
*/
message = "单价不能为空") (
value="单价") (
private BigDecimal price;
/**
* 金额
*/
message = "金额不能为空") (
value="金额") (
private BigDecimal amount;
/**
* 备注
*/
value="备注") (
private String remark;
}
创建处方详情映射类
xxxxxxxxxx
package com.bjsxt.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bjsxt.domain.CareOrderItem;
/**
*
*/
public interface CareOrderItemMapper extends BaseMapper<CareOrderItem> {
}
CareOrderItemMapper.xml
xxxxxxxxxx
<mapper namespace="com.bjsxt.mapper.CareOrderItemMapper">
<resultMap id="BaseResultMap" type="com.bjsxt.domain.CareOrderItem">
<!--@mbg.generated-->
<!--@Table his_care_order_item-->
<id column="item_id" jdbcType="VARCHAR" property="itemId" />
<result column="co_id" jdbcType="VARCHAR" property="coId" />
<result column="item_ref_id" jdbcType="VARCHAR" property="itemRefId" />
<result column="item_name" jdbcType="VARCHAR" property="itemName" />
<result column="item_type" jdbcType="CHAR" property="itemType" />
<result column="num" jdbcType="DECIMAL" property="num" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="status" jdbcType="CHAR" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
item_id, co_id, item_ref_id, item_name, item_type, num, price, amount, remark, `status`,
create_time
</sql>
</mapper>
创建CareOrderService
xxxxxxxxxx
package com.bjsxt.service;
import com.bjsxt.domain.CareHistory;
import java.util.List;
/**
*
* 就诊相关的接口
*/
public interface CareService {
/**
* 根据患者 ID 查询历史病历
* @param patientId
* @return
*/
List<CareHistory> queryCareHistoryByPatientId(String patientId);
}
xxxxxxxxxx
package com.bjsxt.service.impl;
import ...
/**
*
*/
public class CareServiceImpl implements CareService {
private CareHistoryMapper careHistoryMapper;
public List<CareHistory> queryCareHistoryByPatientId(String patientId) {
QueryWrapper<CareHistory> qw = new QueryWrapper<>();
qw.eq(CareHistory.COL_PATIENT_ID, patientId);
return this.careHistoryMapper.selectList(qw);
}
}
修改RegistrationService,增加按条件查询挂号单
xxxxxxxxxx
/**
* 根据条件查询挂号信息
* @param deptId 部门
* @param subsectionType 时段
* @param scheudlingType 类型 门诊 急诊
* @param regStatus 挂号单状态
* @param userId 医生ID
* @return
*/
public List<Registration> queryRegistration(Long deptId, String subsectionType, String scheudlingType, String regStatus, Long userId) {
QueryWrapper<Registration> qw=new QueryWrapper<>();
qw.eq(Registration.COL_DEPT_ID,deptId);
qw.eq(StringUtils.isNotBlank(subsectionType),
Registration.COL_SUBSECTION_TYPE,subsectionType);
qw.eq(Registration.COL_SCHEDULING_TYPE,scheudlingType);
qw.eq(Registration.COL_REG_STATUS,regStatus);
qw.eq(Registration.COL_VISIT_DATE,DateUtil.format(DateUtil.date(),"yyyy-MM-dd"));
qw.eq(null!=userId,Registration.COL_USER_ID,userId);
qw.orderByAsc(Registration.COL_REG_NUMBER);
return this.registrationMapper.selectList(qw);
}
xxxxxxxxxx
package com.bjsxt.controller.doctor;
import ...
/**
*
* @Description: 新开就诊控制器
*/
"doctor/care") (
public class CareController {
private RegistrationService registrationService;
private PatientService patientService;
private CareService careService;
private DeptService deptService;
/**
* 查询待就诊的挂号信息
* GET/doctor/care/queryToBeSeenRegistration/{scheudlingType}
*/
"queryToBeSeenRegistration/{scheudlingType}") (
public AjaxResult queryToBeSeenRegistration( String scheudlingType){
//得到当前用户的部门ID
Long deptId= ShiroSecurityUtils.getCurrentUser().getDeptId();
//设置要查询的状态 只能是挂号单的待就诊的挂号信息
String regStatus= Constants.REG_STATUS_1;
//计算时段
String subsectionType= HisDateUtils.getCurrentTimeType();
//查询
Long userId=null;
List<Registration> list=this.registrationService
.queryRegistration(deptId,subsectionType, scheudlingType,regStatus,userId);
return AjaxResult.success(list);
}
/**
* 查询就诊中的挂号信息
* GET/doctor/care/queryVisitingRegistration/{scheudlingType}
*/
"queryVisitingRegistration/{scheudlingType}") (
public AjaxResult queryVisitingRegistration( String scheudlingType){
//得到当前用户的部门ID
Long deptId= ShiroSecurityUtils.getCurrentUser().getDeptId();
//设置要查询的状态 只能是挂号单的待就诊的挂号信息
String regStatus= Constants.REG_STATUS_2;
//计算时段
// String subsectionType= HisDateUtils.getCurrentTimeType();
//查询
Long userId=ShiroSecurityUtils.getCurrentUser().getUserId();
List<Registration> list=
this.registrationService.queryRegistration(deptId,null, scheudlingType,regStatus,userId);
return AjaxResult.success(list);
}
}
查询待就诊的挂号信息/doctor/care/queryToBeSeenRegistration/{scheudlingType}