⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 amzdjcbrmx.asp

📁 医院医技科室系统,可以进行医技报告的生成打印,完全的BS结构
💻 ASP
字号:
<%@ Language=VBScript %>

<!-- #INCLUDE FILE="../../share/connectdb.asp" -->
<!--#include file=../../pubfunction.asp-->


<%
   dim rs
	 qmzh=Request.Form("imzh")
	 qxm=Request.Form("iXM")
	 qlsh=Request.Form("ilsh")
	 if trim(qlsh)="" then qlsh=0
	 set rs=server.CreateObject("adodb.recordset")
	 if Request.Form("pdid")="JS"  then  '有参数则修改处方状态+2 
		
			dim yp,cl,xm,QFJE
			
			yp=Request.Form("txtyp")
			cl=Request.Form("txtcl")
			xm=Request.Form("txtcfxm")
			'Response.Write Request.Form("txtxm")
			if trim(yp)="" then yp="0"
			if trim(cl)="" then cl="0"
			if trim(xm)="" then xm="0"
			
			QFJE=0
			if trim(yp)<>"0" then 
				rs.Open "select isnull(sum(a.je-a.ytje),0) as cfje from mz_tcflr a where cfid in ( " &yp& ") and cfzt in (0,1) ",conn,3,1
				if rs.RecordCount>0 then QFJE=cdbl(QFJE)+cdbl(RS("cfje"))
				rs.Close 
			end if
			
			if trim(cl)<>"0" then 
				rs.Open "select isnull(sum(a.je-a.ytje),0) as cfje from mz_tcflr_cl a where cfid in ( " &cl& ") and cfzt in (0,1) ",conn,3,1
				if rs.RecordCount>0 then QFJE=cdbl(QFJE)+cdbl(RS("cfje"))
				rs.Close 
			end if
			
			if trim(xm)<>"0" then 
			  ' Response.Write "select isnull(sum(a.je-a.ytje),0) as cfje from mz_tcflr_xm a where cfid in ( " &xm& ") and cfzt in (0,1) "
				rs.Open "select isnull(sum(a.je-a.ytje),0) as cfje from mz_tcflr_xm a where cfid in ( " &xm& ") and cfzt in (0,1) ",conn,3,1
				if rs.RecordCount>0 then QFJE=cdbl(QFJE)+cdbl(RS("cfje"))
				rs.Close 
			end if
			
			if cdbl(QFJE)>0 then
			    if trim(yp)<>"0" then 
			        funmzyffy  qlsh,session("rzks"),session("yhid"),session("yhid"),session("yhid"),session("yhid"),yp
			    end if
			    if trim(cl)<>"0" then 
			        funmzyfcl  qlsh,session("rzks"),session("yhid"),session("yhid"),session("yhid"),session("yhid"),cl
			    end if
			    if trim(xm)<>"0" then
			        funmzxmjs  qlsh,session("rzks"),session("yhid"),session("yhid"),session("yhid"),session("yhid"),xm
			    end if
			end if
				
	end if
		
		
	function funmzyffy(lsh,rzks,fyr,tpr,tpfhr,cfshr,vcfid)
		set comm=server.CreateObject("adodb.command")
		comm.ActiveConnection=conn
		comm.CommandType=4
		'Response.Write lsh&","&rzks&","&fyr&","&tpr&","&tpfhr&","&cfshr
		comm.CommandText="proc_mzyffy"
		comm.Parameters("@intLSH")=lsh
		comm.Parameters("@intRZKS")=rzks
		comm.Parameters("@intfyr")=fyr
		comm.Parameters("@inttpr")=tpr
		comm.Parameters("@inttpfhr")=tpfhr
		comm.Parameters("@intcfshr")=cfshr
		comm.Parameters("@vcfid")=vcfid
		
		comm.Parameters("@jsid")=0
		comm.Execute 
		funmzyffy=comm.Parameters("@jsid")' comm("jg").Value 
		set comm=nothing
	end function
	
	function funmzyfcl(lsh,rzks,fyr,tpr,tpfhr,cfshr,vcfid)
		set comm=server.CreateObject("adodb.command")
		comm.ActiveConnection=conn
		comm.CommandType=4
		'Response.Write lsh&","&rzks&","&fyr&","&tpr&","&tpfhr&","&cfshr
		comm.CommandText="proc_mzclfcl"
		comm.Parameters("@intLSH")=lsh
		comm.Parameters("@intRZKS")=rzks
		comm.Parameters("@intfyr")=fyr
		comm.Parameters("@inttpr")=tpr
		comm.Parameters("@inttpfhr")=tpfhr
		comm.Parameters("@intcfshr")=cfshr
		comm.Parameters("@vcfid")=vcfid
		
		comm.Parameters("@jsid")=0
		comm.Execute 
		funmzyfcl=comm.Parameters("@jsid")' comm("jg").Value 
		set comm=nothing
	end function
	
	function funmzxmjs(lsh,rzks,fyr,tpr,tpfhr,cfshr,vcfid)
		set comm=server.CreateObject("adodb.command")
		comm.ActiveConnection=conn
		comm.CommandType=4
		'Response.Write lsh&","&rzks&","&fyr&","&tpr&","&tpfhr&","&cfshr
		comm.CommandText="proc_mzxmjs"
		comm.Parameters("@intLSH")=lsh
		comm.Parameters("@intRZKS")=rzks
		comm.Parameters("@intfyr")=fyr
		comm.Parameters("@inttpr")=tpr
		comm.Parameters("@inttpfhr")=tpfhr
		comm.Parameters("@intcfshr")=cfshr
		comm.Parameters("@vcfid")=vcfid
		
		comm.Parameters("@jsid")=0
		comm.Execute 
		funmzxmjs=comm.Parameters("@jsid")' comm("jg").Value 
		set comm=nothing
	end function
	
	
	
