tmp

select sql_id, module from v$sql where last_active_time > sysdate and sql_text like '%select t.mzzdid as id,to_char%';
select 
    -- to_char(max(ZZSJ),'yyyy-MM-dd hh24:mi:ss') as t
    *
from 
    yl_mz_mzzz
where
    YLJGBM = '43199698-9'
    and ZZCZYBM = 2005348208;


select
    *
from 
    bhis.rep_charge_detail 
where
    YLJGBM = '43199698-9' 
    and zzsj >= to_date('2023-09-15', 'yyyy-mm-dd') 
    and zzsj < to_date('2023-09-30', 'yyyy-mm-dd') + 1
    and jsr = 2005348208;

curl 'http://vpn.yxws.cn/AppcenterBCLSWeb/ajax/zzRecordList.action' -H 'Cookie: JSESSIONID=ZCqwQYznEVtpWFyqKDGTH14o.undefined' -H 'Origin: http://vpn.yxws.cn' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: zh-CN,zh;q=0.9' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X -1_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: text/html, /; q=0.01' -H 'Referer: http://vpn.yxws.cn/AppcenterBCLSWeb//daemon/zzRecordIndex.action' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' -H 'Content-Length: 151' --compressed --insecure

select * from
(select MZZL.BRXM,MZZL.SFZH,QYJS.JSSJ,JG.JGMC,YG.XM as jsrxm from BHIS.MZ_MZZL_QY MZZL,
BHIS.YL_MZ_MZJS_QY QYJS,
bhis.mz_fp_qy fp,
dict_maint.zd_jgzc JG,
dict_maint.DM_YG YG
where MZZL.MZ_MZZLID=QYJS.MZZLID
and mzzl.mz_mzzlid = fp.MZZLID
and QYJS.YLJGBM=JG.JGBM
and YG.ID=QYJS.JSR
and MZZL.SFZH= '530402198801160915'
and fp.fpzt = 'ZL0018_01'
and QYJS.JSSJ >= to_date((select CFG_Z from dict_maint.IPTV_SING_CONFIG t where T.SFYX='1' and CFG_BM='jq002'),'yyyy-mm-dd')
and QYJS.JSSJ < to_date((select CFG_Z from dict_maint.IPTV_SING_CONFIG t where T.SFYX='1' and CFG_BM='jq003'),'yyyy-mm-dd')
order by QYJS.jssj desc)

SELECT
T.ID AS id,
T.QYJGMC as qyjgmc,
T.JMSFZH AS sfzh,
T.JMXM AS xm,
T.QYYSXM AS ysxm,
NVL(M.DMMC,' ') AS xb,
TO_CHAR(T.QYSJ,'YYYY-MM-DD') AS qysj,
T.NL AS nl,
T.JSZT as JSZT
FROM
DICT_MAINT.IPTV_SIGN_MESSAGE T
LEFT JOIN DICT_MAINT.ZD_DM M ON M.DMBZ = T.XB
where
T.STATUS = '1'
and T.JSZT='0'
and T.JMSFZH = '530402198801160915'
AND T.QYND = (select CFG_Z from dict_maint.IPTV_SING_CONFIG t where T.SFYX='1' and CFG_BM='jq004')

-- 根据patient_reg_id(浏览器里拿),查询该患者“未执行”医嘱 567908
select
elg.*
from
bhis.exam_test_exec_log elg
inner join bhis.inp_medical_orders orders on orders.order_id = elg.med_order_no and orders.applicaiton_no = elg.apply_no
where
orders.patient_reg_id = 567908
and elg.EXEC_STATUS = '0';

-- 修改医嘱状态为“已执行”
update bhis.exam_test_exec_log set EXEC_STATUS = '1' where EXA_TES_EXEC_LOG_ID in (
select
elg.EXA_TES_EXEC_LOG_ID
from
bhis.exam_test_exec_log elg
inner join bhis.inp_medical_orders orders on orders.order_id = elg.med_order_no and orders.applicaiton_no = elg.apply_no
where
orders.patient_reg_id = 567908
and elg.EXEC_STATUS = '0'
);

select nvl((select case
when bb.csz is null then
(case
when aa.mrz is null then
'1'
else
aa.mrz
end) else bb.csz end
from DICT_MAINT.XT_CS aa
left join DICT_MAINT.XT_JGCS bb on aa.id = bb.cs_dm
and bb.yljg_dm = #{yljgbm}
where aa.csbm = '0032'
and rownum = 1),
'1')
from dual
select distinct max(A.ORDER_ID) as orderId,
               max(reg.name) as patientName,
                max(A.ORDER_NO) as orderNo,
                 A.ORDER_GROUP_NO as ORDER_GROUP_NO,
                to_char(WMSYS.WM_CONCAT(A.ORDER_TEXT)) as ORDERTEXT,
                max(a.patient_reg_id) as patientRegId,
                   max(A.ORDER_TYPE) as itemType,
                max((select dict_name
                   from dict_maint.data_dict
                  where dict_code = a.order_type)) as orderType,
                 max( a.is_repeat_order) as isRepeatOrder,              
                max(case
                  when a.is_repeat_order = '1' then
                   '未停止'
                  when (a.check_order_date is null and (a.check_nurse_id is null or a.check_nurse_id='0')) then
                   '未校对'
                  when a.last_accting_date is null then
                   '未发送'
                  else
                   '未完成'
                end) as remark,decode(max( a.is_repeat_order),'1','长嘱','临嘱')  isRepeatOrderName
        from bhis.inp_medical_orders a
        left join bhis.inp_patient_reg reg on reg.patient_reg_id = a.patient_reg_id
        where
        ((a.is_repeat_order='2' and a.last_accting_date is null) or (a.is_repeat_order='1'))
        and a.order_status in ('S010001','S010002')
        and a.patient_reg_id=#{patientRegId}
        group by ORDER_GROUP_NO
posted @ 2023-10-08 10:38  JaxYoun  阅读(42)  评论(0编辑  收藏  举报