|
@@ -7,6 +7,8 @@ import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
|
|
|
import thyyxxk.webserver.entity.datamodify.YzActOrder;
|
|
|
import thyyxxk.webserver.entity.yibao.ZyActpatient;
|
|
|
import thyyxxk.webserver.entity.zhuyuanyisheng.HuanZheFeiYong;
|
|
|
+import thyyxxk.webserver.entity.zhuyuanyisheng.YaoPinXinXi;
|
|
|
+import thyyxxk.webserver.entity.zhuyuanyisheng.YiZhuMingChen;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@@ -223,4 +225,158 @@ public interface YiZhuLuRuDao {
|
|
|
@Param("orderName") String orderName);
|
|
|
|
|
|
|
|
|
+ @Select("SELECT distinct py_code=a.py_code, " +
|
|
|
+ " d_code =a.d_code, " +
|
|
|
+ " order_code =a.code, " +
|
|
|
+ " order_name =a.name, " +
|
|
|
+ " specification=a.specification, " +
|
|
|
+ " order_type =case a.infusion_flag " +
|
|
|
+ " when '1' then 'i' " +
|
|
|
+ " else " +
|
|
|
+ " (case " +
|
|
|
+ " when a.code >= '30000' and a.code < '50000' then 'z' " +
|
|
|
+ " else 'd' end) end, " +
|
|
|
+ " parent_code=null, " +
|
|
|
+ " exclu_group_type=null, " +
|
|
|
+ " discription=case a.infusion_flag " +
|
|
|
+ " when '1' then '大输液' " +
|
|
|
+ " else (case " +
|
|
|
+ " when a.code >= '30000' and a.code < '50000' then '中药' " +
|
|
|
+ " else '西药 ' end) end + convert(char(10), a.pack_retprice) + '元' + '(医保类别:' + " +
|
|
|
+ " ltrim(rtrim(yb_flag_new)) + ';报销比例:' + ltrim(rtrim(yb_bl_new)) + ';医保说明:' + " +
|
|
|
+ " ltrim(rtrim(yb_comment_new)) + ')', " +
|
|
|
+ " serial=a.serial, " +
|
|
|
+ " group_no=a.group_no, " +
|
|
|
+ " infusion_flag=a.infusion_flag, " +
|
|
|
+ " drug_flag =a.drug_flag, " +
|
|
|
+ " group_name =a.group_name, " +
|
|
|
+ " pack_size=a.pack_size, " +
|
|
|
+ " order_class='Y', " +
|
|
|
+ " spec_pack=a.spec_pack, " +
|
|
|
+ " jsy_flag =a.jsy_flag, " +
|
|
|
+ " xnh_flag, " +
|
|
|
+ " yb_comment, " +
|
|
|
+ " dosage = a.dosage, " +
|
|
|
+ " yb_type, " +
|
|
|
+ " yb_flag_new," +
|
|
|
+ " father_flag, " +
|
|
|
+ " manu_name=(select name from yp_zd_manufactory where code *= a.manu_code), " +
|
|
|
+ " stock_amount=a.stock_amount " +
|
|
|
+ "FROM view_yp_zd_dict_base_yf a with (NOLOCK) " +
|
|
|
+ "WHERE isnull(a.visible_flag_zy, '') <> '1' " +
|
|
|
+ " and (a.py_code like #{code} or a.name like #{code} or code like #{code}) " +
|
|
|
+ " and group_no in ('73','11','81')")
|
|
|
+ List<YiZhuMingChen> yiZhuMingChen1(@Param("code") String code);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("SELECT a.py_code, " +
|
|
|
+ " a.d_code, " +
|
|
|
+ " a.order_code , " +
|
|
|
+ " a.order_name, " +
|
|
|
+ " specification='诊疗项目', " +
|
|
|
+ " order_type =operation, " +
|
|
|
+ " a.parent_code , " +
|
|
|
+ " a.exclu_group_type, " +
|
|
|
+ " discription=a.discription + ' ' + a.yb_comment, " +
|
|
|
+ " serial ='00', " +
|
|
|
+ " group_no='00', " +
|
|
|
+ " infusion_flag='', " +
|
|
|
+ " drug_flag ='', " +
|
|
|
+ " group_name ='', " +
|
|
|
+ " pack_size=1, " +
|
|
|
+ " order_class=a.order_class, " +
|
|
|
+ " spec_pack='', " +
|
|
|
+ " jsy_flag ='', " +
|
|
|
+ " xnh_flag='', " +
|
|
|
+ " yb_comment =null, " +
|
|
|
+ " dosage='', " +
|
|
|
+ " yb_type='', " +
|
|
|
+ " father_flag='0', " +
|
|
|
+ " manu_name='', " +
|
|
|
+ " stock_amount=0 " +
|
|
|
+ "FROM yz_order_item a with (NOLOCK) " +
|
|
|
+ "WHERE isnull(a.del_flag, '') <> '1' " +
|
|
|
+ " and (py_code like #{code} or order_name like #{code} or order_code like #{code}) " +
|
|
|
+ " and order_code not in (select zy_order_code from jc_zd_item) " +
|
|
|
+ " and isnull(exec_dept, '') <> '2010000'")
|
|
|
+ List<YiZhuMingChen> yiZhuMingChen2(String code);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select /* 毒麻标志 */ " +
|
|
|
+ " drug_flag, " +
|
|
|
+ " serial, " +
|
|
|
+ " /* 医保自费 */ " +
|
|
|
+ " self_flag_yb, " +
|
|
|
+ " /* 重量 */ " +
|
|
|
+ " weight, " +
|
|
|
+ " /* 重量单位 */ " +
|
|
|
+ " weigh_unit, " +
|
|
|
+ " weigh_unit_name = (select name from yp_zd_unit where code = weigh_unit), " +
|
|
|
+ " /*体积*/ " +
|
|
|
+ " volum, " +
|
|
|
+ " /*体积单位*/ " +
|
|
|
+ " vol_unit, " +
|
|
|
+ " vol_unit_name = (select name from yp_zd_unit where code = vol_unit), " +
|
|
|
+ " /*包装体积*/ " +
|
|
|
+ " pack_size, " +
|
|
|
+ " /*包装单位*/ " +
|
|
|
+ " pack_unit, " +
|
|
|
+ " pack_unit_name = (select name from yp_zd_unit where code = pack_unit), " +
|
|
|
+ " /*最小单位*/ " +
|
|
|
+ " mini_unit, " +
|
|
|
+ " mini_unit_name = (select name from yp_zd_unit where code = mini_unit), " +
|
|
|
+ " /* 需要判断医生的权限 在 select doctor_xz_yp from a_employee_mi */ " +
|
|
|
+ " isnull(yp_level,0) as yp_level, " +
|
|
|
+ " /*需要皮试*/ " +
|
|
|
+ " isnull(ps_flag,0) as ps_flag," +
|
|
|
+ " code as order_code,name as order_name ," +
|
|
|
+ " frequency as frequCode " +
|
|
|
+ "from yp_zd_dict " +
|
|
|
+ "where code = #{code} " +
|
|
|
+ " and serial = #{serial} " +
|
|
|
+ " and isnull(del_flag, '') = '' ")
|
|
|
+ YaoPinXinXi huoQuYaoPin(@Param("code") String code,
|
|
|
+ @Param("serial") String serial);
|
|
|
+
|
|
|
+ @Select("select isnull(doctor_xz_yp,0) from a_employee_mi where code = #{code}")
|
|
|
+ String huoQuYiShenDengJi(String code);
|
|
|
+
|
|
|
+ @Select("select rtrim(supply_code) code,rtrim(supply_name) name " +
|
|
|
+ "from yz_supply_type " +
|
|
|
+ "where ps_flag in ('1', '0')")
|
|
|
+ List<GetDropdownBox> piShiGeiYaoFangShi();
|
|
|
+
|
|
|
+ @Select("select rtrim(code) code, rtrim(comm) name " +
|
|
|
+ "from yz_order_frequency " +
|
|
|
+ "where (code like #{code} or comm like #{code})")
|
|
|
+ List<GetDropdownBox> huoQuZhuYuanPinLv(String code);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select rtrim(supply_code) code, rtrim(supply_name) name " +
|
|
|
+ "from yz_supply_type " +
|
|
|
+ "where (supply_code like #{code} or supply_name like #{code} or py_code like #{code} )")
|
|
|
+ List<GetDropdownBox> huoQuGeiYaoFangShi(String code);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("SELECT CONVERT(nvarchar(100), CAST(act_order_no AS decimal(11,0))) as code," +
|
|
|
+ " rtrim(order_name) as name " +
|
|
|
+ "FROM yz_act_order " +
|
|
|
+ "WHERE (inpatient_no = #{patNo}) " +
|
|
|
+ " AND (admiss_times = #{times}) " +
|
|
|
+ " AND (isnull(parent_no, 0) = 0) " +
|
|
|
+ " and status_flag <> '5' " +
|
|
|
+ " and drug_flag = 'i'")
|
|
|
+ List<GetDropdownBox> huoQuFuYiZhu(@Param("patNo") String patNo,
|
|
|
+ @Param("times") Integer times);
|
|
|
+
|
|
|
+ @Select("SELECT a.code code, " +
|
|
|
+ " a.name name " +
|
|
|
+ "FROM zd_unit_code a, " +
|
|
|
+ " zd_dept_all b " +
|
|
|
+ "where isnull(a.del_flag, '0') <> '1' " +
|
|
|
+ " and a.code = b.small_dept " +
|
|
|
+ " and (a.code like #{code} or a.name like #{code} or py_code like #{code} )")
|
|
|
+ List<GetDropdownBox> huoQuZhiXinKeShi(String code);
|
|
|
+
|
|
|
+
|
|
|
}
|