emr问题处理

--通过his病历号查询emr中对应的患者ID
select a.id, a.* from vhis_inpatientinfo a where a.PATIENT_NO='0001059171' --556457

--通过患者ID找出患者所有的病历集合ID
select * from rcd_inpatient_record_set where inpatient_id='556457' --19107
--通过病历集合查找患者所有的病历
select t.*,t.rowid from rcd_inpatient_record t where t.inpatient_record_set_id='19107' --1940569

--通过病历dataID查找对应的病历数据,病历存在大字段中
 select * from rcd_record_data c where c.id='1940569';
 
 -- 查找病历所有的操作记录
 select * from rcd_inpatient_record_log a where  a.data_id='1940569' -- a.inpatient_record_id='533482'  
 ;
  select * from rcd_inpatient_record_log a where    a.inpatient_record_id='533482'  ;
  

 

posted @ 2017-04-07 17:18  windback  阅读(183)  评论(0编辑  收藏  举报