Loading... 备份一下备份一下 <div class="tip inlineBlock info"> 添加到脚本后,记得Call IFPETCTORECT </div> ```vbnet SUB IFPETCTORECT CHECKSERIALNUM = Rpt.Data.GetNamedValue("CHECKSERIALNUM") sql="select hispatienttype,INFEEPATIENTID,clinicpatientid from PATIENTINFO where checkserialnum='" & CHECKSERIALNUM & "'" Set Conn=Rpt.GetDBConn Set rs = Conn.Execute(sql) hispatienttype=rs("hispatienttype") if CInt(hispatienttype)=1 Then clinicpatientid=rs("clinicpatientid") sql2="select * from studyinfo s,patientinfo p where (s.devicetypeid='24' or s.devicetypeid='25') and s.studytime>sysdate-3 and p.checkserialnum=s.checkserialnum and p.clinicpatientid='" & clinicpatientid & "'" Set rs2 = Conn.Execute(sql2) If not rs2.eof Then msgbox "该患者3天内存在核医学科检查!",vbOKOnly + vbExclamation,"警告" End If elseif CInt(hispatienttype)=2 Then INFEEPATIENTID=rs("INFEEPATIENTID") sql3="select * from studyinfo s,patientinfo p where (s.devicetypeid='24' or s.devicetypeid='25') and s.studytime>sysdate-3 and p.checkserialnum=s.checkserialnum and p.INFEEPATIENTID='" & INFEEPATIENTID & "'" Set rs3 = Conn.Execute(sql3) If not rs3.eof Then msgbox "该患者3天内存在核医学科检查!",vbOKOnly + vbExclamation,"警告" End If end if end sub ``` 最后修改:2023 年 05 月 24 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