%>
<HTML>
<HEAD>
<meta http-equiv="refresh" content="180; url=amzdjcBRmx.asp">
<META name=VI60_defaultClientScript content=VBScript>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">

<link rel="stylesheet" type="text/css" href="../../style/style.css" >
<link rel="stylesheet" type="text/css" href="../../style/table.css" >
</HEAD>

<script language="javascript">
<!--
    function backthis(){
       window.parent.mbdiv.style.visibility='hidden';
    }
    
    
    function cmdJS_onclick() {
		if(form1.iLSH.value=='')
		{
			window.alert("请选择挂号时间");
			return ;
		}
			
			
		if(parseFloat(form1.txtcfje.value)>parseFloat(form1.txtkye.value))
		{
		   window.alert("患者医院余额不足,不能接收!");
		   return;
		}
		if(funchek()==0)
		{
		    window.alert("请选择项目!");
			return;
		}
		//window.alert( window.form1.txtxm.value);
		form1.pdid.value="JS"  ;
		
		form1.submit();
	     window.parent.form1.submit();
}

function funchek()
{  
    var obj,i;
    window.form1.txtyp.value="0";
    window.form1.txtcl.value="0";
    window.form1.txtcfxm.value="0";
    obj=document.all.item('chk');
    if(obj==null) return 0;
    if(obj.length==null)
    {
       if(obj.checked==true) 
       {
          if(obj.title=="0")
          {
             window.form1.txtyp.value=window.form1.txtyp.value+","+obj.value;
          }
          else  if(obj.title=="1")
          {
             window.form1.txtcfxm.value=window.form1.txtcfxm.value+","+obj.value;
          }
          else if(obj.title=="2")
          {
             window.form1.txtcl.value=window.form1.txtcl.value+","+obj.value;
          }
          return 1;
       }
       return 0;
    } 
    for(i=0;i<obj.length;i++)
    {
      if(obj(i)!=null)
      { 
         if(obj(i).checked==true) 
         {
			if(obj(i).title=="0")
			{
				window.form1.txtyp.value=window.form1.txtyp.value+","+obj(i).value;
			}
			else  if(obj(i).title=="1")
			{
				window.form1.txtcfxm.value=window.form1.txtcfxm.value+","+obj(i).value;
			}
			else if(obj(i).title=="2")
			{
				window.form1.txtcl.value=window.form1.txtcl.value+","+obj(i).value;
			}
          
         }
        // return 1;
      }
    }
    if(window.form1.txtcl.value!="0" || window.form1.txtcfxm.value!="0" || window.form1.txtyp.value!="0")
		return 1;
    return 0;

}

