5
« เมื่อ: ตุลาคม 24, 2012, 11:09:04 AM »
การคำนวน DRG ของผู้ป่วยในที่มีการลง ICD9 ประมาณ 25 รายการขึ้นไปจะมีการลงลำดับความสำคัญของ ICD9 แต่พอโปรแกรมส่งเข้าไปคำนวนกลับไม่เรียงลำดับตามความสำคัญครับ แต่เรียงตามวันที่และเวลา
ตามนี้ครับ
select idx.*,doctor.name as dname,icd9cm1.name as icdname from iptoprt idx left outer join doctor on doctor.code=idx.doctor left outer join icd9cm1 on icd9cm1.code=idx.icd9 where idx.an='550027502' order by idx.opdate,idx.optime
-------------------------------------------------------------------------------------------------------------------------
ไฟล์ transact.txt
select bw from ipt where an='550027502'
select idx.*,doctor.name as dname,icd101.name as icdname,diagtype.name as dxname from iptdiag idx left outer join doctor on doctor.code=idx.doctor left outer join icd101 on icd101.code=idx.icd10 left outer join diagtype on diagtype.diagtype=idx.diagtype where idx.an='550027502' order by idx.diagtype,idx.ipt_diag_id
select name from icd101 where code='B200'
SHOW KEYS FROM hos.icd101
select name from icd101 where code = 'B20'
select name from icd101 where code='A162'
select name from icd101 where code = 'A16'
select name from icd101 where code='G442'
select name from icd101 where code = 'G44'
select dchstts from ipt where an='550027502'
select name from dchstts where dchstts='02'
SHOW KEYS FROM hos.dchstts
select count(*) as cc from sys_var where sys_name='track-ipt-trx'
select sys_value from sys_var where sys_name='track-ipt-trx'
select an from ipt where an = '550027502'
select * from ipt where an='550027502'
select ipd_hour_cut from pttype where pttype = '89'
select * from opitemrece where an='550027502' order by rxdate,rxtime,order_no,icode
SHOW TABLES FROM hos LIKE 'opitemrece'
SHOW COLUMNS FROM hos.opitemrece LIKE '%'
select now() as cc
select * from ward_pc_online where computer_name = 'PERJER4675'
UPDATE ward_pc_onlineSET last_agent_active = '2012-10-24 09:24:29'WHERE computer_name = 'PERJER4675'
SHOW KEYS FROM hos.opitemrece
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','UPDATE ward_pc_online\r\nSET\r\n last_agent_active = \'2012-10-24 09:24:29\'\r\nWHERE\r\n computer_name = \'PERJER4675\'')
select * from iptdiag where an='550027502' and diagtype='1'
SHOW KEYS FROM hos.iptdiag
select * from an_stat where an='550027502'
SHOW KEYS FROM hos.an_stat
select * from inc_ipd_stat where an='550027502'
SHOW TABLES FROM hos LIKE 'inc_ipd_stat'
SHOW COLUMNS FROM hos.inc_ipd_stat LIKE '%'
SHOW KEYS FROM hos.inc_ipd_stat
select pttypeno from ipt_pttype where an='550027502' and pttype_number=1
SHOW TABLES FROM hos LIKE 'ipt_pttype'
SHOW COLUMNS FROM hos.ipt_pttype LIKE '%'
SHOW KEYS FROM hos.ipt_pttype
select hospmain from ovst where hn='510038528' and vstdate='2012-09-21'
SHOW KEYS FROM hos.ovst
select hospsub from ovst where hn='510038528' and vstdate='2012-09-21'
select max(vn) as vn from vn_stat where hn='510038528' and vstdate='2012-09-21'
select r.rcpno from rcpt_print r where r.vn='550027502' and r.rcpno not in (select rcpno from rcpt_abort where vn = '550027502')
SHOW TABLES FROM hos LIKE 'rcpt_print'
SHOW COLUMNS FROM hos.rcpt_print LIKE '%'
SHOW KEYS FROM hos.rcpt_print
select debt_id from rcpt_debt where vn='550027502' and debt_id not in (select debt_id from rcpt_debt_cancel where vn = '550027502')
SHOW TABLES FROM hos LIKE 'rcpt_debt'
SHOW COLUMNS FROM hos.rcpt_debt LIKE '%'
SHOW KEYS FROM hos.rcpt_debt
select pcode from pttype where pttype='89'
select in_region from pttype where pttype='89'
select region_type from pttype where pttype='89'
select * from iptoprt where an='550027502' order by priority,opdate,optime
SHOW KEYS FROM hos.iptoprt
select * from iptdiag where an='550027502' and diagtype<>'1' order by ipt_diag_id
select a.an from ipt a where a.hn = '510038528' and a.regdate< '2012-09-21' and dchdate is not null order by regdate desc limit 1
select * from ipt where an='550019744'
select pdx from an_stat where hn='510038528' and regdate < '2012-09-21' order by regdate desc limit 1
select hn,sex,chwpart,amppart,tmbpart,birthday from patient where hn='510038528'
select count(an) as cc from ipt where hn='510038528' and an<'550027502' and regdate between '2012-09-01' and '2012-09-30'
select count(an) as cc from ipt where hn='510038528' and an<'550027502' and regdate between '2012-01-01' and '2012-12-31'
select spclty from ipt where an='550027502'
select leave_home_day from ipt where an = '550027502'
select count(*) as cc from ipt where an='550027502' and dchdate is not null
select pttype,paidst,discount,debtor from pttype where pttype='89'
select count(*) as cc from sys_var where sys_name='income_auto_type_1'
select sys_value from sys_var where sys_name='income_auto_type_1'
select count(*) as cc from ipt_income_auto where an='550027502'
SHOW TABLES FROM hos LIKE 'ipt_income_auto'
SHOW COLUMNS FROM hos.ipt_income_auto LIKE '%'
select count(*) as cc from sys_var where sys_name='income_auto_type_2'
select sys_value from sys_var where sys_name='income_auto_type_2'
select p1.pcode from ipt i,pttype p1 where i.an = '550027502' and i.pttype = p1.pttype
select hos_guid from opitemrece where an='550027502' and (finance_number is NULL or finance_number='')
select hos_guid from opitemrece where an='550027502' and (finance_number is NULL or finance_number='' or (finance_number<>'' and income='') )
select icode from s_drugitems where must_paid='Y' and paidst<>'03' and icode in ('1500068','1500235','1500293','1500309','1500371','1500529','1500553','1500631','1500779','3000001','3000137','3000139','3000140','3000145','3001211','3001372','3002008','3002408','3002409','3503170','3501162','3501237','3501744','3501753','3501552','3501586','1510004','3501185','3501263','3501940','3501965','3502099','3501872','3501873','3000198','1500736','3000073','3005350','1500161','1500527','3501206','3501208','1500353','1500435','1500366','3502117','3504144','1500069','3501176','3501964','1500236')
SHOW TABLES FROM hos LIKE 's_drugitems'
SHOW COLUMNS FROM hos.s_drugitems LIKE '%'
SHOW KEYS FROM hos.s_drugitems
select icode from s_drugitems where must_paid='Y' and paidst<>'03' and icode in ('1500068','1500235','1500293','1500309','1500371','1500529','1500553','1500631','1500779','3000001','3000137','3000139','3000140','3000145','3001211','3001372','3002008','3002408','3002409','3503170','3501162','3501237','3501744','3501753','3501552','3501586','1510004','3501185','3501263','3501940','3501965','3502099','3501872','3501873','3000198','1500736','3000073','3005350','1500161','1500527','3501206','3501208','1500353','1500435','1500366','3502117','3504144','1500069','3501176','3501964','1500236') and icode in ('')
select icode from s_drugitems where must_paid='Y' and paidst='03' and icode in ('1500068','1500235','1500293','1500309','1500371','1500529','1500553','1500631','1500779','3000001','3000137','3000139','3000140','3000145','3001211','3001372','3002008','3002408','3002409','3503170','3501162','3501237','3501744','3501753','3501552','3501586','1510004','3501185','3501263','3501940','3501965','3502099','3501872','3501873','3000198','1500736','3000073','3005350','1500161','1500527','3501206','3501208','1500353','1500435','1500366','3502117','3504144','1500069','3501176','3501964','1500236') and icode in ('')
select icode from drugitems where drugaccount<>'' and drugaccount is not null and icode in ('1500068','1500235','1500293','1500309','1500371','1500529','1500553','1500631','1500779','3000001','3000137','3000139','3000140','3000145','3001211','3001372','3002008','3002408','3002409','3503170','3501162','3501237','3501744','3501753','3501552','3501586','1510004','3501185','3501263','3501940','3501965','3502099','3501872','3501873','3000198','1500736','3000073','3005350','1500161','1500527','3501206','3501208','1500353','1500435','1500366','3502117','3504144','1500069','3501176','3501964','1500236')
SHOW TABLES FROM hos LIKE 'drugitems'
SHOW COLUMNS FROM hos.drugitems LIKE '%'
SHOW KEYS FROM hos.drugitems
select icode from drugitems where (drugaccount='' or drugaccount is null) and icode in ('1500068','1500235','1500293','1500309','1500371','1500529','1500553','1500631','1500779','3000001','3000137','3000139','3000140','3000145','3001211','3001372','3002008','3002408','3002409','3503170','3501162','3501237','3501744','3501753','3501552','3501586','1510004','3501185','3501263','3501940','3501965','3502099','3501872','3501873','3000198','1500736','3000073','3005350','1500161','1500527','3501206','3501208','1500353','1500435','1500366','3502117','3504144','1500069','3501176','3501964','1500236')
select count(*) as cc from sys_var where sys_name='MIRROR_OPI_TRX'
select sys_value from sys_var where sys_name='MIRROR_OPI_TRX'
select finance_status from ipt_finance_status where an = '550027502'
SHOW KEYS FROM hos.ipt_finance_status
select * from ipt_pttype where an = '550027502' order by pttype_number
select order_no from ipt_order_no where an = '550027502' and order_type = 'TRx'
SHOW TABLES FROM hos LIKE 'ipt_order_no'
SHOW COLUMNS FROM hos.ipt_order_no LIKE '%'
SHOW KEYS FROM hos.ipt_order_no
select order_no from ipt_order_no where an = '550027502' and order_type = 'Hme'
select use_contract_id from pttype where pttype='89'
select max_debt_money from pttype where pttype='89'
select count(*) as cc from ovst_finance where vn = '550027502' and finance_status < 9
SHOW TABLES FROM hos LIKE 'ovst_finance'
SHOW COLUMNS FROM hos.ovst_finance LIKE '%'
select vn from ipt where an = '550027502'
select hos_guid from opitemrece_charge where vn = '550920212048' and vn<>''
SHOW TABLES FROM hos LIKE 'opitemrece_charge'
SHOW COLUMNS FROM hos.opitemrece_charge LIKE '%'
SHOW KEYS FROM hos.opitemrece_charge
select * from opitemrece_charge where vn = '550027502'
select charge_guid from opitemrece_charge where vn = '550027502'
select * from opitemrece limit 0
select * from opitemrece_charge where vn = '550027502'
select * from inc_ipd_stat where an='550027502'
UPDATE inc_ipd_stat SET uinc01=0,uinc04=0,uinc06=0,uinc12=0,uinc14=0,uinc16=0,uinc17=0 WHERE an='550027502'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','UPDATE inc_ipd_stat SET uinc01=0,uinc04=0,uinc06=0,uinc12=0,uinc14=0,uinc16=0,uinc17=0 WHERE an=\'550027502\'')
select * from an_stat where an='550027502'
UPDATE an_stat SET inc01=0,inc04=0,inc06=0,inc12=0,inc14=0,inc16=0,inc17=0 WHERE an='550027502'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','UPDATE an_stat SET inc01=0,inc04=0,inc06=0,inc12=0,inc14=0,inc16=0,inc17=0 WHERE an=\'550027502\'')
select * from an_stat where an='550027502'
select discount from pttype where pttype='89'
select hos_guid from patient where hn='510038528'
select count(*) as cc from ipt where an='550027502' and dchdate is NULL
update patient set admit = 'N' where hos_guid in ('{FBF676CD-9B9A-4346-BECC-C62C0BE94E46}')
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','update patient set admit = \'N\' where hos_guid in (\'{FBF676CD-9B9A-4346-BECC-C62C0BE94E46}\')')
select hos_guid from opitemrece where an='550027502'
select * from inc_ipd_stat where an='550027502'
delete from incith where an='550027502'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','delete from incith where an=\'550027502\'')
select * from incith where an='550027502' and paidst = '02'
SHOW TABLES FROM hos LIKE 'incith'
SHOW COLUMNS FROM hos.incith LIKE '%'
SHOW KEYS FROM hos.incith
select income,paidst,sum(sum_price) as sp from opitemrece where an='550027502' and paidst = '02' group by income,paidst
select r2.income as income,sum(r2.amount) as sp from rcpt_debt r1,rcpt_debt_detail r2 where r1.vn='550027502' and r1.debt_id = r2.debt_id group by r2.income
SHOW TABLES FROM hos LIKE 'rcpt_debt_detail'
SHOW COLUMNS FROM hos.rcpt_debt_detail LIKE '%'
select * from incith where an='550027502' and paidst = '02'
INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES ('550027502','2012-09-21','10:48:00','2012-09-21','10:48:00','01','02',NULL,3000,NULL,NULL,NULL,NULL,'N',NULL)
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES (\'550027502\',\'2012-09-21\',\'10:48:00\',\'2012-09-21\',\'10:48:00\',\'01\',\'02\',NULL,3000,NULL,NULL,NULL,NULL,\'N\',NULL)')
INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES ('550027502','2012-09-21','10:48:00','2012-09-21','10:48:00','03','02',NULL,629,NULL,NULL,NULL,NULL,'N',NULL)
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES (\'550027502\',\'2012-09-21\',\'10:48:00\',\'2012-09-21\',\'10:48:00\',\'03\',\'02\',NULL,629,NULL,NULL,NULL,NULL,\'N\',NULL)')
INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES ('550027502','2012-09-21','10:48:00','2012-09-21','10:48:00','04','02',NULL,343,NULL,NULL,NULL,NULL,'N',NULL)
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES (\'550027502\',\'2012-09-21\',\'10:48:00\',\'2012-09-21\',\'10:48:00\',\'04\',\'02\',NULL,343,NULL,NULL,NULL,NULL,\'N\',NULL)')
INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES ('550027502','2012-09-21','10:48:00','2012-09-21','10:48:00','05','02',NULL,172,NULL,NULL,NULL,NULL,'N',NULL)
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES (\'550027502\',\'2012-09-21\',\'10:48:00\',\'2012-09-21\',\'10:48:00\',\'05\',\'02\',NULL,172,NULL,NULL,NULL,NULL,\'N\',NULL)')
INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES ('550027502','2012-09-21','10:48:00','2012-09-21','10:48:00','07','02',NULL,1665,NULL,NULL,NULL,NULL,'N',NULL)
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES (\'550027502\',\'2012-09-21\',\'10:48:00\',\'2012-09-21\',\'10:48:00\',\'07\',\'02\',NULL,1665,NULL,NULL,NULL,NULL,\'N\',NULL)')
INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES ('550027502','2012-09-21','10:48:00','2012-09-21','10:48:00','08','02',NULL,10170,NULL,NULL,NULL,NULL,'N',NULL)
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES (\'550027502\',\'2012-09-21\',\'10:48:00\',\'2012-09-21\',\'10:48:00\',\'08\',\'02\',NULL,10170,NULL,NULL,NULL,NULL,\'N\',NULL)')
INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES ('550027502','2012-09-21','10:48:00','2012-09-21','10:48:00','11','02',NULL,200,NULL,NULL,NULL,NULL,'N',NULL)
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES (\'550027502\',\'2012-09-21\',\'10:48:00\',\'2012-09-21\',\'10:48:00\',\'11\',\'02\',NULL,200,NULL,NULL,NULL,NULL,\'N\',NULL)')
INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES ('550027502','2012-09-21','10:48:00','2012-09-21','10:48:00','12','02',NULL,3300,NULL,NULL,NULL,NULL,'N',NULL)
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES (\'550027502\',\'2012-09-21\',\'10:48:00\',\'2012-09-21\',\'10:48:00\',\'12\',\'02\',NULL,3300,NULL,NULL,NULL,NULL,\'N\',NULL)')
INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES ('550027502','2012-09-21','10:48:00','2012-09-21','10:48:00','16','02',NULL,1200,NULL,NULL,NULL,NULL,'N',NULL)
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','INSERT INTO incith (an,billdate,billtime,incdate,inctime,income,paidst,rcpno,rcptamt,`user`,computer,finance_number,porder,verify,pttype) VALUES (\'550027502\',\'2012-09-21\',\'10:48:00\',\'2012-09-21\',\'10:48:00\',\'16\',\'02\',NULL,1200,NULL,NULL,NULL,NULL,\'N\',NULL)')
select count(*) as cc from rcpt_print where vn='550027502' and department='IPD' and bill_amount>0
select income,paidst,sum(sum_price) as sp from opitemrece where an='550027502' and paidst in ('01','03') group by income,paidst
select income,paidst,sum(sum_price) as sp from opitemrece where an='550027502' and paidst in ('01','03') group by income,paidst
select sum(sum_price) as cc from opitemrece where an = '550027502'
select sum(rcptamt) as cc from incith where an = '550027502'
select count(*) as cc from incith_summary where an='550027502'
SHOW TABLES FROM hos LIKE 'incith_summary'
SHOW COLUMNS FROM hos.incith_summary LIKE '%'
select sum(rcptamt) as cc from incith where an='550027502'
select sum(rcptamt) as cc from incith where an='550027502' and paidst = '02'
select sum(sum_price) as cc from opitemrece where an='550027502' and paidst in ('01','03')
select sum(bill_amount) as cc from rcpt_print where vn='550027502'
select sum(discount) as cc from rcpt_print where vn='550027502'
select sum(rcptamt) as cc from incith where an='550027502'
select sum(rcptamt) as cc from incith where an='550027502' and paidst = '00'
select sum(sum_price) as cc from opitemrece where an='550027502'
select pttype from ipt where an='550027502'
select spclty from ipt where an='550027502'
select g.income_group as income_group,sum(o.rcptamt) as samt from income_group g,income i,incith o where o.an='550027502' and i.income=o.income and g.income_group=i.income_group group by g.income_group
SHOW TABLES FROM hos LIKE 'income_group'
SHOW COLUMNS FROM hos.income_group LIKE '%'
SHOW TABLES FROM hos LIKE 'income'
SHOW COLUMNS FROM hos.income LIKE '%'
select g.income_group as income_group,sum(o.rcptamt) as samt from income_group g,income i,incith o where o.an='550027502' and i.income=o.income and g.income_group=i.income_group and o.paidst in ('01','03') group by g.income_group
select sum(rcptamt) as cc from incith where an='550027502' and paidst in ('01','03') and income in ('03',17 )
select sum(rcptamt) as cc from incith where an='550027502' and paidst in ('01','03') and income in ('05')
select g.income_group as income_group,sum(o.rcptamt) as samt from income_group g,income i,incith o where o.an='550027502' and i.income=o.income and g.income_group=i.income_group and o.paidst in ('00','02') group by g.income_group
select sum(rcptamt) as cc from incith where an='550027502' and paidst in ('00','02') and income in ('03',17 )
select sum(rcptamt) as cc from incith where an='550027502' and paidst in ('00','02') and income in ('05')
select * from inc_ipd_stat where an='550027502'
UPDATE inc_ipd_stat SET uinc01=1665,uinc04=10170,uinc06=200,uinc12=1144,uinc14=1200,uinc16=3000,uinc17=3300,uincome=20679,uinc_drug=629 WHERE an='550027502'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','UPDATE inc_ipd_stat SET uinc01=1665,uinc04=10170,uinc06=200,uinc12=1144,uinc14=1200,uinc16=3000,uinc17=3300,uincome=20679,uinc_drug=629 WHERE an=\'550027502\'')
select * from an_stat where an='550027502'
UPDATE an_stat SET income=20679,uc_money=20679,item_money=20679,inc01=1665,inc04=10170,inc06=200,inc12=1144,inc14=1200,inc16=3000,inc17=3300 WHERE an='550027502'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','UPDATE an_stat SET income=20679,uc_money=20679,item_money=20679,inc01=1665,inc04=10170,inc06=200,inc12=1144,inc14=1200,inc16=3000,inc17=3300 WHERE an=\'550027502\'')
select * from ipt_pregnancy where an = '550027502'
SHOW TABLES FROM hos LIKE 'ipt_pregnancy'
SHOW COLUMNS FROM hos.ipt_pregnancy LIKE '%'
SHOW KEYS FROM hos.ipt_pregnancy
select * from iptbedmove where an = '550027502' order by movedate,movetime
select * from ipt_ward_stat where an = '550027502'
SHOW TABLES FROM hos LIKE 'ipt_ward_stat'
SHOW COLUMNS FROM hos.ipt_ward_stat LIKE '%'
SHOW KEYS FROM hos.ipt_ward_stat
select ward,first_ward,regdate,regtime,dchdate,dchtime from ipt where an = '550027502'
select vn from ipt where an = '550027502'
select hos_guid from opitemrece where an = '550027502'
select hos_guid from opitemrece_summary where vn in ('550027502' , '550920212048')
SHOW TABLES FROM hos LIKE 'opitemrece_summary'
SHOW COLUMNS FROM hos.opitemrece_summary LIKE '%'
SHOW KEYS FROM hos.opitemrece_summary
select * from opitemrece_summary where hos_guid in ('{03824953-8AF6-4B89-B5CA-97BE8B2FD7F5}','{04D3525B-10DD-45CA-84CB-403625323243}','{0624F163-EECC-4999-9307-AF031C092BE9}','{09B481DD-9754-4C52-9DA6-AEFEDA32C749}','{0ACF20EE-11BD-4BDF-91EC-69EE274BA8A1}','{0B824033-7D2D-4C3A-A544-2A5094327CAD}','{0F7191B6-8D82-42A8-89AC-F3060D64C422}','{119941DE-BEAB-4003-8620-07C6565E3184}','{12C0F70F-27D6-4090-ACFF-41833FD5379F}','{1463C21F-4A7B-4602-83D9-ECFA83E88C91}','{1560E2C6-D40A-4F61-9A92-916CC68E6143}','{1B7F93CC-975E-4B6C-BBE2-066A7F7D323C}','{1B9450B2-1840-457F-BA84-71DC0F1E76C6}','{1C43AA5C-8FDE-41EC-A6B8-ECA112A6AE07}','{1D74413D-4508-49F6-ADB0-52D738B805B8}','{21A3BAA9-E832-45A7-8D63-666E17A6A46F}','{23D5CDA4-082D-45EF-A14A-DE0A64E3A482}','{29DDF63E-B344-4FFD-9FA3-25B067402EE6}','{2AF4B682-8672-43EC-B31C-71503E4A49D9}','{2BD1B338-1293-4267-BF32-8F2350CD81C8}','{2C8798A5-3309-4002-9573-FC0CCA16970E}','{2DDF9E00-50BE-4B1B-A37A-05C9006F4F46}','{3158BF1E-22AB-4A04-B063-5B9271624072}','{35B3ACFC-B209-4B81-AA37-9CBC9F0E15F3}','{36417892-CEA8-48A4-9541-266A636E424B}','{368CF7D2-72A2-4045-A4D7-00F774858D5F}','{3ED585B5-C9C5-4958-B3C8-7A282B2EC2AC}','{3F914063-CCDA-4EBE-BC8E-2DCE4594F93C}','{43863C22-C92D-4DBF-ACA1-D57632BDFDE7}','{460177AB-4AD1-4D59-A8EA-434F1147679D}','{4665FC34-EAD1-4D46-ADE2-F931747FD006}','{46ED5BB9-4B20-49B8-87EB-05FC2BFFB182}','{47CC6641-C04A-47E2-828A-B25F946730C3}','{4B42BFDE-A696-48C3-ADEE-4D505539CEC9}','{4C539B3F-3C4C-4469-8F13-1DE49A786C03}','{4D0F964A-50A2-4022-B62E-784F54B3CB25}','{4D6249CC-1DB7-41CB-8D62-F2A866FAC46C}','{4F6F389D-EF0A-4920-A19E-169B90245FCE}','{50181202-66E0-440D-A17F-5295BAC0E715}','{50794ADC-9305-4C34-8AB1-7DBB74115DDA}','{538D0A22-E934-4C86-8D35-AE5F90B76190}','{541AB0FF-2BAA-4BB6-9E5F-79FD277E1DC0}','{5601E651-F8D2-4CAB-8B4F-49CE68D34C96}','{569434A4-6FB6-4266-B255-F3A83EDA81D1}','{599E0455-1707-46A2-A2F1-E9E6D0EB1B9A}','{5BAE5D11-8660-4AFC-B3FE-BCE882A74239}','{5C459D9B-443E-43EF-9D42-F4D8956088BD}','{6162C970-3162-4D6D-B886-58BE3D71D419}','{66EC4930-DB50-4D14-BFA5-C6B991AA37A7}','{6AD1F526-5E0C-42EF-89EB-6430F18AA6E3}','{6B21FE47-4359-45DA-8542-98451747FFFB}','{6E5A2A20-B49C-4987-97F4-CB4FEFB44A81}','{70C54D8C-2BDA-45C1-8443-CEE149B3DB82}','{75400951-E7ED-4DD9-9D60-9E098CC2E7DA}','{77B1B2CE-CEDB-474E-96E6-6C70F693B0C0}','{78813221-0761-419C-9015-FC7391A3D079}','{78DB50CA-2DF3-40E1-8FD6-F8F657C509A6}','{7927A6C8-0786-41F2-A12E-13FEB0DAEF06}','{7C759350-0CE3-4229-9F1F-545DCF93D013}','{7D24CCE2-5670-4CA6-80BF-194D9D4BD437}','{7E2CC7B4-D90F-4F97-82BB-A89CEF9F851F}','{8263DCFF-319D-40B4-BCCA-06B8866D4001}','{82690002-7C17-4EBC-ABB4-D6195CBAAC52}','{8349CA6E-4D31-419E-A0E1-DE2D3B3FF52F}','{84000E2F-3EF8-4563-A162-4D39F0450EF0}','{8545F93C-F801-4E52-81FE-7E2867309B1E}','{85564DFC-7497-4BC2-88EB-25480CFCFD90}','{85BFA600-4740-44F7-B1C6-AE3C4D6F11C3}','{87E47CA6-F3A0-4D1F-B9E3-09DE9B36FB29}','{88420D0E-114E-470B-AAF4-B078D22788EC}','{889EC774-BEC9-4C97-A777-2D89ABE1E133}','{90D13118-DDB0-4360-BE72-358299F8D2F5}','{92B159F4-4442-4EDC-9D1E-69A3C15CE97A}','{92E47CC2-2E9D-45E4-9484-DECDC815A57C}','{943AF666-A846-4733-ACEE-E0A56D139C9C}','{998F41D3-10BE-47E3-850E-79F6B866FA9D}','{9E1C22C3-014B-4188-A8AB-5B1E3A5C1E4C}','{9E996C8B-C03E-4339-BE2A-C6FF413E3229}','{A38C6257-684C-4832-A7E8-A7D11717F1AE}','{A678C5DE-AF99-4E66-BECC-56AA623C6AE9}','{A6C39094-57E1-459C-98A3-AD070630F89D}','{A71EEDB9-13D7-47EA-98D6-5415B22BE21E}','{A8B6EE8C-0A53-4DA4-B7B9-C432BC752A9C}','{A9305116-D632-408D-B6B7-DECEDBB86C27}','{A9A8B9A1-8838-4326-B179-66F6C7ACEC60}','{AFE6CC5E-52AF-450E-8AF8-78065D511EAB}','{B3EB6EE9-DC68-4F22-8C85-DC0465B7DF8C}','{B50D768B-E880-411D-B5DA-3CC980F9F7FF}','{B6ED2D19-8132-47A7-9F51-910B6D4728B1}','{B795F006-C073-4DA0-BBFC-E07D9EEB4BE7}','{BA267995-C639-4BE2-BC62-C8CF1B2EA046}','{BA5161CC-483D-43AC-97B4-0321B9BB0E73}','{BB5981CF-3691-4B5A-B746-BCFE428B4D7F}','{BC9C22F7-C653-4E96-AEA9-7C3BF145FA47}','{BD02FEF6-1599-40AC-A3C8-241E0FD14B2D}','{C0DF404E-8BA6-4D17-8D5C-84D615B0C44C}','{C24C9B01-9B07-43A6-AD71-412C72344980}','{C3E0494A-DFD3-4E78-8B4C-5616FB964010}','{C3FEAD38-67BE-4A5A-8B54-4059A5DFDE4F}','{C403A43F-427F-4A03-A482-CCE65F098168}','{C6D656F9-E048-4C81-8644-781ADB470EBD}','{C7C2B1D5-6CF1-46B4-AE58-B783EA512515}','{C920E54F-E013-4313-8175-A613516C8368}','{D0C92B16-8BE6-4CA2-BA66-62FF833CAF96}','{D1B0AF1F-1047-4DE4-B86E-0E806FB88F96}','{D2C37DAB-D8AC-4E3F-BFE4-C6292DD5604F}','{D47A73ED-1175-44EF-852E-A13EB3CECCD1}','{D645B8D2-BB8F-4C43-9533-7E590CC9A186}','{D95C09D7-6657-4A90-B6B7-8596935526EB}','{D9B4BDC5-8E23-4D56-9202-FDFBBCF647A0}','{DABC442F-4AF9-43E5-BE5B-73EDFED9F408}','{DBF255E3-FD35-4EB8-91B5-B31966EEA88D}','{DC5FD0CE-31EE-4F70-AEE6-4DD7AFEC905D}','{DD691F3D-886D-486F-8C25-0F6CB51D23D1}','{DE577DB2-EEF3-4FCC-967D-B089BEA9E7E1}','{E44DF526-AEC7-474F-BD7B-49B7187AAAE4}','{E559B67B-C246-49CA-936E-B7AA7C88C7A4}','{E8BC3933-89CB-493F-A86A-41973B9915FF}','{E975A9EB-98E1-492B-B656-48AFB08D6630}','{EECB5A44-F62E-47D1-9E57-0DC05ECDD129}','{F34AEEF2-B1A4-4F91-B1AB-0DC37032FD0A}','{F3CC1149-2E57-4475-A94E-D185A449A6F0}','{F428EB2D-A450-438E-B638-8BF91F6202A1}','{F701E366-7A14-4E8C-BC45-A2B204009DFF}','{FA2E8586-DC26-42B0-BBB8-B6C60A73D175}','{FB52DC69-CE98-4509-B5C5-F8FFBAACA3B6}','{FD07A96F-DBC8-4FD9-A08B-975D55F0F8BD}','{FD900775-1BD9-4E71-987E-BFB9EB11FAB0}','{FE66A78F-8957-4FE7-9EF4-3C85E6381193}','{FF972041-CCBB-496D-82B0-C5F49B4754A8}','{03824953-8AF6-4B89-B5CA-97BE8B2FD7F5}','{04D3525B-10DD-45CA-84CB-403625323243}','{0624F163-EECC-4999-9307-AF031C092BE9}','{09B481DD-9754-4C52-9DA6-AEFEDA32C749}','{0ACF20EE-11BD-4BDF-91EC-69EE274BA8A1}','{0B824033-7D2D-4C3A-A544-2A5094327CAD}','{0F7191B6-8D82-42A8-89AC-F3060D64C422}','{119941DE-BEAB-4003-8620-07C6565E3184}','{11B73AE0-B649-4FCA-A295-596F4466CFBB}','{12C0F70F-27D6-4090-ACFF-41833FD5379F}','{1463C21F-4A7B-4602-83D9-ECFA83E88C91}','{1560E2C6-D40A-4F61-9A92-916CC68E6143}','{1B7F93CC-975E-4B6C-BBE2-066A7F7D323C}','{1B9450B2-1840-457F-BA84-71DC0F1E76C6}','{1C43AA5C-8FDE-41EC-A6B8-ECA112A6AE07}','{1D74413D-4508-49F6-ADB0-52D738B805B8}','{21A3BAA9-E832-45A7-8D63-666E17A6A46F}','{23D5CDA4-082D-45EF-A14A-DE0A64E3A482}','{29DDF63E-B344-4FFD-9FA3-25B067402EE6}','{2AF4B682-8672-43EC-B31C-71503E4A49D9}','{2BD1B338-1293-4267-BF32-8F2350CD81C8}','{2C8798A5-3309-4002-9573-FC0CCA16970E}','{2C9C10C0-2904-443E-9C83-39F0B42554CC}','{2DDF9E00-50BE-4B1B-A37A-05C9006F4F46}','{3158BF1E-22AB-4A04-B063-5B9271624072}','{35B3ACFC-B209-4B81-AA37-9CBC9F0E15F3}','{36417892-CEA8-48A4-9541-266A636E424B}','{368CF7D2-72A2-4045-A4D7-00F774858D5F}','{3ED585B5-C9C5-4958-B3C8-7A282B2EC2AC}','{3F914063-CCDA-4EBE-BC8E-2DCE4594F93C}','{43863C22-C92D-4DBF-ACA1-D57632BDFDE7}','{460177AB-4AD1-4D59-A8EA-434F1147679D}','{4665FC34-EAD1-4D46-ADE2-F931747FD006}','{46ED5BB9-4B20-49B8-87EB-05FC2BFFB182}','{47CC6641-C04A-47E2-828A-B25F946730C3}','{4B42BFDE-A696-48C3-ADEE-4D505539CEC9}','{4C539B3F-3C4C-4469-8F13-1DE49A786C03}','{4D0F964A-50A2-4022-B62E-784F54B3CB25}','{4D6249CC-1DB7-41CB-8D62-F2A866FAC46C}','{4F6F389D-EF0A-4920-A19E-169B90245FCE}','{50181202-66E0-440D-A17F-5295BAC0E715}','{50794ADC-9305-4C34-8AB1-7DBB74115DDA}','{530FE7E7-A898-4D93-8C9F-82EDF95A010C}','{538D0A22-E934-4C86-8D35-AE5F90B76190}','{541AB0FF-2BAA-4BB6-9E5F-79FD277E1DC0}','{5601E651-F8D2-4CAB-8B4F-49CE68D34C96}','{569434A4-6FB6-4266-B255-F3A83EDA81D1}','{599E0455-1707-46A2-A2F1-E9E6D0EB1B9A}','{5BAE5D11-8660-4AFC-B3FE-BCE882A74239}','{5C459D9B-443E-43EF-9D42-F4D8956088BD}','{5C5A5B57-F1E7-4DAB-AA78-F4B4E562621A}','{6162C970-3162-4D6D-B886-58BE3D71D419}','{61ABC2C4-02E3-43A2-BDBD-D2AEBE48018A}','{66EC4930-DB50-4D14-BFA5-C6B991AA37A7}','{6AD1F526-5E0C-42EF-89EB-6430F18AA6E3}','{6B21FE47-4359-45DA-8542-98451747FFFB}','{6E5A2A20-B49C-4987-97F4-CB4FEFB44A81}','{70C54D8C-2BDA-45C1-8443-CEE149B3DB82}','{75400951-E7ED-4DD9-9D60-9E098CC2E7DA}','{77B1B2CE-CEDB-474E-96E6-6C70F693B0C0}','{78813221-0761-419C-9015-FC7391A3D079}','{78DB50CA-2DF3-40E1-8FD6-F8F657C509A6}','{7927A6C8-0786-41F2-A12E-13FEB0DAEF06}','{79F2E83C-D68E-41A2-AEB5-D5C293720BC6}','{7C759350-0CE3-4229-9F1F-545DCF93D013}','{7D24CCE2-5670-4CA6-80BF-194D9D4BD437}','{7E2CC7B4-D90F-4F97-82BB-A89CEF9F851F}','{8263DCFF-319D-40B4-BCCA-06B8866D4001}','{82690002-7C17-4EBC-ABB4-D6195CBAAC52}','{8349CA6E-4D31-419E-A0E1-DE2D3B3FF52F}','{84000E2F-3EF8-4563-A162-4D39F0450EF0}','{8545F93C-F801-4E52-81FE-7E2867309B1E}','{85564DFC-7497-4BC2-88EB-25480CFCFD90}','{85BFA600-4740-44F7-B1C6-AE3C4D6F11C3}','{87E47CA6-F3A0-4D1F-B9E3-09DE9B36FB29}','{88420D0E-114E-470B-AAF4-B078D22788EC}','{889EC774-BEC9-4C97-A777-2D89ABE1E133}','{90D13118-DDB0-4360-BE72-358299F8D2F5}','{92B159F4-4442-4EDC-9D1E-69A3C15CE97A}','{92E47CC2-2E9D-45E4-9484-DECDC815A57C}','{943AF666-A846-4733-ACEE-E0A56D139C9C}','{998F41D3-10BE-47E3-850E-79F6B866FA9D}','{9E1C22C3-014B-4188-A8AB-5B1E3A5C1E4C}','{9E996C8B-C03E-4339-BE2A-C6FF413E3229}','{A38C6257-684C-4832-A7E8-A7D11717F1AE}','{A3943872-001D-43A3-A620-2CFEC99DCF5F}','{A678C5DE-AF99-4E66-BECC-56AA623C6AE9}','{A6C39094-57E1-459C-98A3-AD070630F89D}','{A71EEDB9-13D7-47EA-98D6-5415B22BE21E}','{A7BA4740-7F8D-4A27-8D9B-FE6157ABB794}','{A8B6EE8C-0A53-4DA4-B7B9-C432BC752A9C}','{A9305116-D632-408D-B6B7-DECEDBB86C27}','{A9A8B9A1-8838-4326-B179-66F6C7ACEC60}','{AFE6CC5E-52AF-450E-8AF8-78065D511EAB}','{B3EB6EE9-DC68-4F22-8C85-DC0465B7DF8C}','{B50D768B-E880-411D-B5DA-3CC980F9F7FF}','{B6ED2D19-8132-47A7-9F51-910B6D4728B1}','{B795F006-C073-4DA0-BBFC-E07D9EEB4BE7}','{BA267995-C639-4BE2-BC62-C8CF1B2EA046}','{BA5161CC-483D-43AC-97B4-0321B9BB0E73}','{BB5981CF-3691-4B5A-B746-BCFE428B4D7F}','{BC9C22F7-C653-4E96-AEA9-7C3BF145FA47}','{BD02FEF6-1599-40AC-A3C8-241E0FD14B2D}','{C0DF404E-8BA6-4D17-8D5C-84D615B0C44C}','{C24C9B01-9B07-43A6-AD71-412C72344980}','{C2E22B61-944A-4318-AB91-6B9E83035242}','{C3E0494A-DFD3-4E78-8B4C-5616FB964010}','{C3FEAD38-67BE-4A5A-8B54-4059A5DFDE4F}','{C403A43F-427F-4A03-A482-CCE65F098168}','{C6D656F9-E048-4C81-8644-781ADB470EBD}','{C7C2B1D5-6CF1-46B4-AE58-B783EA512515}','{C920E54F-E013-4313-8175-A613516C8368}','{D0C92B16-8BE6-4CA2-BA66-62FF833CAF96}','{D1B0AF1F-1047-4DE4-B86E-0E806FB88F96}','{D2C37DAB-D8AC-4E3F-BFE4-C6292DD5604F}','{D47A73ED-1175-44EF-852E-A13EB3CECCD1}','{D645B8D2-BB8F-4C43-9533-7E590CC9A186}','{D95C09D7-6657-4A90-B6B7-8596935526EB}','{D9B4BDC5-8E23-4D56-9202-FDFBBCF647A0}','{DABC442F-4AF9-43E5-BE5B-73EDFED9F408}','{DBF255E3-FD35-4EB8-91B5-B31966EEA88D}','{DC5FD0CE-31EE-4F70-AEE6-4DD7AFEC905D}','{DD691F3D-886D-486F-8C25-0F6CB51D23D1}','{DE577DB2-EEF3-4FCC-967D-B089BEA9E7E1}','{E44DF526-AEC7-474F-BD7B-49B7187AAAE4}','{E559B67B-C246-49CA-936E-B7AA7C88C7A4}','{E8BC3933-89CB-493F-A86A-41973B9915FF}','{E975A9EB-98E1-492B-B656-48AFB08D6630}','{EAC3EE69-B1D9-48C2-8452-24750D0648A9}','{EECB5A44-F62E-47D1-9E57-0DC05ECDD129}','{EFF44908-E323-4712-A341-06460BBE1BBE}','{F34AEEF2-B1A4-4F91-B1AB-0DC37032FD0A}','{F3CC1149-2E57-4475-A94E-D185A449A6F0}','{F428EB2D-A450-438E-B638-8BF91F6202A1}','{F701E366-7A14-4E8C-BC45-A2B204009DFF}','{FA2E8586-DC26-42B0-BBB8-B6C60A73D175}','{FB52DC69-CE98-4509-B5C5-F8FFBAACA3B6}','{FD07A96F-DBC8-4FD9-A08B-975D55F0F8BD}','{FD900775-1BD9-4E71-987E-BFB9EB11FAB0}','{FE4F652E-AF62-4FDD-AAA4-6193ED08EA5F}','{FE66A78F-8957-4FE7-9EF4-3C85E6381193}','{FF972041-CCBB-496D-82B0-C5F49B4754A8}')
select * from opitemrece_summary where hos_guid in ('{03824953-8AF6-4B89-B5CA-97BE8B2FD7F5}','{04D3525B-10DD-45CA-84CB-403625323243}','{0624F163-EECC-4999-9307-AF031C092BE9}','{09B481DD-9754-4C52-9DA6-AEFEDA32C749}','{0ACF20EE-11BD-4BDF-91EC-69EE274BA8A1}','{0B824033-7D2D-4C3A-A544-2A5094327CAD}','{0F7191B6-8D82-42A8-89AC-F3060D64C422}','{119941DE-BEAB-4003-8620-07C6565E3184}','{12C0F70F-27D6-4090-ACFF-41833FD5379F}','{1463C21F-4A7B-4602-83D9-ECFA83E88C91}','{1560E2C6-D40A-4F61-9A92-916CC68E6143}','{1B7F93CC-975E-4B6C-BBE2-066A7F7D323C}','{1B9450B2-1840-457F-BA84-71DC0F1E76C6}','{1C43AA5C-8FDE-41EC-A6B8-ECA112A6AE07}','{1D74413D-4508-49F6-ADB0-52D738B805B8}','{21A3BAA9-E832-45A7-8D63-666E17A6A46F}','{23D5CDA4-082D-45EF-A14A-DE0A64E3A482}','{29DDF63E-B344-4FFD-9FA3-25B067402EE6}','{2AF4B682-8672-43EC-B31C-71503E4A49D9}','{2BD1B338-1293-4267-BF32-8F2350CD81C8}','{2C8798A5-3309-4002-9573-FC0CCA16970E}','{2DDF9E00-50BE-4B1B-A37A-05C9006F4F46}','{3158BF1E-22AB-4A04-B063-5B9271624072}','{35B3ACFC-B209-4B81-AA37-9CBC9F0E15F3}','{36417892-CEA8-48A4-9541-266A636E424B}','{368CF7D2-72A2-4045-A4D7-00F774858D5F}','{3ED585B5-C9C5-4958-B3C8-7A282B2EC2AC}','{3F914063-CCDA-4EBE-BC8E-2DCE4594F93C}','{43863C22-C92D-4DBF-ACA1-D57632BDFDE7}','{460177AB-4AD1-4D59-A8EA-434F1147679D}','{4665FC34-EAD1-4D46-ADE2-F931747FD006}','{46ED5BB9-4B20-49B8-87EB-05FC2BFFB182}','{47CC6641-C04A-47E2-828A-B25F946730C3}','{4B42BFDE-A696-48C3-ADEE-4D505539CEC9}','{4C539B3F-3C4C-4469-8F13-1DE49A786C03}','{4D0F964A-50A2-4022-B62E-784F54B3CB25}','{4D6249CC-1DB7-41CB-8D62-F2A866FAC46C}','{4F6F389D-EF0A-4920-A19E-169B90245FCE}','{50181202-66E0-440D-A17F-5295BAC0E715}','{50794ADC-9305-4C34-8AB1-7DBB74115DDA}','{538D0A22-E934-4C86-8D35-AE5F90B76190}','{541AB0FF-2BAA-4BB6-9E5F-79FD277E1DC0}','{5601E651-F8D2-4CAB-8B4F-49CE68D34C96}','{569434A4-6FB6-4266-B255-F3A83EDA81D1}','{599E0455-1707-46A2-A2F1-E9E6D0EB1B9A}','{5BAE5D11-8660-4AFC-B3FE-BCE882A74239}','{5C459D9B-443E-43EF-9D42-F4D8956088BD}','{6162C970-3162-4D6D-B886-58BE3D71D419}','{66EC4930-DB50-4D14-BFA5-C6B991AA37A7}','{6AD1F526-5E0C-42EF-89EB-6430F18AA6E3}','{6B21FE47-4359-45DA-8542-98451747FFFB}','{6E5A2A20-B49C-4987-97F4-CB4FEFB44A81}','{70C54D8C-2BDA-45C1-8443-CEE149B3DB82}','{75400951-E7ED-4DD9-9D60-9E098CC2E7DA}','{77B1B2CE-CEDB-474E-96E6-6C70F693B0C0}','{78813221-0761-419C-9015-FC7391A3D079}','{78DB50CA-2DF3-40E1-8FD6-F8F657C509A6}','{7927A6C8-0786-41F2-A12E-13FEB0DAEF06}','{7C759350-0CE3-4229-9F1F-545DCF93D013}','{7D24CCE2-5670-4CA6-80BF-194D9D4BD437}','{7E2CC7B4-D90F-4F97-82BB-A89CEF9F851F}','{8263DCFF-319D-40B4-BCCA-06B8866D4001}','{82690002-7C17-4EBC-ABB4-D6195CBAAC52}','{8349CA6E-4D31-419E-A0E1-DE2D3B3FF52F}','{84000E2F-3EF8-4563-A162-4D39F0450EF0}','{8545F93C-F801-4E52-81FE-7E2867309B1E}','{85564DFC-7497-4BC2-88EB-25480CFCFD90}','{85BFA600-4740-44F7-B1C6-AE3C4D6F11C3}','{87E47CA6-F3A0-4D1F-B9E3-09DE9B36FB29}','{88420D0E-114E-470B-AAF4-B078D22788EC}','{889EC774-BEC9-4C97-A777-2D89ABE1E133}','{90D13118-DDB0-4360-BE72-358299F8D2F5}','{92B159F4-4442-4EDC-9D1E-69A3C15CE97A}','{92E47CC2-2E9D-45E4-9484-DECDC815A57C}','{943AF666-A846-4733-ACEE-E0A56D139C9C}','{998F41D3-10BE-47E3-850E-79F6B866FA9D}','{9E1C22C3-014B-4188-A8AB-5B1E3A5C1E4C}','{9E996C8B-C03E-4339-BE2A-C6FF413E3229}','{A38C6257-684C-4832-A7E8-A7D11717F1AE}','{A678C5DE-AF99-4E66-BECC-56AA623C6AE9}','{A6C39094-57E1-459C-98A3-AD070630F89D}','{A71EEDB9-13D7-47EA-98D6-5415B22BE21E}','{A8B6EE8C-0A53-4DA4-B7B9-C432BC752A9C}','{A9305116-D632-408D-B6B7-DECEDBB86C27}','{A9A8B9A1-8838-4326-B179-66F6C7ACEC60}','{AFE6CC5E-52AF-450E-8AF8-78065D511EAB}','{B3EB6EE9-DC68-4F22-8C85-DC0465B7DF8C}','{B50D768B-E880-411D-B5DA-3CC980F9F7FF}','{B6ED2D19-8132-47A7-9F51-910B6D4728B1}','{B795F006-C073-4DA0-BBFC-E07D9EEB4BE7}','{BA267995-C639-4BE2-BC62-C8CF1B2EA046}','{BA5161CC-483D-43AC-97B4-0321B9BB0E73}','{BB5981CF-3691-4B5A-B746-BCFE428B4D7F}','{BC9C22F7-C653-4E96-AEA9-7C3BF145FA47}','{BD02FEF6-1599-40AC-A3C8-241E0FD14B2D}','{C0DF404E-8BA6-4D17-8D5C-84D615B0C44C}','{C24C9B01-9B07-43A6-AD71-412C72344980}','{C3E0494A-DFD3-4E78-8B4C-5616FB964010}','{C3FEAD38-67BE-4A5A-8B54-4059A5DFDE4F}','{C403A43F-427F-4A03-A482-CCE65F098168}','{C6D656F9-E048-4C81-8644-781ADB470EBD}','{C7C2B1D5-6CF1-46B4-AE58-B783EA512515}','{C920E54F-E013-4313-8175-A613516C8368}','{D0C92B16-8BE6-4CA2-BA66-62FF833CAF96}','{D1B0AF1F-1047-4DE4-B86E-0E806FB88F96}','{D2C37DAB-D8AC-4E3F-BFE4-C6292DD5604F}','{D47A73ED-1175-44EF-852E-A13EB3CECCD1}','{D645B8D2-BB8F-4C43-9533-7E590CC9A186}','{D95C09D7-6657-4A90-B6B7-8596935526EB}','{D9B4BDC5-8E23-4D56-9202-FDFBBCF647A0}','{DABC442F-4AF9-43E5-BE5B-73EDFED9F408}','{DBF255E3-FD35-4EB8-91B5-B31966EEA88D}','{DC5FD0CE-31EE-4F70-AEE6-4DD7AFEC905D}','{DD691F3D-886D-486F-8C25-0F6CB51D23D1}','{DE577DB2-EEF3-4FCC-967D-B089BEA9E7E1}','{E44DF526-AEC7-474F-BD7B-49B7187AAAE4}','{E559B67B-C246-49CA-936E-B7AA7C88C7A4}','{E8BC3933-89CB-493F-A86A-41973B9915FF}','{E975A9EB-98E1-492B-B656-48AFB08D6630}','{EECB5A44-F62E-47D1-9E57-0DC05ECDD129}','{F34AEEF2-B1A4-4F91-B1AB-0DC37032FD0A}','{F3CC1149-2E57-4475-A94E-D185A449A6F0}','{F428EB2D-A450-438E-B638-8BF91F6202A1}','{F701E366-7A14-4E8C-BC45-A2B204009DFF}','{FA2E8586-DC26-42B0-BBB8-B6C60A73D175}','{FB52DC69-CE98-4509-B5C5-F8FFBAACA3B6}','{FD07A96F-DBC8-4FD9-A08B-975D55F0F8BD}','{FD900775-1BD9-4E71-987E-BFB9EB11FAB0}','{FE66A78F-8957-4FE7-9EF4-3C85E6381193}','{FF972041-CCBB-496D-82B0-C5F49B4754A8}','{03824953-8AF6-4B89-B5CA-97BE8B2FD7F5}','{04D3525B-10DD-45CA-84CB-403625323243}','{0624F163-EECC-4999-9307-AF031C092BE9}','{09B481DD-9754-4C52-9DA6-AEFEDA32C749}','{0ACF20EE-11BD-4BDF-91EC-69EE274BA8A1}','{0B824033-7D2D-4C3A-A544-2A5094327CAD}','{0F7191B6-8D82-42A8-89AC-F3060D64C422}','{119941DE-BEAB-4003-8620-07C6565E3184}','{11B73AE0-B649-4FCA-A295-596F4466CFBB}','{12C0F70F-27D6-4090-ACFF-41833FD5379F}','{1463C21F-4A7B-4602-83D9-ECFA83E88C91}','{1560E2C6-D40A-4F61-9A92-916CC68E6143}','{1B7F93CC-975E-4B6C-BBE2-066A7F7D323C}','{1B9450B2-1840-457F-BA84-71DC0F1E76C6}','{1C43AA5C-8FDE-41EC-A6B8-ECA112A6AE07}','{1D74413D-4508-49F6-ADB0-52D738B805B8}','{21A3BAA9-E832-45A7-8D63-666E17A6A46F}','{23D5CDA4-082D-45EF-A14A-DE0A64E3A482}','{29DDF63E-B344-4FFD-9FA3-25B067402EE6}','{2AF4B682-8672-43EC-B31C-71503E4A49D9}','{2BD1B338-1293-4267-BF32-8F2350CD81C8}','{2C8798A5-3309-4002-9573-FC0CCA16970E}','{2C9C10C0-2904-443E-9C83-39F0B42554CC}','{2DDF9E00-50BE-4B1B-A37A-05C9006F4F46}','{3158BF1E-22AB-4A04-B063-5B9271624072}','{35B3ACFC-B209-4B81-AA37-9CBC9F0E15F3}','{36417892-CEA8-48A4-9541-266A636E424B}','{368CF7D2-72A2-4045-A4D7-00F774858D5F}','{3ED585B5-C9C5-4958-B3C8-7A282B2EC2AC}','{3F914063-CCDA-4EBE-BC8E-2DCE4594F93C}','{43863C22-C92D-4DBF-ACA1-D57632BDFDE7}','{460177AB-4AD1-4D59-A8EA-434F1147679D}','{4665FC34-EAD1-4D46-ADE2-F931747FD006}','{46ED5BB9-4B20-49B8-87EB-05FC2BFFB182}','{47CC6641-C04A-47E2-828A-B25F946730C3}','{4B42BFDE-A696-48C3-ADEE-4D505539CEC9}','{4C539B3F-3C4C-4469-8F13-1DE49A786C03}','{4D0F964A-50A2-4022-B62E-784F54B3CB25}','{4D6249CC-1DB7-41CB-8D62-F2A866FAC46C}','{4F6F389D-EF0A-4920-A19E-169B90245FCE}','{50181202-66E0-440D-A17F-5295BAC0E715}','{50794ADC-9305-4C34-8AB1-7DBB74115DDA}','{530FE7E7-A898-4D93-8C9F-82EDF95A010C}','{538D0A22-E934-4C86-8D35-AE5F90B76190}','{541AB0FF-2BAA-4BB6-9E5F-79FD277E1DC0}','{5601E651-F8D2-4CAB-8B4F-49CE68D34C96}','{569434A4-6FB6-4266-B255-F3A83EDA81D1}','{599E0455-1707-46A2-A2F1-E9E6D0EB1B9A}','{5BAE5D11-8660-4AFC-B3FE-BCE882A74239}','{5C459D9B-443E-43EF-9D42-F4D8956088BD}','{5C5A5B57-F1E7-4DAB-AA78-F4B4E562621A}','{6162C970-3162-4D6D-B886-58BE3D71D419}','{61ABC2C4-02E3-43A2-BDBD-D2AEBE48018A}','{66EC4930-DB50-4D14-BFA5-C6B991AA37A7}','{6AD1F526-5E0C-42EF-89EB-6430F18AA6E3}','{6B21FE47-4359-45DA-8542-98451747FFFB}','{6E5A2A20-B49C-4987-97F4-CB4FEFB44A81}','{70C54D8C-2BDA-45C1-8443-CEE149B3DB82}','{75400951-E7ED-4DD9-9D60-9E098CC2E7DA}','{77B1B2CE-CEDB-474E-96E6-6C70F693B0C0}','{78813221-0761-419C-9015-FC7391A3D079}','{78DB50CA-2DF3-40E1-8FD6-F8F657C509A6}','{7927A6C8-0786-41F2-A12E-13FEB0DAEF06}','{79F2E83C-D68E-41A2-AEB5-D5C293720BC6}','{7C759350-0CE3-4229-9F1F-545DCF93D013}','{7D24CCE2-5670-4CA6-80BF-194D9D4BD437}','{7E2CC7B4-D90F-4F97-82BB-A89CEF9F851F}','{8263DCFF-319D-40B4-BCCA-06B8866D4001}','{82690002-7C17-4EBC-ABB4-D6195CBAAC52}','{8349CA6E-4D31-419E-A0E1-DE2D3B3FF52F}','{84000E2F-3EF8-4563-A162-4D39F0450EF0}','{8545F93C-F801-4E52-81FE-7E2867309B1E}','{85564DFC-7497-4BC2-88EB-25480CFCFD90}','{85BFA600-4740-44F7-B1C6-AE3C4D6F11C3}','{87E47CA6-F3A0-4D1F-B9E3-09DE9B36FB29}','{88420D0E-114E-470B-AAF4-B078D22788EC}','{889EC774-BEC9-4C97-A777-2D89ABE1E133}','{90D13118-DDB0-4360-BE72-358299F8D2F5}','{92B159F4-4442-4EDC-9D1E-69A3C15CE97A}','{92E47CC2-2E9D-45E4-9484-DECDC815A57C}','{943AF666-A846-4733-ACEE-E0A56D139C9C}','{998F41D3-10BE-47E3-850E-79F6B866FA9D}','{9E1C22C3-014B-4188-A8AB-5B1E3A5C1E4C}','{9E996C8B-C03E-4339-BE2A-C6FF413E3229}','{A38C6257-684C-4832-A7E8-A7D11717F1AE}','{A3943872-001D-43A3-A620-2CFEC99DCF5F}','{A678C5DE-AF99-4E66-BECC-56AA623C6AE9}','{A6C39094-57E1-459C-98A3-AD070630F89D}','{A71EEDB9-13D7-47EA-98D6-5415B22BE21E}','{A7BA4740-7F8D-4A27-8D9B-FE6157ABB794}','{A8B6EE8C-0A53-4DA4-B7B9-C432BC752A9C}','{A9305116-D632-408D-B6B7-DECEDBB86C27}','{A9A8B9A1-8838-4326-B179-66F6C7ACEC60}','{AFE6CC5E-52AF-450E-8AF8-78065D511EAB}','{B3EB6EE9-DC68-4F22-8C85-DC0465B7DF8C}','{B50D768B-E880-411D-B5DA-3CC980F9F7FF}','{B6ED2D19-8132-47A7-9F51-910B6D4728B1}','{B795F006-C073-4DA0-BBFC-E07D9EEB4BE7}','{BA267995-C639-4BE2-BC62-C8CF1B2EA046}','{BA5161CC-483D-43AC-97B4-0321B9BB0E73}','{BB5981CF-3691-4B5A-B746-BCFE428B4D7F}','{BC9C22F7-C653-4E96-AEA9-7C3BF145FA47}','{BD02FEF6-1599-40AC-A3C8-241E0FD14B2D}','{C0DF404E-8BA6-4D17-8D5C-84D615B0C44C}','{C24C9B01-9B07-43A6-AD71-412C72344980}','{C2E22B61-944A-4318-AB91-6B9E83035242}','{C3E0494A-DFD3-4E78-8B4C-5616FB964010}','{C3FEAD38-67BE-4A5A-8B54-4059A5DFDE4F}','{C403A43F-427F-4A03-A482-CCE65F098168}','{C6D656F9-E048-4C81-8644-781ADB470EBD}','{C7C2B1D5-6CF1-46B4-AE58-B783EA512515}','{C920E54F-E013-4313-8175-A613516C8368}','{D0C92B16-8BE6-4CA2-BA66-62FF833CAF96}','{D1B0AF1F-1047-4DE4-B86E-0E806FB88F96}','{D2C37DAB-D8AC-4E3F-BFE4-C6292DD5604F}','{D47A73ED-1175-44EF-852E-A13EB3CECCD1}','{D645B8D2-BB8F-4C43-9533-7E590CC9A186}','{D95C09D7-6657-4A90-B6B7-8596935526EB}','{D9B4BDC5-8E23-4D56-9202-FDFBBCF647A0}','{DABC442F-4AF9-43E5-BE5B-73EDFED9F408}','{DBF255E3-FD35-4EB8-91B5-B31966EEA88D}','{DC5FD0CE-31EE-4F70-AEE6-4DD7AFEC905D}','{DD691F3D-886D-486F-8C25-0F6CB51D23D1}','{DE577DB2-EEF3-4FCC-967D-B089BEA9E7E1}','{E44DF526-AEC7-474F-BD7B-49B7187AAAE4}','{E559B67B-C246-49CA-936E-B7AA7C88C7A4}','{E8BC3933-89CB-493F-A86A-41973B9915FF}','{E975A9EB-98E1-492B-B656-48AFB08D6630}','{EAC3EE69-B1D9-48C2-8452-24750D0648A9}','{EECB5A44-F62E-47D1-9E57-0DC05ECDD129}','{EFF44908-E323-4712-A341-06460BBE1BBE}','{F34AEEF2-B1A4-4F91-B1AB-0DC37032FD0A}','{F3CC1149-2E57-4475-A94E-D185A449A6F0}','{F428EB2D-A450-438E-B638-8BF91F6202A1}','{F701E366-7A14-4E8C-BC45-A2B204009DFF}','{FA2E8586-DC26-42B0-BBB8-B6C60A73D175}','{FB52DC69-CE98-4509-B5C5-F8FFBAACA3B6}','{FD07A96F-DBC8-4FD9-A08B-975D55F0F8BD}','{FD900775-1BD9-4E71-987E-BFB9EB11FAB0}','{FE4F652E-AF62-4FDD-AAA4-6193ED08EA5F}','{FE66A78F-8957-4FE7-9EF4-3C85E6381193}','{FF972041-CCBB-496D-82B0-C5F49B4754A8}')
DELETE FROM opitemrece_summary WHERE hos_guid='{11B73AE0-B649-4FCA-A295-596F4466CFBB}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{11B73AE0-B649-4FCA-A295-596F4466CFBB}\'')
DELETE FROM opitemrece_summary WHERE hos_guid='{2C9C10C0-2904-443E-9C83-39F0B42554CC}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{2C9C10C0-2904-443E-9C83-39F0B42554CC}\'')
DELETE FROM opitemrece_summary WHERE hos_guid='{530FE7E7-A898-4D93-8C9F-82EDF95A010C}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{530FE7E7-A898-4D93-8C9F-82EDF95A010C}\'')
DELETE FROM opitemrece_summary WHERE hos_guid='{5C5A5B57-F1E7-4DAB-AA78-F4B4E562621A}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{5C5A5B57-F1E7-4DAB-AA78-F4B4E562621A}\'')
DELETE FROM opitemrece_summary WHERE hos_guid='{61ABC2C4-02E3-43A2-BDBD-D2AEBE48018A}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{61ABC2C4-02E3-43A2-BDBD-D2AEBE48018A}\'')
DELETE FROM opitemrece_summary WHERE hos_guid='{79F2E83C-D68E-41A2-AEB5-D5C293720BC6}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{79F2E83C-D68E-41A2-AEB5-D5C293720BC6}\'')
DELETE FROM opitemrece_summary WHERE hos_guid='{A3943872-001D-43A3-A620-2CFEC99DCF5F}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{A3943872-001D-43A3-A620-2CFEC99DCF5F}\'')
DELETE FROM opitemrece_summary WHERE hos_guid='{A7BA4740-7F8D-4A27-8D9B-FE6157ABB794}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{A7BA4740-7F8D-4A27-8D9B-FE6157ABB794}\'')
DELETE FROM opitemrece_summary WHERE hos_guid='{C2E22B61-944A-4318-AB91-6B9E83035242}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{C2E22B61-944A-4318-AB91-6B9E83035242}\'')
DELETE FROM opitemrece_summary WHERE hos_guid='{EAC3EE69-B1D9-48C2-8452-24750D0648A9}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{EAC3EE69-B1D9-48C2-8452-24750D0648A9}\'')
DELETE FROM opitemrece_summary WHERE hos_guid='{EFF44908-E323-4712-A341-06460BBE1BBE}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{EFF44908-E323-4712-A341-06460BBE1BBE}\'')
DELETE FROM opitemrece_summary WHERE hos_guid='{FE4F652E-AF62-4FDD-AAA4-6193ED08EA5F}'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','DELETE FROM opitemrece_summary WHERE hos_guid=\'{FE4F652E-AF62-4FDD-AAA4-6193ED08EA5F}\'')
select * from ipt where an = '550027502'
select * from opitemrece_trx where an = '550027502'
SHOW TABLES FROM hos LIKE 'opitemrece_trx'
SHOW COLUMNS FROM hos.opitemrece_trx LIKE '%'
SHOW KEYS FROM hos.opitemrece_trx
update an_stat set dchdate = NULL where an = '550027502' and dchdate = '1899-12-30'
insert into replicate_log (`event_time`,`client`,`sql`) values (current_timestamp,'PERJER4675','update an_stat set dchdate = NULL where an = \'550027502\' and dchdate = \'1899-12-30\'')
select count(*) as cc from an_stat_resync where an = '550027502'
SHOW TABLES FROM hos LIKE 'an_stat_resync'
SHOW COLUMNS FROM hos.an_stat_resync LIKE '%'
select count(*) as cc from sys_var where sys_name='send-nhso-drug-dispensing'
select sys_value from sys_var where sys_name='send-nhso-drug-dispensing'
select a.*,i.regtime,i.dchtime,i.dchtype,i.dchstts,i.leave_home_day from an_stat a left outer join ipt i on i.an=a.an where a.an='550027502'
select birthday from patient where hn='510038528'
select icd10 from iptdiag where an = '550027502' and diagtype<>'1' order by diagtype,ipt_diag_id
select distinct icd9 from iptoprt where an = '550027502'
select count(an) as cc from ipt where an='550027502' and dchdate IS NULL
select count(an) as cc from ipt_newborn where an='550027502'
SHOW TABLES FROM hos LIKE 'ipt_newborn'
SHOW COLUMNS FROM hos.ipt_newborn LIKE '%'
select bw from ipt where an='550027502'
select * from ipt where an = '550027502'
select * from an_stat where an = '550027502'
select idx.icd10 from iptdiag idx where idx.diagtype='1' and idx.an='550027502'
select adjrw from ipt where an = '550027502'
select k.* ,o.name as user_name from ksklog k left outer join opduser o on o.loginname=k.loginname where k.tablename = 'IPTDIAG' and k.modifytype = 'EDIT' and k.detail = '550027502' order by k.ksklog_id
select lockdx from ipt where an='550027502'
select idx.*,doctor.name as dname,icd9cm1.name as icdname from iptoprt idx left outer join doctor on doctor.code=idx.doctor left outer join icd9cm1 on icd9cm1.code=idx.icd9 where idx.an='550027502' order by idx.opdate,idx.optime
select count(*) as cc from ipt where an = '550027502' and ipt_type = 4