CREATE OR REPLACE FUNCTION SF_MZHS_GHXZ00(Pghks00 number,Pghys00 number,Pbrid00 number) return varchar2 is Vbyzglb varchar2(50) ;--本院职工挂号类别bm_ghlbb0.lbbh00%type Vghhbid SF_YSGHHB.GHHBID%type ;--挂号号表ID ls_YBZXLB IC_YBBRLB.YBZXLB%type ; VMZID00 SF_BRXXB0.GHID00%type ; V_COUNT0 Number(5) ;--临时变量 V_COUNT1 Number(5) ;--临时变量 V_COUNT10 Number(5) ;--临时变量 Vcounter number(10) ;--临时变量 ls_dtghxz char(1) ;--病人同一天在 --同一个医生是否限制只挂一次普通 --挂号和一次急诊号 Y:是(特殊病种患者除外) M:是(特殊病种病人也一样限制) N:都不限制, 默认为N --Q非医保病人一个普通号一个急诊号,医保病人一个普通号急诊号不限 --D:只有一个普通号(特殊病种除外) Ecustom exception ;--错误变量 Verrmsg varchar2(255) ;--错误信息 ls_TSBZGHCSXZ char(1) ;--Y:特殊病种病人的挂号限制按照上一次收费处结算时特殊病种数目+1 N:该参数不做限制 ls_KSGHZDCS number(5) ; ls_XZMGYBZXGHCS XT_XTCS00.VALUE0%type ;--限制每个医保中心挂号次数 ls_SFYXPTH char(1) ;-- 是否允许挂 普通号 0:不允许 1:允许 ls_ybbrptghxz char(1) ; ls_YSGHCSXZ XT_XTCS00.VALUE0%type ;--限制某个个医保中心医生次数 LS_YBZX00 varchar2(10); LS_YSGS00 varchar2(10); LS_GHCS00 varchar2(10); ls_DTGHZCSXZ NUMBER(5) ; --当天挂号总次数限制 ,0不限制,>0表示医保当天挂普通号不能超过的个数 默认0 ls_SFXYJZH varchar2(2) ;--是否允许挂急诊号 Vghlbbh_pt varchar2(255) ;--普通挂号类别 V_TSBZS0 number(3); --上次结算的特殊病种数 LS_BYZGGHLB varchar2(10); YS_BYZGSFZXSZGH varchar2(10); ls_TKSYYXGHBRZGH varchar2(10); ls_FBBH00 BM_BRXXB0.FBBH00%type; ls_YBLB00 BM_BRXXB0.YBLB00%type; LS_KSCFYYXZ_HMKS varchar2(100); MZHS_SFXZQH varchar2(10); LS_KSCFYYXZ_HMGHLB varchar2(100); V_COUNT2 Number(5) ;--临时变量 LS_COUNT0 number(10); LS_BRXM00 BM_BRXXB0.BRXM00%type; LS_KMH000 IC_YHXX00.KMH000%type; LS_ICKH00 IC_YHXX00.ICKH00%type; LS_BRZJBH BM_BRXXB0.BRZJBH%type; -- MODIFICATION HISTORY -- Person Date Comments -- dsm 2016.12.27 create for MZHS-20161220-001 -- dsm 2016.12.27 YY_KSCFYYXZ for ZZJJK-20161226-001 -- dsm 2017.01.23 增加MZHS_SFXZQH参数控制是否执行此过程 for MZHS-20170122-001 -- dsm 2020.10.10 限制互联网号源 for MZHS-20201010-001 -- dsm 2023.02.23 YY_KSCFYYXZ参数启用时增加豁免挂号科室 for YYGH-20220208-001 begin ls_SFYXPTH:='1'; ls_YBZX00:='-1'; LS_YSGS00:='2'; LS_GHCS00:='1'; LS_BYZGGHLB:=' '; YS_BYZGSFZXSZGH:='Y'; begin select nvl(max(trim(VALUE0)),'N') into MZHS_SFXZQH from XT_XTCS00 where NAME00='MZHS_SFXZQH' and value0='Y'; exception when others then MZHS_SFXZQH:='N'; end; --互联网专用号源不能用 select count(*) into V_COUNT0 from SF_YSGHHB where GHKSBH=Pghks00 and GHYSBH=Pghys00 and GHMZSJ=to_char(sysdate,'YYYYMMDD') and to_char(sysdate,'YYYYMMDDHH24:MI:SS') between GHMZSJ||GHQSSJ and GHMZSJ||GHJSSJ and PBLX00='2' and TZBZ00='0'; if V_COUNT0>0 then Verrmsg:='互联网专用号源不能在此使用!*'; return '1'||Verrmsg; end if; if MZHS_SFXZQH='N' then return ''; end if; select TO_NUMBER(trim(NVL(max(value0),'0'))) into ls_KSGHZDCS from xt_xtcs00 where name00='YS_KSGHXZCS'; --限制某个医保中心病人一天一个医生的挂号次数,该参数描述的是具体的YBZXLB 不做限制为-1 默认为-1 select trim(NVL(max(value0),'-1')) into ls_XZMGYBZXGHCS from xt_xtcs00 where name00='YS_XZMGYBZXGHCS'; --限制某个医保中心病人,一天只能看几个医生,一个医生只能挂几个号参数: --YS_YSGHCSXZ开启后(YS_XZMGYBZXGHCS设置无效) select trim(NVL(max(value0),'-1')) into ls_YSGHCSXZ from xt_xtcs00 where name00='YS_YSGHCSXZ'; select trim(NVL(max(value0),'N')) into ls_dtghxz from xt_xtcs00 where name00='YS_TYSDTGHXZ'; --ls_ybbrptghxz 医保病人普通挂号限制 N:不限制 Y:医保普通号限制一个 急诊号不限 --特殊病种病人的挂号限制按照上一次收费处结算时特殊病种数目+1 select trim(NVL(max(value0),'N')) into ls_TSBZGHCSXZ from xt_xtcs00 where name00='YS_TSBZGHCSXZ'; if ls_dtghxz='Q' then ls_ybbrptghxz:='Y'; ls_dtghxz:='Y'; else ls_ybbrptghxz:='N'; end if; if Pbrid00>0 then--指定了病人 begin select FBBH00,YBLB00 into ls_FBBH00,ls_YBLB00 from BM_BRXXB0 where BRID00=Pbrid00; select ybzxlb into ls_YBZXLB from ic_ybbrlb where yblb00=ls_YBLB00 and FBBH00=ls_FBBH00; exception when others then Verrmsg:='取挂号类别不能成功!*'; return '1'||Verrmsg; end; end if; --MZYS-20150907-001 select trim(NVL(max(value0),'N')) into ls_TKSYYXGHBRZGH from xt_xtcs00 where name00='YS_TKSYYXGHBRZGH'; if ls_TKSYYXGHBRZGH='Y' and Pbrid00>0 then select count(*) into Vcounter from VW_YS_YXGH00_YS where BRID00=Pbrid00 and FBBH00=3 and GHKS00=Pghks00 and GHDJ00>=0; if Vcounter>0 then Verrmsg:='取挂号失败:病人在本科室还存在有效挂号,不能再挂号!*'; return '1'||Verrmsg; end if; end if; --本院职工挂号类别限制 begin select trim(value0) into Vbyzglb from xt_xtcs00 where name00='SF_BYZGGHLB'; exception when others then Vbyzglb:='-1'; end; --限制某个医保中心病人,一天只能看几个医生,一个医生只能挂几个号YS_YSGHCSXZ开启后(YS_XZMGYBZXGHCS设置无效) by MZYS-20120310-001 -- if ls_YSGHCSXZ<>'-1' then select SF_YS_GETGHXZCS(ls_YBZXLB,0) into LS_YBZX00 from dual; --医保中心类别ybzxlb select SF_YS_GETGHXZCS(ls_YBZXLB,1) into LS_YSGS00 from dual; --允许看几个医生 select SF_YS_GETGHXZCS(ls_YBZXLB,2) into LS_GHCS00 from dual; --同一个医生运行挂号次数 end if; --医保病人不论医生不论科室,当天的挂号数不能超过的个数 begin select to_number(Value0) into ls_DTGHZCSXZ from XT_XTCS00 where Name00='YS_DTGHZCSXZ'; exception when others then ls_DTGHZCSXZ:=0; end; begin select count(*) into v_Count1 from XT_XTCS00 where name00='YY_KSCFYYXZ' and VALUE0='Y'; exception when others then v_Count1:=0; end; begin select trim(VALUE0) into LS_KSCFYYXZ_HMKS from XT_XTCS00 where name00='YY_KSCFYYXZ_HMKS' ; exception when others then LS_KSCFYYXZ_HMKS:=''; LS_KSCFYYXZ_HMGHLB:=''; end; v_Count2:=instr(LS_KSCFYYXZ_HMKS,';'); if v_Count2>0 then LS_KSCFYYXZ_HMKS:=','||substr(LS_KSCFYYXZ_HMKS,1,v_Count2-1)||','; LS_KSCFYYXZ_HMGHLB:=','||substr(LS_KSCFYYXZ_HMKS,v_Count2,100)||','; else LS_KSCFYYXZ_HMKS:=','||LS_KSCFYYXZ_HMKS||','; LS_KSCFYYXZ_HMGHLB:=''; end if; if v_Count1>0 and instr(LS_KSCFYYXZ_HMKS,','||Pghks00||',')=0 then select count(1) into V_COUNT0 from VW_YS_HZBR00 where BRID00=Pbrid00 and DJRQ00=to_char(sysdate,'YYYYMMDD') and JZKS00=Pghks00 and decode(sign(to_number(substr(HZQSSJ,1,2))-12),-1,'上午','下午')= decode(sign(to_number(to_char(sysdate,'HH24'))-12),-1,'上午','下午') and instr(LS_KSCFYYXZ_HMGHLB,','||GHLB00||',')=0 ; if V_COUNT0>=1 then Verrmsg:='取挂号失败:此科室此时段你已经预约过'||V_COUNT0||'了!*'; return '1'||Verrmsg; end if; end if; --wdy控制病人有预约不能再取同科室同医生的现场号 select BRXM00,KMH000,ICKH00,BRZJBH into LS_BRXM00,LS_KMH000,LS_ICKH00,LS_BRZJBH from bm_brxxb0 a,ic_yhxx00 b where a.brid00=b.brid00 and b.zt0000='1' and a.brid00=Pbrid00; select count(*) into LS_COUNT0 from SF_YYBRB0 a where a.BRXM00=ls_BRXM00 AND ( a.KMH000=LS_KMH000 or a.ICKH00=LS_ICKH00 or a.SFZH00=ls_brzjbh) AND a.YYRQ00=to_char(sysdate,'YYYYMMDD') and a.YYZT00 in('0','1') and a.yyysbh=Pghys00 and a.yyksbh=Pghks00 and exists(select 1 from YS_HBHZXH where GHHBID=a.GHHBID and YYID00=a.YYID00 and HZXH00=a.YYH000 and decode(sign(to_number(substr(HZQSSJ,1,2))-12),-1,'上午','下午')= decode(sign(to_number(to_char(sysdate,'HH24'))-12),-1,'上午','下午')); if ls_COUNT0 > 0 then Verrmsg:='已经预约过该医生,请按预约候诊单打印!'; return '1'||Verrmsg; end if; if Pbrid00>0 then--指定了病人 --被医保中心限制的医生不能挂号MZYS-20151230-001 select count(*) into V_COUNT0 from BM_BRXXB0 a,IC_YBBRLB b where a.BRID00=Pbrid00 and a.FBBH00=b.FBBH00 and a.YBLB00=b.YBLB00 and exists(select 1 from BM_TYZD00 where ZDMC00='被医保中心限制处方权的医生' and BH0000=Pghys00 and instr(','||MC0000||',',','||b.YBZXLB||',')>0); if V_COUNT0>0 then Verrmsg:='取挂号失败:您已经被医保中心限制了此医保中心病人的处方权!*'; return '1'||Verrmsg; end if; --病人是否是本院职工,如果是本院职工,只能挂本院职工号并立即返回,其他病人不能挂本院职工号 if Vbyzglb<>'-1' then if (trim(ls_XZMGYBZXGHCS)<>'-1') and (LS_YBZX00='-1') then -- by MZYS-20120306-001. select count(1) into v_count0 from SF_BRXXB0 c where c.BRID00=Pbrid00 and c.JZYS00=Pghys00 and c.GHRQ00= TO_CHAR(SYSDATE,'YYYYMMDD') and c.THBZ00<>'0' --and c.ghlb00<>-99999 and exists(select 1 from BM_BRXXB0 a,IC_YBBRLB b where a.FBBH00=b.FBBH00 and a.YBLB00=b.YBLB00 and a.BRID00=c.BRID00 and instr(';'||trim(ls_XZMGYBZXGHCS)||';',';'||b.YBZXLB||';')>0); if V_COUNT0>0 then Verrmsg:='取挂号失败:该病人在本医生处已经挂过号,不能重新挂号!*'; return '1'||Verrmsg; end if; end if; --by MZYS-20120310-001 限制某个医保中心病人,一天只能看几个医生,一个医生只能挂几个号--参数:YS_YSGHCSXZ开启后(YS_XZMGYBZXGHCS设置无效) if (LS_YBZX00<>'-1') then select count(distinct jzys00) into V_COUNT0 from SF_BRXXB0 c where c.BRID00=Pbrid00 and c.JZYS00<>Pghys00 and c.GHRQ00= TO_CHAR(SYSDATE,'YYYYMMDD') and c.THBZ00<>'0' --and c.ghlb00<>-99999 ; if V_COUNT0>=to_number(LS_YSGS00) then Verrmsg:='该病人本日就诊医生已超过('||LS_YSGS00||')个,不能重新挂号!*'; return '1'||Verrmsg; else select Count(1) into V_COUNT0 from SF_BRXXB0 c where c.BRID00=Pbrid00 and c.JZYS00=Pghys00 and c.GHRQ00= TO_CHAR(SYSDATE,'YYYYMMDD') and c.THBZ00<>'0' --and c.ghlb00<>-99999 ; if V_COUNT0>=to_number(LS_GHCS00) then Verrmsg:='该病人在本医生挂号次数已超过('||LS_GHCS00||')个,不能重新挂号!*'; return '1'||Verrmsg; end if; end if; end if; end if; ----Vbyzglb<>'-1' end if ls_ybbrptghxz<>'N' then--医保普通号限制 select count(1) into V_Count10 from SF_BRXXB0 a, bm_ghlbb0 b where b.SYXTFL in ('0','1') and a.ghlb00=b.lbbh00 and a.BRID00=Pbrid00 and a.JZYS00=Pghys00 and GHRQ00= TO_CHAR(SYSDATE,'YYYYMMDD') and a.THBZ00<>'0' --and a.ghlb00<>-99999 and b.lbmc00 not like '%急诊%' and a.fbbh00='3'; end if; if ls_dtghxz='G' then--医保普通号限制每医生2个 select count(1) into V_COUNT10 from SF_BRXXB0 a, bm_ghlbb0 b where b.SYXTFL in ('0','1') and a.ghlb00=b.lbbh00 and a.BRID00=Pbrid00 and a.JZYS00=Pghys00 And GHRQ00= TO_CHAR(SYSDATE,'YYYYMMDD') and a.THBZ00<>'0' --and a.ghlb00<>-99999 and b.lbmc00 not like '%急诊%' and a.fbbh00='3'; if V_Count10=1 then V_COUNT10:=0; end if; end if; if ls_dtghxz<> 'N' then if ls_dtghxz='G' then select COUNT(1) into V_COUNT1 from SF_BRXXB0 where BRID00=Pbrid00 and JZYS00=Pghys00 and GHRQ00= to_char(Sysdate,'YYYYMMDD') and THBZ00<>'0' --and ghlb00<>-99999 and FBBH00='3'; else select COUNT(1) into V_COUNT1 From SF_BRXXB0 WHERE BRID00=Pbrid00 And JZYS00=Pghys00 and GHRQ00= TO_CHAR(SYSDATE,'YYYYMMDD') and THBZ00<>'0' --and ghlb00<>-99999 ; end if; if V_COUNT1>0 then if (ls_dtghxz='Y') or (ls_dtghxz='D') then select count(1) Into V_COUNT0 from BM_TSBZB0 Where YBZXLB=ls_YBZXLB; ELSIF ls_dtghxz='M' or ls_dtghxz='G' Then V_COUNT0:=0; end if; if V_COUNT0=0 then--参数ls_dtghxz='M' 或((ls_dtghxz='Y') or (ls_dtghxz='D')非特殊病种--病人) if ls_dtghxz='D' then Verrmsg:='取挂号失败:该病人当天已经在这个医生处挂过号,不能重新挂号!*'; return '1'||Verrmsg; end if; if ((V_COUNT1=1) and (ls_dtghxz<>'G')) or (ls_dtghxz='G' and V_COUNT1<=2 and V_COUNT1>0 ) then Select count(1) into V_COUNT0 From SF_BRXXB0 a, bm_ghlbb0 b where a.ghlb00=b.lbbh00 and a.BRID00=Pbrid00 and a.JZYS00=Pghys00 and b.SYXTFL in ('0','1') and GHRQ00= TO_CHAR(SYSDATE,'YYYYMMDD') and a.THBZ00<>'0' --and a.ghlb00<>-99999 and b.lbmc00 like '%急诊%'; if V_COUNT0>0 then ls_SFXYJZH:='0' ; else ls_SFXYJZH:='1' ; end if; if (V_COUNT0>0) or (ls_dtghxz='G' and V_COUNT1<2) then ls_SFYXPTH :='1'; else ls_SFYXPTH := '0'; end if; else if ls_dtghxz='G' then Verrmsg:='取挂号失败:该病人当天已经在这个医生处挂过两个普通号和一个急诊号,不能重新挂号!*'; else Verrmsg:='取挂号失败:该病人当天已经在这个医生处挂过一个普通号和一个急诊号,不能重新挂号!*'; end if; return '1'||Verrmsg; end if; end if; end if; --V_COUNT1>0 end if; --ls_dtghxz<> 'N' --限制某个医保中心病人一天一个医生的挂号次数,该参数描述的是具体的YBZXLB 不做限制为-1 默认为-1 if (trim(ls_XZMGYBZXGHCS)<>'-1') and (LS_YBZX00='-1') then select count(1) Into V_COUNT0 from SF_BRXXB0 c where c.BRID00=Pbrid00 and c.JZYS00=Pghys00 and c.GHRQ00= to_char(SYSDATE,'YYYYMMDD') and c.THBZ00<>'0' --and c.ghlb00<>-99999 and exists(select 1 from BM_BRXXB0 a,IC_YBBRLB b where a.FBBH00=b.FBBH00 and a.YBLB00=b.YBLB00 and a.BRID00=c.BRID00 and instr(';'||trim(ls_XZMGYBZXGHCS)||';',';'||b.YBZXLB||';')>0); if V_COUNT0>0 then Verrmsg:='取挂号类别不能成功:该病人在本医生处已经挂过号,不能重新挂号!*'; return '1'||Verrmsg; end if; end if; --by MZYS-20120310-001 限制某个医保中心病人,一天只能看几个医生,一个医生只能挂几个号--参数:YS_YSGHCSXZ开启后(YS_XZMGYBZXGHCS设置无效) if (LS_YBZX00<>'-1') then select count(distinct jzys00) into V_COUNT0 from SF_BRXXB0 c where c.BRID00=Pbrid00 and c.JZYS00<>Pghys00 and c.GHRQ00= TO_CHAR(SYSDATE,'YYYYMMDD') and c.THBZ00<>'0' --and c.ghlb00<>-99999 ; if V_COUNT0>=to_number(LS_YSGS00) then Verrmsg:='本日就诊医生已超过('||LS_YSGS00||')个,不能重新挂号!*'; return '1'||Verrmsg; else select count(1) into V_COUNT0 from SF_BRXXB0 c where c.BRID00=Pbrid00 and c.JZYS00=Pghys00 and c.GHRQ00= TO_CHAR(SYSDATE,'YYYYMMDD') and c.THBZ00<>'0' --and c.ghlb00<>-99999 ; if V_COUNT0>=to_number(LS_GHCS00) then Verrmsg:='该病人在本医生挂号次数已超过('||LS_GHCS00||')个,不能重新挂号!*'; return '1'||Verrmsg; end if; end if; end if; --马尾医院,限制特殊病种病人挂号次数为,上一次收费出结算该病人的特殊病种数目+1; V_TSBZS0:=0; if ls_TSBZGHCSXZ='Y' then Select count(*) into V_COUNT0 from BM_BRXXB0 where BRID00=Pbrid00 and FBBH00='3'; if V_COUNT0>0 then select nvl(max(MZID00),0) into VMZID00 from SF_JZB000 where BRID00=Pbrid00; if VMZID00>0 then select count(distinct TSBZBH) into V_TSBZS0 from XT_YBTSBZ where GHID00=VMZID00; --V_COUNT0换成V_TSBZS0,因后面还要用 else V_TSBZS0:=0; end if; Select count(1) into V_COUNT1 from SF_BRXXB0 where BRID00=Pbrid00 and JZYS00=Pghys00 and GHRQ00= to_char(sysdate,'YYYYMMDD') and THBZ00<>'0' --and ghlb00<>-99999 ; if V_COUNT1>V_TSBZS0 then Verrmsg:='取挂号失败:该病人上次的特殊病种数目为'||to_char(V_TSBZS0)||'次,所以当天最多只能挂'||to_char(V_TSBZS0+1)||'次号!*'; return '1'||Verrmsg; end if; LS_GHCS00:=V_COUNT1; end if; elsif ls_TSBZGHCSXZ='M' then Select count(*) into V_COUNT0 from BM_BRXXB0 Where BRID00=Pbrid00 and FBBH00='3'; if V_COUNT0>0 then select nvl(max(TSBZSL),0) into V_COUNT0 from ( select GHID00,count(distinct TSBZBH) TSBZSL from XT_YBTSBZ where BRID00=Pbrid00 and MZZYBZ='0' and CZRQ00 between to_char(add_months(sysdate,-12),'YYYYMMDD') and to_char(sysdate,'YYYYMMDD') group by GHID00); select count(1) into V_COUNT1 from SF_BRXXB0 where BRID00=Pbrid00 and JZYS00=Pghys00 and GHRQ00= to_char(sysdate,'YYYYMMDD') and THBZ00<>'0' --and ghlb00<>-99999 ; if V_COUNT1>V_COUNT0 then Verrmsg:='取挂号失败:该病人一年内记录中使用最多的特殊病种看病的数目为'||to_char(V_COUNT0)||'次,所以当天最多只能挂'||to_char(V_COUNT0+1)||'次号!*'; return '1'||Verrmsg; end if; end if; end if; --MZYS-20150713-002 病人第一次挂号默认为医生的默认挂号类别(次功能已有),如果病人没有特殊病种,只能挂一次普通门诊号(例如“主任号”),如果有1个或多个特殊病种则可多挂1个或多个免费号(一个普通门诊号+特殊病种数的免费号)。离休、512、保健患者允许挂1个普通号+1个免费号;本院职工按便民挂号收取,如果有特殊病种那么就按1个便民号加对应的特殊病种数的免费号; if LS_BYZGGHLB<>' ' and YS_BYZGSFZXSZGH='M' and ls_TSBZGHCSXZ in ('Y','M') then --康复的本院职工,第1次挂便民号,第二次挂免费号(特殊病种数) MZYS-20150713-002 if LS_GHCS00=0 then return LS_BYZGGHLB; else LS_BYZGGHLB:=' '; end if; end if; if (ls_KSGHZDCS>0) and (LS_YBZX00='-1') then --modify by MZYS-20120424-002 该病人医保中心类别不在YS_YSGHCSXZ中继续执行以下控制 select count(1) into V_COUNT0 from SF_BRXXB0 where BRID00=Pbrid00 and GHKS00=Pghks00 and GHRQ00= TO_CHAR(SYSDATE,'YYYYMMDD') and THBZ00<>'0' --and ghlb00<>-99999 ; if V_COUNT0>=ls_KSGHZDCS then Verrmsg:='取挂号失败:该病人当天已经在本科室挂过'||to_char(ls_KSGHZDCS)||'次号,不能重新挂号!*'; return '1'||Verrmsg; end if; end if; end if; if ls_DTGHZCSXZ>0 then select COUNT(1) into V_COUNT0 from SF_BRXXB0 a, bm_ghlbb0 b where a.ghlb00=b.lbbh00 and a.BRID00=Pbrid00 and b.SYXTFL in ('0','1') and GHRQ00= TO_CHAR(SYSDATE,'YYYYMMDD') and b.LBMC00 like '普通%' and a.THBZ00<>'0' and a.ghlb00<>-99999 and a.fbbh00='3'; if V_COUNT0>=ls_DTGHZCSXZ then Verrmsg:='该医保病人当天已挂过'||to_char(ls_DTGHZCSXZ)||'次普通号,不能再挂号!*'; return '1'||Verrmsg; end if; end if; return ''; exception when Ecustom then raise_application_error(-20010,Verrmsg); end SF_MZHS_GHXZ00;