-->
</script>
<BODY>
<FORM action="" method=post id=form1 name=form1>
<input type=hidden id=iLSH name=iLSH  value='<%=qlsh%>'>
<input type=hidden id=iXM name=iXM>
<input type=hidden id=iMZH name=iMZH>
<input type=hidden id=txtcfje name=txtcfje>
<input type=hidden id=txtkye name=txtkye>
<input type=hidden id=pdid name=pdid>
<INPUT type="hidden" id=txtyp name=txtyp >
<INPUT type="hidden" id=txtcl name=txtcl >
<INPUT type="hidden" id=txtcfxm name=txtcfxm >

<TABLE border=0 cellPadding=0 cellSpacing=0 width=100%>
<tr>
	<td align=center>
	<STRONG><a href="vbscript: window.print"><font size=4 color=Blue> <%=session("yymc")%></font></a></STRONG>
	</td><td onclick="backthis()" width="40" style="cursor:hand"><font color=blue>[<U>×</U>]</font></td>
</tr>
<tr>
	<td align=center colspan=2>
	<STRONG><font size=2> 检查项目单【待】</font></STRONG>
	</td>
</tr>
</Table>

<TABLE border=0 cellPadding=0 cellSpacing=0 width=100%>
  <TR>
    <TD>
       门诊号:<INPUT id=txtmzh name=txtmzh class=transparenttext style=" HEIGHT: 16px; WIDTH: 60px"   readOnly  value=<%=qmzh%>  >

     
     姓名:<INPUT id=txtXM name=txtXM class=transparenttext  style=" HEIGHT: 16px; WIDTH: 50px"  readonly value=<%=qxm%>    >

      挂号时间:	
		<input id=cobLSH name=cobLSH readonly class=transparenttext  style=" HEIGHT: 16px; WIDTH: 150px"   value=<%=Request.Form("cobLSH")%>  > 
    <input type="button"  value="接收" class=buttons02   id="cmdJS" name=cmdJS name="button2" style="WIDTH:70px" LANGUAGE=javascript onclick="return cmdJS_onclick()">
    </TD>		
	</TR>
</TABLE>


<table align="center" border="1" cellPadding="0" cellSpacing="0" width="100%"   bordercolorlight='#000000' bordercolordark='#FFFFFF'>
<tr bgcolor="<%=trBGCOLOR%>">
	<td align=middle><font color="<%=tableHFONTCOLOR%>">项目名称</TD>
	<td align=middle><font color="<%=tableHFONTCOLOR%>">数量</TD>
	<td align=middle><font color="<%=tableHFONTCOLOR%>">金额</TD>
	<td align=middle><font color="<%=tableHFONTCOLOR%>">医师</TD>
	<td align=middle><font color="<%=tableHFONTCOLOR%>">处方开出时间</TD>
	</tr>

