Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -83,7 +83,7 @@ public interface ISupplierManagementAppService {
|
||||
* @param id 查询条件
|
||||
* @return 厂商/产地查询结果
|
||||
*/
|
||||
R<?> getSupplierDetail(@PathVariable("id") Long id);
|
||||
R<?> getSupplierDetail(Long id);
|
||||
|
||||
/**
|
||||
* 厂商/产地停用
|
||||
|
||||
@@ -25,7 +25,9 @@ import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.core.common.utils.poi.ExcelUtil;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.enums.AccountStatus;
|
||||
import com.openhis.common.enums.ApplicableScope;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.domain.MedicationDefinition;
|
||||
@@ -118,16 +120,6 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
e.setActiveFlag_enumText(EnumUtils.getInfoByValue(AccountStatus.class, e.getActiveFlag()));
|
||||
// 适用范围
|
||||
e.setDomainEnum_enumText(EnumUtils.getInfoByValue(ApplicableScope.class, e.getDomainEnum()));
|
||||
// 药品分类
|
||||
e.setCategoryCode_enumText(EnumUtils.getInfoByValue(ItemCategory.class, e.getCategoryCode()));
|
||||
// 是否皮试
|
||||
e.setSkinTestFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getSkinTestFlag()));
|
||||
// 是否为注射药物
|
||||
e.setInjectFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getInjectFlag()));
|
||||
// 是否限制使用
|
||||
e.setRestrictedFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getRestrictedFlag()));
|
||||
// 儿童用药标志
|
||||
e.setChildrenFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getChildrenFlag()));
|
||||
});
|
||||
|
||||
// 返回【药品录列表DTO】分页
|
||||
@@ -135,9 +127,9 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑供应商信息
|
||||
* 编辑药品目录信息
|
||||
*
|
||||
* @param medicationManageUpDto 供应商信息
|
||||
* @param medicationManageUpDto 药品目录信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> editMedication(@Validated @RequestBody MedicationManageUpDto medicationManageUpDto) {
|
||||
@@ -222,9 +214,9 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加供应商信息
|
||||
* 添加药品目录信息
|
||||
*
|
||||
* @param medicationManageUpDto 供应商信息
|
||||
* @param medicationManageUpDto 药品目录信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> addMedication(@Validated @RequestBody MedicationManageUpDto medicationManageUpDto) {
|
||||
|
||||
@@ -144,7 +144,7 @@ public class SupplierManagementAppServiceImpl implements ISupplierManagementAppS
|
||||
* @return 厂商/产地查询结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> getSupplierDetail(@PathVariable("id") Long id) {
|
||||
public R<?> getSupplierDetail(Long id) {
|
||||
SupplierDto supplierDto = new SupplierDto();
|
||||
// 根据ID查询【供应商信息】
|
||||
Supplier supplier = supplierService.getById(id);
|
||||
|
||||
@@ -117,7 +117,7 @@ public class DeviceManageController {
|
||||
* @param id 器材ID
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-one/{id}")
|
||||
@GetMapping("/information-one")
|
||||
public R<?> getDeviceOne(@PathVariable("id") Long id) {
|
||||
|
||||
return deviceManageAppService.getDeviceOne(id);
|
||||
|
||||
@@ -157,7 +157,7 @@ public class DiagnosisTreatmentController {
|
||||
* @param id 诊疗ID
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-one/{id}")
|
||||
@GetMapping("/information-one")
|
||||
public R<?> getDiseaseTreatmentOne(@PathVariable("id") Long id) {
|
||||
DiagnosisTreatmentDto diagnosisTreatmentDto = new DiagnosisTreatmentDto();
|
||||
// 根据ID查询【诊疗目录】
|
||||
|
||||
@@ -101,7 +101,7 @@ public class DiseaseManageController {
|
||||
* @param id 疾病ID
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-one/{id}")
|
||||
@GetMapping("/information-one")
|
||||
public R<?> getDiseaseOne(@PathVariable("id") Long id) {
|
||||
DiseaseManageDto diseaseManageDto = new DiseaseManageDto();
|
||||
// 根据ID查询【病种目录】
|
||||
|
||||
@@ -28,10 +28,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@AllArgsConstructor
|
||||
public class MedicationManageController {
|
||||
|
||||
// private final IMedicationDefinitionService iMedicationDefinitionService;
|
||||
// private final IMedicationService iMedicationService;
|
||||
// private final MedicationManageSearchMapper medicationManageSearchMapper;
|
||||
|
||||
@Autowired
|
||||
private IMedicationManageAppService medicationManageAppService;
|
||||
|
||||
@@ -42,16 +38,7 @@ public class MedicationManageController {
|
||||
*/
|
||||
@GetMapping("/information-init")
|
||||
public R<?> getMedicationInit() {
|
||||
|
||||
return medicationManageAppService.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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,25 +59,8 @@ public class MedicationManageController {
|
||||
@RequestParam(value = "categoryCode", defaultValue = "") String categoryCode,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
return medicationManageAppService.getMedicationList(searchKey, ybMatchFlag, statusEnum, categoryCode, pageNo,
|
||||
pageSize, request);
|
||||
|
||||
// // 分页设置
|
||||
// Integer offset = (pageNo - 1) * pageSize;
|
||||
// // 获取租户ID
|
||||
// Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
// // 查询药品目录列表
|
||||
// List<MedicationManageDto> medicationDetailList = medicationManageSearchMapper.getPage(searchKey, ybMatchFlag,
|
||||
// statusEnum, categoryCode, tenantId, pageSize, offset);
|
||||
// // 查询总记录数
|
||||
// long total =
|
||||
// medicationManageSearchMapper.getPageCount(searchKey, ybMatchFlag, statusEnum, categoryCode, tenantId);
|
||||
// // 创建Page对象并设置属性
|
||||
// Page<MedicationManageDto> medicationManageDtoPage = new Page<>(pageNo, pageSize, total);
|
||||
// medicationManageDtoPage.setRecords(medicationDetailList);
|
||||
// // 返回【药品录列表DTO】分页
|
||||
// return R.ok(medicationManageDtoPage);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,39 +69,15 @@ public class MedicationManageController {
|
||||
* @param id 药品ID
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-one/{id}")
|
||||
@GetMapping("/information-one")
|
||||
public R<?> getMedicationOne(@PathVariable("id") Long id) {
|
||||
|
||||
return medicationManageAppService.getMedicationOne(id);
|
||||
|
||||
// // 获取租户ID
|
||||
// Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
// // 查询药品目录列表
|
||||
// MedicationManageDto medicationManageDto = medicationManageSearchMapper.getOne(id, tenantId);
|
||||
// // 返回【药品录列表DTO】列表
|
||||
// return R.ok(medicationManageDto);
|
||||
}
|
||||
|
||||
// 药品目录编辑
|
||||
@PutMapping("/information")
|
||||
public R<?> editMedication(@RequestBody MedicationManageUpDto medicationManageUpDto) {
|
||||
|
||||
return medicationManageAppService.editMedication(medicationManageUpDto);
|
||||
|
||||
// MedicationDefinition medicationDefinition = new MedicationDefinition();
|
||||
// Medication medication = new Medication();
|
||||
// BeanUtils.copyProperties(medicationManageUpDto, medication); // 子表信息
|
||||
// BeanUtils.copyProperties(medicationManageUpDto, medicationDefinition);// 主表信息
|
||||
//
|
||||
// // 更新子表药品信息
|
||||
// if (iMedicationService.updateById(medication)) {
|
||||
// // 更新主表药品信息
|
||||
// return iMedicationDefinitionService.updateById(medicationDefinition)
|
||||
// ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"药品目录"}))
|
||||
// : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
// } else {
|
||||
// return R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,19 +88,6 @@ public class MedicationManageController {
|
||||
*/
|
||||
@PutMapping("/information-stop")
|
||||
public R<?> editMedicationStop(@RequestBody List<Long> ids) {
|
||||
// List<Medication> medicationList = new ArrayList<>();
|
||||
// // 取得更新值
|
||||
// for (Long detail : ids) {
|
||||
// Medication medication = new Medication();
|
||||
// medication.setId(detail);
|
||||
// medication.setStatusEnum(PublicationStatus.RETIRED);
|
||||
// medicationList.add(medication);
|
||||
// }
|
||||
// // 更新药品信息
|
||||
// return iMedicationService.updateBatchById(medicationList)
|
||||
// ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"药品目录"}))
|
||||
// : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
|
||||
return medicationManageAppService.editMedicationStop(ids);
|
||||
}
|
||||
|
||||
@@ -166,20 +99,7 @@ public class MedicationManageController {
|
||||
*/
|
||||
@PutMapping("/information-start")
|
||||
public R<?> editMedicationStart(@RequestBody List<Long> ids) {
|
||||
|
||||
return medicationManageAppService.editMedicationStart(ids);
|
||||
// List<Medication> medicationList = new ArrayList<>();
|
||||
// // 取得更新值
|
||||
// for (Long detail : ids) {
|
||||
// Medication medication = new Medication();
|
||||
// medication.setId(detail);
|
||||
// medication.setStatusEnum(PublicationStatus.ACTIVE);
|
||||
// medicationList.add(medication);
|
||||
// }
|
||||
// // 更新药品信息
|
||||
// return iMedicationService.updateBatchById(medicationList)
|
||||
// ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"药品目录"}))
|
||||
// : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -190,20 +110,7 @@ public class MedicationManageController {
|
||||
*/
|
||||
@PostMapping("/information")
|
||||
public R<?> addMedication(@Validated @RequestBody MedicationManageUpDto medicationManageUpDto) {
|
||||
|
||||
return medicationManageAppService.addMedication(medicationManageUpDto);
|
||||
|
||||
// MedicationDetail medicationDetail = new MedicationDetail();
|
||||
// BeanUtils.copyProperties(medicationManageUpDto, medicationDetail);
|
||||
// // 新增主表外来药品目录
|
||||
// if (iMedicationDefinitionService.addMedication(medicationDetail)) {
|
||||
// // 新增子表外来药品目录
|
||||
// return iMedicationService.addMedication(medicationDetail)
|
||||
// ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"药品目录"}))
|
||||
// : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
// } else {
|
||||
// return R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,15 +139,6 @@ public class MedicationManageController {
|
||||
@RequestParam(value = "ybMatchFlag", defaultValue = "-1") Integer ybMatchFlag,
|
||||
@RequestParam(value = "statusEnum", defaultValue = "-1") Integer statusEnum,
|
||||
@RequestParam(value = "categoryCode", defaultValue = "") String categoryCode, HttpServletResponse response) {
|
||||
|
||||
return medicationManageAppService.exportMedication(searchKey, ybMatchFlag, statusEnum, categoryCode, response);
|
||||
|
||||
// // 获取租户ID
|
||||
// Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
// List<MedicationManageDto> list =
|
||||
// medicationManageSearchMapper.getList(searchKey, ybMatchFlag, statusEnum, categoryCode, tenantId);
|
||||
// ExcelUtil<MedicationManageDto> util = new ExcelUtil<>(MedicationManageDto.class);
|
||||
// util.exportExcel(response, list, "药品目录");
|
||||
// return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,8 +88,8 @@ public class SupplierManagementController {
|
||||
* @param id 查询条件
|
||||
* @return 厂商/产地查询结果
|
||||
*/
|
||||
@GetMapping(value = "/get-supplier-detail/{id}")
|
||||
public R<?> getSupplierDetail(@PathVariable("id") Long id) {
|
||||
@GetMapping(value = "/get-supplier-detail")
|
||||
public R<?> getSupplierDetail(@RequestParam Long id) {
|
||||
return supplierManagementAppService.getSupplierDetail(id);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -99,8 +100,8 @@ public class MedicationManageDto {
|
||||
private String wbStr;
|
||||
|
||||
/** 药品分类 */
|
||||
@Dict(dictCode = "medicine_category")
|
||||
private Integer categoryCode;
|
||||
private String categoryCode_enumText;
|
||||
|
||||
/** 商品名称 */
|
||||
private String merchandiseName;
|
||||
@@ -142,12 +143,12 @@ public class MedicationManageDto {
|
||||
private String pharmacologyCategoryCode;
|
||||
|
||||
/** 是否皮试 */
|
||||
@Dict(dictCode = "sys_yes_no")
|
||||
private Integer skinTestFlag;
|
||||
private String skinTestFlag_enumText;
|
||||
|
||||
/** 是否为注射药物 */
|
||||
@Dict(dictCode = "sys_yes_no")
|
||||
private Integer injectFlag;
|
||||
private String injectFlag_enumText;
|
||||
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
@@ -156,15 +157,15 @@ public class MedicationManageDto {
|
||||
private Long supplyId;
|
||||
|
||||
/** 是否限制使用 */
|
||||
@Dict(dictCode = "sys_yes_no")
|
||||
private Integer restrictedFlag;
|
||||
private String restrictedFlag_enumText;
|
||||
|
||||
/** 限制使用范围 */
|
||||
private String restrictedScope;
|
||||
|
||||
/** 儿童用药标志 */
|
||||
@Dict(dictCode = "sys_yes_no")
|
||||
private Integer childrenFlag;
|
||||
private String childrenFlag_enumText;
|
||||
|
||||
/** 产品特性 */
|
||||
private Integer characteristic;
|
||||
|
||||
@@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
|
||||
public class AdviceBaseDto {
|
||||
|
||||
/** 医嘱类型 */
|
||||
private String adviceType; // 1:药品 , 2: 耗材 , 3:检查检验
|
||||
private String adviceType; // 1:药品 , 2: 耗材 , 3:项目
|
||||
|
||||
/** 医嘱定义ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@@ -107,6 +107,12 @@ public class AdviceBaseDto {
|
||||
*/
|
||||
private String adviceTableName;
|
||||
|
||||
/** 所属科室 */
|
||||
private Long orgId;
|
||||
|
||||
/** 所在位置 */
|
||||
private Long locationId;
|
||||
|
||||
/**
|
||||
* 医嘱库存集合
|
||||
*/
|
||||
|
||||
@@ -42,6 +42,10 @@ public class AdviceInventoryDto {
|
||||
/** 产品批号 */
|
||||
private String lotNumber;
|
||||
|
||||
/** 库位 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationStoreId;
|
||||
|
||||
/** 库房id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.openhis.web.doctorstation.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.EncounterClass;
|
||||
import com.openhis.common.enums.RequestStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 医嘱保存 dto
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AdviceSaveDto {
|
||||
|
||||
/** 医嘱类型 */
|
||||
private String adviceType; // 1:药品 , 2: 耗材 , 3:项目
|
||||
|
||||
/** 执行次数 */
|
||||
private Integer executeNum; // 当医嘱类型为药品时,选填
|
||||
|
||||
/** 处方号 */
|
||||
private String prescriptionNo;
|
||||
|
||||
/** 请求数量 */
|
||||
private Integer quantity;
|
||||
|
||||
/** 请求单位编码 */
|
||||
private String unitCode;
|
||||
|
||||
/** 产品批号 */
|
||||
private String lotNumber;
|
||||
|
||||
/**
|
||||
* 请求状态
|
||||
*/
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 请求类型 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 医嘱定义ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long adviceDefinitionId;
|
||||
|
||||
/** 患者 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
|
||||
/** 开方医生 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long practitionerId;
|
||||
|
||||
/** 所属位置 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
|
||||
/** 所属科室 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
|
||||
/** 就诊id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/** 组套id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long packageId; // 该参数先预留出来
|
||||
|
||||
/** 活动(项目)定义id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long activityId; // 该参数先预留出来
|
||||
|
||||
/**
|
||||
* 设置默认值
|
||||
*/
|
||||
public AdviceSaveDto() {
|
||||
this.statusEnum = RequestStatus.DRAFT.getValue();
|
||||
this.categoryEnum = EncounterClass.AMB.getValue();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.openhis.web.doctorstation.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 医嘱保存参数类
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AdviceSaveParam {
|
||||
|
||||
/**
|
||||
* 保存医嘱 dto
|
||||
*/
|
||||
private List<AdviceSaveDto> adviceSaveList;
|
||||
|
||||
}
|
||||
@@ -1,16 +1,12 @@
|
||||
package com.openhis.web.outpatientmanage.appservice;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionInitDto;
|
||||
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionPatientDto;
|
||||
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionRecordDto;
|
||||
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionSearchParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 门诊管理——输液实现类
|
||||
@@ -27,7 +23,6 @@ public interface IOutpatientInfusionRecordService {
|
||||
*/
|
||||
OutpatientInfusionInitDto getOutpatientInfusionInit();
|
||||
|
||||
|
||||
/**
|
||||
* 获取门诊输液记录的患者列表
|
||||
*
|
||||
@@ -39,23 +34,22 @@ public interface IOutpatientInfusionRecordService {
|
||||
IPage<OutpatientInfusionPatientDto> getOutpatientInfusionPatient(
|
||||
OutpatientInfusionSearchParam outpatientInfusionSearchParam, Integer pageNo, Integer pageSize);
|
||||
|
||||
|
||||
/**
|
||||
* 查询单个患者门诊输液记录查询
|
||||
*
|
||||
* @param outpatientInfusionPatientDto 患者输液信息
|
||||
* @return 门诊输液记录列表
|
||||
*/
|
||||
List<OutpatientInfusionRecordDto> getPatientInfusionRecord(OutpatientInfusionPatientDto outpatientInfusionPatientDto);
|
||||
List<OutpatientInfusionRecordDto>
|
||||
getPatientInfusionRecord(OutpatientInfusionPatientDto outpatientInfusionPatientDto);
|
||||
|
||||
/**
|
||||
* 执行单个患者门诊输液
|
||||
*
|
||||
* @param exeCount 执行记录数
|
||||
* @param outpatientInfusionRecordDto 患者输液信息
|
||||
* @param outpatientInfusionRecordDtoList 输液记录
|
||||
* @return 修改成功/失败
|
||||
*/
|
||||
boolean editPatientInfusionRecord(OutpatientInfusionRecordDto outpatientInfusionRecordDto,Long exeCount);
|
||||
boolean batchEditPatientInfusionRecord(List<OutpatientInfusionRecordDto> outpatientInfusionRecordDtoList);
|
||||
|
||||
/**
|
||||
* 执行输液后,修改执行结束时间
|
||||
@@ -66,12 +60,13 @@ public interface IOutpatientInfusionRecordService {
|
||||
boolean editPatientInfusionTime(OutpatientInfusionRecordDto outpatientInfusionRecordDto);
|
||||
|
||||
/**
|
||||
* 显示门诊输液执行记录查询
|
||||
* 门诊输液执行历史记录查询
|
||||
*
|
||||
* @param beginTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param historyFlag 查询的是否为执行履历
|
||||
* @return 门诊输液记录列表
|
||||
*/
|
||||
List<OutpatientInfusionRecordDto> getPatientInfusionPerformRecord(String beginTime,String endTime);
|
||||
List<OutpatientInfusionRecordDto> getPatientInfusionPerformRecord(String beginTime, String endTime,boolean historyFlag);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
package com.openhis.web.outpatientmanage.appservice.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@@ -12,9 +9,11 @@ import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.utils.AgeCalculatorUtil;
|
||||
@@ -25,9 +24,11 @@ import com.openhis.administration.domain.Practitioner;
|
||||
import com.openhis.administration.domain.PractitionerRole;
|
||||
import com.openhis.administration.service.IPractitionerRoleService;
|
||||
import com.openhis.administration.service.IPractitionerService;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.enums.AdministrativeGender;
|
||||
import com.openhis.common.enums.ClinicalStatus;
|
||||
import com.openhis.common.enums.EventStatus;
|
||||
import com.openhis.common.enums.Whether;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.outpatientmanage.appservice.IOutpatientInfusionRecordService;
|
||||
@@ -39,7 +40,6 @@ import com.openhis.web.outpatientmanage.mapper.OutpatientManageMapper;
|
||||
import com.openhis.workflow.domain.ServiceRequest;
|
||||
import com.openhis.workflow.mapper.ServiceRequestMapper;
|
||||
import com.openhis.workflow.service.IServiceRequestService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 门诊管理——输液实现类
|
||||
@@ -76,34 +76,10 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
||||
OutpatientInfusionInitDto initDto = new OutpatientInfusionInitDto();
|
||||
|
||||
// 获取皮试结果
|
||||
List<OutpatientInfusionInitDto.statusEnumOption> statusEnumOptions2 = Stream.of(ClinicalStatus.values())
|
||||
List<OutpatientInfusionInitDto.statusEnumOption> statusEnumOptions = Stream.of(ClinicalStatus.values())
|
||||
.map(status -> new OutpatientInfusionInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
initDto.setClinicalStatus(statusEnumOptions2);
|
||||
|
||||
// 获取当天日期
|
||||
LocalDateTime beginTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), true);
|
||||
LocalDateTime endTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), false);
|
||||
// 创建查询包装器
|
||||
QueryWrapper<OutpatientInfusionRecordDto> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.ge("occurrence_start_time", beginTime);
|
||||
queryWrapper.le("occurrence_end_time", endTime);
|
||||
|
||||
// 从数据库获取输液记录列表
|
||||
List<OutpatientInfusionRecordDto> infusionList =
|
||||
outpatientManageMapper.getOutpatientInfusionRecord(queryWrapper);
|
||||
// 遍历列表并处理每个记录
|
||||
infusionList.forEach(e -> {
|
||||
// 性别
|
||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
// 药品状态
|
||||
e.setClinicalStatusEnum_enumText(EnumUtils.getInfoByValue(EventStatus.class, e.getMedicationStatusEnum()));
|
||||
// 皮试结果
|
||||
e.setMedicationStatusEnum_enumText(
|
||||
EnumUtils.getInfoByValue(ClinicalStatus.class, e.getClinicalStatusEnum()));
|
||||
});
|
||||
|
||||
initDto.setInfusionList(infusionList);
|
||||
initDto.setClinicalStatus(statusEnumOptions);
|
||||
|
||||
return initDto;
|
||||
}
|
||||
@@ -122,27 +98,37 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
||||
|
||||
LocalDateTime beginTime;
|
||||
LocalDateTime endTime;
|
||||
if (outpatientInfusionSearchParam == null || outpatientInfusionSearchParam.getBeginTime() == null
|
||||
String searchKey;
|
||||
// 搜索key为空
|
||||
if (outpatientInfusionSearchParam == null) {
|
||||
searchKey = null;
|
||||
} else {
|
||||
searchKey = outpatientInfusionSearchParam.getSearchKey();
|
||||
}
|
||||
// 任意开始结束时间为空,默认查询当天日期记录
|
||||
if (outpatientInfusionSearchParam.getBeginTime() == null
|
||||
|| outpatientInfusionSearchParam.getEndTime() == null) {
|
||||
beginTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), true);
|
||||
endTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), false);
|
||||
} else {
|
||||
} else {// 时间不空,删选时间
|
||||
beginTime = DateUtils.startDayOrEndDay(outpatientInfusionSearchParam.getBeginTime(), true);
|
||||
endTime = DateUtils.startDayOrEndDay(outpatientInfusionSearchParam.getEndTime(), false);
|
||||
}
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<OutpatientInfusionPatientDto> queryWrapper =
|
||||
HisQueryUtils.buildQueryWrapper(null, outpatientInfusionSearchParam.getSearchKey(),
|
||||
new HashSet<>(Arrays.asList("patient_bus_no", "encounter_bus_no", "patient_name")), null);
|
||||
QueryWrapper<OutpatientInfusionPatientDto> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
||||
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientBusNo,
|
||||
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.PatientName)),
|
||||
null);
|
||||
// based_on_id 是为空的
|
||||
queryWrapper.eq("based_on_id", null);
|
||||
queryWrapper.eq(CommonConstants.FieldName.basedOnId, null);
|
||||
// 状态是未完成的
|
||||
queryWrapper.in("status_enum", EventStatus.IN_PROGRESS.getValue(), EventStatus.NOT_DONE.getValue());
|
||||
queryWrapper.in(CommonConstants.FieldName.requestStatus, EventStatus.IN_PROGRESS.getValue(),
|
||||
EventStatus.NOT_DONE.getValue());
|
||||
// 添加时间段查询条件
|
||||
if (beginTime != null && endTime != null) {
|
||||
queryWrapper.ge("begin_time", beginTime);
|
||||
queryWrapper.le("end_time", endTime);
|
||||
queryWrapper.ge(CommonConstants.FieldName.createTime, beginTime);
|
||||
queryWrapper.le(CommonConstants.FieldName.createTime, endTime);
|
||||
}
|
||||
|
||||
IPage<OutpatientInfusionPatientDto> outpatientInfusionPatientDto =
|
||||
@@ -159,10 +145,10 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单个患者门诊输液记录查询
|
||||
* 查询单个患者门诊输液待执行记录
|
||||
*
|
||||
* @param outpatientInfusionPatientDto 患者输液信息
|
||||
* @return 门诊输液记录列表
|
||||
* @return 患者待输液记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<OutpatientInfusionRecordDto>
|
||||
@@ -172,12 +158,13 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
||||
return null;
|
||||
}
|
||||
// 创建查询包装器
|
||||
QueryWrapper<OutpatientInfusionRecordDto> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("patient_id", outpatientInfusionPatientDto.getPatientId());
|
||||
LambdaQueryWrapper<OutpatientInfusionRecordDto> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OutpatientInfusionRecordDto::getPatientId, outpatientInfusionPatientDto.getPatientId());
|
||||
// based_on_id 是为空的
|
||||
queryWrapper.eq("based_on_id", null);
|
||||
queryWrapper.eq(OutpatientInfusionRecordDto::getBasedOnId, null);
|
||||
// 状态是未完成的
|
||||
queryWrapper.in("status_enum", EventStatus.IN_PROGRESS.getValue(), EventStatus.NOT_DONE.getValue());
|
||||
queryWrapper.in(OutpatientInfusionRecordDto::getRequestStatus, EventStatus.IN_PROGRESS.getValue(),
|
||||
EventStatus.NOT_DONE.getValue());
|
||||
// 从数据库获取输液记录列表
|
||||
List<OutpatientInfusionRecordDto> infusionList =
|
||||
outpatientManageMapper.getOutpatientInfusionRecord(queryWrapper);
|
||||
@@ -186,74 +173,96 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行单个患者门诊输液
|
||||
* 执行患者门诊输液
|
||||
*
|
||||
* @param exeCount 执行记录数
|
||||
* @param outpatientInfusionRecordDto 患者输液信息
|
||||
* @return 门诊输液记录列表
|
||||
* @param outpatientInfusionRecordDtoList 输液记录列表
|
||||
* @return 执行成功/失败
|
||||
*/
|
||||
@Override
|
||||
public boolean editPatientInfusionRecord(OutpatientInfusionRecordDto outpatientInfusionRecordDto, Long exeCount) {
|
||||
|
||||
public boolean batchEditPatientInfusionRecord(List<OutpatientInfusionRecordDto> outpatientInfusionRecordDtoList) {
|
||||
// 根据执行人ID,通过登录userId获取
|
||||
Practitioner practitioner =
|
||||
practitionerService.getPractitionerByUserId(SecurityUtils.getLoginUser().getUserId());
|
||||
// 以执行人ID,获取执行人的身份类别
|
||||
// 根据执行人ID,获取执行人身份类型
|
||||
PractitionerRole practitionerRole = practitionerRoleService.getPractitionerRoleById(practitioner.getId());
|
||||
if (practitioner == null || practitionerRole == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String busNo = AssignSeqUtil.formatString(outpatientInfusionRecordDto.getBusNo(), exeCount, 3);
|
||||
// 当输液未被全部执行时,可以修改继续执行,生成一条执行记录
|
||||
if ((BigDecimal.valueOf(exeCount)).compareTo(outpatientInfusionRecordDto.getMedicationAntity()) < 0) {
|
||||
// 当 exeCount 小于 medicationAntity 时,执行这里的代码
|
||||
// 按 groupId 分组
|
||||
Map<Long, List<OutpatientInfusionRecordDto>> groupedRecords = outpatientInfusionRecordDtoList.stream()
|
||||
.collect(Collectors.groupingBy(OutpatientInfusionRecordDto::getGroupId));
|
||||
|
||||
// 遍历每个分组
|
||||
for (Map.Entry<Long, List<OutpatientInfusionRecordDto>> entry : groupedRecords.entrySet()) {
|
||||
List<OutpatientInfusionRecordDto> groupRecords = entry.getValue();
|
||||
|
||||
// 获取组内药品个数
|
||||
Long groupCount = outpatientManageMapper.countMedicationExecuteNum(groupRecords.get(0).getServiceId(), null,
|
||||
groupRecords.get(0).getGroupId(), false);
|
||||
// 检查组内药品是否全部选中
|
||||
if (groupCount != groupRecords.size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 构造批量插入的 ServiceRequest 列表
|
||||
List<ServiceRequest> serviceRequests = new ArrayList<>();
|
||||
for (OutpatientInfusionRecordDto record : groupRecords) {
|
||||
String prefixBusNo = record.getBusNo() + "." + record.getGroupId() + "." + record.getMedicationId();
|
||||
// 获取执行次数
|
||||
Long exeCount =
|
||||
outpatientManageMapper.countMedicationExecuteNum(record.getServiceId(), prefixBusNo, null, true);
|
||||
|
||||
if (exeCount < record.getExecuteNum()) {
|
||||
ServiceRequest serviceRequest = new ServiceRequest();
|
||||
serviceRequest.setPrescriptionNo(outpatientInfusionRecordDto.getPrescriptionNo())
|
||||
// 设置busNo,原来的服务请求编码为基础.执行次数
|
||||
.setBusNo(busNo)
|
||||
// 基于service_request的id
|
||||
.setBasedOnId(outpatientInfusionRecordDto.getServiceId())
|
||||
// 设置状态完成
|
||||
.setStatusEnum(EventStatus.COMPLETED.getValue())
|
||||
// 设置请求code 和原来一致
|
||||
.setActivityId(outpatientInfusionRecordDto.getActivityId())
|
||||
// 患者id
|
||||
.setPatientId(outpatientInfusionRecordDto.getPatientId())
|
||||
// 就诊id
|
||||
.setEncounterId(outpatientInfusionRecordDto.getEncounterId())
|
||||
// 执行人id,通过登录userId获取
|
||||
.setPerformerId(practitioner.getId())
|
||||
// 设置执行人身份类别
|
||||
serviceRequest.setPrescriptionNo(record.getPrescriptionNo())
|
||||
.setBusNo(AssignSeqUtil.formatString(prefixBusNo, exeCount, 3))
|
||||
.setBasedOnId(record.getServiceId()).setStatusEnum(EventStatus.COMPLETED.getValue())
|
||||
.setActivityId(record.getActivityId()).setPatientId(record.getPatientId())
|
||||
.setEncounterId(record.getEncounterId()).setPerformerId(practitioner.getId())
|
||||
.setPerformerTypeCode(practitionerRole.getRoleCode())
|
||||
// 设置执行日期为当前时间
|
||||
.setOccurrenceStartTime(DateUtils.getNowDate())
|
||||
// 默认30结束
|
||||
.setOccurrenceEndTime(DateUtils.addDateMinute(DateUtils.getNowDate(), 30));
|
||||
|
||||
boolean result = serviceRequestService.save(serviceRequest);
|
||||
if (!result) {
|
||||
return false;
|
||||
serviceRequests.add(serviceRequest);
|
||||
}
|
||||
}
|
||||
// 使用 MyBatis-Plus 的 saveBatch 方法批量插入
|
||||
if (!serviceRequestService.saveBatch(serviceRequests)) {
|
||||
return false; // 如果批量插入失败,返回 false
|
||||
}
|
||||
// 更新分组中每个记录的状态
|
||||
for (OutpatientInfusionRecordDto record : groupRecords) {
|
||||
String prefixBusNo = record.getBusNo() + "." + record.getGroupId() + "." + record.getMedicationId();
|
||||
// 获取执行次数
|
||||
Long exeCount =
|
||||
outpatientManageMapper.countMedicationExecuteNum(record.getServiceId(), prefixBusNo, null, true);
|
||||
|
||||
// 判断如果是执行该患者最后一次记录,更新原来的服请求状态
|
||||
if ((BigDecimal.valueOf(exeCount + 1)).compareTo(outpatientInfusionRecordDto.getMedicationAntity()) == 0) {
|
||||
// 以id为主条件更新服务申请管理表
|
||||
UpdateWrapper<ServiceRequest> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("id", outpatientInfusionRecordDto.getServiceId())
|
||||
.set("status_enum", EventStatus.COMPLETED.getValue())
|
||||
.set("performer_type_code", practitionerRole.getRoleCode())
|
||||
.set("performer_id", practitioner.getId()).set("occurrence_start_time", DateUtils.getNowDate())
|
||||
.set("occurrence_end_time", DateUtils.getNowDate());
|
||||
int countUpdate = serviceRequestMapper.update(null, updateWrapper);
|
||||
if (countUpdate < 0) {
|
||||
return false;
|
||||
// 执行完毕后,更新执行服务请求表的状态
|
||||
if (exeCount.equals(record.getExecuteNum())) {
|
||||
if (!updateRecordStatus(record.getServiceId())) {
|
||||
return false; // 如果更新状态失败,返回 false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 所有分组都执行成功
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
/**
|
||||
* 更新执行状态
|
||||
*
|
||||
* @param serviceId 服务请求ID
|
||||
* @return 修改成功/失败
|
||||
*/
|
||||
public boolean updateRecordStatus(Long serviceId) {
|
||||
LambdaUpdateWrapper<ServiceRequest> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ServiceRequest::getId, serviceId).set(ServiceRequest::getStatusEnum,
|
||||
EventStatus.COMPLETED.getValue());
|
||||
|
||||
int countUpdate = serviceRequestMapper.update(null, updateWrapper);
|
||||
return countUpdate > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -265,15 +274,14 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
||||
@Override
|
||||
public boolean editPatientInfusionTime(OutpatientInfusionRecordDto outpatientInfusionRecordDto) {
|
||||
// 以id为主条件更新服务申请管理表
|
||||
UpdateWrapper<ServiceRequest> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("id", outpatientInfusionRecordDto.getServiceId()).set("occurrence_end_time",
|
||||
LambdaUpdateWrapper<ServiceRequest> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ServiceRequest::getId, outpatientInfusionRecordDto.getServiceId()).set(
|
||||
ServiceRequest::getOccurrenceEndTime,
|
||||
DateUtils.parseDate(outpatientInfusionRecordDto.getOccurrenceEndTime()));
|
||||
int countUpdate = serviceRequestMapper.update(null, updateWrapper);
|
||||
if (countUpdate < 0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
return countUpdate < 0 ? false : true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -281,10 +289,11 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
||||
*
|
||||
* @param beginTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 门诊输液记录列表
|
||||
* @param historyFlag 查询的是否为执行履历
|
||||
* @return 门诊输液执行记录查询
|
||||
*/
|
||||
@Override
|
||||
public List<OutpatientInfusionRecordDto> getPatientInfusionPerformRecord(String beginTime, String endTime) {
|
||||
public List<OutpatientInfusionRecordDto> getPatientInfusionPerformRecord(String beginTime, String endTime,boolean historyFlag) {
|
||||
|
||||
LocalDateTime beginDateTime;
|
||||
LocalDateTime endDateTime;
|
||||
@@ -298,18 +307,45 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
||||
}
|
||||
|
||||
// 创建查询包装器
|
||||
QueryWrapper<OutpatientInfusionRecordDto> queryWrapper = new QueryWrapper<>();
|
||||
// based_on_id 不为空
|
||||
queryWrapper.isNotNull("based_on_id");
|
||||
LambdaQueryWrapper<OutpatientInfusionRecordDto> queryWrapper = new LambdaQueryWrapper<>();
|
||||
//执行历史查询的条件
|
||||
if(historyFlag){
|
||||
// based_on_id 不为空,此条件筛选出执行履历
|
||||
queryWrapper.isNotNull(OutpatientInfusionRecordDto::getBasedOnId);
|
||||
// 状态是已完成
|
||||
queryWrapper.eq("status_enum", EventStatus.COMPLETED.getValue());
|
||||
queryWrapper.eq(OutpatientInfusionRecordDto::getRequestStatus, EventStatus.COMPLETED.getValue());
|
||||
|
||||
//门诊输液待执行记录查询
|
||||
}else{
|
||||
// based_on_id 为空,此条件筛选控制不显示执行履历
|
||||
queryWrapper.isNull(OutpatientInfusionRecordDto::getBasedOnId);
|
||||
// 状态是进行中
|
||||
queryWrapper.eq(OutpatientInfusionRecordDto::getRequestStatus, EventStatus.IN_PROGRESS.getValue());
|
||||
}
|
||||
// 时间筛选
|
||||
queryWrapper.ge("begin_time", beginDateTime);
|
||||
queryWrapper.le("end_time", endDateTime);
|
||||
queryWrapper.ge(OutpatientInfusionRecordDto::getCreateTime, beginDateTime);
|
||||
queryWrapper.le(OutpatientInfusionRecordDto::getCreateTime, endDateTime);
|
||||
|
||||
// 从数据库获取输液记录列表
|
||||
List<OutpatientInfusionRecordDto> infusionPerformList =
|
||||
outpatientManageMapper.getOutpatientInfusionRecord(queryWrapper);
|
||||
|
||||
// 遍历列表并处理每个记录
|
||||
infusionPerformList.forEach(e -> {
|
||||
// 性别
|
||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
// 药品状态
|
||||
e.setClinicalStatusEnum_enumText(EnumUtils.getInfoByValue(EventStatus.class, e.getMedicationStatusEnum()));
|
||||
// 皮试标志
|
||||
e.setSkinTestFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getSkinTestFlag()));
|
||||
// 只有皮试药品才显示皮试结果
|
||||
if (e.getSkinTestFlag() == Whether.YES.getValue()) {
|
||||
// 皮试结果
|
||||
e.setMedicationStatusEnum_enumText(
|
||||
EnumUtils.getInfoByValue(ClinicalStatus.class, e.getClinicalStatusEnum()));
|
||||
}
|
||||
});
|
||||
|
||||
return infusionPerformList;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.web.outpatientmanage.appservice.IOutpatientInfusionRecordService;
|
||||
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionPatientDto;
|
||||
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionRecordDto;
|
||||
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionSearchParam;
|
||||
import com.openhis.workflow.service.IServiceRequestService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -25,7 +23,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
* @date 2025/3/12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/outpatientmanage/infusion")
|
||||
@RequestMapping("/outpatient-manage/infusion")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class OutpatientInfusionRecordController {
|
||||
@@ -33,9 +31,6 @@ public class OutpatientInfusionRecordController {
|
||||
@Autowired
|
||||
IOutpatientInfusionRecordService outpatientInfusionRecordService;
|
||||
|
||||
@Autowired
|
||||
IServiceRequestService serviceRequestService;
|
||||
|
||||
/**
|
||||
* 门诊输液记录初期数据
|
||||
*
|
||||
@@ -48,24 +43,7 @@ public class OutpatientInfusionRecordController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询门诊输液患者列表
|
||||
*
|
||||
* @param outpatientInfusionSearchParam 查询参数
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 就诊患者信息
|
||||
*/
|
||||
@GetMapping(value = "/patients")
|
||||
public R<?> getOutpatientInfusionPatient(OutpatientInfusionSearchParam outpatientInfusionSearchParam,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
|
||||
return R.ok(outpatientInfusionRecordService.getOutpatientInfusionPatient(outpatientInfusionSearchParam, pageNo,
|
||||
pageSize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单个患者门诊输液记录查询
|
||||
* 查询单个患者的门诊输液记录
|
||||
*
|
||||
* @param outpatientInfusionPatientDto 患者输液信息
|
||||
* @return 门诊输液记录列表
|
||||
@@ -76,25 +54,6 @@ public class OutpatientInfusionRecordController {
|
||||
return R.ok(outpatientInfusionRecordService.getPatientInfusionRecord(outpatientInfusionPatientDto));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 执行单个患者门诊输液
|
||||
// *
|
||||
// * @param outpatientInfusionRecordDto 患者输液信息
|
||||
// * @return 门诊输液记录列表
|
||||
// */
|
||||
// @PutMapping("/infusion-perform")
|
||||
// public R<?>
|
||||
// editPatientInfusionRecord(@Validated @RequestBody OutpatientInfusionRecordDto outpatientInfusionRecordDto) {
|
||||
// // 获取执行次数
|
||||
// Long exeCount =
|
||||
// serviceRequestService.countServiceRequestByBasedOnId(outpatientInfusionRecordDto.getServiceId());
|
||||
// boolean res = outpatientInfusionRecordService.editPatientInfusionRecord(outpatientInfusionRecordDto, exeCount);
|
||||
// if (!res) {
|
||||
// return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
// }
|
||||
// return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"患者门诊输液执行"}));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 批量执行患者门诊输液
|
||||
*
|
||||
@@ -104,14 +63,11 @@ public class OutpatientInfusionRecordController {
|
||||
@PutMapping("/infusion-perform/batch")
|
||||
public R<?> batchEditPatientInfusionRecord(
|
||||
@Validated @RequestBody List<OutpatientInfusionRecordDto> outpatientInfusionRecordDtoList) {
|
||||
// 获取执行次数
|
||||
for (OutpatientInfusionRecordDto dto : outpatientInfusionRecordDtoList) {
|
||||
Long exeCount = serviceRequestService.countServiceRequestByBasedOnId(dto.getServiceId());
|
||||
boolean res = outpatientInfusionRecordService.editPatientInfusionRecord(dto, exeCount);
|
||||
if (!res) {
|
||||
|
||||
if (!outpatientInfusionRecordService.batchEditPatientInfusionRecord(outpatientInfusionRecordDtoList)) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
}
|
||||
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"患者门诊输液执行"}));
|
||||
}
|
||||
|
||||
@@ -131,17 +87,31 @@ public class OutpatientInfusionRecordController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示门诊输液执行记录查询
|
||||
* 门诊输液待执行记录查询
|
||||
*
|
||||
* @param beginTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 门诊输液记录列表
|
||||
* @return 门诊输液待执行记录列表
|
||||
*/
|
||||
@GetMapping(value = "/infusion-perform-Record")
|
||||
@GetMapping(value = "/infusion-wait-perform-record")
|
||||
public R<?> getPatientInfusionRecords(@RequestParam(required = false) String beginTime,
|
||||
@RequestParam(required = false) String endTime) {
|
||||
|
||||
return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(beginTime, endTime, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* 门诊输液执行历史记录查询
|
||||
*
|
||||
* @param beginTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 门诊输液执行历史记录列表
|
||||
*/
|
||||
@GetMapping(value = "/infusion-perform-record")
|
||||
public R<?> getPatientInfusionPerformRecord(@RequestParam(required = false) String beginTime,
|
||||
@RequestParam(required = false) String endTime) {
|
||||
|
||||
return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(beginTime,endTime));
|
||||
return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(beginTime, endTime, true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
* @date 2025/3/5
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/outpatientmanage/skintest")
|
||||
@RequestMapping("/outpatient-manage/skin-test")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class OutpatientSkinTestRecordController {
|
||||
@@ -46,7 +46,7 @@ public class OutpatientSkinTestRecordController {
|
||||
*
|
||||
* @param outpatientSkinTestRecordDto 皮试记录信息
|
||||
*/
|
||||
@PutMapping("/outpatient-record-skintest")
|
||||
@PutMapping("/outpatient-record-skin-test")
|
||||
public R<?> editSkinTestRecord(@Validated @RequestBody OutpatientSkinTestRecordDto outpatientSkinTestRecordDto) {
|
||||
|
||||
if (!OutpatientSkinTestRecordService.editSkinTestRecord(outpatientSkinTestRecordDto)) {
|
||||
@@ -60,7 +60,7 @@ public class OutpatientSkinTestRecordController {
|
||||
*
|
||||
* @param outpatientSkinTestRecordDto 皮试记录信息
|
||||
*/
|
||||
@PutMapping("/outpatient-record-signcheck")
|
||||
@PutMapping("/outpatient-record-sign-check")
|
||||
public R<?> nurseSignChkPs(@Validated @RequestBody OutpatientSkinTestRecordDto outpatientSkinTestRecordDto) {
|
||||
|
||||
if (!OutpatientSkinTestRecordService.nurseSignChkPs(outpatientSkinTestRecordDto)) {
|
||||
|
||||
@@ -19,8 +19,6 @@ public class OutpatientInfusionInitDto {
|
||||
|
||||
//皮试结果
|
||||
private List<statusEnumOption> clinicalStatus;
|
||||
//当天位执行的输液记录
|
||||
private List<OutpatientInfusionRecordDto> infusionList;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
package com.openhis.web.outpatientmanage.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 门诊输液记录Dto
|
||||
*
|
||||
@@ -22,6 +24,9 @@ public class OutpatientInfusionRecordDto {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long serviceId;
|
||||
|
||||
/** 服务申请状态 */
|
||||
private Integer requestStatus;
|
||||
|
||||
/** 请求基于什么的ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long basedOnId;
|
||||
@@ -56,9 +61,8 @@ public class OutpatientInfusionRecordDto {
|
||||
private Integer genderEnum;
|
||||
private String genderEnum_enumText;
|
||||
|
||||
/** 已执行数量 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long executionCount;
|
||||
/** 住院执行次数 */
|
||||
private Integer executeNum;
|
||||
|
||||
/** 分组id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@@ -88,6 +92,9 @@ public class OutpatientInfusionRecordDto {
|
||||
/** 预计结束时间 */
|
||||
private String occurrenceEndTime;
|
||||
|
||||
/** 药品ID */
|
||||
private Long medicationId;
|
||||
|
||||
/** 药品信息 */
|
||||
private String medicationInformation;
|
||||
|
||||
@@ -108,10 +115,14 @@ public class OutpatientInfusionRecordDto {
|
||||
private String medicationStatusEnum_enumText;
|
||||
|
||||
/** 皮试标志(是/否) */
|
||||
private String flagText;
|
||||
private Integer skinTestFlag;
|
||||
private String skinTestFlag_enumText;
|
||||
|
||||
/** 皮试结果 */
|
||||
private Integer clinicalStatusEnum;
|
||||
private String clinicalStatusEnum_enumText;
|
||||
|
||||
/** 开单时间 */
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
@@ -59,8 +60,19 @@ public interface OutpatientManageMapper {
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 门诊输液记录列表
|
||||
*/
|
||||
List<OutpatientInfusionRecordDto>
|
||||
getOutpatientInfusionRecord(@Param(Constants.WRAPPER) QueryWrapper<OutpatientInfusionRecordDto> queryWrapper);
|
||||
List<OutpatientInfusionRecordDto> getOutpatientInfusionRecord(
|
||||
@Param(Constants.WRAPPER) LambdaQueryWrapper<OutpatientInfusionRecordDto> queryWrapper);
|
||||
|
||||
/**
|
||||
* 查询药品已执行数量/查询同组内药品数量
|
||||
*
|
||||
* @param paramId baseOnId/服务请求ID
|
||||
* @param prefixBusNo 服务请求编码
|
||||
* @param groupId 分组ID
|
||||
* @param flag 控制查询条件
|
||||
* @return 查询个数
|
||||
*/
|
||||
long countMedicationExecuteNum(@Param("paramId") Long paramId, @Param("prefixBusNo") String prefixBusNo,
|
||||
@Param("groupId") Long groupId, @Param("flag") boolean flag);
|
||||
|
||||
}
|
||||
|
||||
@@ -95,6 +95,18 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
||||
.collect(Collectors.toList());
|
||||
initDto.setFamilyRelationshipType(statusEnumOptions6);
|
||||
|
||||
// 获取证件类型
|
||||
List<PatientInfoInitDto.statusEnumOption> statusEnumOptions7 = Stream.of(IdentityDocumentType.values())
|
||||
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
initDto.setIdentityDocumentType(statusEnumOptions7);
|
||||
|
||||
// 获取是/否状态
|
||||
List<PatientInfoInitDto.statusEnumOption> statusEnumOptions8 = Stream.of(Whether.values())
|
||||
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
initDto.setWhetherStatus(statusEnumOptions8);
|
||||
|
||||
return initDto;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
* @date 2025/2/28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/patientmanage/records")
|
||||
@RequestMapping("/patient-manage/records")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class OutpatientRecordController {
|
||||
|
||||
@@ -18,7 +18,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
* @date 2025/2/22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/patientmanage/information")
|
||||
@RequestMapping("/patient-manage/information")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class PatientInformationController {
|
||||
|
||||
@@ -28,6 +28,10 @@ public class PatientInfoInitDto {
|
||||
private List<PatientInfoInitDto.statusEnumOption> bloodTypeRH;
|
||||
//获取家庭关系列表
|
||||
private List<PatientInfoInitDto.statusEnumOption> familyRelationshipType;
|
||||
//身份证件类型
|
||||
private List<PatientInfoInitDto.statusEnumOption> identityDocumentType;
|
||||
//是/否 状态
|
||||
private List<PatientInfoInitDto.statusEnumOption> whetherStatus;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
abi.volume,
|
||||
abi.method_code,
|
||||
abi.rate_code,
|
||||
abi.org_id,
|
||||
abi.location_id,
|
||||
abi.dose,
|
||||
abi.dose_unit_code,
|
||||
abi.supplier,
|
||||
@@ -42,6 +44,8 @@
|
||||
T2.total_volume AS volume,
|
||||
T2.method_code AS method_code,
|
||||
T2.rate_code AS rate_code,
|
||||
T2.org_id AS org_id,
|
||||
T2.location_id AS location_id,
|
||||
CAST(T2.dose AS TEXT) AS dose,
|
||||
T2.dose_unit_code AS dose_unit_code,
|
||||
T3.NAME AS supplier,
|
||||
@@ -75,6 +79,8 @@
|
||||
T1.SIZE AS volume,
|
||||
'' AS method_code,
|
||||
'' AS rate_code,
|
||||
T1.org_id AS org_id,
|
||||
T1.location_id AS location_id,
|
||||
'' AS dose,
|
||||
'' AS dose_unit_code,
|
||||
T2.NAME AS supplier,
|
||||
@@ -106,6 +112,8 @@
|
||||
'' AS volume,
|
||||
'' AS method_code,
|
||||
'' AS rate_code,
|
||||
T1.org_id AS org_id,
|
||||
T1.location_id AS location_id,
|
||||
'' AS dose,
|
||||
'' AS dose_unit_code,
|
||||
'' AS supplier,
|
||||
@@ -131,6 +139,7 @@
|
||||
T1.lot_number,
|
||||
T1.price,
|
||||
T1.location_id,
|
||||
T1.location_store_id,
|
||||
T2.NAME AS location_name
|
||||
FROM
|
||||
wor_inventory_item AS T1
|
||||
|
||||
@@ -179,8 +179,9 @@
|
||||
resultType="com.openhis.web.outpatientmanage.dto.OutpatientInfusionRecordDto">
|
||||
SELECT
|
||||
T1.service_id,
|
||||
T1.request_status,
|
||||
T1.bus_no,
|
||||
T1.execution_count,
|
||||
T1.execute_num,
|
||||
T1.based_on_id,
|
||||
T1.activity_id,
|
||||
T1.prescription_no,
|
||||
@@ -194,7 +195,7 @@
|
||||
T1.medication_status_Enum,
|
||||
T1.group_id,
|
||||
T1.clinical_status_enum,
|
||||
T1.flag_text,
|
||||
T1.skin_test_flag,
|
||||
T1.speed,
|
||||
T1.method_code,
|
||||
T1.dose,
|
||||
@@ -209,25 +210,27 @@
|
||||
SELECT
|
||||
sr.id AS service_id, --服务申请管理ID
|
||||
sr.bus_no, -- 服务请求编码
|
||||
(SELECT COUNT(*) FROM wor_service_request wsr WHERE wsr.based_on_id = sr.based_on_id) AS execution_count,
|
||||
sr.based_on_id, -- 请求基于什么的ID
|
||||
sr.execute_num, -- 执行次数
|
||||
sr.activity_id,--请求code,输液
|
||||
sr.prescription_no, --处方号
|
||||
sr.encounter_id , --就诊ID
|
||||
sr.tenant_id,
|
||||
sr.status_enum AS request_status, --服务请求状态
|
||||
e.bus_no AS encounter_busNo, --就诊ID(前台显示用)
|
||||
pt.name AS patient_name, --病人姓名
|
||||
pt.bus_no AS patient_busNo, --病人ID(前台显示用)
|
||||
sr.patient_id, --病人ID
|
||||
ad.name AS medication_information, --药品信息
|
||||
md.id AS medication_id, --药品ID
|
||||
md.name AS medication_information, --药品信息
|
||||
mr.antity AS medication_antity,--药品数量
|
||||
mr.status_enum AS medication_status_Enum, --药品状态
|
||||
mr.group_id, --注射药品组号
|
||||
CASE mr.skin_test_flag
|
||||
WHEN 1 THEN 1
|
||||
ELSE 0
|
||||
END AS skin_test_flag ,--皮试标志
|
||||
ai.clinical_status_enum, --皮试检查结果
|
||||
CASE mr.skin_test_flag--皮试标志
|
||||
WHEN 1 THEN '是'
|
||||
ELSE '否'
|
||||
END AS flag_text,
|
||||
mr.speed, --输液速度
|
||||
mr.method_code,--用法
|
||||
mr.dose || ' '|| mr.dose_unit_code AS dose,--单次剂量,剂量单位
|
||||
@@ -247,7 +250,7 @@
|
||||
LEFT JOIN med_medication_definition md ON md.id = m.medication_def_id
|
||||
LEFT JOIN cli_allergy_intolerance ai ON ai.request_id = sr.id
|
||||
<where>
|
||||
ad.bus_no = 'sy001' -- 皮试检查的编号,todo:编号未定,后期修改
|
||||
ad.bus_no = 'sy001' -- 输液检查的编号,todo:编号未定,后期修改
|
||||
AND mr.infusion_flag = 1
|
||||
AND md.infusion_flag = 1
|
||||
|
||||
@@ -258,4 +261,40 @@
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<!-- 查询药品已执行数量/查询同组内药品数量 -->
|
||||
<select id="countMedicationExecuteNum" resultType="long">
|
||||
|
||||
SELECT COUNT(*)
|
||||
FROM
|
||||
wor_service_request sr
|
||||
LEFT JOIN adm_encounter e ON e.id = sr.encounter_id
|
||||
LEFT JOIN adm_patient pt ON pt.id = sr.patient_id
|
||||
LEFT JOIN wor_activity_definition ad ON ad.id = sr.activity_id
|
||||
LEFT JOIN med_medication_request mr ON mr.prescription_no = sr.prescription_no
|
||||
LEFT JOIN med_medication m ON m.id = mr.medication_id
|
||||
LEFT JOIN med_medication_definition md ON md.id = m.medication_def_id
|
||||
LEFT JOIN cli_allergy_intolerance ai ON ai.request_id = sr.id
|
||||
<where>
|
||||
ad.bus_no = 'sy001' -- 输液检查的编号,todo:编号未定,后期修改
|
||||
AND mr.infusion_flag = 1
|
||||
AND md.infusion_flag = 1
|
||||
|
||||
<!-- 药品已执行数量 条件筛选 -->
|
||||
<if test="flag and paramId != null and paramId != '' and prefixBusNo != null and prefixBusNo != '' ">
|
||||
AND sr.base_on_id = #{paramId}
|
||||
AND sr.bus_no LIKE CONCAT(#{prefixBusNo}, '%')
|
||||
AND sr.status_enum = 6 --服务状态是已完成
|
||||
</if>
|
||||
|
||||
<!-- 同组内药品数量 条件筛选 -->
|
||||
<if test="!flag and paramId != null and paramId != '' and groupId != null and groupId != ''">
|
||||
AND sr.id = #{paramId}
|
||||
AND mr.group_id = #{groupId}
|
||||
AND sr.status_enum = 2 --服务状态是进行中
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -137,6 +137,21 @@ public class CommonConstants {
|
||||
* 患者姓名
|
||||
*/
|
||||
String PatientName = "patient_name";
|
||||
|
||||
/**
|
||||
* 请求状态
|
||||
*/
|
||||
String requestStatus = "request_status";
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
String createTime = "create_time";
|
||||
|
||||
/**
|
||||
* 请求基于什么的ID
|
||||
*/
|
||||
String basedOnId = "based_on_id";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,40 +14,29 @@ import lombok.Getter;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ChargeItemContext {
|
||||
public enum ChargeItemContext implements HisEnumInterface {
|
||||
|
||||
/**
|
||||
* 采购
|
||||
*/
|
||||
PURCHASE(1, "采购"),
|
||||
PURCHASE(1, "1", "采购"),
|
||||
|
||||
/**
|
||||
* 药品
|
||||
*/
|
||||
MEDICATION(2, "药品"),
|
||||
MEDICATION(2, "2", "药品"),
|
||||
|
||||
/**
|
||||
* 耗材
|
||||
*/
|
||||
DEVICE(3, "耗材"),
|
||||
DEVICE(3, "3", "耗材"),
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
ACTIVITY(4, "项目");
|
||||
ACTIVITY(4, "4", "项目");
|
||||
|
||||
private Integer value;
|
||||
private String info;
|
||||
|
||||
public static ChargeItemContext getByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
for (ChargeItemContext val : values()) {
|
||||
if (val.getValue().equals(value)) {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
}
|
||||
|
||||
@@ -46,15 +46,4 @@ public enum ChargeItemStatus implements HisEnumInterface {
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
public static ChargeItemStatus getByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
for (ChargeItemStatus val : values()) {
|
||||
if (val.getValue().equals(value)) {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 身份证件类型
|
||||
*
|
||||
* @author liuhr
|
||||
* @date 2025/3/18
|
||||
*/
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum IdentityDocumentType implements HisEnumInterface {
|
||||
|
||||
RESIDENT_ID_CARD(1, "residentIdCard", "居民身份证"),
|
||||
HOUSEHOLD_REGISTER(2, "householdRegister", "居民户口簿"),
|
||||
PASSPORT(3, "passport", "护照"),
|
||||
OFFICER_CERTIFICATE(4, "officerCertificate", "军官证"),
|
||||
DRIVING_LICENSE(5, "drivingLicense", "驾驶证"),
|
||||
HONGKONG_MACAO_PASS(6, "hongkongMacaoPass", "港澳居民来往内地通行证"),
|
||||
TAIWAN_PASS(7, "taiwanPass", "台湾居民来往内地通行证"),
|
||||
OTHER(99, "other", "其他身份证件");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
}
|
||||
@@ -59,6 +59,12 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
/** 最小使用单位 */
|
||||
private String minUnitCode;
|
||||
|
||||
/** 所属科室 */
|
||||
private Long orgId;
|
||||
|
||||
/** 所在位置 */
|
||||
private Long locationId;
|
||||
|
||||
/** 产品型号 */
|
||||
private String modelNumber;
|
||||
|
||||
|
||||
@@ -38,6 +38,9 @@ public class Medication extends HisBaseEntity {
|
||||
/** 所属科室 */
|
||||
private Long orgId;
|
||||
|
||||
/** 所在位置 */
|
||||
private Long locationId;
|
||||
|
||||
/** 剂型 */
|
||||
private String doseFormCode;
|
||||
|
||||
@@ -77,4 +80,16 @@ public class Medication extends HisBaseEntity {
|
||||
/** 药品定义 */
|
||||
private String definition;
|
||||
|
||||
/** 删除状态 */
|
||||
private String deleteFlag;
|
||||
|
||||
/** 用量限定 */
|
||||
private BigDecimal usageLimit;
|
||||
|
||||
/** DDD值 */
|
||||
private String dddCode;
|
||||
|
||||
/** DDD单位 */
|
||||
private String dddUnitCode;
|
||||
|
||||
}
|
||||
@@ -108,9 +108,18 @@ public class MedicationDefinition extends HisBaseEntity {
|
||||
/** 限制使用范围 */
|
||||
private String restrictedScope;
|
||||
|
||||
/** 是否使用 */
|
||||
private Integer activeFlag;
|
||||
|
||||
/** 儿童用药标志 */
|
||||
private Integer childrenFlag;
|
||||
|
||||
/** 产品特性 */
|
||||
private Integer characteristic;
|
||||
|
||||
/** 删除状态 */
|
||||
private String deleteFlag;
|
||||
|
||||
/** 最小库存警戒数量(常规单位) */
|
||||
private BigDecimal itemMinQuantity;
|
||||
|
||||
@@ -123,4 +132,25 @@ public class MedicationDefinition extends HisBaseEntity {
|
||||
/** 默认住院单位 */
|
||||
private String defInhospitalUnitCode;
|
||||
|
||||
/** 贯标国家编码 */
|
||||
private String nationalDrugCode;
|
||||
|
||||
/** 拆分属性 */
|
||||
private String partAttribute;
|
||||
|
||||
/** 抗生素分类 */
|
||||
private String antibioticCode;
|
||||
|
||||
/** 权限限制 */
|
||||
private Integer restrictedEnum;
|
||||
|
||||
/** 是否自制 */
|
||||
private Integer selfFlag;
|
||||
|
||||
/** 是否抗生素 */
|
||||
private Integer antibioticFlag;
|
||||
|
||||
/** 基药标识 */
|
||||
private Integer basicFlag;
|
||||
|
||||
}
|
||||
@@ -43,15 +43,15 @@ public class MedicationRequest extends HisBaseEntity {
|
||||
/** 请求数量 */
|
||||
private Integer quantity;
|
||||
|
||||
/** 执行次数 */
|
||||
private Integer executeNum;
|
||||
|
||||
/** 请求单位编码 */
|
||||
private String unitCode;
|
||||
|
||||
/** 产品批号 */
|
||||
private String lotNumber;
|
||||
|
||||
/** 请求合计(元) */
|
||||
private BigDecimal displayAmount;
|
||||
|
||||
/** 药品请求状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ 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.ActivityDefCategory;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -48,6 +46,12 @@ public class ActivityDefinition extends HisBaseEntity {
|
||||
/** 使用单位 */
|
||||
private String permittedUnitCode;
|
||||
|
||||
/** 所属科室 */
|
||||
private Long orgId;
|
||||
|
||||
/** 所在位置 */
|
||||
private Long locationId;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ public class DeviceRequest extends HisBaseEntity {
|
||||
/** 请求意图 */
|
||||
private String intentCode;
|
||||
|
||||
/** 请求类型 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 优先级 */
|
||||
private Integer priorityEnum;
|
||||
|
||||
@@ -67,9 +70,6 @@ public class DeviceRequest extends HisBaseEntity {
|
||||
/** 耗材定义id */
|
||||
private Long deviceDefId;
|
||||
|
||||
/** 请求合计(元) */
|
||||
private BigDecimal displayAmount;
|
||||
|
||||
/** 器材规格 */
|
||||
private String deviceSpecifications;
|
||||
|
||||
@@ -85,6 +85,9 @@ public class DeviceRequest extends HisBaseEntity {
|
||||
/** 就诊id */
|
||||
private Long encounterId;
|
||||
|
||||
/** 患者ID */
|
||||
private Long patientId;
|
||||
|
||||
/** 用药频次 */
|
||||
private String rateCode;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ServiceRequest extends HisBaseEntity {
|
||||
/** 意图 */
|
||||
private Integer intentEnum;
|
||||
|
||||
/** 服务分类 */
|
||||
/** 请求类型 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 优先权 */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.workflow.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -30,8 +31,8 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
*/
|
||||
@Override
|
||||
public Long countServiceRequestByBasedOnId(Long basedOnId) {
|
||||
QueryWrapper<ServiceRequest> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("based_on_id", basedOnId);
|
||||
LambdaQueryWrapper<ServiceRequest> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ServiceRequest::getBasedOnId, basedOnId);
|
||||
return serviceRequestMapper.selectCount(queryWrapper);
|
||||
}
|
||||
}
|
||||
@@ -13,8 +13,9 @@ export function getSupplierList(query) {
|
||||
// 查询厂商详细
|
||||
export function getSupplierOne(id) {
|
||||
return request({
|
||||
url: '/data-dictionary/supplier/get-supplier-detail/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
url: '/data-dictionary/supplier/get-supplier-detail',
|
||||
method: 'get',
|
||||
params: {id}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export function getInit() {
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/basedatamanage/organization/organization',
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
@@ -56,7 +56,7 @@ export function deptTreeSelect(queryParams) {
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/basedatamanage/cabinet-location/cabinet-location',
|
||||
url: '/base-data-manage/cabinet-location/cabinet-location',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
|
||||
@@ -522,7 +522,7 @@ const data = reactive({
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 挂号收费查询下拉树结构 */
|
||||
function getregistrationfeeTypeList() {
|
||||
function getRegistrationfeeTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log(response, "response");
|
||||
activeFlagOptions.value = response.data.activeFlagOptions; // 活动标记
|
||||
@@ -842,7 +842,7 @@ const transformFormEditData = (form) => {
|
||||
},
|
||||
};
|
||||
};
|
||||
getregistrationfeeTypeList();
|
||||
getRegistrationfeeTypeList();
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
getList();
|
||||
|
||||
@@ -5,7 +5,7 @@ import { parseStrEmpty } from "@/utils/openhis";
|
||||
export function getDeviceList(query) {
|
||||
console.log(query,'aaaaa')
|
||||
return request({
|
||||
url: '/datadictionary/device/information-page',
|
||||
url: '/data-dictionary/device/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@@ -14,7 +14,7 @@ export function getDeviceList(query) {
|
||||
// 查询器材目录详细
|
||||
export function getDeviceOne(id) {
|
||||
return request({
|
||||
url: '/datadictionary/device/information-one/' + parseStrEmpty(id),
|
||||
url: '/data-dictionary/device/information-one/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -22,7 +22,7 @@ export function getDeviceOne(id) {
|
||||
// 新增器材目录
|
||||
export function addDevice(data) {
|
||||
return request({
|
||||
url: '/datadictionary/device/information',
|
||||
url: '/data-dictionary/device/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -31,7 +31,7 @@ export function addDevice(data) {
|
||||
// 修改器材目录
|
||||
export function editDevice(data) {
|
||||
return request({
|
||||
url: '/datadictionary/device/information',
|
||||
url: '/data-dictionary/device/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
@@ -48,7 +48,7 @@ export function editDevice(data) {
|
||||
// 器材目录分类查询
|
||||
export function getDiseaseTreatmentInit() {
|
||||
return request({
|
||||
url: '/datadictionary/device/init',
|
||||
url: '/data-dictionary/device/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -57,7 +57,7 @@ export function getDiseaseTreatmentInit() {
|
||||
export function stopDevice(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/datadictionary/device/information-stop',
|
||||
url: '/data-dictionary/device/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
@@ -67,7 +67,7 @@ export function stopDevice(ids) {
|
||||
export function startDevice(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/datadictionary/device/information-start',
|
||||
url: '/data-dictionary/device/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@ import { parseStrEmpty } from "@/utils/openhis";
|
||||
// 查询诊疗目录列表
|
||||
export function getDiagnosisTreatmentList(query) {
|
||||
return request({
|
||||
url: '/datadictionary/diagnosistreatment/information-page',
|
||||
url: '/data-dictionary/diagnosistreatment/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@@ -13,7 +13,7 @@ export function getDiagnosisTreatmentList(query) {
|
||||
// 查询诊疗目录详细
|
||||
export function getDiagnosisTreatmentOne(id) {
|
||||
return request({
|
||||
url: '/datadictionary/diagnosistreatment/information-one/' + parseStrEmpty(id),
|
||||
url: '/data-dictionary/diagnosistreatment/information-one/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -21,7 +21,7 @@ export function getDiagnosisTreatmentOne(id) {
|
||||
// 新增诊疗目录
|
||||
export function addDiagnosisTreatment(data) {
|
||||
return request({
|
||||
url: '/datadictionary/diagnosistreatment/information',
|
||||
url: '/data-dictionary/diagnosistreatment/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -30,7 +30,7 @@ export function addDiagnosisTreatment(data) {
|
||||
// 修改诊疗目录
|
||||
export function editDiagnosisTreatment(data) {
|
||||
return request({
|
||||
url: '/datadictionary/diagnosistreatment/information',
|
||||
url: '/data-dictionary/diagnosistreatment/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
@@ -47,7 +47,7 @@ export function editDiagnosisTreatment(data) {
|
||||
// 诊疗目录分类查询
|
||||
export function getDiseaseTreatmentInit() {
|
||||
return request({
|
||||
url: '/datadictionary/diagnosistreatment/init',
|
||||
url: '/data-dictionary/diagnosistreatment/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -56,7 +56,7 @@ export function getDiseaseTreatmentInit() {
|
||||
export function stopDiseaseTreatment(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/datadictionary/diagnosistreatment/information-stop',
|
||||
url: '/data-dictionary/diagnosistreatment/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
@@ -66,7 +66,7 @@ export function stopDiseaseTreatment(ids) {
|
||||
export function startDiseaseTreatment(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/datadictionary/diagnosistreatment/information-start',
|
||||
url: '/data-dictionary/diagnosistreatment/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
|
||||
@@ -149,7 +149,7 @@ import {
|
||||
addDiagnosisTreatment,
|
||||
getDiseaseTreatmentInit,
|
||||
getDiagnosisTreatmentOne,
|
||||
} from "./diagnosisTreatment";
|
||||
} from "./diagnosistreatment";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
@@ -323,45 +323,45 @@
|
||||
:viewFlg="viewFlg"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script setup name="DiagnosisTreatment">
|
||||
import {
|
||||
<script setup name="DiagnosisTreatment">
|
||||
import {
|
||||
getDiagnosisTreatmentList,
|
||||
stopDiseaseTreatment,
|
||||
startDiseaseTreatment,
|
||||
getDiseaseTreatmentInit,
|
||||
getDiagnosisTreatmentOne,
|
||||
} from "./components/diagnosisTreatment";
|
||||
import diagnosisTreatmentDialog from "./components/diagnosisTreatmentDialog";
|
||||
import diagnosisTreatmentViewDialog from "./components/diagnosisTreatmentViewDialog";
|
||||
import { nextTick } from "vue";
|
||||
} from "./components/diagnosistreatment";
|
||||
import diagnosisTreatmentDialog from "./components/diagnosisTreatmentDialog";
|
||||
import diagnosisTreatmentViewDialog from "./components/diagnosisTreatmentViewDialog";
|
||||
import { nextTick } from "vue";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
);
|
||||
);
|
||||
|
||||
const diagnosisTreatmentList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const diseaseTreatmentCategoryList = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const exeOrganizations = ref(undefined);
|
||||
// 使用 ref 定义当前器材数据
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看器材数据
|
||||
const viewData = ref({});
|
||||
const diagnosisTreatmentList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const diseaseTreatmentCategoryList = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const exeOrganizations = ref(undefined);
|
||||
// 使用 ref 定义当前器材数据
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看器材数据
|
||||
const viewData = ref({});
|
||||
|
||||
const data = reactive({
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
@@ -379,18 +379,18 @@ const data = reactive({
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 通过条件过滤节点 */
|
||||
const filterNode = (value, data) => {
|
||||
/** 通过条件过滤节点 */
|
||||
const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
};
|
||||
};
|
||||
|
||||
/** 诊断目录分类查询下拉树结构 */
|
||||
function getDiseaseTreatmentList() {
|
||||
/** 诊断目录分类查询下拉树结构 */
|
||||
function getDiseaseTreatmentList() {
|
||||
getDiseaseTreatmentInit().then((response) => {
|
||||
console.log(response, "response器材目录分类查询下拉树结构");
|
||||
diseaseTreatmentCategoryList.value =
|
||||
@@ -398,9 +398,9 @@ function getDiseaseTreatmentList() {
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
exeOrganizations.value = response.data.exeOrganizations;
|
||||
});
|
||||
}
|
||||
/** 查询诊断目录列表 */
|
||||
function getList() {
|
||||
}
|
||||
/** 查询诊断目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getDiagnosisTreatmentList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
@@ -408,23 +408,23 @@ function getList() {
|
||||
console.log(diagnosisTreatmentList, "res.data");
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
console.log(data, "节点单击事件");
|
||||
queryParams.value.categoryEnum = data.value;
|
||||
console.log(queryParams, "queryParams节点单击事件");
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
console.log(queryParams, "queryParams搜索");
|
||||
getList();
|
||||
}
|
||||
}
|
||||
|
||||
/** 启用按钮操作 */
|
||||
function handleStart() {
|
||||
/** 启用按钮操作 */
|
||||
function handleStart() {
|
||||
const stardIds = ids.value;
|
||||
// selectedData
|
||||
proxy.$modal
|
||||
@@ -437,9 +437,9 @@ function handleStart() {
|
||||
proxy.$modal.msgSuccess("启用成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 停用按钮操作 */
|
||||
function handleClose() {
|
||||
}
|
||||
/** 停用按钮操作 */
|
||||
function handleClose() {
|
||||
const stopIds = ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认停用数据!")
|
||||
@@ -451,9 +451,9 @@ function handleClose() {
|
||||
proxy.$modal.msgSuccess("停用成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download(
|
||||
"system/user/export",
|
||||
{
|
||||
@@ -461,36 +461,36 @@ function handleExport() {
|
||||
},
|
||||
`user_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
}
|
||||
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
proxy.download(
|
||||
"system/user/importTemplate",
|
||||
{},
|
||||
`user_template_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddDiagnosisTreatment() {
|
||||
/** 打开新增弹窗 */
|
||||
function openAddDiagnosisTreatment() {
|
||||
console.log("打开新增弹窗");
|
||||
title.value = "新增";
|
||||
nextTick(() => {
|
||||
proxy.$refs.diagnosisTreatmentRef.show();
|
||||
});
|
||||
}
|
||||
/** 打开编辑弹窗 */
|
||||
function openEditDiagnosisTreatment(row) {
|
||||
}
|
||||
/** 打开编辑弹窗 */
|
||||
function openEditDiagnosisTreatment(row) {
|
||||
console.log("打开新增弹窗");
|
||||
currentData.value = JSON.parse(JSON.stringify(row));
|
||||
currentData.value.ybFlag == 1
|
||||
@@ -506,9 +506,9 @@ function openEditDiagnosisTreatment(row) {
|
||||
proxy.$refs["diagnosisTreatmentRef"].edit();
|
||||
});
|
||||
// proxy.$refs["diagnosisTreatmentRef"].edit();
|
||||
}
|
||||
/** 打开查看弹窗 */
|
||||
function openViewDiagnosisTreatment(row) {
|
||||
}
|
||||
/** 打开查看弹窗 */
|
||||
function openViewDiagnosisTreatment(row) {
|
||||
// viewData.value = row;
|
||||
getDiagnosisTreatmentOne(row.id).then((response) => {
|
||||
currentData.value = response.data;
|
||||
@@ -530,15 +530,16 @@ function openViewDiagnosisTreatment(row) {
|
||||
// proxy.$refs["diagnosisTreatmentViewRef"].edit();
|
||||
// });
|
||||
// proxy.$refs["diagnosisTreatmentRef"].edit();
|
||||
}
|
||||
}
|
||||
|
||||
getDiseaseTreatmentList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
getDiseaseTreatmentList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { parseStrEmpty } from "@/utils/openhis";
|
||||
// 查询病种目录列表
|
||||
export function getDiseaseList(query) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-page',
|
||||
url: '/data-dictionary/disease/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@@ -13,7 +13,7 @@ export function getDiseaseList(query) {
|
||||
// 查询病种目录详细
|
||||
export function getDiseaseOne(id) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-one/' + parseStrEmpty(id),
|
||||
url: '/data-dictionary/disease/information-one/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -21,7 +21,7 @@ export function getDiseaseOne(id) {
|
||||
// 新增病种目录
|
||||
export function addDisease(data) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information',
|
||||
url: '/data-dictionary/disease/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -30,7 +30,7 @@ export function addDisease(data) {
|
||||
// 修改病种目录
|
||||
export function editDisease(data) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information',
|
||||
url: '/data-dictionary/disease/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
@@ -47,7 +47,7 @@ export function editDisease(data) {
|
||||
// 病种目录分类查询
|
||||
export function getDiseaseCategory() {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-init',
|
||||
url: '/data-dictionary/disease/information-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -55,7 +55,7 @@ export function getDiseaseCategory() {
|
||||
// 停用病种目录
|
||||
export function stopDisease(ids) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-stop',
|
||||
url: '/data-dictionary/disease/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
@@ -64,7 +64,7 @@ export function stopDisease(ids) {
|
||||
// 启用病种目录
|
||||
export function startDisease(ids) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-start',
|
||||
url: '/data-dictionary/disease/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@ import { parseStrEmpty } from "@/utils/openhis";
|
||||
// 查询药品目录列表
|
||||
export function getMedicationList(query) {
|
||||
return request({
|
||||
url: '/datadictionary/medication/information-page',
|
||||
url: '/data-dictionary/medication/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@@ -13,7 +13,7 @@ export function getMedicationList(query) {
|
||||
// 查询药品目录详细
|
||||
export function getMedicationOne(id) {
|
||||
return request({
|
||||
url: '/datadictionary/medication/information-one/' + parseStrEmpty(id),
|
||||
url: '/data-dictionary/medication/information-one/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -21,7 +21,7 @@ export function getMedicationOne(id) {
|
||||
// 新增药品目录
|
||||
export function addMedication(data) {
|
||||
return request({
|
||||
url: '/datadictionary/medication/information',
|
||||
url: '/data-dictionary/medication/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -30,7 +30,7 @@ export function addMedication(data) {
|
||||
// 修改药品目录
|
||||
export function editMedication(data) {
|
||||
return request({
|
||||
url: '/datadictionary/medication/information',
|
||||
url: '/data-dictionary/medication/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
@@ -47,7 +47,7 @@ export function delUser(userId) {
|
||||
// 药品目录分类查询
|
||||
export function getMedicationCategory() {
|
||||
return request({
|
||||
url: '/datadictionary/medication/information-init',
|
||||
url: '/data-dictionary/medication/information-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -57,7 +57,7 @@ export function getMedicationCategory() {
|
||||
export function stopMedication(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/datadictionary/medication/information-stop',
|
||||
url: '/data-dictionary/medication/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
@@ -67,7 +67,7 @@ export function stopMedication(ids) {
|
||||
export function startMedication(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/datadictionary/medication/information-start',
|
||||
url: '/data-dictionary/medication/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
@input="generateCodes"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -55,7 +54,6 @@
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
@input="generateCodes"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -650,7 +648,6 @@
|
||||
// getDiseaseCategory,
|
||||
// getDiseaseOne,
|
||||
// } from "./components/medicine";
|
||||
import pinyin from "pinyin"; // 需要安装 pinyin 库
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
@@ -700,14 +697,6 @@ const data = reactive({
|
||||
},
|
||||
});
|
||||
|
||||
// 生成拼音码和五笔码
|
||||
const generateCodes = () => {
|
||||
form.value.pyStr = pinyin(form.value.name, {
|
||||
style: pinyin.STYLE_FIRST_LETTER,
|
||||
}).join(""); // 生成拼音首字母
|
||||
console.log(form.value.pyStr, "form.pyStr", form.value.name);
|
||||
// form.wbStr = wubi(form.name).join(''); // 如果有五笔库,可以生成五笔码
|
||||
};
|
||||
const { queryParams, form, antibioticForm, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,73 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询服务管理列表
|
||||
export function getPurchaseinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询服务管理详细
|
||||
export function getPurchaseinventoryOne(id) {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service-detail/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增服务管理
|
||||
export function addPurchaseinventory(data) {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改服务管理
|
||||
export function editPurchaseinventory(data) {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询厂商类型
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/cabinet-location/cabinet-location',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 删除收费挂号项目
|
||||
export function delPurchaseinventory(param) {
|
||||
console.log(param,'aaaa')
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service',
|
||||
method: 'delete',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,683 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="单据号" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="审批状态:"
|
||||
prop="statusEnum"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in appointmentRequiredFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-input
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder="回车查询"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门:" prop="categoryEnum">
|
||||
<el-select
|
||||
v-model="queryParams.categoryEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in activeFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门经手人:" prop="applicantId" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.applicantId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in activeFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="查询时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddInventoryReceiptDialog"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加记录</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['monitor:job:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="getList"
|
||||
v-hasPermi="['system:user:import']"
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
v-hasPermi="['system:user:export']"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="单据号" align="center" key="busNo" prop="busNo" />
|
||||
<el-table-column
|
||||
label="审批状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplierId"
|
||||
prop="supplierId"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="部门"
|
||||
align="center"
|
||||
key="purposeLocationId"
|
||||
prop="purposeLocationId"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="部门经手人"
|
||||
align="center"
|
||||
key="approverId"
|
||||
prop="approverId"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单人"
|
||||
align="center"
|
||||
key="applicantId"
|
||||
prop="applicantId"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId"
|
||||
prop="approverId"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="applyTime"
|
||||
prop="applyTime"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核日期 "
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="140"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<inventory-receipt-dialog
|
||||
ref="inventoryReceiptRef"
|
||||
:item="currentData"
|
||||
:domainEnum="domainEnumOptions"
|
||||
:status="statusFlagOptions"
|
||||
@submit="submitForm"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Purchaseinventory">
|
||||
import {
|
||||
getPurchaseinventoryList,
|
||||
editPurchaseinventory,
|
||||
addPurchaseinventory,
|
||||
getPurchaseinventoryOne,
|
||||
getInit,
|
||||
deptTreeSelect,
|
||||
locationTreeSelect,
|
||||
delPurchaseinventory,
|
||||
} from "./components/purchaseinventory";
|
||||
|
||||
import inventoryReceiptDialog from "./components/inventoryReceiptDialog";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const {
|
||||
adm_location,
|
||||
category_code,
|
||||
service_type_code,
|
||||
specialty_code,
|
||||
med_chrgitm_type,
|
||||
financial_type_code,
|
||||
} = proxy.useDict(
|
||||
"adm_location",
|
||||
"category_code",
|
||||
"service_type_code",
|
||||
"specialty_code",
|
||||
"med_chrgitm_type",
|
||||
"financial_type_code"
|
||||
);
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const activeFlagOptions = ref(undefined);
|
||||
const appointmentRequiredFlagOptions = ref(undefined);
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
const dateRange = ref([]);
|
||||
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
busNo: undefined, // 编码
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||
},
|
||||
rules: {
|
||||
offeredOrgId: [
|
||||
{ required: true, message: "提供部门不能为空", trigger: "blur" },
|
||||
],
|
||||
categoryCode: [
|
||||
{ required: true, message: "服务分类不能为空", trigger: "blur" },
|
||||
],
|
||||
fwTypeCode: [
|
||||
{ required: true, message: "服务类型不能为空", trigger: "blur" },
|
||||
],
|
||||
specialtyCode: [
|
||||
{ required: true, message: "服务专业不能为空", trigger: "blur" },
|
||||
],
|
||||
locationId: [{ required: true, message: "地点不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "服务名称不能为空", trigger: "blur" }],
|
||||
contact: [
|
||||
{ required: true, message: "联系人电话不能为空", trigger: "blur" },
|
||||
],
|
||||
appointmentRequiredFlag: [
|
||||
{ required: true, message: "预约要求不能为空", trigger: "blur" },
|
||||
],
|
||||
activeFlag: [
|
||||
{ required: true, message: "活动标识不能为空", trigger: "blur" },
|
||||
],
|
||||
chargeName: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
description: [{ required: true, message: "描述不能为空", trigger: "blur" }],
|
||||
cwTypeCode: [
|
||||
{ required: true, message: "财务类别不能为空", trigger: "blur" },
|
||||
],
|
||||
ybType: [{ required: true, message: "医保类别不能为空", trigger: "blur" }],
|
||||
price: [{ required: true, message: "基础价格不能为空", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 挂号收费查询下拉树结构 */
|
||||
function getPurchaseinventoryTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log(response, "response");
|
||||
activeFlagOptions.value = response.data.activeFlagOptions; // 活动标记
|
||||
appointmentRequiredFlagOptions.value =
|
||||
response.data.appointmentRequiredFlagOptions; // 预约必填标记
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
locationOptions.value = response.data.records;
|
||||
console.log(locationOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询挂号收费项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// // queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
// console.log(queryParams.value, "queryParams.value");
|
||||
// getPurchaseinventoryList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
// console.log(res, "res");
|
||||
// purchaseinventoryList.value = res.data.records;
|
||||
// total.value = res.data.total;
|
||||
// console.log(total.value, "total.value");
|
||||
// });
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.applyTimeStart = dateRange.value[0];
|
||||
queryParams.value.applyTimeEnd = dateRange.value[1];
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddInventoryReceiptDialog() {
|
||||
proxy.$refs["inventoryReceiptRef"].show();
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
categoryCode: undefined,
|
||||
cwTypeCode: undefined,
|
||||
fwTypeCode: undefined,
|
||||
specialtyCode: undefined,
|
||||
locationId: undefined,
|
||||
offeredOrgId: undefined,
|
||||
activeFlag: undefined,
|
||||
extraDetails: undefined,
|
||||
contact: undefined,
|
||||
appointmentRequiredFlag: undefined,
|
||||
chargeName: undefined,
|
||||
price: undefined,
|
||||
description: undefined,
|
||||
ybType: undefined,
|
||||
title: undefined,
|
||||
comment: undefined,
|
||||
};
|
||||
proxy.resetForm("purchaseinventoryRef");
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "新增";
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
form.value.fwTypeCode = form.value.typeCode;
|
||||
open.value = true;
|
||||
title.value = "编辑";
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
if (form.value.id != undefined) {
|
||||
// 移除规则
|
||||
rules.value.chargeName = [];
|
||||
rules.value.description = [];
|
||||
rules.value.cwTypeCode = [];
|
||||
rules.value.ybType = [];
|
||||
rules.value.price = [];
|
||||
} else {
|
||||
// 恢复规则
|
||||
rules.value.cwTypeCode = [
|
||||
{ required: true, message: "财务类别不能为空", trigger: "blur" },
|
||||
];
|
||||
rules.value.ybType = [
|
||||
{ required: true, message: "医保类别不能为空", trigger: "blur" },
|
||||
];
|
||||
rules.value.price = [
|
||||
{ required: true, message: "基础价格不能为空", trigger: "blur" },
|
||||
];
|
||||
|
||||
rules.value.chargeName = [
|
||||
{ required: true, message: "名称不能为空", trigger: "blur" },
|
||||
];
|
||||
rules.value.description = [
|
||||
{ required: true, message: "描述不能为空", trigger: "blur" },
|
||||
];
|
||||
}
|
||||
|
||||
// const nameData = name || chargeName;
|
||||
// 服务名称
|
||||
form.value.name = getName();
|
||||
// 收费名称
|
||||
form.value.chargeName = getName();
|
||||
proxy.$refs["purchaseinventoryRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
// 调用转换函数
|
||||
const transformFormEditParam = transformFormEditData(form);
|
||||
console.log(transformFormEditData, "transformFormEditData");
|
||||
console.log(form.value, "editPurchaseinventory", form.value.statusEnum);
|
||||
editPurchaseinventory(transformFormEditParam).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
reset();
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
// 调用转换函数
|
||||
const transformedData = transformFormData(form);
|
||||
console.log(transformedData, "transformedData");
|
||||
addPurchaseinventory(transformedData).then((response) => {
|
||||
reset();
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取完整地址字符串
|
||||
function getName() {
|
||||
console.log(service_type_code.value, "service_type_code.value");
|
||||
// 服务类型
|
||||
const serviceTypeText = proxy.selectDictLabel(
|
||||
service_type_code.value,
|
||||
form.value.fwTypeCode
|
||||
);
|
||||
// 服务分类
|
||||
const categoryCodeText = proxy.selectDictLabel(
|
||||
category_code.value,
|
||||
form.value.categoryCode
|
||||
);
|
||||
// 服务专业
|
||||
const specialtyCodeText = proxy.selectDictLabel(
|
||||
specialty_code.value,
|
||||
form.value.specialtyCode
|
||||
);
|
||||
console.log(
|
||||
serviceTypeText,
|
||||
"serviceTypeText",
|
||||
categoryCodeText,
|
||||
specialtyCodeText
|
||||
);
|
||||
const nameParts = [
|
||||
serviceTypeText,
|
||||
form.value.addressCity,
|
||||
categoryCodeText,
|
||||
specialtyCodeText,
|
||||
];
|
||||
|
||||
// 使用 reduce 方法拼接地址,非空字段之间用 '-' 连接
|
||||
return nameParts.reduce((acc, part) => {
|
||||
if (part) {
|
||||
if (acc) {
|
||||
acc += " - "; // 在非空字段之间添加 '-'
|
||||
}
|
||||
acc += part;
|
||||
}
|
||||
return acc;
|
||||
}, "");
|
||||
}
|
||||
/** 详细按钮操作 */
|
||||
function handleView(row) {
|
||||
reset();
|
||||
title.value = "查看";
|
||||
open.value = true;
|
||||
getPurchaseinventoryOne(row.id).then((response) => {
|
||||
console.log(response, "responsebbbb", row.id);
|
||||
form.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const delId = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认删除以上数据?")
|
||||
.then(function () {
|
||||
return delPurchaseinventory({ ids: delId.join(",") });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
// 转换insert参数函数
|
||||
const transformFormData = (form) => {
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
categoryCode,
|
||||
// typeCode,
|
||||
cwTypeCode,
|
||||
fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
offeredOrgId,
|
||||
activeFlag,
|
||||
extraDetails,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
chargeName,
|
||||
price,
|
||||
description,
|
||||
ybType,
|
||||
title,
|
||||
comment,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
healthcareServiceFormData: {
|
||||
id,
|
||||
activeFlag,
|
||||
offeredOrgId,
|
||||
categoryCode,
|
||||
typeCode: fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
name,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
},
|
||||
chargeItemDefinitionFormData: {
|
||||
id,
|
||||
chargeName,
|
||||
title,
|
||||
orgId: offeredOrgId,
|
||||
description,
|
||||
typeCode: cwTypeCode,
|
||||
ybType,
|
||||
price,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
// 转换insert参数函数
|
||||
const transformFormEditData = (form) => {
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
categoryCode,
|
||||
// typeCode,
|
||||
cwTypeCode,
|
||||
fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
offeredOrgId,
|
||||
activeFlag,
|
||||
extraDetails,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
chargeName,
|
||||
price,
|
||||
description,
|
||||
ybType,
|
||||
title,
|
||||
comment,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
healthcareServiceFormData: {
|
||||
id,
|
||||
activeFlag,
|
||||
offeredOrgId,
|
||||
categoryCode,
|
||||
typeCode: fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
name,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
},
|
||||
};
|
||||
};
|
||||
getPurchaseinventoryTypeList();
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user