Merge branch 'master' of codeup.aliyun.com:61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -69,6 +69,7 @@ public class CabinetLocationController {
|
||||
|
||||
// 设置排序
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
|
||||
// 执行分页查询并转换为 locationQueryDtoPage
|
||||
Page<LocationQueryDto> locationQueryDtoPage =
|
||||
HisPageUtils.selectPage(locationMapper, queryWrapper, pageNo, pageSize, LocationQueryDto.class);
|
||||
@@ -80,14 +81,16 @@ public class CabinetLocationController {
|
||||
/**
|
||||
* 添加库房位置信息
|
||||
*
|
||||
* @param locationQueryDto 位置信息
|
||||
* @param locationQueryDto 库房位置信息
|
||||
*/
|
||||
@PostMapping("/cabinet-location")
|
||||
public R<?> addLocation(@Validated @RequestBody LocationQueryDto locationQueryDto) {
|
||||
|
||||
LocationQueryDto locationQuery = new LocationQueryDto(LocationForm.CABINET);
|
||||
// 设置为库房
|
||||
// LocationQueryDto locationQuery = new LocationQueryDto(LocationForm.CABINET);
|
||||
Location location = new Location();
|
||||
BeanUtils.copyProperties(locationQuery, location);
|
||||
locationQueryDto.setFormEnum(LocationForm.CABINET);
|
||||
BeanUtils.copyProperties(locationQueryDto, location);
|
||||
|
||||
boolean saveLocationSuccess = locationService.save(location);
|
||||
|
||||
@@ -97,21 +100,21 @@ public class CabinetLocationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取位置需要编辑的信息
|
||||
* 获取库房位置需要编辑的信息
|
||||
*
|
||||
* @param locationId 位置信息
|
||||
* @param locationId 库房位置信息Id
|
||||
*/
|
||||
@GetMapping("/cabinet-location-editById")
|
||||
@GetMapping("/cabinet-location-getById")
|
||||
public R<?> getLocationById(@Validated @RequestParam Long locationId) {
|
||||
|
||||
Location location = locationService.getById(locationId);
|
||||
return R.ok(location, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"位置信息"}));
|
||||
return R.ok(location, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"位置信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑位置信息
|
||||
* 编辑库房位置信息
|
||||
*
|
||||
* @param location 位置信息
|
||||
* @param location 库房位置信息
|
||||
*/
|
||||
@PutMapping("/cabinet-location")
|
||||
public R<?> editLocation(@Validated @RequestBody Location location) {
|
||||
@@ -124,9 +127,9 @@ public class CabinetLocationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除位置信息
|
||||
* 删除库房位置信息
|
||||
*
|
||||
* @param locationId 主表id
|
||||
* @param locationId 库房位置信息Id
|
||||
*/
|
||||
@DeleteMapping("/cabinet-location")
|
||||
public R<?> deleteLocation(@RequestParam Long locationId) {
|
||||
|
||||
@@ -125,11 +125,11 @@ public class OrganizationController {
|
||||
*
|
||||
* @param orgId 机构信息
|
||||
*/
|
||||
@GetMapping("/organization-editById")
|
||||
@GetMapping("/organization-getById")
|
||||
public R<?> getOrganizationById(@Validated @RequestParam Long orgId) {
|
||||
|
||||
Organization organization = organizationService.getById(orgId);
|
||||
return R.ok(organization, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"机构信息"}));
|
||||
return R.ok(organization, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -171,18 +171,33 @@ public class OrganizationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用启用
|
||||
* 启用
|
||||
*
|
||||
* @param orgId 主表id
|
||||
* @param orgId 启用数据的Id
|
||||
*/
|
||||
@PutMapping("/organization-flag")
|
||||
public R<?> changeOrgFlag(@RequestParam Long orgId) {
|
||||
@PutMapping("/organization-active")
|
||||
public R<?> changeActive(@RequestParam Long orgId) {
|
||||
|
||||
boolean flagChangeSuccess = organizationService.changeOrgFlag(orgId);
|
||||
boolean activeSuccess = organizationService.activeChange(orgId);
|
||||
|
||||
return flagChangeSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"机构活动标识"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构活动标识"}));
|
||||
return activeSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"启用"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"启用"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用
|
||||
*
|
||||
* @param orgId 停用数据的Id
|
||||
*/
|
||||
@PutMapping("/organization-inactive")
|
||||
public R<?> changeInactive(@RequestParam Long orgId) {
|
||||
|
||||
boolean inActiveSuccess = organizationService.activeChange(orgId);
|
||||
|
||||
return inActiveSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"停用"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"停用"}));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.domain.OrganizationLocation;
|
||||
import com.openhis.administration.mapper.OrganizationLocationMapper;
|
||||
import com.openhis.administration.service.ILocationService;
|
||||
import com.openhis.administration.service.IOrganizationLocationService;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.basedatamanage.dto.OrgLocInitDto;
|
||||
import com.openhis.web.basedatamanage.dto.OrgLocQueryDto;
|
||||
import com.openhis.web.basedatamanage.dto.OrgLocQueryParam;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 机构位置关系controller
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/basedatamanage/org-loc")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class OrganizationLocationController {
|
||||
|
||||
@Autowired
|
||||
private final IOrganizationLocationService organizationLocationService;
|
||||
|
||||
@Autowired
|
||||
private IOrganizationService organizationService;
|
||||
|
||||
@Autowired
|
||||
private ILocationService locationService;
|
||||
|
||||
@Autowired
|
||||
private OrganizationLocationMapper organizationLocationMapper;
|
||||
|
||||
/**
|
||||
* 机构位置关系初始化
|
||||
*
|
||||
*/
|
||||
@GetMapping(value = "/init")
|
||||
public R<?> init() {
|
||||
|
||||
OrgLocInitDto initDto = new OrgLocInitDto();
|
||||
// 设置科室列表
|
||||
initDto.setOrganization(organizationService.list())
|
||||
// 设置药库列表
|
||||
.setLocation(locationService.list(new LambdaQueryWrapper<Location>().in(Location::getFormEnum, 11)));
|
||||
return R.ok(initDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 机构位置关系分页列表
|
||||
*
|
||||
* @param orgLocQueryParam 查询字段
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request 请求数据
|
||||
* @return 机构位置关系分页列表
|
||||
*/
|
||||
@GetMapping(value = "/org-loc")
|
||||
public R<?> getOrgLocPage(OrgLocQueryParam orgLocQueryParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<OrganizationLocation> queryWrapper = HisQueryUtils.buildQueryWrapper(orgLocQueryParam, searchKey,
|
||||
new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), request);
|
||||
|
||||
// 设置排序
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
|
||||
// 执行分页查询并转换为 orgLocQueryDtoPage
|
||||
Page<OrgLocQueryDto> orgLocQueryDtoPage =
|
||||
HisPageUtils.selectPage(organizationLocationMapper, queryWrapper, pageNo, pageSize, OrgLocQueryDto.class);
|
||||
|
||||
return R.ok(orgLocQueryDtoPage,
|
||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构信息"}));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加机构位置关系信息
|
||||
*
|
||||
* @param orgLocQueryDto 机构位置关系信息
|
||||
*/
|
||||
@PostMapping("/org-loc")
|
||||
public R<?> addOrgLoc(@Validated @RequestBody OrgLocQueryDto orgLocQueryDto) {
|
||||
|
||||
// 新增organizationLocation信息
|
||||
OrganizationLocation orgLoc = new OrganizationLocation();
|
||||
BeanUtils.copyProperties(orgLocQueryDto, orgLoc);
|
||||
|
||||
boolean saveOrgLocSuccess = organizationLocationService.save(orgLoc);
|
||||
|
||||
return saveOrgLocSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"机构位置关系信息"}))
|
||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取机构位置关系需要编辑的信息
|
||||
*
|
||||
* @param orgLocId 机构位置关系信息
|
||||
*/
|
||||
@GetMapping("/org-loc-getById")
|
||||
public R<?> getOrgLocById(@Validated @RequestParam Long orgLocId) {
|
||||
|
||||
OrganizationLocation orgLoc = organizationLocationService.getById(orgLocId);
|
||||
return R.ok(orgLoc, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构位置关系信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑机构位置关系信息
|
||||
*
|
||||
* @param orgLocQueryDto 机构位置关系信息
|
||||
*/
|
||||
@PutMapping("/org-loc")
|
||||
public R<?> editOrgLoc(@Validated @RequestBody OrgLocQueryDto orgLocQueryDto) {
|
||||
|
||||
// 编辑organizationLocation信息
|
||||
OrganizationLocation orgLoc = new OrganizationLocation();
|
||||
BeanUtils.copyProperties(orgLocQueryDto, orgLoc);
|
||||
|
||||
boolean editOrgLocSuccess = organizationLocationService.updateById(orgLoc);
|
||||
return editOrgLocSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"机构位置关系信息"}))
|
||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除机构位置关系信息
|
||||
*
|
||||
* @param orgLocId 主表id
|
||||
*/
|
||||
@DeleteMapping("/org-loc")
|
||||
public R<?> delOrgLoc(@RequestParam Long orgLocId) {
|
||||
|
||||
boolean delOrgLocSuccess = organizationLocationService.removeById(orgLocId);
|
||||
|
||||
return delOrgLocSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"机构位置关系信息"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"机构位置关系信息"}));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.openhis.administration.domain.PractitionerRole;
|
||||
import com.openhis.administration.mapper.PractitionerRoleMapper;
|
||||
import com.openhis.administration.service.IPractitionerRoleService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.basedatamanage.dto.PractRoleSearchParam;
|
||||
import com.openhis.web.basedatamanage.dto.PractitionerRoleDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 岗位管理Controller业务层处理
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/basedatamanage/practitioner-role")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class PractitionerRoleController {
|
||||
|
||||
private final IPractitionerRoleService practitionerRoleService;
|
||||
|
||||
@Autowired
|
||||
private PractitionerRoleMapper practitionerRoleMapper;
|
||||
|
||||
/**
|
||||
* 岗位分页列表
|
||||
*
|
||||
* @param practRoleSearchParam 查询条件
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request 请求数据
|
||||
* @return 岗位分页列表
|
||||
*/
|
||||
@GetMapping(value = "/practitioner-role")
|
||||
public R<?> getPractitionerRolePage(PractRoleSearchParam practRoleSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<PractitionerRole> queryWrapper = HisQueryUtils.buildQueryWrapper(practRoleSearchParam, searchKey,
|
||||
new HashSet<>(Arrays.asList("name")), request);
|
||||
|
||||
// 设置排序
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
|
||||
// 执行分页查询并转换为 practitionerRoleDtoPage
|
||||
Page<PractitionerRoleDto> practitionerRoleDtoPage =
|
||||
HisPageUtils.selectPage(practitionerRoleMapper, queryWrapper, pageNo, pageSize, PractitionerRoleDto.class);
|
||||
|
||||
return R.ok(practitionerRoleDtoPage,
|
||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构信息"}));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加岗位信息
|
||||
*
|
||||
* @param practitionerRoleDto 岗位信息
|
||||
*/
|
||||
@PostMapping("/practitioner-role")
|
||||
public R<?> addPractitionerRole(@Validated @RequestBody PractitionerRoleDto practitionerRoleDto) {
|
||||
|
||||
// 新增practitionerRole信息
|
||||
PractitionerRole practitionerRole = new PractitionerRole();
|
||||
BeanUtils.copyProperties(practitionerRoleDto, practitionerRole);
|
||||
|
||||
boolean savePractitionerRoleSuccess = practitionerRoleService.save(practitionerRole);
|
||||
|
||||
return savePractitionerRoleSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"岗位信息"}))
|
||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位需要编辑的信息
|
||||
*
|
||||
* @param proleId 岗位信息
|
||||
*/
|
||||
@GetMapping("/practitioner-role-getById")
|
||||
public R<?> getPractitionerRoleById(@Validated @RequestParam Long proleId) {
|
||||
|
||||
PractitionerRole practitionerRole = practitionerRoleService.getById(proleId);
|
||||
return R.ok(practitionerRole, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"岗位信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑岗位信息
|
||||
*
|
||||
* @param practitionerRoleDto 岗位信息
|
||||
*/
|
||||
@PutMapping("/practitioner-role")
|
||||
public R<?> editPractitionerRole(@Validated @RequestBody PractitionerRoleDto practitionerRoleDto) {
|
||||
|
||||
// 编辑practitionerRole信息
|
||||
PractitionerRole practitionerRole = new PractitionerRole();
|
||||
BeanUtils.copyProperties(practitionerRoleDto, practitionerRole);
|
||||
|
||||
boolean editPractitionerRoleSuccess = practitionerRoleService.updateById(practitionerRole);
|
||||
|
||||
return editPractitionerRoleSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"岗位信息"}))
|
||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除岗位信息
|
||||
*
|
||||
* @param prId 主表id
|
||||
*/
|
||||
@DeleteMapping("/practitioner-role")
|
||||
public R<?> deletePractitionerRole(@RequestParam Long prId) {
|
||||
|
||||
boolean deletePractitionerRoleSuccess = practitionerRoleService.removeById(prId);
|
||||
|
||||
return deletePractitionerRoleSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"岗位信息"}))
|
||||
: R.fail(PromptMsgConstant.Common.M00006, null);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,7 +5,10 @@ package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.enums.LocationBedStatus;
|
||||
import com.openhis.common.enums.LocationForm;
|
||||
import com.openhis.common.enums.LocationMode;
|
||||
import com.openhis.common.enums.LocationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -59,9 +62,9 @@ public class LocationQueryDto {
|
||||
private Integer displayOrder;
|
||||
|
||||
// public LocationQueryDto(LocationForm form, String busNo, LocationMode mode) {
|
||||
public LocationQueryDto(LocationForm form) {
|
||||
this.statusEnum = LocationStatus.ACTIVE;
|
||||
this.formEnum = form;
|
||||
// public LocationQueryDto(LocationForm form) {
|
||||
// this.statusEnum = LocationStatus.ACTIVE;
|
||||
// this.formEnum = form;
|
||||
// this.modeEnum = mode;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 科室位置关系初始化 dto
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrgLocInitDto implements Serializable {
|
||||
|
||||
/** 机构科室信息 */
|
||||
private List<Organization> organization;
|
||||
|
||||
/** 位置药房信息 */
|
||||
private List<Location> location;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrgLocQueryDto {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 机构编码 */
|
||||
private Long organizationId;
|
||||
|
||||
/** 位置编码 */
|
||||
private Long locationId;
|
||||
|
||||
/** 默认药房 */
|
||||
private Long defLocationId;
|
||||
|
||||
/** 药品类别 */
|
||||
private String medCategoryCode;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endTime;
|
||||
|
||||
/** 显示顺序 */
|
||||
private Integer displayOrder;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 科室分页查询条件
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrgLocQueryParam implements Serializable {
|
||||
|
||||
/** 活动标识 */
|
||||
private Integer activeFlag;
|
||||
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 岗位分页查询条件
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PractRoleSearchParam implements Serializable {
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 专业编码枚举 */
|
||||
private Integer specialtyEnum;
|
||||
|
||||
/** 机构 */
|
||||
private Long orgId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PractitionerRoleDto {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 角色编码 */
|
||||
private String role_code;
|
||||
|
||||
/** 活动标识 */
|
||||
private Integer activeFlag;
|
||||
|
||||
/** 参与者Id */
|
||||
private Long practitionerId;
|
||||
|
||||
/** 机构 */
|
||||
private Long orgId;
|
||||
|
||||
/** 位置ID */
|
||||
private Long locationId;
|
||||
|
||||
/** 服务id */
|
||||
private Long healthcareServiceId;
|
||||
|
||||
/** 专业编码枚举 */
|
||||
private Integer specialtyEnum;
|
||||
|
||||
/** 岗位类型 */
|
||||
private String typeCode;
|
||||
|
||||
/** 有效时间 */
|
||||
private String availabilityJson;
|
||||
}
|
||||
@@ -6,22 +6,25 @@ package com.openhis.web.basicservice.controller;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.mapper.LocationMapper;
|
||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||
import com.openhis.administration.service.IHealthcareServiceService;
|
||||
import com.openhis.common.enums.AccountStatus;
|
||||
import com.openhis.common.enums.WhetherContainUnknown;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.domain.MedicationQueryDto;
|
||||
import com.openhis.web.basicservice.dto.HealthcareServiceAddOrUpdateParam;
|
||||
import com.openhis.web.basicservice.dto.HealthcareServiceInitDto;
|
||||
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
@@ -39,6 +42,9 @@ import java.util.stream.Stream;
|
||||
public class HealthcareServiceController {
|
||||
|
||||
private final IHealthcareServiceService iHealthcareServiceService;
|
||||
private final IChargeItemDefinitionService iChargeItemDefinitionService;
|
||||
|
||||
|
||||
private final HealthcareServiceBizMapper healthcareServiceBizMapper;
|
||||
private final LocationMapper locationMapper;
|
||||
|
||||
@@ -66,8 +72,28 @@ public class HealthcareServiceController {
|
||||
.map(location -> new HealthcareServiceInitDto.locationIdOption(location.getId(), location.getName()))
|
||||
.collect(Collectors.toList());
|
||||
healthcareServiceInitDto.setLocationIdOptions(locationIdOptions);
|
||||
// 是否需要预约
|
||||
List<HealthcareServiceInitDto.appointmentRequiredFlagOption> appointmentRequiredFlagOptions = Stream.of(WhetherContainUnknown.values())
|
||||
.map(wh -> new HealthcareServiceInitDto.appointmentRequiredFlagOption(wh.getValue(), wh.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
healthcareServiceInitDto.setAppointmentRequiredFlagOptions(appointmentRequiredFlagOptions);
|
||||
return R.ok(healthcareServiceInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务管理 新增
|
||||
*/
|
||||
@PostMapping(value = "/healthcare-service")
|
||||
public R<?> add(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam){
|
||||
// 服务管理-表单数据
|
||||
HealthcareService healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData();
|
||||
// 费用定价-表单数据
|
||||
ChargeItemDefinition chargeItemDefinitionFormData = healthcareServiceAddOrUpdateParam.getChargeItemDefinitionFormData();
|
||||
// 服务管理-新增
|
||||
HealthcareService healthcareService = iHealthcareServiceService.addHealthcareService(healthcareServiceFormData);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.openhis.web.basicservice.dto;
|
||||
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 服务项目管理 新增修改参数类
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
public class HealthcareServiceAddOrUpdateParam{
|
||||
/**
|
||||
* 服务管理
|
||||
*/
|
||||
private HealthcareService healthcareServiceFormData;
|
||||
|
||||
/**
|
||||
* 费用定价
|
||||
*/
|
||||
private ChargeItemDefinition chargeItemDefinitionFormData;
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@ public class HealthcareServiceInitDto {
|
||||
|
||||
private List<activeFlagOption> activeFlagOptions;
|
||||
private List<locationIdOption> locationIdOptions;
|
||||
private List<appointmentRequiredFlagOption> appointmentRequiredFlagOptions;
|
||||
|
||||
|
||||
/**
|
||||
@@ -45,4 +46,18 @@ public class HealthcareServiceInitDto {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否需要预约
|
||||
*/
|
||||
@Data
|
||||
public static class appointmentRequiredFlagOption {
|
||||
private Integer value;
|
||||
private String label;
|
||||
|
||||
public appointmentRequiredFlagOption(Integer value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,227 @@
|
||||
package com.openhis.web.datadictionary.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import com.openhis.administration.mapper.DeviceDefinitionMapper;
|
||||
import com.openhis.administration.service.IDeviceDefinitionService;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.DeviceCategory;
|
||||
import com.openhis.common.enums.OrganizationType;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageDto;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageInitDto;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageSelParam;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageUpDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* TODO:器材目录
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/datadictionary/device")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class DeviceManageController {
|
||||
private final IDeviceDefinitionService iDeviceDefinitionService;
|
||||
private final DeviceDefinitionMapper DeviceDefinitionMapper;
|
||||
private final IOrganizationService iOrganizationService;
|
||||
|
||||
/**
|
||||
* TODO: 器材目录初期查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/init")
|
||||
public R<?> getDeviceManageInit() {
|
||||
DeviceManageInitDto deviceManageInitDto = new DeviceManageInitDto();
|
||||
// 获取状态
|
||||
List<DeviceManageInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new DeviceManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
deviceManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
// 获取执行科室
|
||||
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(Organization::getTypeEnum, OrganizationType.HOSPITAL_DEPARTMENT);
|
||||
List<Organization> organizations = iOrganizationService.list(queryWrapper);
|
||||
List<DeviceManageInitDto.exeOrganization> exeOrganizations = organizations.stream()
|
||||
.map(exeOrg -> new DeviceManageInitDto.exeOrganization(exeOrg.getId(), exeOrg.getName()))
|
||||
.collect(Collectors.toList());
|
||||
deviceManageInitDto.setExeOrganizations(exeOrganizations);
|
||||
// 获取分类
|
||||
List<DeviceManageInitDto.deviceCategory> deviceCategories = Stream.of(DeviceCategory.values())
|
||||
.map(category -> new DeviceManageInitDto.deviceCategory(category.getValue(), category.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
deviceManageInitDto.setDeviceCategories(deviceCategories);
|
||||
return R.ok(deviceManageInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询器材目录分页列表
|
||||
*
|
||||
* @param DeviceManageSelParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-page")
|
||||
public R<?> getDevicePage(DeviceManageSelParam DeviceManageSelParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<DeviceDefinition> queryWrapper = HisQueryUtils.buildQueryWrapper(DeviceManageSelParam, searchKey,
|
||||
new HashSet<>(Arrays.asList("bus_no", "name", "py_str", "wb_str")), request);
|
||||
// 设置排序
|
||||
queryWrapper.orderByAsc("bus_no");
|
||||
// 分页查询
|
||||
Page<DeviceManageDto> deviceManagePage =
|
||||
HisPageUtils.selectPage(DeviceDefinitionMapper, queryWrapper, pageNo, pageSize, DeviceManageDto.class);
|
||||
// 返回【器材目录列表DTO】分页
|
||||
return R.ok(deviceManagePage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询器材详情
|
||||
*
|
||||
* @param id 器材ID
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-one/{id}")
|
||||
public R<?> getDeviceOne(@PathVariable("id") Long id) {
|
||||
|
||||
// 根据ID查询【器材目录】
|
||||
DeviceDefinition byId = iDeviceDefinitionService.getById(id);
|
||||
return R.ok(byId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 器材目录编辑
|
||||
*
|
||||
* @param DeviceManageDto 器材目录列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information")
|
||||
public R<?> editDevice(@RequestBody DeviceManageUpDto DeviceManageDto) {
|
||||
|
||||
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||
BeanUtils.copyProperties(DeviceManageDto, DeviceDefinition);
|
||||
|
||||
// 更新器材信息
|
||||
return iDeviceDefinitionService.updateById(DeviceDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 器材目录停用
|
||||
*
|
||||
* @param ids 器材目录ID列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information-stop")
|
||||
public R<?> editDeviceStop(@RequestBody List<Long> ids) {
|
||||
List<DeviceDefinition> DeviceDefinitionList = new CopyOnWriteArrayList<>();
|
||||
|
||||
// 取得更新值
|
||||
for (Long detail : ids) {
|
||||
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||
DeviceDefinition.setId(detail);
|
||||
DeviceDefinition.setStatusEnum(PublicationStatus.RETIRED);
|
||||
DeviceDefinitionList.add(DeviceDefinition);
|
||||
}
|
||||
// 更新器材信息
|
||||
return iDeviceDefinitionService.updateBatchById(DeviceDefinitionList)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 器材目录启用
|
||||
*
|
||||
* @param ids 器材目录ID列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information-start")
|
||||
public R<?> editDeviceStart(@RequestBody List<Long> ids) {
|
||||
List<DeviceDefinition> DeviceDefinitionList = new CopyOnWriteArrayList<>();
|
||||
|
||||
// 取得更新值
|
||||
for (Long detail : ids) {
|
||||
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||
DeviceDefinition.setId(detail);
|
||||
DeviceDefinition.setStatusEnum(PublicationStatus.ACTIVE);
|
||||
DeviceDefinitionList.add(DeviceDefinition);
|
||||
}
|
||||
// 更新器材信息
|
||||
return iDeviceDefinitionService.updateBatchById(DeviceDefinitionList)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增外来器材目录
|
||||
*
|
||||
* @param DeviceManageUpDto 器材目录
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/information")
|
||||
public R<?> addDevice(@Validated @RequestBody DeviceManageUpDto DeviceManageUpDto) {
|
||||
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||
BeanUtils.copyProperties(DeviceManageUpDto, DeviceDefinition);
|
||||
// 新增外来器材目录
|
||||
DeviceDefinition.setStatusEnum(PublicationStatus.DRAFT);
|
||||
return iDeviceDefinitionService.addDevice(DeviceDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增医保器材目录
|
||||
*
|
||||
* @param DeviceManageUpDto 器材目录
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/information-yb")
|
||||
public R<?> addYbDevice(@RequestBody DeviceManageUpDto DeviceManageUpDto) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 器材目录导出
|
||||
*
|
||||
* @param DeviceManageDto 器材目录
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-export")
|
||||
public R<?> exportDevice(@RequestBody DeviceManageDto DeviceManageDto) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
package com.openhis.web.datadictionary.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.common.enums.ConditionDefinitionSource;
|
||||
import com.openhis.web.basedatamanage.dto.OrganizationQueryDto;
|
||||
import com.openhis.web.basicservice.dto.HealthcareServiceInitDto;
|
||||
import com.openhis.web.datadictionary.dto.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.OrganizationType;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.workflow.domain.ActivityDefinition;
|
||||
import com.openhis.workflow.mapper.ActivityDefinitionMapper;
|
||||
import com.openhis.workflow.service.IActivityDefinitionService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* TODO:诊疗目录
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/datadictionary/diagnosistreatment")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class DiagnosisTreatmentController {
|
||||
private final IActivityDefinitionService iActivityDefinitionService;
|
||||
private final ActivityDefinitionMapper activityDefinitionMapper;
|
||||
private final IOrganizationService iOrganizationService;
|
||||
|
||||
/**
|
||||
* 诊疗目录初期查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/init")
|
||||
public R<?> getDiseaseTreatmentInit() {
|
||||
DiagnosisTreatmentInitDto diagnosisTreatmentInitDto = new DiagnosisTreatmentInitDto();
|
||||
// 获取状态
|
||||
List<DiagnosisTreatmentInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new DiagnosisTreatmentInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
diagnosisTreatmentInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
// 获取执行科室
|
||||
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(Organization::getTypeEnum, OrganizationType.HOSPITAL_DEPARTMENT);
|
||||
List<Organization> organizations = iOrganizationService.list(queryWrapper);
|
||||
List<DiagnosisTreatmentInitDto.exeOrganization> exeOrganizations = organizations.stream()
|
||||
.map(exeOrg -> new DiagnosisTreatmentInitDto.exeOrganization(exeOrg.getId(), exeOrg.getName()))
|
||||
.collect(Collectors.toList());
|
||||
diagnosisTreatmentInitDto.setExeOrganizations(exeOrganizations);
|
||||
|
||||
// 获取诊疗分类
|
||||
return R.ok(diagnosisTreatmentInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询诊疗目录分页列表
|
||||
*
|
||||
* @param DiagnosisTreatmentSelParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-page")
|
||||
public R<?> getDiseaseTreatmentPage(DiagnosisTreatmentSelParam DiagnosisTreatmentSelParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<ActivityDefinition> queryWrapper = HisQueryUtils.buildQueryWrapper(DiagnosisTreatmentSelParam,
|
||||
searchKey, new HashSet<>(Arrays.asList("bus_no", "name", "py_str", "wb_str")), request);
|
||||
// 设置排序
|
||||
queryWrapper.orderByAsc("bus_no");
|
||||
// 分页查询
|
||||
Page<DiagnosisTreatmentDto> diseaseTreatmentPage = HisPageUtils.selectPage(activityDefinitionMapper,
|
||||
queryWrapper, pageNo, pageSize, DiagnosisTreatmentDto.class);
|
||||
// 返回【诊疗目录列表DTO】分页
|
||||
return R.ok(diseaseTreatmentPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询诊疗详情
|
||||
*
|
||||
* @param id 诊疗ID
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-one/{id}")
|
||||
public R<?> getDiseaseTreatmentOne(@PathVariable("id") Long id) {
|
||||
DiagnosisTreatmentDto diagnosisTreatmentDto = new DiagnosisTreatmentDto();
|
||||
// 根据ID查询【诊疗目录】
|
||||
ActivityDefinition activityDefinition = iActivityDefinitionService.getById(id);
|
||||
BeanUtils.copyProperties(activityDefinition, diagnosisTreatmentDto);
|
||||
return R.ok(diagnosisTreatmentDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗目录编辑
|
||||
*
|
||||
* @param diagnosisTreatmentUpDto 诊疗目录列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information")
|
||||
public R<?> editDiseaseTreatment(@RequestBody DiagnosisTreatmentUpDto diagnosisTreatmentUpDto) {
|
||||
|
||||
ActivityDefinition ActivityDefinition = new ActivityDefinition();
|
||||
BeanUtils.copyProperties(diagnosisTreatmentUpDto, ActivityDefinition);
|
||||
|
||||
// 更新诊疗信息
|
||||
return iActivityDefinitionService.updateById(ActivityDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊疗目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗目录停用
|
||||
*
|
||||
* @param ids 诊疗目录ID列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information-stop")
|
||||
public R<?> editDiseaseTreatmentStop(@RequestBody List<Long> ids) {
|
||||
List<ActivityDefinition> ActivityDefinitionList = new CopyOnWriteArrayList<>();
|
||||
|
||||
// 取得更新值
|
||||
for (Long detail : ids) {
|
||||
ActivityDefinition ActivityDefinition = new ActivityDefinition();
|
||||
ActivityDefinition.setId(detail);
|
||||
ActivityDefinition.setStatusEnum(PublicationStatus.RETIRED);
|
||||
ActivityDefinitionList.add(ActivityDefinition);
|
||||
}
|
||||
// 更新诊疗信息
|
||||
return iActivityDefinitionService.updateBatchById(ActivityDefinitionList)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊疗目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗目录启用
|
||||
*
|
||||
* @param ids 诊疗目录ID列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information-start")
|
||||
public R<?> editDiseaseTreatmentStart(@RequestBody List<Long> ids) {
|
||||
List<ActivityDefinition> ActivityDefinitionList = new CopyOnWriteArrayList<>();
|
||||
|
||||
// 取得更新值
|
||||
for (Long detail : ids) {
|
||||
ActivityDefinition ActivityDefinition = new ActivityDefinition();
|
||||
ActivityDefinition.setId(detail);
|
||||
ActivityDefinition.setStatusEnum(PublicationStatus.ACTIVE);
|
||||
ActivityDefinitionList.add(ActivityDefinition);
|
||||
}
|
||||
// 更新诊疗信息
|
||||
return iActivityDefinitionService.updateBatchById(ActivityDefinitionList)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊疗目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增外来诊疗目录
|
||||
*
|
||||
* @param diagnosisTreatmentUpDto 诊疗目录
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/information")
|
||||
public R<?> addDiseaseTreatment(@Validated @RequestBody DiagnosisTreatmentUpDto diagnosisTreatmentUpDto) {
|
||||
ActivityDefinition ActivityDefinition = new ActivityDefinition();
|
||||
BeanUtils.copyProperties(diagnosisTreatmentUpDto, ActivityDefinition);
|
||||
// 新增外来诊疗目录
|
||||
ActivityDefinition.setStatusEnum(PublicationStatus.DRAFT);
|
||||
return iActivityDefinitionService.addDiagnosisTreatment(ActivityDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊疗目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增医保诊疗目录
|
||||
*
|
||||
* @param diagnosisTreatmentUpDto 诊疗目录
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/information-yb")
|
||||
public R<?> addYbDiseaseTreatment(@RequestBody DiagnosisTreatmentUpDto diagnosisTreatmentUpDto) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗目录导出
|
||||
*
|
||||
* @param diagnosisTreatmentDto 诊疗目录
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-export")
|
||||
public R<?> exportDiseaseTreatment(@RequestBody DiagnosisTreatmentDto diagnosisTreatmentDto) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.openhis.web.datadictionary.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@@ -25,9 +26,9 @@ import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseManageDto;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseManageInitDto;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseManageSelParam;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseManageUpDto;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseSourceDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -47,24 +48,24 @@ public class DiseaseManageController {
|
||||
private final ConditionDefinitionMapper conditionDefinitionMapper;
|
||||
|
||||
/**
|
||||
* 病种目录分类查询
|
||||
* 病种目录初始化
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-category")
|
||||
public R<?> getDiseaseCategory() {
|
||||
@GetMapping("/information-init")
|
||||
public R<?> getDiseaseInit() {
|
||||
DiseaseManageInitDto diseaseManageInitDto = new DiseaseManageInitDto();
|
||||
// 获取疾病目录种类
|
||||
List<ConditionDefinitionSource> statusList = Arrays.asList(ConditionDefinitionSource.values());
|
||||
List<DiseaseSourceDto> diseaseSourceDtos = new ArrayList<>();
|
||||
// 取得更新值
|
||||
for (ConditionDefinitionSource detail : statusList) {
|
||||
DiseaseSourceDto diseaseSourceDto = new DiseaseSourceDto();
|
||||
diseaseSourceDto.setCode(detail.getCode());
|
||||
diseaseSourceDto.setValue(detail.getValue());
|
||||
diseaseSourceDto.setInfo(detail.getInfo());
|
||||
diseaseSourceDtos.add(diseaseSourceDto);
|
||||
}
|
||||
return R.ok(diseaseSourceDtos);
|
||||
List<DiseaseManageInitDto.diseaseCategory> diseaseCategoryList = Stream.of(ConditionDefinitionSource.values())
|
||||
.map(status -> new DiseaseManageInitDto.diseaseCategory(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
diseaseManageInitDto.setDiseaseCategoryList(diseaseCategoryList);
|
||||
// 获取状态
|
||||
List<DiseaseManageInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new DiseaseManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
diseaseManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
return R.ok(diseaseManageInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.openhis.web.datadictionary.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@@ -21,6 +23,7 @@ import com.openhis.medication.domain.MedicationDetail;
|
||||
import com.openhis.medication.service.IMedicationDefinitionService;
|
||||
import com.openhis.medication.service.IMedicationService;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageDto;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageInitDto;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageUpDto;
|
||||
import com.openhis.web.datadictionary.mapper.MedicationManageSearchMapper;
|
||||
|
||||
@@ -44,7 +47,23 @@ public class MedicationManageController {
|
||||
private final MedicationManageSearchMapper medicationManageSearchMapper;
|
||||
|
||||
/**
|
||||
* 查询病种目录分页列表
|
||||
* 药品目录初始化
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-init")
|
||||
public R<?> getMedicationInit() {
|
||||
MedicationManageInitDto medicationManageInitDto = new MedicationManageInitDto();
|
||||
// 获取状态
|
||||
List<MedicationManageInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new MedicationManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
medicationManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
return R.ok(medicationManageInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品目录分页列表
|
||||
*
|
||||
* @param searchKey 查询条件
|
||||
* @param statusEnum 查询条件-状态
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.DeviceCategory;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 器材目录分页检索
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DeviceManageDto {
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 编码 */
|
||||
private String busNo;
|
||||
|
||||
/** 器材名称 */
|
||||
private String name;
|
||||
|
||||
/** 器材名称拼音 */
|
||||
private String pyStr;
|
||||
|
||||
/** 器材五笔拼音 */
|
||||
private String wbStr;
|
||||
|
||||
/** 器材分类 */
|
||||
private DeviceCategory categoryEnum;
|
||||
|
||||
/** 器材种类 */
|
||||
private String typeCode;
|
||||
|
||||
/** 包装单位 */
|
||||
private String unitCode;
|
||||
|
||||
/** 包装规格 */
|
||||
private String size;
|
||||
|
||||
/** 拆零比 */
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 最小使用单位 */
|
||||
private String minUnitCode;
|
||||
|
||||
/** 产品型号 */
|
||||
private String modelNumber;
|
||||
|
||||
/** 高值器材标志 */
|
||||
private Integer hvcmFlag;
|
||||
|
||||
/** 销售单位 */
|
||||
private String salesUnitCode;
|
||||
|
||||
/** 批准文号 */
|
||||
private String approvalNumber;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplyId;
|
||||
|
||||
/** 说明 */
|
||||
private String description;
|
||||
|
||||
/** 适用范围 */
|
||||
private String jurisdiction;
|
||||
|
||||
/** 执行科室 */
|
||||
private Long ruleId;
|
||||
|
||||
/** 器材版本 */
|
||||
private String version;
|
||||
|
||||
/** 主要成分 */
|
||||
private String substanceText;
|
||||
|
||||
/** 过敏标记 */
|
||||
private Integer allergenFlag;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 器材目录初始dto
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DeviceManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<deviceCategory> deviceCategories;
|
||||
private List<exeOrganization> exeOrganizations;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
|
||||
public statusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 器材分类
|
||||
*/
|
||||
@Data
|
||||
public static class deviceCategory {
|
||||
private Integer value;
|
||||
private String info;
|
||||
List<deviceCategory> children = new ArrayList<>();
|
||||
|
||||
public deviceCategory(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行机构
|
||||
*/
|
||||
@Data
|
||||
public static class exeOrganization {
|
||||
private Long value;
|
||||
private String label;
|
||||
|
||||
public exeOrganization(Long value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 器材目录分页检索条件
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DeviceManageSelParam {
|
||||
|
||||
/** 器材分类 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 器材种类 */
|
||||
private String typeCode;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 执行科室 */
|
||||
private Long ruleId;
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.DeviceCategory;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 器材目录更新
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DeviceManageUpDto {
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 编码 */
|
||||
@NotBlank(message = "器材编码不能为空")
|
||||
private String busNo;
|
||||
|
||||
/** 器材名称 */
|
||||
@NotBlank(message = "器材名称不能为空")
|
||||
private String name;
|
||||
|
||||
/** 器材名称拼音 */
|
||||
private String pyStr;
|
||||
|
||||
/** 器材五笔拼音 */
|
||||
private String wbStr;
|
||||
|
||||
/** 器材分类 */
|
||||
private DeviceCategory categoryEnum;
|
||||
|
||||
/** 器材种类 */
|
||||
private String typeCode;
|
||||
|
||||
/** 包装单位 */
|
||||
private String unitCode;
|
||||
|
||||
/** 包装规格 */
|
||||
private String size;
|
||||
|
||||
/** 拆零比 */
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 最小使用单位 */
|
||||
private String minUnitCode;
|
||||
|
||||
/** 产品型号 */
|
||||
private String modelNumber;
|
||||
|
||||
/** 高值器材标志 */
|
||||
private Integer hvcmFlag;
|
||||
|
||||
/** 销售单位 */
|
||||
private String salesUnitCode;
|
||||
|
||||
/** 批准文号 */
|
||||
private String approvalNumber;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplyId;
|
||||
|
||||
/** 说明 */
|
||||
private String description;
|
||||
|
||||
/** 适用范围 */
|
||||
private String jurisdiction;
|
||||
|
||||
/** 执行科室 */
|
||||
private Long ruleId;
|
||||
|
||||
/** 器材版本 */
|
||||
private String version;
|
||||
|
||||
/** 主要成分 */
|
||||
private String substanceText;
|
||||
|
||||
/** 过敏标记 */
|
||||
private Integer allergenFlag;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 诊疗目录分页检索
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiagnosisTreatmentDto {
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 目录类别 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 编码 */
|
||||
private String busNo;
|
||||
|
||||
/** 项目名称 */
|
||||
private String name;
|
||||
|
||||
/** 项目名称拼音 */
|
||||
private String pyStr;
|
||||
|
||||
/** 五笔拼音 */
|
||||
private String wbStr;
|
||||
|
||||
/** 类型 */
|
||||
private Integer typeEnum;
|
||||
|
||||
/** 使用单位 */
|
||||
private String permittedUnitCode;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
|
||||
/** 身体部位 */
|
||||
private String bodySiteCode;
|
||||
|
||||
/** 所需标本 */
|
||||
private String specimenCode;
|
||||
|
||||
/** 说明 */
|
||||
private String descriptionText;
|
||||
|
||||
/** 规则id */
|
||||
private Integer ruleId;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 诊疗目录初期查询
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiagnosisTreatmentInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<diseaseTreatmentCategory> diseaseTreatmentCategoryList;
|
||||
private List<exeOrganization> exeOrganizations;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
|
||||
public statusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗分类
|
||||
*/
|
||||
@Data
|
||||
public static class diseaseTreatmentCategory {
|
||||
private Integer value;
|
||||
private String info;
|
||||
List<diseaseTreatmentType> children = new ArrayList<>();
|
||||
|
||||
public diseaseTreatmentCategory(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗类型
|
||||
*/
|
||||
@Data
|
||||
public static class diseaseTreatmentType {
|
||||
private Integer value;
|
||||
private String info;
|
||||
List<diseaseTreatmentType> children = new ArrayList<>();
|
||||
|
||||
public diseaseTreatmentType(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行机构
|
||||
*/
|
||||
@Data
|
||||
public static class exeOrganization {
|
||||
private Long value;
|
||||
private String label;
|
||||
|
||||
public exeOrganization(Long value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 诊疗目录分页检索条件
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiagnosisTreatmentSelParam {
|
||||
/** 目录类别 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 类型 */
|
||||
private Integer typeEnum;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 规则id */
|
||||
private Integer ruleId;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 诊疗目录分页更新
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiagnosisTreatmentUpDto {
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 目录类别 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 编码 */
|
||||
@NotBlank(message = "项目编码不能为空")
|
||||
private String busNo;
|
||||
|
||||
/** 项目名称 */
|
||||
@NotBlank(message = "项目名称不能为空")
|
||||
private String name;
|
||||
|
||||
/** 项目名称拼音 */
|
||||
private String pyStr;
|
||||
|
||||
/** 五笔拼音 */
|
||||
private String wbStr;
|
||||
|
||||
/** 类型 */
|
||||
private Integer typeEnum;
|
||||
|
||||
/** 使用单位 */
|
||||
private String permittedUnitCode;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 身体部位 */
|
||||
private String bodySiteCode;
|
||||
|
||||
/** 所需标本 */
|
||||
private String specimenCode;
|
||||
|
||||
/** 说明 */
|
||||
private String descriptionText;
|
||||
|
||||
/** 规则id */
|
||||
private Integer ruleId;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 疾病目录初始dto
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiseaseManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<diseaseCategory> diseaseCategoryList;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
|
||||
public statusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 疾病分类
|
||||
*/
|
||||
@Data
|
||||
public static class diseaseCategory {
|
||||
private Integer value;
|
||||
private String info;
|
||||
List<diseaseCategory> children = new ArrayList<>();
|
||||
|
||||
public diseaseCategory(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ import lombok.experimental.Accessors;
|
||||
@Accessors(chain = true)
|
||||
public class DiseaseManageSelParam {
|
||||
/** 所属分类 */
|
||||
private ConditionDefinitionSource sourceEnum;
|
||||
private Integer sourceEnum;
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
private Integer statusEnum;
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import com.core.common.core.domain.entity.SysDept;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 疾病目录种别dto
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiseaseSourceDto {
|
||||
private Integer value;
|
||||
private String code;
|
||||
private String info;
|
||||
List<DiseaseSourceDto> children = new ArrayList<>();
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 药品目录初始dto
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MedicationManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
|
||||
public statusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,8 @@ public enum ConditionDefinitionSource {
|
||||
DIAGNOSIS_BY_DISEASE_CATALOG(3, "03", "按病种目录付费诊断"),
|
||||
DAY_SURGERY_TREATMENT_DISEASE(4, "04", "日间手术治疗病种"),
|
||||
TRADITIONAL_CHINESE_MEDICINE_DIAGNOSIS(5, "05", "中医诊断"),
|
||||
TRADITIONAL_CHINESE_MEDICINE_SYNDROME_CATALOG(6, "06", "中医证候目录");
|
||||
TRADITIONAL_CHINESE_MEDICINE_SYNDROME_CATALOG(6, "06", "中医证候目录"),
|
||||
TUMOR_MORPHOLOGY_CATALOG(7, "07", "肿瘤形态学目录");
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 是否
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WhetherContainUnknown {
|
||||
NO(0, "no", "否"),
|
||||
YES(1, "yes", "是"),
|
||||
UNKNOWN(2, "unknown", "未知");
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.openhis.common.enums.DeviceCategory;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -81,7 +81,7 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private PublicationStatus statusEnum;
|
||||
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
@@ -107,5 +107,4 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
/** 过敏标记 */
|
||||
private Integer allergenFlag;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 机构位置关系管理Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-22
|
||||
*/
|
||||
@Data
|
||||
@TableName("adm_organization_location")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class OrganizationLocation extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 机构编码 */
|
||||
private Long organizationId;
|
||||
|
||||
/** 位置编码 */
|
||||
private Long locationId;
|
||||
|
||||
/** 默认药房 */
|
||||
private Long defLocationId;
|
||||
|
||||
/** 药品类别 */
|
||||
private String medCategoryCode;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endTime;
|
||||
|
||||
/** 显示顺序 */
|
||||
private Integer displayOrder;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.OrganizationLocation;
|
||||
|
||||
/**
|
||||
* 机构位置关系管理Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-22
|
||||
*/
|
||||
@Repository
|
||||
public interface OrganizationLocationMapper extends BaseMapper<OrganizationLocation> {
|
||||
|
||||
}
|
||||
@@ -11,4 +11,19 @@ import com.openhis.administration.domain.DeviceDefinition;
|
||||
*/
|
||||
public interface IDeviceDefinitionService extends IService<DeviceDefinition> {
|
||||
|
||||
/**
|
||||
* 新增器材目录
|
||||
*
|
||||
* @param deviceDefinition 耗材器材实体
|
||||
* @return
|
||||
*/
|
||||
boolean addDevice(DeviceDefinition deviceDefinition);
|
||||
|
||||
/**
|
||||
* 新增医保器材目录
|
||||
*
|
||||
* @param deviceDefinition 器材目录实体
|
||||
* @return
|
||||
*/
|
||||
boolean addYbDevice(DeviceDefinition deviceDefinition);
|
||||
}
|
||||
@@ -11,4 +11,6 @@ import com.openhis.administration.domain.HealthcareService;
|
||||
*/
|
||||
public interface IHealthcareServiceService extends IService<HealthcareService> {
|
||||
|
||||
HealthcareService addHealthcareService(HealthcareService healthcareService);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.OrganizationLocation;
|
||||
|
||||
/**
|
||||
* 机构位置关系管理Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
public interface IOrganizationLocationService extends IService<OrganizationLocation> {}
|
||||
@@ -10,5 +10,5 @@ import com.openhis.administration.domain.Organization;
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
public interface IOrganizationService extends IService<Organization> {
|
||||
boolean changeOrgFlag(Long orgId);
|
||||
boolean activeChange(Long orgId);
|
||||
}
|
||||
@@ -1,19 +1,50 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
import com.openhis.administration.mapper.DeviceDefinitionMapper;
|
||||
import com.openhis.administration.service.IDeviceDefinitionService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 器材定义管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DeviceDefinitionServiceImpl extends ServiceImpl<DeviceDefinitionMapper, DeviceDefinition> implements IDeviceDefinitionService {
|
||||
@AllArgsConstructor
|
||||
public class DeviceDefinitionServiceImpl extends ServiceImpl<DeviceDefinitionMapper, DeviceDefinition>
|
||||
implements IDeviceDefinitionService {
|
||||
|
||||
private final DeviceDefinitionMapper deviceDefinitionMapper;
|
||||
|
||||
@Override
|
||||
public boolean addDevice(DeviceDefinition deviceDefinition) {
|
||||
// 根据器材编码判断器材是否存在
|
||||
List<DeviceDefinition> activityDefinitions = deviceDefinitionMapper.selectList(
|
||||
new LambdaQueryWrapper<DeviceDefinition>().eq(DeviceDefinition::getBusNo, deviceDefinition.getBusNo()));
|
||||
if (activityDefinitions.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
// 新增器材项目
|
||||
int insert = deviceDefinitionMapper.insert(deviceDefinition);
|
||||
if (insert != 1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addYbDevice(DeviceDefinition deviceDefinition) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -16,4 +16,10 @@ import com.openhis.administration.service.IHealthcareServiceService;
|
||||
@Service
|
||||
public class HealthcareServiceServiceImpl extends ServiceImpl<HealthcareServiceMapper, HealthcareService> implements IHealthcareServiceService {
|
||||
|
||||
@Override
|
||||
public HealthcareService addHealthcareService(HealthcareService healthcareService){
|
||||
baseMapper.insert(healthcareService);
|
||||
return healthcareService;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.OrganizationLocation;
|
||||
import com.openhis.administration.mapper.OrganizationLocationMapper;
|
||||
import com.openhis.administration.service.IOrganizationLocationService;
|
||||
|
||||
/**
|
||||
* 机构位置关系管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Service
|
||||
public class OrganizationLocationServiceImpl extends ServiceImpl<OrganizationLocationMapper, OrganizationLocation>
|
||||
implements IOrganizationLocationService {
|
||||
|
||||
}
|
||||
@@ -23,20 +23,25 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
private OrganizationMapper organizationMapper;
|
||||
|
||||
@Override
|
||||
public boolean changeOrgFlag(Long orgId) {
|
||||
|
||||
public boolean activeChange(Long orgId) {
|
||||
if (orgId != null) {
|
||||
Organization organization = organizationMapper.selectById(orgId);
|
||||
if (organization.getActiveFlag().equals(AccountStatus.ACTIVE.getValue())) {
|
||||
if (organization != null) {
|
||||
Integer activeFlag = organization.getActiveFlag();
|
||||
switch (activeFlag ) {
|
||||
case 1:
|
||||
organization.setActiveFlag(AccountStatus.INACTIVE.getValue());
|
||||
return true;
|
||||
} else {
|
||||
break;
|
||||
case 2:
|
||||
organization.setActiveFlag(AccountStatus.ACTIVE.getValue());
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
organizationMapper.updateById(organization);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
package com.openhis.workflow.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -59,7 +57,7 @@ public class ActivityDefinition extends HisBaseEntity {
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private PublicationStatus statusEnum;
|
||||
|
||||
/** 身体部位 */
|
||||
private String bodySiteCode;
|
||||
@@ -68,10 +66,9 @@ public class ActivityDefinition extends HisBaseEntity {
|
||||
private String specimenCode;
|
||||
|
||||
/** 说明 */
|
||||
private String description;
|
||||
private String descriptionText;
|
||||
|
||||
/** 规则id */
|
||||
private Integer ruleId;
|
||||
|
||||
|
||||
}
|
||||
@@ -11,4 +11,19 @@ import com.openhis.workflow.domain.ActivityDefinition;
|
||||
*/
|
||||
public interface IActivityDefinitionService extends IService<ActivityDefinition> {
|
||||
|
||||
/**
|
||||
* 新增诊疗目录
|
||||
*
|
||||
* @param activityDefinition 诊疗目录实体
|
||||
* @return
|
||||
*/
|
||||
boolean addDiagnosisTreatment(ActivityDefinition activityDefinition);
|
||||
|
||||
/**
|
||||
* 新增医保诊疗目录
|
||||
*
|
||||
* @param activityDefinition 诊疗目录实体
|
||||
* @return
|
||||
*/
|
||||
boolean addYbDiagnosisTreatment(ActivityDefinition activityDefinition);
|
||||
}
|
||||
@@ -1,19 +1,58 @@
|
||||
package com.openhis.workflow.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.workflow.domain.ActivityDefinition;
|
||||
import com.openhis.workflow.mapper.ActivityDefinitionMapper;
|
||||
import com.openhis.workflow.service.IActivityDefinitionService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 诊疗定义管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitionMapper, ActivityDefinition> implements IActivityDefinitionService {
|
||||
@AllArgsConstructor
|
||||
public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitionMapper, ActivityDefinition>
|
||||
implements IActivityDefinitionService {
|
||||
private final ActivityDefinitionMapper activityDefinitionMapper;
|
||||
|
||||
/**
|
||||
* 增加外来诊疗项目
|
||||
*
|
||||
* @param activityDefinition 诊疗项目实体
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean addDiagnosisTreatment(ActivityDefinition activityDefinition) {
|
||||
// 根据诊疗编码判断诊疗项目是否存在
|
||||
List<ActivityDefinition> activityDefinitions =
|
||||
activityDefinitionMapper.selectList(new LambdaQueryWrapper<ActivityDefinition>()
|
||||
.eq(ActivityDefinition::getBusNo, activityDefinition.getBusNo()));
|
||||
if (activityDefinitions.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
// 新增诊疗项目
|
||||
int insert = activityDefinitionMapper.insert(activityDefinition);
|
||||
if (insert != 1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addYbDiagnosisTreatment(ActivityDefinition activityDefinition) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.administration.mapper.OrganizationLocationMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -13,7 +13,7 @@ export function getDiseaseList(query) {
|
||||
// 查询病种目录详细
|
||||
export function getDiseaseOne(id) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-one' + parseStrEmpty(id),
|
||||
url: '/datadictionary/disease/information-one/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -47,7 +47,7 @@ export function editDisease(data) {
|
||||
// 病种目录分类查询
|
||||
export function getDiseaseCategory() {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-category',
|
||||
url: '/datadictionary/disease/information-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -49,26 +49,26 @@
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="疾病:" prop="diseaseName">
|
||||
<el-form-item label="疾病:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.diseaseName"
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="名称/ICD10编码/拼音助记码"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否停用" prop="status">
|
||||
<el-form-item label="是否停用" prop="statusEnum">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
v-model="queryParams.statusEnum"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
:label="status.info"
|
||||
:value="status.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -322,6 +322,8 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
// const postOptions = ref([]);
|
||||
// const roleOptions = ref([]);
|
||||
@@ -331,8 +333,9 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
diseaseName: undefined, // 疾病名称
|
||||
status: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
searchKey: undefined, // 疾病名称
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
sourceEnum: undefined, // 来源(包括 1:病种目录分类,2:自定义)
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
@@ -357,12 +360,16 @@ const filterNode = (value, data) => {
|
||||
function getDiseaseCategoryList() {
|
||||
getDiseaseCategory().then((response) => {
|
||||
console.log(response, "response病种目录分类查询下拉树结构");
|
||||
conditionDefinitionOptions.value = response.data;
|
||||
conditionDefinitionOptions.value = response.data.diseaseCategoryList;
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
console.log(queryParams.value, "queryParams.value");
|
||||
getDiseaseList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, "res");
|
||||
@@ -373,7 +380,7 @@ function getList() {
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
queryParams.value.deptId = data.id;
|
||||
queryParams.value.sourceEnum = data.id;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
|
||||
@@ -1,43 +1,42 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询病种目录列表
|
||||
export function getDiseaseList(query) {
|
||||
// 查询药品目录列表
|
||||
export function getMedicationList(query) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-page',
|
||||
url: '/datadictionary/medication/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询病种目录详细
|
||||
export function getDiseaseOne(id) {
|
||||
// 查询药品目录详细
|
||||
export function getMedicationOne(id) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-one',
|
||||
method: 'get',
|
||||
params: id
|
||||
url: '/datadictionary/medication/information-one/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增病种目录
|
||||
export function addDisease(data) {
|
||||
// 新增药品目录
|
||||
export function addMedication(data) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information',
|
||||
url: '/datadictionary/medication/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改病种目录
|
||||
export function editDisease(data) {
|
||||
// 修改药品目录
|
||||
export function editMedication(data) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information',
|
||||
url: '/datadictionary/medication/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除病种目录
|
||||
// 删除药品目录
|
||||
export function delUser(userId) {
|
||||
return request({
|
||||
url: '/system/user/' + userId,
|
||||
@@ -45,10 +44,10 @@ export function delUser(userId) {
|
||||
})
|
||||
}
|
||||
|
||||
// 病种目录分类查询
|
||||
export function getDiseaseCategory() {
|
||||
// 药品目录分类查询
|
||||
export function getMedicationCategory() {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-category',
|
||||
url: '/datadictionary/medication/information-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="diseaseRef"
|
||||
ref="medicationRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="编号" prop="conditionCode">
|
||||
<el-form-item label="编号" prop="busNo">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
v-model="form.busNo"
|
||||
placeholder="请输入编码"
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -32,16 +32,20 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拼音码(品名)" prop="name">
|
||||
<el-input v-model="form.name" placeholder="" maxlength="30" />
|
||||
<el-form-item label="拼音码(品名)" prop="pyStr">
|
||||
<el-input
|
||||
v-model="form.pyStr"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格" prop="conditionCode">
|
||||
<el-form-item label="规格" prop="totalVolume">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
v-model="form.totalVolume"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
/>
|
||||
@@ -53,25 +57,29 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="" maxlength="30" />
|
||||
<el-form-item label="商品名" prop="merchandiseName">
|
||||
<el-input
|
||||
v-model="form.merchandiseName"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="厂家/产地" prop="conditionCode">
|
||||
<el-form-item label="厂家/产地" prop="manufacturerId">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
v-model="form.manufacturerId"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="包装单位" prop="name">
|
||||
<el-form-item label="包装单位" prop="unitCode">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
v-model="form.unitCode"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -79,9 +87,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最小单位" prop="name">
|
||||
<el-form-item label="最小单位" prop="minUnitCode">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
v-model="form.minUnitCode"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -91,9 +99,9 @@
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拆零比" prop="conditionCode">
|
||||
<el-form-item label="拆零比" prop="partPercent">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
v-model="form.partPercent"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -123,9 +131,9 @@
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批准文号" prop="conditionCode">
|
||||
<el-form-item label="批准文号" prop="approvalNumber">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
v-model="form.approvalNumber"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
/>
|
||||
@@ -149,13 +157,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="皮试判别" prop="name">
|
||||
<el-checkbox v-model="form.status"></el-checkbox>
|
||||
<el-form-item label="皮试判别" prop="skinTestFlag">
|
||||
<el-checkbox v-model="form.skinTestFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="注射药品" prop="name">
|
||||
<el-checkbox v-model="form.status"></el-checkbox>
|
||||
<el-form-item label="注射药品" prop="injectFlag">
|
||||
<el-checkbox v-model="form.injectFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -194,9 +202,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用药频次" prop="name">
|
||||
<el-form-item label="用药频次" prop="rateCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
v-model="queryParams.rateCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
@@ -210,15 +218,15 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单次剂量" prop="name" inline>
|
||||
<el-form-item label="单次剂量" prop="dose" inline>
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
v-model="form.dose"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
style="width: 49%"
|
||||
/>
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
v-model="queryParams.doseUnitCode"
|
||||
clearable
|
||||
style="width: 49%"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -235,9 +243,9 @@
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="剂型" prop="conditionCode">
|
||||
<el-form-item label="剂型" prop="doseFormCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
v-model="queryParams.doseFormCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
@@ -398,9 +406,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="限制使用范围" prop="name">
|
||||
<el-form-item label="限制使用范围" prop="restrictedScope">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
v-model="form.restrictedScope"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -408,9 +416,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label=" 限制使用标记" prop="name">
|
||||
<el-form-item label="限制使用标记" prop="restrictedFlag">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
v-model="form.restrictedFlag"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -527,23 +535,9 @@ const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const selectedData = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const deptName = ref("");
|
||||
const visible = ref(false);
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
// const postOptions = ref([]);
|
||||
// const roleOptions = ref([]);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
@@ -554,10 +548,11 @@ const data = reactive({
|
||||
status: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
],
|
||||
// busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
// name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
// conditionCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -586,6 +581,40 @@ function edit() {
|
||||
form.value = props.item;
|
||||
visible.value = true;
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
busNo: undefined, // 编码
|
||||
name: undefined, // 名称
|
||||
pyStr: undefined, // 拼音码(品名)
|
||||
totalVolume: undefined, // 规格
|
||||
merchandiseName: undefined, // 商品名称
|
||||
manufacturerId: undefined, // 厂商ID
|
||||
unitCode: undefined, // 包装单位
|
||||
minUnitCode: undefined, // 最小单位
|
||||
partPercent: undefined, // 拆零比
|
||||
approvalNumber: undefined, // 批准文号
|
||||
skinTestFlag: undefined, // 皮试标志
|
||||
injectFlag: undefined, // 注射标志
|
||||
rateCode: undefined, // 医保支付比例编码
|
||||
doseCode: undefined, // 单次剂量
|
||||
doseUnitCode: undefined, // 单次剂量单位
|
||||
doseFormCode: undefined, // 剂型
|
||||
restrictedScope: undefined, // 限制范围
|
||||
restrictedFlag: undefined, // 限制标志
|
||||
};
|
||||
proxy.resetForm("medicationRef");
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["medicationRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
// 将表单数据发送给父组件
|
||||
emits("submit", form.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--疾病目录数据-->
|
||||
<!--药品目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<!-- <div class="head-container">
|
||||
<el-input
|
||||
@@ -12,21 +12,21 @@
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div> -->
|
||||
<!-- <div class="head-container">
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="conditionDefinitionOptions"
|
||||
:props="{ label: 'label', children: 'children' }"
|
||||
:data="medicationOptions"
|
||||
:props="{ label: 'info', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="deptTreeRef"
|
||||
ref="medicationTreeRef"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div> -->
|
||||
</div>
|
||||
</el-col>
|
||||
<!--用户数据-->
|
||||
<!--药品目录-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
@@ -37,9 +37,9 @@
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="药品" prop="diseaseName" label-width="40">
|
||||
<el-form-item label="药品" prop="searchKey" label-width="40">
|
||||
<el-input
|
||||
v-model="queryParams.diseaseName"
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="品名/商品名/英文品名/编码/拼音"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@@ -53,7 +53,7 @@
|
||||
prop="status"
|
||||
label-width="100"
|
||||
>
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-select v-model="queryParams.statusEnum" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
@@ -70,7 +70,7 @@
|
||||
label-width="100"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
v-model="queryParams.ybMatchFlag"
|
||||
placeholder="用户状态"
|
||||
clearable
|
||||
>
|
||||
@@ -83,7 +83,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<!-- <el-col :span="4">
|
||||
<el-form-item label="已发生业务" prop="status" label-width="100">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
@@ -98,7 +98,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<el-form-item label="医保等级" prop="status" label-width="80">
|
||||
<el-select
|
||||
@@ -116,7 +116,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@@ -189,7 +188,7 @@
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="diseaseList"
|
||||
:data="medicationList"
|
||||
@selection-change="handleSelectionChange"
|
||||
width="90%"
|
||||
>
|
||||
@@ -424,7 +423,11 @@
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<medicine-dialog ref="medicineRef" :item="currentData" @ok="submitForm" />
|
||||
<medicine-dialog
|
||||
ref="medicineRef"
|
||||
:item="currentData"
|
||||
@submit="submitForm"
|
||||
/>
|
||||
<medicine-view-dialog
|
||||
ref="medicineViewRef"
|
||||
:item="viewData"
|
||||
@@ -432,7 +435,7 @@
|
||||
/>
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<!-- <el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||
<el-form :model="form" :rules="rules" ref="diseaseRef" label-width="80px">
|
||||
<el-form :model="form" :rules="rules" ref="medicationRef" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="name">
|
||||
@@ -478,13 +481,13 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Disease">
|
||||
<script setup name="Medication">
|
||||
import {
|
||||
getDiseaseList,
|
||||
editDisease,
|
||||
addDisease,
|
||||
getDiseaseCategory,
|
||||
getDiseaseOne,
|
||||
getMedicationList,
|
||||
editMedication,
|
||||
addMedication,
|
||||
getMedicationCategory,
|
||||
getMedicationOne,
|
||||
} from "./components/medicine";
|
||||
import medicineDialog from "./components/medicineDialog";
|
||||
import medicineViewDialog from "./components/medicineViewDialog";
|
||||
@@ -497,19 +500,16 @@ const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const medicationList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const selectedData = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const deptName = ref("");
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
const medicationOptions = ref(undefined);
|
||||
// 使用 ref 定义当前药品数据
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看药品数据
|
||||
@@ -523,14 +523,16 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
diseaseName: undefined, // 疾病名称
|
||||
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
ybMatchFlag: undefined, // 是否医保匹配(包括 1:是,0:否)
|
||||
status: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
],
|
||||
// name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
// conditionCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -546,20 +548,20 @@ const filterNode = (value, data) => {
|
||||
// proxy.$refs["deptTreeRef"].filter(val);
|
||||
// });
|
||||
/** 病种目录分类查询下拉树结构 */
|
||||
function getDiseaseCategoryList() {
|
||||
getDiseaseCategory().then((response) => {
|
||||
console.log(response, "response病种目录分类查询下拉树结构");
|
||||
conditionDefinitionOptions.value = response.data;
|
||||
function getMedicationCategoryList() {
|
||||
getMedicationCategory().then((response) => {
|
||||
console.log(response, "response药品目录分类查询下拉树结构");
|
||||
medicationOptions.value = response.data;
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getDiseaseList(queryParams.value).then((res) => {
|
||||
getMedicationList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, "res");
|
||||
diseaseList.value = res.data.records;
|
||||
total.value = res.total;
|
||||
medicationList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
@@ -584,7 +586,7 @@ function handleStart() {
|
||||
proxy.$modal
|
||||
.confirm("是否确定启用数据!")
|
||||
.then(function () {
|
||||
return editDisease(data);
|
||||
return editMedication(data);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
@@ -602,7 +604,7 @@ function handleClose() {
|
||||
proxy.$modal
|
||||
.confirm("是否确认停用数据!")
|
||||
.then(function () {
|
||||
return editDisease(data);
|
||||
return editMedication(data);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
@@ -646,7 +648,7 @@ function reset() {
|
||||
status: undefined,
|
||||
statusEnum: undefined,
|
||||
};
|
||||
proxy.resetForm("diseaseRef");
|
||||
proxy.resetForm("medicationRef");
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
@@ -669,7 +671,15 @@ function openEditMedicine(row) {
|
||||
}
|
||||
/** 打开查看弹窗 */
|
||||
function openViewMedicine(row) {
|
||||
viewData.value = row;
|
||||
// viewData.value = row;
|
||||
reset();
|
||||
getMedicationOne(row.id).then((response) => {
|
||||
viewData.value = response.data;
|
||||
nextTick(() => {
|
||||
proxy.$refs["medicineViewRef"].edit();
|
||||
});
|
||||
getList();
|
||||
});
|
||||
console.log(viewData.value, "currentData");
|
||||
// 确保子组件已经接收到最新的 props
|
||||
nextTick(() => {
|
||||
@@ -692,43 +702,37 @@ function handleUpdate(row) {
|
||||
title.value = "病种编辑";
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["diseaseRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
form.value.status
|
||||
? (form.value.statusEnum = "3")
|
||||
: (form.value.statusEnum = "2");
|
||||
console.log(form.value, "editDisease", form.value.statusEnum);
|
||||
let param = [];
|
||||
param.push(form.value);
|
||||
editDisease(param).then((response) => {
|
||||
function submitForm(formData) {
|
||||
if (formData.id != undefined) {
|
||||
// form.value.status
|
||||
// ? (form.value.statusEnum = "3")
|
||||
// : (form.value.statusEnum = "2");
|
||||
// console.log(form.value, "editMedication", form.value.statusEnum);
|
||||
editMedication(formData).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addDisease(form.value).then((response) => {
|
||||
addMedication(formData).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 详细按钮操作 */
|
||||
function handleView(row) {
|
||||
reset();
|
||||
open.value = true;
|
||||
getDiseaseOne(row.id).then((response) => {
|
||||
getMedicationOne(row.id).then((response) => {
|
||||
console.log(response, "responsebbbb", row.id);
|
||||
form.value = response.data;
|
||||
// getList();
|
||||
});
|
||||
}
|
||||
getDiseaseCategoryList();
|
||||
getMedicationCategoryList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user