|
@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.*;
|
|
|
import thyyxxk.webserver.entity.datamodify.FeiYongLeiXin;
|
|
|
import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
|
|
|
import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
|
|
|
+import thyyxxk.webserver.entity.yibao.WeiGuiFeiYongFenXi;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
@@ -891,4 +892,74 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
|
|
|
@Param("admissTimes") Integer admissTimes,
|
|
|
@Param("ledger") Integer ledger,
|
|
|
@Param("detailSn") Integer detailSn);
|
|
|
+
|
|
|
+
|
|
|
+ // 违规费用 分析
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select ori_detail_sn from zy_detail_charge " +
|
|
|
+ "where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledger} " +
|
|
|
+ "and infant_flag = #{infantFlag} " +
|
|
|
+ " and charge_fee < 0 " +
|
|
|
+ " and ori_detail_sn is not null " +
|
|
|
+ "group by ori_detail_sn having count(1) > 1")
|
|
|
+ List<Integer> chongFuTuiFei(@Param("inpatientNo") String inpatientNo,
|
|
|
+ @Param("admissTimes") Integer admissTimes,
|
|
|
+ @Param("ledger") Integer ledger,
|
|
|
+ @Param("infantFlag") Integer infantFlag);
|
|
|
+
|
|
|
+ @Update("<script>" +
|
|
|
+ "update zy_detail_charge set ori_detail_sn = null where inpatient_no = '0402330' and admiss_times = 1 and ledger_sn = 1 and infant_flag = 0 and ori_detail_sn in " +
|
|
|
+ "<foreach collection='list' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
+ "#{item}" +
|
|
|
+ "</foreach>" +
|
|
|
+ "</script>")
|
|
|
+ void chongZhiWeiGuiYuanLiuShui(@Param("inpatientNo") String inpatientNo,
|
|
|
+ @Param("admissTimes") Integer admissTimes,
|
|
|
+ @Param("ledger") Integer ledger,
|
|
|
+ @Param("infantFlag") Integer infantFlag,
|
|
|
+ @Param("list") List<Integer> oriDetailSn);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 违规药品 信息 没有匹配的
|
|
|
+ *
|
|
|
+ * @param inpatientNo 住院号
|
|
|
+ * @param admissTimes 住院次数
|
|
|
+ * @param ledger 账页号
|
|
|
+ * @return 返回违规药品 没有匹配的
|
|
|
+ */
|
|
|
+ @Select("select charge_code_mx,b.name,national_code from zy_detail_charge a, yp_zd_dict b " +
|
|
|
+ "where order_no <> 6 and trans_flag_yb not in (1,2) and charge_code like 'BILL%' " +
|
|
|
+ " and isnull(b.national_code,'') = '' and inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledger} " +
|
|
|
+ "and a.infant_flag = #{infantFlag} " +
|
|
|
+ " and a.charge_code_mx = b.code " +
|
|
|
+ "group by charge_code_mx, b.name, national_code")
|
|
|
+ List<WeiGuiFeiYongFenXi> weiGuiYaoPin(@Param("inpatientNo") String inpatientNo,
|
|
|
+ @Param("admissTimes") Integer admissTimes,
|
|
|
+ @Param("ledger") Integer ledger,
|
|
|
+ @Param("infantFlag") Integer infantFlag);
|
|
|
+
|
|
|
+ @Select("select charge_code_mx,b.name,national_code from zy_detail_charge a, zd_charge_item b " +
|
|
|
+ "where order_no <> 6 and trans_flag_yb not in (1,2) and charge_code not like 'BILL%' " +
|
|
|
+ " and isnull(b.national_code,'') = '' and inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledger} " +
|
|
|
+ " and a.infant_flag = #{infantFlag} " +
|
|
|
+ " and a.charge_code_mx = b.code " +
|
|
|
+ "group by charge_code_mx, b.name, national_code")
|
|
|
+ List<WeiGuiFeiYongFenXi> weiGuiXiangMu(@Param("inpatientNo") String inpatientNo,
|
|
|
+ @Param("admissTimes") Integer admissTimes,
|
|
|
+ @Param("ledger") Integer ledger,
|
|
|
+ @Param("infantFlag") Integer infantFlag);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select rtrim(inpatient_no) inpatient_no,admiss_times,ledger_sn,charge_code_mx,detail_sn,ori_detail_sn,charge_fee,charge_amount, " +
|
|
|
+ " exec_unit_name = (select rtrim(name) name from zd_unit_code where exec_unit = code),charge_date,trans_flag_yb, " +
|
|
|
+ " op_id_code = (select rtrim(name) name from a_employee_mi where code = op_id_code) from zy_detail_charge " +
|
|
|
+ "where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledger} " +
|
|
|
+ " and charge_fee < 0 " +
|
|
|
+ " and trans_flag_yb not in (1,2) " +
|
|
|
+ " and ori_detail_sn is null")
|
|
|
+ List<ZyDetailCharge> weiXieDaiYuanLiuShui(@Param("inpatientNo") String inpatientNo,
|
|
|
+ @Param("admissTimes") Integer admissTimes,
|
|
|
+ @Param("ledger") Integer ledger,
|
|
|
+ @Param("infantFlag") Integer infantFlag);
|
|
|
}
|