/// <summary> /// 读卡 /// 2017-11-29 cc /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void butRead_Click(object sender, EventArgs e) { //MessageBox.Show("该功能暂未开放!"); //return; HisChipInfo _chipobj = ReadCard.GetChipObj(); if (_chipobj != null) { // MessageBox.Show("病人ID:" + _chipobj.PAT_INDEX_NO + "\r\n就诊卡号:" + _chipobj.CARD_NO); TB_CHILDBASE _childobj = basebll.GetByPatientId(_chipobj.PAT_INDEX_NO); if (_childobj != null) { //MessageBox.Show("本地病人ID查询有数据"); SetChildInfo(_childobj, sender); } else { _childobj = basebll.GetByPatientId(_chipobj.CARD_NO); if (_childobj != null) { //MessageBox.Show("本地就诊卡号查询有数据"); SetChildInfo(_childobj, sender); } else { if (_chipobj.PAT_INDEX_NO == null && _chipobj.CARD_NO == null) { MessageBox.Show("读卡错误!"); return; } else { IList <HisPatientInfo> _hisPatientlist = ReadCard.GetListHisPatientInfo(_chipobj.PAT_INDEX_NO, _chipobj.CARD_NO, false); if (_hisPatientlist.Count > 0) { _hisobj = _hisPatientlist[0]; //取查询第一条数据 if (_hisobj != null) { SetHisPatientInfo(sender, _hisobj); } } else { MessageBox.Show("信息不存在!"); } } } } } }
/// <summary> /// 获取读芯片号对象 /// 2017-11-29 cc /// </summary> /// <returns></returns> public static HisChipInfo GetChipObj() { if (IsSuccess()) { string chipnum = GetChipNum(); YHRequest YHReq = new YHRequest(YHRequest.fid_get_hischip); YHReq.addQuery(YHRequest.item_chip, YHRequest.compy_equals, "'" + chipnum + "'", YHRequest.splice_and); var result = YHMQUtil <HisChipInfo> .get(YHReq); HisChipInfo hisobj = result.data; return(hisobj); } else { return(null); } }