后端最新版本同步
This commit is contained in:
@@ -67,7 +67,7 @@ public class ChargeItem extends HisBaseEntity {
|
||||
private Long costOrgId;
|
||||
|
||||
/** 数量 */
|
||||
private Integer quantityValue;
|
||||
private BigDecimal quantityValue;
|
||||
|
||||
/** 单位 */
|
||||
private String quantityUnit;
|
||||
|
||||
@@ -44,5 +44,5 @@ public class EncounterParticipant extends HisBaseEntity {
|
||||
private Long practitionerId;
|
||||
|
||||
/** 状态 */
|
||||
private Long statusEnum;
|
||||
private Integer statusEnum;
|
||||
}
|
||||
@@ -100,4 +100,7 @@ public class Practitioner extends HisBaseEntity {
|
||||
|
||||
/** 开票点编码 */
|
||||
private String kpdCode;
|
||||
|
||||
/** 签名图片 */
|
||||
private String signature;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.openhis.administration.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -65,8 +69,46 @@ public class ChargeItemBaseInfoDto extends ChargeItem {
|
||||
/** 开单科室医保码 */
|
||||
private String doctYbNo;
|
||||
|
||||
/** 自费还是医保收费 */
|
||||
/** 自费还是医保收费 */
|
||||
private String contractNo;
|
||||
|
||||
/** 名称 */
|
||||
private String chargeName;
|
||||
|
||||
/** 标题 */
|
||||
private String title;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 机构ID */
|
||||
private Long orgId;
|
||||
|
||||
/** 描述 */
|
||||
private String description;
|
||||
|
||||
/** 代码 */
|
||||
private String instanceTable;
|
||||
|
||||
/** 关联项目 */
|
||||
private Long instanceId;
|
||||
|
||||
/** 有效时间开始 */
|
||||
private Date effectiveStart;
|
||||
|
||||
/** 有效时间结束 */
|
||||
private Date effectiveEnd;
|
||||
|
||||
/** 财务类别 */
|
||||
private String typeCode;
|
||||
|
||||
/** 医保类别 */
|
||||
private String ybType;
|
||||
|
||||
/** 是否使用详细价格规则 */
|
||||
private Integer conditionFlag;
|
||||
|
||||
/** 基础价格 */
|
||||
private BigDecimal price;
|
||||
|
||||
}
|
||||
|
||||
@@ -54,9 +54,9 @@ public interface IChargeItemService extends IService<ChargeItem> {
|
||||
void updateRefundChargeStatus(List<Long> chargeItemIdList);
|
||||
|
||||
/**
|
||||
* 根据集合更改收费状态
|
||||
* 更新收费状态
|
||||
*
|
||||
* @param chargeItemIdList 实体集合
|
||||
* @param chargeItemIdList 收费项目id集合
|
||||
* @param value 状态值
|
||||
*/
|
||||
void updatePaymentStatus(List<Long> chargeItemIdList, Integer value);
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.EncounterLocation;
|
||||
import com.openhis.common.enums.EncounterLocationStatus;
|
||||
import com.openhis.common.enums.EncounterActivityStatus;
|
||||
import com.openhis.common.enums.LocationForm;
|
||||
|
||||
/**
|
||||
@@ -70,11 +70,11 @@ public interface IEncounterLocationService extends IService<EncounterLocation> {
|
||||
* 根据就诊id查询就诊位置信息(某个类型)(某个状态)
|
||||
*
|
||||
* @param locationForm 类型
|
||||
* @param encounterLocationStatus 状态
|
||||
* @param encounterActivityStatus 状态
|
||||
* @param encounterId 就诊id
|
||||
* @return 就诊位置集合
|
||||
*/
|
||||
List<EncounterLocation> getEncounterLocationList(Long encounterId, LocationForm locationForm,
|
||||
EncounterLocationStatus encounterLocationStatus);
|
||||
EncounterActivityStatus encounterActivityStatus);
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
import com.openhis.administration.dto.ChargeItemBaseInfoDto;
|
||||
import com.openhis.administration.dto.ChargeItemDefInfo;
|
||||
@@ -96,9 +97,16 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
new LambdaUpdateWrapper<ChargeItem>().in(ChargeItem::getId, chargeItemIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新收费状态
|
||||
*
|
||||
* @param chargeItemIdList 收费项目id集合
|
||||
* @param value 状态值
|
||||
*/
|
||||
@Override
|
||||
public void updatePaymentStatus(List<Long> chargeItemIdList, Integer value) {
|
||||
baseMapper.update(new ChargeItem().setStatusEnum(value),
|
||||
baseMapper.update(
|
||||
new ChargeItem().setStatusEnum(value).setPerformerId(SecurityUtils.getLoginUser().getPractitionerId()),
|
||||
new LambdaUpdateWrapper<ChargeItem>().in(ChargeItem::getId, chargeItemIdList));
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.openhis.administration.domain.EncounterLocation;
|
||||
import com.openhis.administration.mapper.EncounterLocationMapper;
|
||||
import com.openhis.administration.service.IEncounterLocationService;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.common.enums.EncounterLocationStatus;
|
||||
import com.openhis.common.enums.EncounterActivityStatus;
|
||||
import com.openhis.common.enums.LocationForm;
|
||||
|
||||
/**
|
||||
@@ -48,7 +48,7 @@ public class EncounterLocationServiceImpl extends ServiceImpl<EncounterLocationM
|
||||
queryWrapper.eq(EncounterLocation::getEncounterId, encounterLocation.getEncounterId())
|
||||
.eq(EncounterLocation::getFormEnum, encounterLocation.getFormEnum())
|
||||
// 状态为使用中
|
||||
.eq(EncounterLocation::getStatusEnum, EncounterLocationStatus.ACTIVE.getValue());
|
||||
.eq(EncounterLocation::getStatusEnum, EncounterActivityStatus.ACTIVE.getValue());
|
||||
|
||||
// 查询是否存在记录
|
||||
EncounterLocation existingRecord = baseMapper.selectOne(queryWrapper);
|
||||
@@ -86,7 +86,7 @@ public class EncounterLocationServiceImpl extends ServiceImpl<EncounterLocationM
|
||||
@Override
|
||||
public List<EncounterLocation> getEncounterLocationInfo(Long encounterId, Long locationId) {
|
||||
LambdaQueryWrapper<EncounterLocation> queryWrapper = new LambdaQueryWrapper<EncounterLocation>()
|
||||
.eq(EncounterLocation::getStatusEnum, EncounterLocationStatus.ACTIVE.getValue())
|
||||
.eq(EncounterLocation::getStatusEnum, EncounterActivityStatus.ACTIVE.getValue())
|
||||
.eq(EncounterLocation::getDeleteFlag, DelFlag.NO.getCode());
|
||||
if (locationId != null) {
|
||||
queryWrapper.eq(EncounterLocation::getLocationId, locationId).eq(EncounterLocation::getFormEnum,
|
||||
@@ -118,7 +118,7 @@ public class EncounterLocationServiceImpl extends ServiceImpl<EncounterLocationM
|
||||
// 更新状态为已完成
|
||||
return baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<EncounterLocation>()
|
||||
.set(EncounterLocation::getStatusEnum, EncounterLocationStatus.COMPLETED.getValue())
|
||||
.set(EncounterLocation::getStatusEnum, EncounterActivityStatus.COMPLETED.getValue())
|
||||
.eq(EncounterLocation::getEncounterId, encounterId).in(EncounterLocation::getFormEnum, locationForms));
|
||||
}
|
||||
|
||||
@@ -138,13 +138,13 @@ public class EncounterLocationServiceImpl extends ServiceImpl<EncounterLocationM
|
||||
* 根据就诊id查询就诊位置信息(某个类型)(某个状态)
|
||||
*
|
||||
* @param locationForm 类型
|
||||
* @param encounterLocationStatus 状态
|
||||
* @param encounterActivityStatus 状态
|
||||
* @param encounterId 就诊id
|
||||
* @return 就诊位置集合
|
||||
*/
|
||||
@Override
|
||||
public List<EncounterLocation> getEncounterLocationList(Long encounterId, LocationForm locationForm,
|
||||
EncounterLocationStatus encounterLocationStatus) {
|
||||
EncounterActivityStatus encounterActivityStatus) {
|
||||
LambdaQueryWrapper<EncounterLocation> queryWrapper =
|
||||
new LambdaQueryWrapper<EncounterLocation>().eq(EncounterLocation::getEncounterId, encounterId)
|
||||
.eq(EncounterLocation::getDeleteFlag, DelFlag.NO.getCode());
|
||||
@@ -153,8 +153,8 @@ public class EncounterLocationServiceImpl extends ServiceImpl<EncounterLocationM
|
||||
queryWrapper.eq(EncounterLocation::getFormEnum, locationForm.getCode());
|
||||
}
|
||||
|
||||
if (encounterLocationStatus != null) {
|
||||
queryWrapper.eq(EncounterLocation::getStatusEnum, encounterLocationStatus.getCode());
|
||||
if (encounterActivityStatus != null) {
|
||||
queryWrapper.eq(EncounterLocation::getStatusEnum, encounterActivityStatus.getCode());
|
||||
}
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.openhis.administration.domain.EncounterParticipant;
|
||||
import com.openhis.administration.mapper.EncounterParticipantMapper;
|
||||
import com.openhis.administration.service.IEncounterParticipantService;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.common.enums.EncounterLocationStatus;
|
||||
import com.openhis.common.enums.EncounterActivityStatus;
|
||||
import com.openhis.common.enums.ParticipantType;
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ public class EncounterParticipantServiceImpl extends ServiceImpl<EncounterPartic
|
||||
// 更新状态为已完成
|
||||
return baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<EncounterParticipant>()
|
||||
.set(EncounterParticipant::getStatusEnum, EncounterLocationStatus.COMPLETED.getValue())
|
||||
.set(EncounterParticipant::getStatusEnum, EncounterActivityStatus.COMPLETED.getValue())
|
||||
.eq(EncounterParticipant::getEncounterId, encounterId).in(EncounterParticipant::getTypeCode,
|
||||
ParticipantType.ATTENDING_DOCTOR.getCode(), ParticipantType.CHIEF_DOCTOR.getCode(),
|
||||
ParticipantType.PRIMARY_NURSE.getCode(), ParticipantType.ADMITTING_DOCTOR.getCode()));
|
||||
@@ -79,7 +79,7 @@ public class EncounterParticipantServiceImpl extends ServiceImpl<EncounterPartic
|
||||
public List<EncounterParticipant> getEncounterParticipantList(Long encounterId) {
|
||||
return baseMapper.selectList(
|
||||
new LambdaQueryWrapper<EncounterParticipant>().eq(EncounterParticipant::getEncounterId, encounterId)
|
||||
.eq(EncounterParticipant::getStatusEnum, EncounterLocationStatus.ACTIVE.getValue())
|
||||
.eq(EncounterParticipant::getStatusEnum, EncounterActivityStatus.ACTIVE.getValue())
|
||||
.eq(EncounterParticipant::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ public class PatientServiceImpl extends ServiceImpl<PatientMapper, Patient> impl
|
||||
// 设置五笔首拼
|
||||
patient.setWbStr(ChineseConvertUtils.toWBFirstLetter(patient.getName()));
|
||||
// 不存在重复的证件号,新增患者
|
||||
if (idCardExists(patient) == null) {
|
||||
if (patient.getIdCard() == null || patient.getIdCard().isEmpty() ||idCardExists(patient) == null) {
|
||||
// 添加患者
|
||||
return baseMapper.insert(patient) > 0;
|
||||
}
|
||||
|
||||
@@ -62,4 +62,9 @@ public class ReservationRecord extends HisBaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 牙位
|
||||
*/
|
||||
private String toothPosition;
|
||||
|
||||
}
|
||||
@@ -31,19 +31,15 @@ public class DocStatistics extends HisBaseEntity {
|
||||
/**
|
||||
* 记录科室ID
|
||||
*/
|
||||
private Long orgnizationId;
|
||||
private Long organizationId;
|
||||
/**
|
||||
* 统计值
|
||||
*/
|
||||
private String value;
|
||||
/**
|
||||
* 记录日期 yyyy-MM-dd
|
||||
*/
|
||||
private Date recordingDate;
|
||||
/**
|
||||
* 记录时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private Date recordingTime;
|
||||
private Date recordTime;
|
||||
/**
|
||||
* 记录来源
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.openhis.document.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
package com.openhis.financial.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.financial.model.PaymentReconciliationAccountDel;
|
||||
|
||||
/**
|
||||
* 付款管理Mapper接口
|
||||
@@ -14,4 +18,19 @@ import com.openhis.financial.domain.PaymentReconciliation;
|
||||
@Repository
|
||||
public interface PaymentReconciliationMapper extends BaseMapper<PaymentReconciliation> {
|
||||
|
||||
/**
|
||||
* 查询实体集合
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param entererId 款员id
|
||||
* @param contractNo 合同编号
|
||||
* @param success 状态
|
||||
* @param returnAll 状态
|
||||
* @param clinic 类型
|
||||
* @return 集合
|
||||
*/
|
||||
List<PaymentReconciliationAccountDel> getPaymentAccountContract(@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime, @Param("entererId") Long entererId, @Param("contractNo") String contractNo,
|
||||
@Param("success") Integer success, @Param("returnAll") Integer returnAll, @Param("clinic") Integer clinic);
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.openhis.financial.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 付款管理Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PaymentReconciliationAccountDel extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 关联ID */
|
||||
private Long relationId;
|
||||
|
||||
/** 支付的业务标识符 */
|
||||
private String paymentNo;
|
||||
|
||||
/** 付款类别 */
|
||||
private Integer paymentEnum;
|
||||
|
||||
/** 付款实体ID */
|
||||
private Long paymentReconciliationId;
|
||||
|
||||
/** 发起支付的工作流程类别 */
|
||||
private Integer kindEnum;
|
||||
|
||||
/** 收款员 */
|
||||
private Long entererId;
|
||||
|
||||
/** 支付发起人类型 */
|
||||
private Integer issuerEnum;
|
||||
|
||||
/** 支付的患者ID */
|
||||
private Long patientId;
|
||||
|
||||
/** 请求支付责任人ID */
|
||||
private Long practitionerId;
|
||||
|
||||
/** 付款结果 */
|
||||
private Integer outcomeEnum;
|
||||
|
||||
/** 支付位置 */
|
||||
private Long locationId;
|
||||
|
||||
/** 到期时间 */
|
||||
private Date expirationDate;
|
||||
|
||||
/** 应收金额 */
|
||||
private BigDecimal tenderedAmount;
|
||||
|
||||
/** 找零金额 */
|
||||
private BigDecimal returnedAmount;
|
||||
|
||||
/** 付款总额 */
|
||||
private BigDecimal displayAmount;
|
||||
|
||||
/** 打印标识 */
|
||||
private Integer printCount;
|
||||
|
||||
/** 合同编码 */
|
||||
private String contractNo;// 2025/05/08李:自付和医保同时付费时只生成一条payment,故此该字段在insert时先为null
|
||||
|
||||
/** 处方号集合 */
|
||||
private String chargeItemIds;
|
||||
|
||||
/** 就诊ID */
|
||||
private Long encounterId;
|
||||
|
||||
/** 结算时间 */
|
||||
private Date billDate;
|
||||
|
||||
/** 发票编号 */
|
||||
private Long invoiceId;
|
||||
|
||||
/** 关联账户Id */
|
||||
private Long accountId;// 2025/05/08李:自付和医保同时付费时只生成一条payment,故此该字段在insert时先为null
|
||||
|
||||
/** 医保结算id */
|
||||
private String ybSettleIds;// 记录医保结算id
|
||||
|
||||
/** 医保清算标志 */
|
||||
private Integer ybClearFlag;// 默认值0 未清算
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
private String accountContractNo;
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.openhis.common.enums.PaymentStatus;
|
||||
import com.openhis.common.enums.ybenums.YbMdtrtCertType;
|
||||
import com.openhis.financial.domain.Contract;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.financial.model.PaymentReconciliationAccountDel;
|
||||
import com.openhis.financial.model.PaymentResult;
|
||||
import com.openhis.financial.model.PaymentedItemModel;
|
||||
import com.openhis.financial.model.PrePaymentResult;
|
||||
@@ -77,7 +78,8 @@ public interface IPaymentReconciliationService extends IService<PaymentReconcili
|
||||
* @param success 付款状态
|
||||
* @param settleId 医保结算id
|
||||
*/
|
||||
void updatePaymentStatusAndSettleIdsById(Long id, PaymentStatus success, List<String> settleId);
|
||||
void updatePaymentStatusAndSettleIdsById(Long id, PaymentStatus success, Integer outcomeEnum,
|
||||
List<String> settleId);
|
||||
|
||||
/**
|
||||
* 【住院结算】
|
||||
@@ -95,4 +97,28 @@ public interface IPaymentReconciliationService extends IService<PaymentReconcili
|
||||
* @return 付款实体
|
||||
*/
|
||||
PaymentReconciliation getByEncounterId(Long encounterId, PaymentKind kindEnum);
|
||||
|
||||
/**
|
||||
* 判断是否已退费
|
||||
*
|
||||
* @param paymentId 原单id
|
||||
* @return 结果
|
||||
*/
|
||||
boolean isReturn(Long paymentId);
|
||||
|
||||
/**
|
||||
* 查询实体集合
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param entererId 款员id
|
||||
* @param contractNo 合同编号
|
||||
* @param success 状态
|
||||
* @param returnAll 状态
|
||||
* @param clinic 类型
|
||||
* @return 集合
|
||||
*/
|
||||
List<PaymentReconciliationAccountDel> getPaymentAccountContract(String startTime, String endTime, Long entererId,
|
||||
String contractNo, Integer success, Integer returnAll, Integer clinic);
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.openhis.common.enums.ybenums.YbMedType;
|
||||
import com.openhis.financial.domain.Contract;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.financial.mapper.PaymentReconciliationMapper;
|
||||
import com.openhis.financial.model.PaymentReconciliationAccountDel;
|
||||
import com.openhis.financial.model.PaymentResult;
|
||||
import com.openhis.financial.model.PaymentedItemModel;
|
||||
import com.openhis.financial.model.PrePaymentResult;
|
||||
@@ -243,14 +244,16 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
* @param settleId 医保结算id
|
||||
*/
|
||||
@Override
|
||||
public void updatePaymentStatusAndSettleIdsById(Long id, PaymentStatus success, List<String> settleId) {
|
||||
if (settleId.isEmpty()) {
|
||||
baseMapper.update(new PaymentReconciliation().setStatusEnum(success.getValue()),
|
||||
public void updatePaymentStatusAndSettleIdsById(Long id, PaymentStatus success, Integer paymentOutcome,
|
||||
List<String> settleId) {
|
||||
if (settleId == null || settleId.isEmpty()) {
|
||||
baseMapper.update(
|
||||
new PaymentReconciliation().setStatusEnum(success.getValue()).setOutcomeEnum(paymentOutcome),
|
||||
new LambdaQueryWrapper<PaymentReconciliation>().eq(PaymentReconciliation::getId, id));
|
||||
} else {
|
||||
baseMapper.update(
|
||||
new PaymentReconciliation().setStatusEnum(success.getValue())
|
||||
.setYbSettleIds(String.join(",", settleId)),
|
||||
new PaymentReconciliation().setStatusEnum(success.getValue()).setYbSettleIds(String.join(",", settleId))
|
||||
.setOutcomeEnum(paymentOutcome),
|
||||
new LambdaQueryWrapper<PaymentReconciliation>().eq(PaymentReconciliation::getId, id));
|
||||
}
|
||||
}
|
||||
@@ -268,4 +271,42 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
.eq(PaymentReconciliation::getKindEnum, PaymentKind.HOSPITAL_DEPOSIT.getValue())
|
||||
.eq(PaymentReconciliation::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否已退费
|
||||
*
|
||||
* @param paymentId 原单id
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean isReturn(Long paymentId) {
|
||||
List<PaymentReconciliation> paymentReconciliations = baseMapper.selectList(
|
||||
new LambdaQueryWrapper<PaymentReconciliation>().eq(PaymentReconciliation::getRelationId, paymentId)
|
||||
.in(PaymentReconciliation::getStatusEnum, PaymentStatus.REFUNDING.getValue(),
|
||||
PaymentStatus.REFUND_ALL.getValue(), PaymentStatus.REFUND_PART.getValue())
|
||||
.eq(PaymentReconciliation::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
if (paymentReconciliations != null && paymentReconciliations.size() > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询实体集合
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @param entererId 款员id
|
||||
* @param contractNo 合同编号
|
||||
* @param success 状态
|
||||
* @param returnAll 状态
|
||||
* @param clinic 类型
|
||||
* @return 集合
|
||||
*/
|
||||
@Override
|
||||
public List<PaymentReconciliationAccountDel> getPaymentAccountContract(String startTime, String endTime,
|
||||
Long entererId, String contractNo, Integer success, Integer returnAll, Integer clinic) {
|
||||
return baseMapper.getPaymentAccountContract(startTime, endTime, entererId, contractNo, success, returnAll,
|
||||
clinic);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.openhis.jlau.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 农大审方记录Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("nd_review_prescription_records")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ReviewPrescriptionRecords extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 处方号
|
||||
*/
|
||||
private String prescriptionNo;
|
||||
|
||||
/**
|
||||
* 就诊id
|
||||
*/
|
||||
private Long encounterId;
|
||||
|
||||
/**
|
||||
* 药品请求ids
|
||||
*/
|
||||
private String medRequestIds;
|
||||
|
||||
/**
|
||||
* 通过标识
|
||||
*/
|
||||
private Integer passFlag;
|
||||
|
||||
/**
|
||||
* 原因
|
||||
*/
|
||||
private String reasonText;
|
||||
|
||||
/**
|
||||
* 审方人id
|
||||
*/
|
||||
private Long practitionerId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.openhis.jlau.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.jlau.domain.ReviewPrescriptionRecords;
|
||||
|
||||
/**
|
||||
* 农大审方记录Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface ReviewPrescriptionRecordsMapper extends BaseMapper<ReviewPrescriptionRecords> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.jlau.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.jlau.domain.ReviewPrescriptionRecords;
|
||||
|
||||
/**
|
||||
* 农大审方记录Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IReviewPrescriptionRecordsService extends IService<ReviewPrescriptionRecords> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.openhis.jlau.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.jlau.domain.ReviewPrescriptionRecords;
|
||||
import com.openhis.jlau.mapper.ReviewPrescriptionRecordsMapper;
|
||||
import com.openhis.jlau.service.IReviewPrescriptionRecordsService;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 农大审方记录Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ReviewPrescriptionRecordsServiceImpl
|
||||
extends ServiceImpl<ReviewPrescriptionRecordsMapper, ReviewPrescriptionRecords>
|
||||
implements IReviewPrescriptionRecordsService {
|
||||
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public class MedicationDispense extends HisBaseEntity {
|
||||
private String partTypeCode;
|
||||
|
||||
/** 已发药数量 */
|
||||
private Integer dispenseQuantity;
|
||||
private BigDecimal dispenseQuantity;
|
||||
|
||||
/** 发药频次 */
|
||||
private String dispenseFrequencyCode;
|
||||
@@ -113,7 +113,7 @@ public class MedicationDispense extends HisBaseEntity {
|
||||
private BigDecimal maxUnit;
|
||||
|
||||
/** 发放数量 */
|
||||
private Integer quantity;
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 发放单位 */
|
||||
private String unitCode;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class MedicationRequest extends HisBaseEntity {
|
||||
private Long packageId;
|
||||
|
||||
/** 请求数量 */
|
||||
private Integer quantity;
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 执行次数 */
|
||||
private Integer executeNum;
|
||||
@@ -206,7 +206,7 @@ public class MedicationRequest extends HisBaseEntity {
|
||||
/**
|
||||
* 中药付数
|
||||
*/
|
||||
private Integer chineseHerbsDoseQuantity;
|
||||
private BigDecimal chineseHerbsDoseQuantity;
|
||||
|
||||
/**
|
||||
* 代煎标识 | 0:否 , 1:是
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.medication.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.util.Date;
|
||||
@@ -75,7 +76,7 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
// 药品请求id
|
||||
medicationDispense.setMedReqId(medicationRequest.getId());
|
||||
// 已发药数量
|
||||
medicationDispense.setDispenseQuantity(0);
|
||||
medicationDispense.setDispenseQuantity(BigDecimal.ZERO);
|
||||
// 用法
|
||||
medicationDispense.setMethodCode(medicationRequest.getMethodCode());
|
||||
// 用药频次
|
||||
@@ -169,6 +170,7 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
.eq(MedicationDispense::getStatusEnum, DispenseStatus.REFUNDED.getValue()))
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过请求id获取药品发放信息
|
||||
*
|
||||
@@ -176,9 +178,10 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
* @return 发放信息
|
||||
*/
|
||||
@Override
|
||||
public List<MedicationDispense> selectByRequestIdList(List<Long> requestIdList){
|
||||
return baseMapper.selectList( new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getMedReqId, requestIdList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
public List<MedicationDispense> selectByRequestIdList(List<Long> requestIdList) {
|
||||
return baseMapper
|
||||
.selectList(new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getMedReqId, requestIdList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -188,8 +191,8 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
* @return 发放信息
|
||||
*/
|
||||
@Override
|
||||
public List<MedicationDispense> selectByIdList(@Param("idList") List<Long> idList){
|
||||
return baseMapper.selectList( new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getId, idList)
|
||||
public List<MedicationDispense> selectByIdList(@Param("idList") List<Long> idList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<MedicationDispense>().in(MedicationDispense::getId, idList)
|
||||
.eq(MedicationDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
@@ -199,7 +202,7 @@ public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispens
|
||||
* @param medDispenseId 发放id列表
|
||||
*/
|
||||
@Override
|
||||
public void updateDispenseStatusSummarized(List<Long> medDispenseId){
|
||||
public void updateDispenseStatusSummarized(List<Long> medDispenseId) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.set(MedicationDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue())
|
||||
|
||||
@@ -10,6 +10,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@TableName("tmp_activity_device")
|
||||
@Accessors(chain = true)
|
||||
@@ -38,11 +40,16 @@ public class ActivityDevice extends HisBaseEntity {
|
||||
private String devActTable;
|
||||
|
||||
/** 耗材数量 */
|
||||
private Integer quantity;
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unitCode;
|
||||
|
||||
public ActivityDevice() {
|
||||
this.statusEnum = PublicationStatus.ACTIVE.getValue();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.openhis.template.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@TableName("tmp_orders_group_package")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class OrdersGroupPackage extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 组套包类型
|
||||
*/
|
||||
private Integer packageTypeEnum;
|
||||
|
||||
/**
|
||||
* 科室id
|
||||
*/
|
||||
private Long organizationId;
|
||||
|
||||
/**
|
||||
* 参与者id
|
||||
*/
|
||||
private Long practitionerId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.openhis.template.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@TableName("tmp_orders_group_package_detail")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class OrdersGroupPackageDetail extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 组合套餐id
|
||||
*/
|
||||
private Long groupPackageId;
|
||||
|
||||
/**
|
||||
* 医嘱定义id
|
||||
*/
|
||||
private Long orderDefinitionId;
|
||||
|
||||
/**
|
||||
* 医嘱定义表名
|
||||
*/
|
||||
private String orderDefinitionTable;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal quantity;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unitCode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.template.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.template.domain.OrdersGroupPackageDetail;
|
||||
|
||||
/**
|
||||
* @author zwh
|
||||
* @date 2025-04-09
|
||||
*/
|
||||
@Repository
|
||||
public interface OrdersGroupPackageDetailMapper extends BaseMapper<OrdersGroupPackageDetail> {}
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.template.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.template.domain.OrdersGroupPackage;
|
||||
|
||||
/**
|
||||
* @author zwh
|
||||
* @date 2025-04-09
|
||||
*/
|
||||
@Repository
|
||||
public interface OrdersGroupPackageMapper extends BaseMapper<OrdersGroupPackage> {}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.openhis.template.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.template.domain.OrdersGroupPackageDetail;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yangmo
|
||||
* @date 2025-04-10
|
||||
*/
|
||||
public interface IOrdersGroupPackageDetailService extends IService<OrdersGroupPackageDetail> {}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.openhis.template.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.template.domain.OrdersGroupPackage;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yangmo
|
||||
* @date 2025-04-10
|
||||
*/
|
||||
public interface IOrdersGroupPackageService extends IService<OrdersGroupPackage> {}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.template.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.template.domain.OrdersGroupPackageDetail;
|
||||
import com.openhis.template.mapper.OrdersGroupPackageDetailMapper;
|
||||
import com.openhis.template.service.IOrdersGroupPackageDetailService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yangmo
|
||||
* @date 2025-04-10
|
||||
*/
|
||||
@Service
|
||||
public class OrdersGroupPackageDetailServiceImpl extends
|
||||
ServiceImpl<OrdersGroupPackageDetailMapper, OrdersGroupPackageDetail> implements IOrdersGroupPackageDetailService {}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.template.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.template.domain.OrdersGroupPackage;
|
||||
import com.openhis.template.mapper.OrdersGroupPackageMapper;
|
||||
import com.openhis.template.service.IOrdersGroupPackageService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yangmo
|
||||
* @date 2025-04-10
|
||||
*/
|
||||
@Service
|
||||
public class OrdersGroupPackageServiceImpl extends ServiceImpl<OrdersGroupPackageMapper, OrdersGroupPackage>
|
||||
implements IOrdersGroupPackageService {}
|
||||
@@ -8,6 +8,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@@ -48,7 +49,7 @@ public class DeviceDispense extends HisBaseEntity {
|
||||
private Integer dispenseCategoryEnum;
|
||||
|
||||
/** 发放数量 */
|
||||
private Integer quantity;
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 发放单位 */
|
||||
private String unitCode;
|
||||
@@ -78,11 +79,14 @@ public class DeviceDispense extends HisBaseEntity {
|
||||
private String partTypeCode;
|
||||
|
||||
/** 已发药数量 */
|
||||
private Integer dispenseQuantity;
|
||||
private BigDecimal dispenseQuantity;
|
||||
|
||||
/** 发药频次 */
|
||||
private String dispenseFrequencyCode;
|
||||
|
||||
/** 配药人 */
|
||||
private Long preparerId;
|
||||
|
||||
/** 配药时间 */
|
||||
private Date prepareTime;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class DeviceRequest extends HisBaseEntity {
|
||||
private String deviceTypeCode;
|
||||
|
||||
/** 请求数量 */
|
||||
private Integer quantity;
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 请求单位编码 */
|
||||
private String unitCode;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.workflow.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
@@ -64,7 +65,7 @@ public class ServiceRequest extends HisBaseEntity {
|
||||
private Long activityId;
|
||||
|
||||
/** 数量 */
|
||||
private Integer quantity;
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 单位 */
|
||||
private String unitCode;
|
||||
@@ -152,4 +153,14 @@ public class ServiceRequest extends HisBaseEntity {
|
||||
*/
|
||||
private String signCode;
|
||||
|
||||
/**
|
||||
* 用药频次
|
||||
*/
|
||||
private String rateCode;
|
||||
|
||||
/**
|
||||
* 父id | 适用诊疗套餐
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface ActivityDefinitionMapper extends BaseMapper<ActivityDefinition>
|
||||
* @param activityName 诊疗名称
|
||||
* @return 诊疗定义id
|
||||
*/
|
||||
Long getAppointActivityDefinitionId(@Param("skinTestInspection") String skinTestInspection,
|
||||
Long getAppointActivityDefinitionId(@Param("activityName") String activityName,
|
||||
@Param("status") Integer status);
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.workflow.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -61,7 +62,7 @@ public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
* @param quantity 发药数量
|
||||
*/
|
||||
DeviceDispense createCompletedDeviceDispense(DeviceDispense deviceDispense, Date now, Practitioner loginUser,
|
||||
String step, Integer quantity);
|
||||
String step, BigDecimal quantity);
|
||||
|
||||
/**
|
||||
* 器材发放状态:已发药
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.workflow.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.util.Date;
|
||||
@@ -76,7 +77,7 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
// 支持用药信息
|
||||
deviceDispense.setSupportInfo(deviceRequest.getSupportInfo());
|
||||
// 已发药数量
|
||||
deviceDispense.setDispenseQuantity(0);
|
||||
deviceDispense.setDispenseQuantity(BigDecimal.ZERO);
|
||||
// 发药频次
|
||||
deviceDispense.setDispenseFrequencyCode(deviceRequest.getRateCode());
|
||||
|
||||
@@ -143,7 +144,7 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
*/
|
||||
@Override
|
||||
public DeviceDispense createCompletedDeviceDispense(DeviceDispense deviceDispense, Date now, Practitioner loginUser,
|
||||
String step, Integer quantity) {
|
||||
String step, BigDecimal quantity) {
|
||||
// 服务请求编码
|
||||
deviceDispense.setBusNo(deviceDispense.getBusNo() + "." + step);
|
||||
// 请求基于什么
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.workflow.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -96,7 +97,7 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
// 请求基于什么的ID
|
||||
serviceRequest.setBasedOnId(serviceRequest.getId());
|
||||
// 数量
|
||||
serviceRequest.setQuantity(1);
|
||||
serviceRequest.setQuantity(new BigDecimal("1"));
|
||||
// 状态
|
||||
serviceRequest.setStatusEnum(RequestStatus.COMPLETED.getValue());
|
||||
// 执行人
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.openhis.yb.dto;
|
||||
|
||||
import com.openhis.financial.domain.PaymentRecDetail;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -13,9 +14,12 @@ public class PaymentDecDetailUniAccountDto extends PaymentRecDetail {
|
||||
*/
|
||||
private String contractNo;
|
||||
|
||||
//险种类型
|
||||
// 险种类型
|
||||
private String insutype;
|
||||
|
||||
//医疗类别
|
||||
// 医疗类别
|
||||
private String medType;
|
||||
|
||||
// 医疗费用总额
|
||||
private String medfeeSumamt;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.yb.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 医保5205接口请求参数
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class Yb5205InputSpecialDisease {
|
||||
|
||||
/**
|
||||
* 患者编号
|
||||
*/
|
||||
private String psnNo;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date begntime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endtime;
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.yb.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 【5205】接口返回结果
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@Data
|
||||
public class Yb5205OutputSpecialDisease {
|
||||
|
||||
/**
|
||||
* 费用明细流水号
|
||||
*/
|
||||
@JSONField(name = "feedetl_sn")
|
||||
private String feedetlSn;
|
||||
|
||||
/**
|
||||
* 处方/医嘱号
|
||||
*/
|
||||
@JSONField(name = "rx_drord_no")
|
||||
private String rxDrordNo;
|
||||
|
||||
/**
|
||||
* 定点医药机构编号
|
||||
*/
|
||||
@JSONField(name = "fixmedins_code")
|
||||
private String fixmedinsCode;
|
||||
|
||||
/**
|
||||
* 定点医药机构名称
|
||||
*/
|
||||
@JSONField(name = "fixmedins_name")
|
||||
private String fixmedinsName;
|
||||
|
||||
/**
|
||||
* 人员编号
|
||||
*/
|
||||
@JSONField(name = "psn_no")
|
||||
private String psnNo;
|
||||
|
||||
/**
|
||||
* 医疗类别
|
||||
*/
|
||||
@JSONField(name = "med_type")
|
||||
private String medType;
|
||||
|
||||
/**
|
||||
* 费用发生时间
|
||||
*/
|
||||
@JSONField(name = "fee_ocur_time", format = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date feeOcurTime;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@JSONField(name = "cnt")
|
||||
private BigDecimal cnt;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@JSONField(name = "pric")
|
||||
private BigDecimal pric;
|
||||
|
||||
/**
|
||||
* 收费项目等级
|
||||
*/
|
||||
@JSONField(name = "chrgitm_lv")
|
||||
private String chrgitmLv;
|
||||
|
||||
/**
|
||||
* 医保目录编码
|
||||
*/
|
||||
@JSONField(name = "hilist_code")
|
||||
private String hilistCode;
|
||||
|
||||
/**
|
||||
* 医保目录名称
|
||||
*/
|
||||
@JSONField(name = "hilist_name")
|
||||
private String hilistName;
|
||||
|
||||
/**
|
||||
* 目录类别
|
||||
*/
|
||||
@JSONField(name = "list_type")
|
||||
private String listType;
|
||||
|
||||
/**
|
||||
* 医疗目录编码
|
||||
*/
|
||||
@JSONField(name = "med_list_codg")
|
||||
private String medListCodg;
|
||||
|
||||
/**
|
||||
* 医药机构目录编码
|
||||
*/
|
||||
@JSONField(name = "medins_list_codg")
|
||||
private String medinsListCodg;
|
||||
|
||||
/**
|
||||
* 医药机构目录名称
|
||||
*/
|
||||
@JSONField(name = "medins_list_name")
|
||||
private String medinsListName;
|
||||
|
||||
/**
|
||||
* 医疗收费项目类别
|
||||
*/
|
||||
@JSONField(name = "med_chrgitm_type")
|
||||
private String medChrgitmType;
|
||||
|
||||
/**
|
||||
* 商品名
|
||||
*/
|
||||
@JSONField(name = "prodname")
|
||||
private String prodname;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@JSONField(name = "spec")
|
||||
private String spec;
|
||||
|
||||
/**
|
||||
* 剂型名称
|
||||
*/
|
||||
@JSONField(name = "dosform_name")
|
||||
private String dosformName;
|
||||
|
||||
/**
|
||||
* 限制使用标志
|
||||
*/
|
||||
@JSONField(name = "lmt_used_flag")
|
||||
private String lmtUsedFlag;
|
||||
|
||||
/**
|
||||
* 医院制剂标志
|
||||
*/
|
||||
@JSONField(name = "hosp_prep_flag")
|
||||
private String hospPrepFlag;
|
||||
|
||||
/**
|
||||
* 医院审批标志
|
||||
*/
|
||||
@JSONField(name = "hosp_appr_flag")
|
||||
private String hospApprFlag;
|
||||
|
||||
/**
|
||||
* 中药使用方式
|
||||
*/
|
||||
@JSONField(name = "tcmdrug_used_way")
|
||||
private String tcmdrugUsedWay;
|
||||
|
||||
/**
|
||||
* 生产地类别
|
||||
*/
|
||||
@JSONField(name = "prodplac_type")
|
||||
private String prodplacType;
|
||||
|
||||
/**
|
||||
* 基本药物标志
|
||||
*/
|
||||
@JSONField(name = "bas_medn_flag")
|
||||
private String basMednFlag;
|
||||
|
||||
/**
|
||||
* 医保谈判药品标志
|
||||
*/
|
||||
@JSONField(name = "hi_nego_drug_flag")
|
||||
private String hiNegoDrugFlag;
|
||||
|
||||
/**
|
||||
* 儿童用药标志
|
||||
*/
|
||||
@JSONField(name = "chld_medc_flag")
|
||||
private String chldMedcFlag;
|
||||
|
||||
/**
|
||||
* 外检标志
|
||||
*/
|
||||
@JSONField(name = "etip_flag")
|
||||
private String etipFlag;
|
||||
|
||||
/**
|
||||
* 外检医院编码
|
||||
*/
|
||||
@JSONField(name = "etip_hosp_code")
|
||||
private String etipHospCode;
|
||||
|
||||
/**
|
||||
* 出院带药标志
|
||||
*/
|
||||
@JSONField(name = "dscg_tkdrug_flag")
|
||||
private String dscgTkdrugFlag;
|
||||
|
||||
/**
|
||||
* 目录特项标志
|
||||
*/
|
||||
@JSONField(name = "list_sp_item_flag")
|
||||
private String listSpItemFlag;
|
||||
|
||||
/**
|
||||
* 生育费用标志
|
||||
*/
|
||||
@JSONField(name = "matn_fee_flag")
|
||||
private String matnFeeFlag;
|
||||
}
|
||||
@@ -709,6 +709,20 @@ public class YbDao {
|
||||
return ybUtil.getMedicalDirectory3301Param(tableName, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 【3301】医保目录对照参数作成(药品)
|
||||
*
|
||||
* @param categoryCode 药品分类
|
||||
* @param busNo 药品编号
|
||||
* @param name 药品编号
|
||||
* @param ybNo 医保编码
|
||||
* @return 医保目录对照参数
|
||||
*/
|
||||
public MedicalDirectory3301Param getMedicalDirectory3301ParamMedication(String categoryCode, String busNo,
|
||||
String name, String ybNo) {
|
||||
return ybUtil.getMedicalDirectory3301ParamMedication(categoryCode, busNo, name, ybNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 【3302】目录对照撤销
|
||||
*
|
||||
@@ -720,6 +734,19 @@ public class YbDao {
|
||||
return ybUtil.getMedicalDirectory3302Param(tableName, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 【3302】医保目录对照撤销参数作成(药品)
|
||||
*
|
||||
* @param categoryCode 药品分类
|
||||
* @param busNo 药品编号
|
||||
* @param ybNo 医保编码
|
||||
* @return 医保目录对照撤销参数
|
||||
*/
|
||||
public MedicalDirectory3302Param getMedicalDirectory3302ParamMedication(String categoryCode, String busNo,
|
||||
String ybNo) {
|
||||
return ybUtil.getMedicalDirectory3302ParamMedication(categoryCode, busNo, ybNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 【3201】医药机构费用结算对总账
|
||||
*
|
||||
@@ -1404,6 +1431,11 @@ public class YbDao {
|
||||
// 基金支付
|
||||
settlement3201Dto.setFundPaySumAmt(
|
||||
paymentDecDetailUniAccountDto.getAmount().add(settlement3201Dto.getFundPaySumAmt()));
|
||||
// 合计医疗费用
|
||||
settlement3201Dto
|
||||
.setMedFeeSumAmt(new BigDecimal(paymentDecDetailUniAccountDto.getMedfeeSumamt() == null
|
||||
? "0.0" : paymentDecDetailUniAccountDto.getMedfeeSumamt())
|
||||
.add(settlement3201Dto.getMedFeeSumAmt()));
|
||||
count++;
|
||||
}
|
||||
if (YbPayment.SELF_YB_ZH_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum())) {
|
||||
@@ -1417,13 +1449,13 @@ public class YbDao {
|
||||
settlement3201Dto.setAcctGjPay(
|
||||
paymentDecDetailUniAccountDto.getAmount().add(settlement3201Dto.getAcctGjPay()));
|
||||
}
|
||||
if (YbPayment.SELF_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum())
|
||||
|| YbPayment.OTHER_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum())
|
||||
|| YbPayment.YB_FUND_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum())) {
|
||||
// 合计医疗费用
|
||||
settlement3201Dto.setMedFeeSumAmt(
|
||||
paymentDecDetailUniAccountDto.getAmount().add(settlement3201Dto.getMedFeeSumAmt()));
|
||||
}
|
||||
// if (YbPayment.SELF_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum())
|
||||
// || YbPayment.OTHER_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum())
|
||||
// || YbPayment.YB_FUND_PAY.getValue().equals(paymentDecDetailUniAccountDto.getPayEnum())) {
|
||||
// // 合计医疗费用
|
||||
// settlement3201Dto.setMedFeeSumAmt(
|
||||
// paymentDecDetailUniAccountDto.getAmount().add(settlement3201Dto.getMedFeeSumAmt()));
|
||||
// }
|
||||
}
|
||||
// 结算笔数
|
||||
settlement3201Dto.setFixMedInsSetlCnt(count);
|
||||
@@ -1985,9 +2017,9 @@ public class YbDao {
|
||||
.setFeeOcurTime(chargeItemBaseInfoDto.getEnteredDate()).setMedListCodg(chargeItemBaseInfoDto.getYbNo())
|
||||
.setMedinsListCodg(chargeItemBaseInfoDto.getBaseBusNo())
|
||||
.setDetItemFeeSumamt(chargeItemBaseInfoDto.getTotalPrice())
|
||||
.setCnt(new BigDecimal(chargeItemBaseInfoDto.getQuantityValue()))
|
||||
.setPric(chargeItemBaseInfoDto.getUnitPrice()).setBilgDeptName(chargeItemBaseInfoDto.getDeptName())
|
||||
.setBilgDrName(chargeItemBaseInfoDto.getDoctName()).setBilgDeptCodg(chargeItemBaseInfoDto.getDeptYbNo())
|
||||
.setCnt(chargeItemBaseInfoDto.getQuantityValue()).setPric(chargeItemBaseInfoDto.getUnitPrice())
|
||||
.setBilgDeptName(chargeItemBaseInfoDto.getDeptName()).setBilgDrName(chargeItemBaseInfoDto.getDoctName())
|
||||
.setBilgDeptCodg(chargeItemBaseInfoDto.getDeptYbNo())
|
||||
.setBilgDrCodg(chargeItemBaseInfoDto.getDoctYbNo());
|
||||
|
||||
yb2301InputFeeDetailList.add(yb2301InputFeeDetail);
|
||||
@@ -2232,7 +2264,7 @@ public class YbDao {
|
||||
}
|
||||
|
||||
List<EncounterLocation> encounterLocationList = iEncounterLocationService.getEncounterLocationList(encounterId,
|
||||
LocationForm.BED, EncounterLocationStatus.ACTIVE);
|
||||
LocationForm.BED, EncounterActivityStatus.ACTIVE);
|
||||
if (encounterLocationList.isEmpty()) {
|
||||
throw new ServiceException("未查询到床位信息");
|
||||
}
|
||||
@@ -2364,7 +2396,7 @@ public class YbDao {
|
||||
}
|
||||
|
||||
List<EncounterLocation> encounterLocationList = iEncounterLocationService.getEncounterLocationList(encounterId,
|
||||
LocationForm.BED, EncounterLocationStatus.ACTIVE);
|
||||
LocationForm.BED, EncounterActivityStatus.ACTIVE);
|
||||
if (encounterLocationList.isEmpty()) {
|
||||
throw new ServiceException("未查询到床位信息");
|
||||
}
|
||||
@@ -2558,7 +2590,7 @@ public class YbDao {
|
||||
}
|
||||
|
||||
List<EncounterLocation> encounterLocationList = iEncounterLocationService.getEncounterLocationList(encounterId,
|
||||
LocationForm.BED, EncounterLocationStatus.ACTIVE);
|
||||
LocationForm.BED, EncounterActivityStatus.ACTIVE);
|
||||
if (encounterLocationList.isEmpty()) {
|
||||
throw new ServiceException("未查询到床位信息");
|
||||
}
|
||||
@@ -2719,4 +2751,28 @@ public class YbDao {
|
||||
return yb2405InputInpatient;
|
||||
}
|
||||
|
||||
/**
|
||||
* 【5205】结果
|
||||
*
|
||||
* @param patientId 患者id
|
||||
* @param begntime 开始时间
|
||||
* @param endtime 结束时间
|
||||
* @return 5205结果
|
||||
*/
|
||||
public Yb5205InputSpecialDisease yb5205SpecialDiseaseDrugRecordSearch(Long patientId, Date begntime, Date endtime) {
|
||||
|
||||
Patient patient = iPatientService.getById(patientId);
|
||||
if (patient == null) {
|
||||
throw new ServiceException("未查询到患者信息");
|
||||
}
|
||||
InfoPerson perInfoByIdCard = iPerinfoService.getPerInfoByIdCard(patient.getIdCard(), patient.getTenantId());
|
||||
if (perInfoByIdCard == null) {
|
||||
throw new ServiceException("未查询到患者医保读卡信息");
|
||||
}
|
||||
|
||||
Yb5205InputSpecialDisease yb5205InputSpecialDisease = new Yb5205InputSpecialDisease();
|
||||
yb5205InputSpecialDisease.setBegntime(begntime).setEndtime(endtime).setPsnNo(perInfoByIdCard.getPsnNo());
|
||||
|
||||
return yb5205InputSpecialDisease;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public class YbHttpUtils {
|
||||
Logger logger = LoggerFactory.getLogger(YbHttpUtils.class);
|
||||
|
||||
public Info1101Output getPerInfo(Info1101ReadcardParam readcard) {
|
||||
// 省名参数
|
||||
// 声明参数
|
||||
Result result = null;
|
||||
Info1101Output perinfo = null;
|
||||
// 发送请求
|
||||
@@ -1014,4 +1014,38 @@ public class YbHttpUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 【5205】人员慢特病用药记录查询
|
||||
*
|
||||
* @param yb5205InputSpecialDisease
|
||||
* @return
|
||||
*/
|
||||
public List<Yb5205OutputSpecialDisease>
|
||||
yb5205SpecialDiseaseDrugRecordSearch(Yb5205InputSpecialDisease yb5205InputSpecialDisease) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/spe-disease-record-search",
|
||||
yb5205InputSpecialDisease, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【5205】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【5205】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
try {
|
||||
result = mapper.readValue(resultString, Result.class);
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
return JSON.parseArray(result.getResult().toString(), Yb5205OutputSpecialDisease.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,6 +510,34 @@ public class YbManager {
|
||||
throw new ServiceException("药品对照失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 【3301】目录对照(药品)
|
||||
*
|
||||
* @param categoryCode 药品分类
|
||||
* @param busNo 药品编号
|
||||
* @param name 药品编号
|
||||
* @param ybNo 医保编码
|
||||
*/
|
||||
public R<?> directoryCheckMedication(String categoryCode, String busNo, String name, String ybNo) {
|
||||
MedicalDirectory3302Param medicalDirectory3302Param =
|
||||
ybBaseService.getMedicalDirectory3302ParamMedication(categoryCode, busNo, ybNo);
|
||||
Result result3302Info = ybHttpService.directoryUnCheck(medicalDirectory3302Param);
|
||||
if (!result3302Info.getCode().equals(CommonConstant.SC_OK_200)) {
|
||||
return R.fail("目录对照前,撤销对照失败");
|
||||
}
|
||||
MedicalDirectory3301Param medicalDirectory3301Param =
|
||||
ybBaseService.getMedicalDirectory3301ParamMedication(categoryCode, busNo, name, ybNo);
|
||||
ArrayList<MedicalDirectory3301Param> list = new ArrayList<>();
|
||||
list.add(medicalDirectory3301Param);
|
||||
MedicalDirectory3301ListParam medicalDirectory3301ListParam = new MedicalDirectory3301ListParam();
|
||||
medicalDirectory3301ListParam.setData(list);
|
||||
Result resultInfo = ybHttpService.directoryCheck(medicalDirectory3301ListParam);
|
||||
if (!resultInfo.getCode().equals(CommonConstant.SC_OK_200)) {
|
||||
return R.fail("药品对照失败");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 【3302】目录对照撤销
|
||||
*
|
||||
@@ -915,9 +943,9 @@ public class YbManager {
|
||||
.setFeeOcurTime(chargeItemBaseInfoDto.getEnteredDate()).setMedListCodg(chargeItemBaseInfoDto.getYbNo())
|
||||
.setMedinsListCodg(chargeItemBaseInfoDto.getBaseBusNo())
|
||||
.setDetItemFeeSumamt(chargeItemBaseInfoDto.getTotalPrice())
|
||||
.setCnt(new BigDecimal(chargeItemBaseInfoDto.getQuantityValue()))
|
||||
.setPric(chargeItemBaseInfoDto.getUnitPrice()).setBilgDeptName(chargeItemBaseInfoDto.getDeptName())
|
||||
.setBilgDrName(chargeItemBaseInfoDto.getDoctName()).setBilgDeptCodg(chargeItemBaseInfoDto.getDeptYbNo())
|
||||
.setCnt(chargeItemBaseInfoDto.getQuantityValue()).setPric(chargeItemBaseInfoDto.getUnitPrice())
|
||||
.setBilgDeptName(chargeItemBaseInfoDto.getDeptName()).setBilgDrName(chargeItemBaseInfoDto.getDoctName())
|
||||
.setBilgDeptCodg(chargeItemBaseInfoDto.getDeptYbNo())
|
||||
.setBilgDrCodg(chargeItemBaseInfoDto.getDoctYbNo());
|
||||
|
||||
yb2301InputFeeDetailList.add(yb2301InputFeeDetail);
|
||||
|
||||
@@ -15,12 +15,14 @@ import org.springframework.stereotype.Component;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.core.common.core.domain.model.LoginUser;
|
||||
import com.core.common.enums.TenantOptionDict;
|
||||
import com.core.common.exception.ServiceException;
|
||||
import com.core.common.utils.AssignSeqUtil;
|
||||
import com.core.common.utils.DateUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.core.system.service.impl.SysUserServiceImpl;
|
||||
import com.core.web.util.TenantOptionUtil;
|
||||
import com.openhis.administration.domain.*;
|
||||
import com.openhis.administration.service.*;
|
||||
import com.openhis.clinical.domain.Condition;
|
||||
@@ -268,7 +270,8 @@ public class YbParamBuilderUtil {
|
||||
List<EncounterDiagnosis> encounterDiagnosis =
|
||||
iEncounterDiagnosisService.list(new LambdaQueryWrapper<EncounterDiagnosis>()
|
||||
.eq(EncounterDiagnosis::getEncounterId, encounterId).eq(EncounterDiagnosis::getTenantId, tenantId)
|
||||
.eq(EncounterDiagnosis::getMedTypeCode, ybMedType.getValue()));// 2025/08/05 农大患者结算慢病时会上传普通门诊的疾病,医保回复该参保人未做该病种的门慢门特备案,故此修正根据门诊类型去上传
|
||||
.eq(EncounterDiagnosis::getMedTypeCode, ybMedType.getValue()));// 2025/08/05
|
||||
// 农大患者结算慢病时会上传普通门诊的疾病,医保回复该参保人未做该病种的门慢门特备案,故此修正根据门诊类型去上传
|
||||
for (EncounterDiagnosis diagnosis : encounterDiagnosis) {
|
||||
if (Objects.equals(Whether.YES.getValue(), diagnosis.getMaindiseFlag())) {
|
||||
mainEncounterDiagnosis = diagnosis;
|
||||
@@ -1219,6 +1222,32 @@ public class YbParamBuilderUtil {
|
||||
return medicalDirectory3301Param;
|
||||
}
|
||||
|
||||
/**
|
||||
* 【3301】医保目录对照参数作成(药品)
|
||||
*
|
||||
* @param categoryCode 药品分类
|
||||
* @param busNo 药品编号
|
||||
* @param name 药品编号
|
||||
* @param ybNo 医保编码
|
||||
* @return 医保目录对照参数
|
||||
*/
|
||||
public MedicalDirectory3301Param getMedicalDirectory3301ParamMedication(String categoryCode, String busNo,
|
||||
String name, String ybNo) {
|
||||
String listType;
|
||||
if (MedCategoryCode.TRADITIONAL_CHINESE_MEDICINE.getValue().equals(categoryCode)
|
||||
|| MedCategoryCode.WESTERN_MEDICINE.getValue().equals(categoryCode)) {
|
||||
listType = YbListType.WESTERN_AND_CHINESE_PATENT_MEDICINE.getValue();
|
||||
} else if (MedCategoryCode.CHINESE_HERBAL_MEDICINE.getValue().equals(categoryCode)) {
|
||||
listType = YbListType.IMPORTANT_HERBAL_SLICES.getValue();
|
||||
} else {
|
||||
throw new ServiceException("无效的目录类别");
|
||||
}
|
||||
return new MedicalDirectory3301Param().setFixmedinsHilistId(busNo).setFixmedinsHilistName(name)
|
||||
.setListType(listType).setMedListCodg(ybNo)
|
||||
.setBegndate(DateUtils.dateTimeNow(YbCommonConstants.constants.YYYY_MM_DD))
|
||||
.setEnddate(YbCommonConstants.constants.END_TIME);
|
||||
}
|
||||
|
||||
/**
|
||||
* 【3302】医保目录对照撤销
|
||||
*
|
||||
@@ -1289,6 +1318,30 @@ public class YbParamBuilderUtil {
|
||||
return medicalDirectory3302Param;
|
||||
}
|
||||
|
||||
/**
|
||||
* 【3302】医保目录对照撤销参数作成(药品)
|
||||
*
|
||||
* @param categoryCode 药品分类
|
||||
* @param busNo 药品编号
|
||||
* @param ybNo 医保编码
|
||||
* @return 医保目录对照撤销参数
|
||||
*/
|
||||
public MedicalDirectory3302Param getMedicalDirectory3302ParamMedication(String categoryCode, String busNo,
|
||||
String ybNo) {
|
||||
String listType;
|
||||
if (MedCategoryCode.TRADITIONAL_CHINESE_MEDICINE.getValue().equals(categoryCode)
|
||||
|| MedCategoryCode.WESTERN_MEDICINE.getValue().equals(categoryCode)) {
|
||||
listType = YbListType.WESTERN_AND_CHINESE_PATENT_MEDICINE.getValue();
|
||||
} else if (MedCategoryCode.CHINESE_HERBAL_MEDICINE.getValue().equals(categoryCode)) {
|
||||
listType = YbListType.IMPORTANT_HERBAL_SLICES.getValue();
|
||||
} else {
|
||||
throw new ServiceException("无效的目录类别");
|
||||
}
|
||||
return new MedicalDirectory3302Param().setFixmedinsHilistId(busNo)
|
||||
.setFixmedinsCode(TenantOptionUtil.getOptionContent(TenantOptionDict.FIXMEDINS_CODE)).setListType(listType)
|
||||
.setMedListCodg(ybNo);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param clearing3205AWebParma [3205]前台传参
|
||||
@@ -1824,9 +1877,9 @@ public class YbParamBuilderUtil {
|
||||
.setPharPracCertNo(medDoctor.getPharPracCertNo()).setPsnCertType(mdtrtCertType.getValue())
|
||||
.setManuLotnum(deviceDispense.getLotNumber()).setManuDate(inventoryItem.getProductionDate())
|
||||
.setTrdnFlag(flag.getCode()).setRtalDocno(invoice.getId().toString())
|
||||
.setSelRetnCnt(new BigDecimal(deviceDispense.getQuantity()))
|
||||
.setSelRetnTime(deviceDispense.getDispenseTime()).setSelRetnOpterName(performer.getName())
|
||||
.setRxFlag(deviceDefinition.getRxFlag().toString()).setExpyEnd(inventoryItem.getExpirationDate());
|
||||
.setSelRetnCnt(deviceDispense.getQuantity()).setSelRetnTime(deviceDispense.getDispenseTime())
|
||||
.setSelRetnOpterName(performer.getName()).setRxFlag(deviceDefinition.getRxFlag().toString())
|
||||
.setExpyEnd(inventoryItem.getExpirationDate());
|
||||
|
||||
// 溯源码
|
||||
SupplyDelivery supplyDelivery = iSupplyDeliveryService.getOne(
|
||||
@@ -2315,6 +2368,10 @@ public class YbParamBuilderUtil {
|
||||
if (jsonObj != null && jsonObj.get("insuplc_admdvs") != null) {
|
||||
baseInfo.setInsuplcAdmdvs(String.valueOf(jsonObj.get("insuplc_admdvs")));
|
||||
}
|
||||
// 异地患者问题
|
||||
// if (contract.getBusNo() != null) {
|
||||
// baseInfo.setInsuplcAdmdvs(contract.getBusNo());
|
||||
// }
|
||||
if (jsonObj != null && jsonObj.get("decrypt_flag") != null) {
|
||||
baseInfo.setDecryptFlag(String.valueOf(jsonObj.get("decrypt_flag")));
|
||||
} else {
|
||||
|
||||
@@ -16,15 +16,20 @@ import com.openhis.ybcatalog.service.ICatalogDrugInfoUsualService;
|
||||
* @date 2025-07-02
|
||||
*/
|
||||
@Service
|
||||
public class CatalogDrugInfoUsualServiceImpl extends ServiceImpl<CatalogDrugInfoUsualMapper, CatalogDrugInfoUsual> implements ICatalogDrugInfoUsualService {
|
||||
public class CatalogDrugInfoUsualServiceImpl extends ServiceImpl<CatalogDrugInfoUsualMapper, CatalogDrugInfoUsual>
|
||||
implements ICatalogDrugInfoUsualService {
|
||||
/**
|
||||
* 获取药品信息
|
||||
*/
|
||||
|
||||
@Override
|
||||
public Page<CatalogDrugInfoUsual> selectCatalogDrugInfoUsual(Integer pageNo,
|
||||
Integer pageSize, String searchKey) {
|
||||
public Page<CatalogDrugInfoUsual> selectCatalogDrugInfoUsual(Integer pageNo, Integer pageSize, String searchKey) {
|
||||
Page<CatalogDrugInfoUsual> page = new Page<>(pageNo, pageSize);
|
||||
return (baseMapper.selectPage(page, new LambdaQueryWrapper<CatalogDrugInfoUsual>().like(CatalogDrugInfoUsual::getRegisteredName, searchKey).or().like(CatalogDrugInfoUsual::getPinyinCode, searchKey).or().like(CatalogDrugInfoUsual::getWubiCode, searchKey).or().like(CatalogDrugInfoUsual::getApprovalNo, searchKey)));
|
||||
return (baseMapper.selectPage(page,
|
||||
new LambdaQueryWrapper<CatalogDrugInfoUsual>().like(CatalogDrugInfoUsual::getRegisteredName, searchKey).or()
|
||||
.like(CatalogDrugInfoUsual::getPinyinCode, searchKey).or()
|
||||
.like(CatalogDrugInfoUsual::getWubiCode, searchKey).or()
|
||||
.like(CatalogDrugInfoUsual::getApprovalNo, searchKey).or()
|
||||
.like(CatalogDrugInfoUsual::getManufacturerName, searchKey)));
|
||||
}
|
||||
}
|
||||
@@ -68,11 +68,26 @@
|
||||
org.yb_no as dept_yb_no,
|
||||
pra."name" as doct_name,
|
||||
pra.yb_no as doct_yb_no,
|
||||
contract.bus_no as contract_no
|
||||
contract.bus_no as contract_no,
|
||||
T2.charge_name,
|
||||
T2.title,
|
||||
T2.status_enum,
|
||||
T2.org_id,
|
||||
T2.description,
|
||||
T2.instance_table,
|
||||
T2.instance_id,
|
||||
T2.effective_start,
|
||||
T2.effective_end,
|
||||
T2.type_code,
|
||||
T2.yb_type,
|
||||
T2.condition_flag,
|
||||
T2.price
|
||||
-- 添加更多需要的字段
|
||||
FROM
|
||||
adm_charge_item a
|
||||
LEFT JOIN
|
||||
adm_charge_item_definition T2 ON a.definition_id = T2.ID AND T2.delete_flag = '0'
|
||||
LEFT JOIN
|
||||
med_medication_request b1 ON a.service_id = b1.id AND a.service_table = 'med_medication_request'
|
||||
LEFT JOIN
|
||||
wor_device_request b2 ON a.service_id = b2.id AND a.service_table = 'wor_device_request'
|
||||
@@ -171,5 +186,6 @@
|
||||
<foreach collection="chargeItemIds" item="itemId" open="(" separator="," close=")">
|
||||
#{itemId}
|
||||
</foreach>
|
||||
AND T1.delete_flag = '0'
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -4,4 +4,25 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.financial.mapper.PaymentReconciliationMapper">
|
||||
|
||||
<select id="getPaymentAccountContract"
|
||||
resultType="com.openhis.financial.model.PaymentReconciliationAccountDel">
|
||||
SELECT payment.*,
|
||||
account.contract_no AS account_contract_no
|
||||
FROM fin_payment_reconciliation payment
|
||||
LEFT JOIN fin_payment_rec_detail paydel ON payment."id" = paydel.reconciliation_id
|
||||
LEFT JOIN adm_account account ON account."id" = paydel.account_id
|
||||
WHERE payment.bill_date > #{startTime} :: timestamp
|
||||
AND payment.bill_date < #{endTime} :: timestamp
|
||||
AND payment.delete_flag = '0'
|
||||
AND payment.status_enum IN (#{success}, #{returnAll})
|
||||
AND payment.kind_enum = #{clinic}
|
||||
<if test="entererId != null">
|
||||
AND payment.enterer_id = #{entererId}
|
||||
</if>
|
||||
<if test="contractNo != null">
|
||||
AND account.contract_no = #{contractNo}
|
||||
</if>
|
||||
GROUP BY payment.ID,
|
||||
account.ID
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.jlau.mapper.ReviewPrescriptionRecordsMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.template.mapper.OrdersGroupPackageDetailMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.template.mapper.OrdersGroupPackageMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -9,7 +9,7 @@
|
||||
FROM wor_activity_definition
|
||||
WHERE delete_flag = '0'
|
||||
AND status_enum = #{status}
|
||||
AND NAME = #{skinTestInspection} LIMIT 1
|
||||
AND NAME = #{activityName} LIMIT 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.yb.mapper.MedicalInsuranceMapper">
|
||||
|
||||
<select id="get3201Param" resultType="com.openhis.web.ybmanage.vo.Settlement3201VO">
|
||||
<select id="get3201Param" resultType="com.openhis.yb.dto.Settlement3201Dto">
|
||||
SELECT sum(T1.tendered_amount) AS med_fee_sum_amt,
|
||||
sum(case when T5.pay_enum = #{ybFund} THEN T5.amount ELSE 0 END) AS fund_pay_sum_amt,
|
||||
sum(case when T5.pay_enum = #{zhPay} THEN T5.amount ELSE 0 END) AS acct_Pay,
|
||||
@@ -21,7 +21,7 @@
|
||||
AND T1.tenant_id = #{tenantId}
|
||||
GROUP BY t1.id
|
||||
</select>
|
||||
<select id="get3202Param" resultType="com.openhis.web.ybmanage.vo.Settlement3202VO">
|
||||
<select id="get3202Param" resultType="com.openhis.yb.dto.Settlement3202Dto">
|
||||
SELECT sum(T1.tendered_amount) AS med_fee_sum_amt,
|
||||
sum(case when T5.pay_enum = #{ybFund} THEN T5.amount ELSE 0 END) AS fund_pay_sum_amt,
|
||||
sum(case when T5.pay_enum = #{zhPay} THEN T5.amount ELSE 0 END) AS acct_pay,
|
||||
@@ -43,7 +43,7 @@
|
||||
AND T1.tenant_id = #{tenantId}
|
||||
GROUP BY t1.id
|
||||
</select>
|
||||
<select id="get3203Param" resultType="com.openhis.web.ybmanage.vo.Financial3203VO">
|
||||
<select id="get3203Param" resultType="com.openhis.yb.dto.Financial3203Dto">
|
||||
SELECT sum(T1.tendered_amount) AS med_fee_sum_amt,
|
||||
sum(case when T5.pay_enum = #{ybFund} THEN T5.amount ELSE 0 END) AS fund_pay_sum_amt,
|
||||
sum(case when T5.pay_enum = #{zhPay} THEN T5.amount ELSE 0 END) AS acct_pay,
|
||||
@@ -68,7 +68,7 @@
|
||||
GROUP BY t1.id
|
||||
</select>
|
||||
|
||||
<select id="get3201ParamList" resultType="com.openhis.web.ybmanage.vo.Settlement3201DetailVO">
|
||||
<select id="get3201ParamList" resultType="com.openhis.yb.dto.Settlement3201DetailDto">
|
||||
SELECT
|
||||
T2.insutype,
|
||||
T4.clr_optins,
|
||||
@@ -122,7 +122,8 @@
|
||||
t1.result_enum,
|
||||
t2.contract_no,
|
||||
t5.insutype,
|
||||
t5.med_type
|
||||
t5.med_type,
|
||||
t7.medfee_sumamt
|
||||
FROM
|
||||
fin_payment_rec_detail t1
|
||||
LEFT JOIN adm_account t2 on t1.account_id = t2.id
|
||||
@@ -130,6 +131,7 @@
|
||||
LEFT JOIN adm_encounter t4 on t2.encounter_id = t4.id
|
||||
LEFT JOIN yb_clinc_reg t5 on t4.bus_no = t5.ipt_otp_no AND t4.delete_flag = '0'
|
||||
LEFT JOIN fin_payment_reconciliation t6 on t6.id = t1.reconciliation_id AND t6.delete_flag = '0'
|
||||
LEFT JOIN yb_clinc_settle t7 on t1.pay_trans_text = t7.setl_id
|
||||
WHERE
|
||||
1=1
|
||||
AND t6.bill_date > #{startTime}
|
||||
|
||||
Reference in New Issue
Block a user