<%	
	'显示处方内容
	
	'sqlstr="select xmdh,xmmc,xm,mzh,ys,sj,sl,dw,je,cfzt,lx,cfid from view_mzxmwjs where cfzt in (0,1) and lsh='" & qlsh & "' and rzks='" & session("rzks") & "' "
	
	'sqlstr=sqlstr&" union all select ypdh as xmdh,ypspm+'['+gg+']' as xmmc,xm,mzh,ys,sj,sl,'' as dw,je,cfzt,lx,cfid from view_mzypwjs where cfzt in (0,1) and lsh='" & qlsh & "' and rzks='" & session("rzks") & "' "
	
	'and rzks='" & session("rzks") & "' 
	'dim je,kye
	'je=0
	'rs.Open sqlstr,conn,3,1
	'if not rs.eof then
	'	do while not rs.eof 
	'		Response.Write "<TR>"
		'	Response.Write "<TD nowrap align=center><INPUT type=checkbox id=chk  name=chk  value=" & RS("cfid") & " title='"&rs("lx")&"' checked style='width:0px;height:0px'>"& rs("xmdh")&"</TD>"
		'	Response.Write "<TD nowrap >"& rs("xmmc")&"</TD>"
		'	Response.Write "<TD nowrap align=center>"& rs("sl")&rs("dw")&"</TD>"
		'	Response.Write "<TD nowrap align=center>"& rs("je")&"</TD>"
		'	Response.Write "<TD nowrap align=center>"& rs("ys")&"</TD>"
		'	Response.Write "<TD nowrap align=center>"& rs("sj")&"</TD>"
		'	Response.Write "</TR>"
		'	if cint(rs("cfzt"))=0 then je=cdbl(je)+cdbl(rs("je"))
		'	rs.movenext
		'loop
	'end if
	'rs.close	
	
	i=0
		dim je
		je=0
		sqlstr="select cfzt, cfid,xmmc,dw,sl,dj,je,bz,lsh,xmlx,rzks, zid,zmc,lx,ys,sj,lx  from view_mzxmwjsmx  where lsh='" & qlsh & "'  AND  rzks='" & session("rzks") & "' order by zid desc,cfid"
		'Response.Write sqlstr
		dim zid,bgcolor
		rs.Open sqlstr,conn,3,1
		bgcolor="#ffffff"
		
		
		do while not RS.eof
			if clng(rs("zid"))<>-1 then'--有分组项目
				if clng(ai)>clng(maxi) then maxi=ai
				if trim(zid)<>trim(rs("zid")) then
					'if clng(j) mod 2=0 then 
					'	bgcolor="#ffffff"
					'else
					'	bgcolor="#3cb371"
					'end if
						Response.Write "<tr bordercolorlight='#000000'  bordercolordark='#ffffff'  bgcolor='"&bgcolor&"' >"
						Response.Write "<Td colspan=6 >"
						Response.Write "<font color=black><b>*"&rs("zmc")&"↓↓</b></font></td></tr>"
					   ai=0
					j=clng(j)+1				 
				end if
				zid=trim(rs("zid"))      
				Response.Write "<TR bgcolor='"&bgcolor&"'><TD nowrap><INPUT  type=checkbox id=chk  name=chk  value=" & RS("cfid") & " title='"&rs("lx")&"' checked style='width:0px;height:0px'>" 
				Response.Write  rs("XMMC") 			    	
				Response.Write "</td><td ALIGN=RIGHT nowrap>"
				Response.Write rs("SL")& rs("dw")

				Response.Write "</td><td align=right nowrap>"
				Response.Write formatnumber(rs("JE"),2,-1)&"</td><td >"
				
					Response.Write rs("ys")&"</td><td >"
				 Response.Write rs("sj")&"&nbsp;</td></tr>"


				
			else '--无分组项目
				Response.Write "<tr><td nowrap ><INPUT type=checkbox id=chk  name=chk  value=" & RS("cfid") & " title='"&rs("lx")&"' checked style='width:0px;height:0px'>"
				Response.Write RS("xmmc")&"</td><td   align=center  nowrap>"
				Response.Write RS("sl")&RS("dw")&"</td><td  align=right  nowrap>"
	
				Response.Write formatnumber(rs("JE"),2,-1)&"</td><td >"
				Response.Write rs("ys")&"</td><td >"
				Response.Write rs("sj")&"&nbsp;</td></tr>"
			end if
			if cint(rs("cfzt"))=0 then je=cdbl(je)+cdbl(rs("je"))
			RS.movenext
			
							
		loop
		
		rs.close  
		
		
	
	sql="select syje from mz_tbr,mz_tbrls where mz_tbr.blh=mz_tbrls.blh and lsh="&qlsh
	kye=0
	rs.Open sql,conn,3,1
	if rs.RecordCount >0 then 
		kye=rs("syje")
	end if
	rs.Close 
	
	
    

%>
</TABLE>


</FORM>
</BODY>
</HTML>
<%
set rs=nothing
conn.Close 
set conn=nothing 

%>  
<SCRIPT LANGUAGE=javascript>
<!--
 if(document.getElementById("txtcfje")!=null)
    document.getElementById("txtcfje").value='<%=je%>';
  if(document.getElementById("txtkye")!=null)
     document.getElementById("txtkye").value='<%=kye%>';
//-->
</SCRIPT>



      

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -