function SF_ZY_TransBASYBMToJSQDBM ( Pqdjdbm varchar2, --清单节点编码 Pbasybm varchar2, --病案首页编码 Pfhlx00 varchar2 default '0' --返回类型 ) -- MODIFICATION HISTORY -- Person Date Comments -- linzetao 2021.11.26 created 获取病案首页主节点推送信息 ZYSF9-20211103-003 return varchar2 is LS_RESULT varchar2(100); begin LS_RESULT := Pbasybm; if Pqdjdbm = 'dscg_way' then --离院方式 if Pbasybm = '01' then LS_RESULT := '1'; elsif Pbasybm = '02' then LS_RESULT := '2'; elsif Pbasybm = '03' then LS_RESULT := '3'; elsif Pbasybm = '04' then LS_RESULT := '4'; elsif Pbasybm = '05' then LS_RESULT := '5'; end if; elsif Pqdjdbm = 'trt_type' then --治疗类别 10 30 22 21 --治疗类别 [1:西医 2.1:中医 2.2:民族医 3:中西医] if Pbasybm = '1' then LS_RESULT := '30'; elsif Pbasybm = '2.1' then LS_RESULT := '21'; elsif Pbasybm = '2.2' then LS_RESULT := '22'; elsif Pbasybm = '3' then LS_RESULT := '30'; else LS_RESULT:=Pbasybm; end if; elsif Pqdjdbm = 'patn_rlts' then --与患者关系 if Pbasybm = '1' then --配偶 LS_RESULT := '10'; elsif Pbasybm = '2' then --子 LS_RESULT := '20'; elsif Pbasybm = '3' then --女 LS_RESULT := '30'; elsif Pbasybm = '4' then --孙子、孙女或外孙子、外孙女 LS_RESULT := '40'; elsif Pbasybm = '5' then --父母 LS_RESULT := '50'; elsif Pbasybm = '6' then --祖父母或外祖父母 LS_RESULT := '60'; elsif Pbasybm = '7' then --兄、弟、姐、妹 LS_RESULT := '70'; elsif Pbasybm = '8' then --其他 LS_RESULT := '80'; end if; end if; return LS_RESULT; end;