TIULP3 ;BAY PINES/ELR - Functions determining privilege continued ; 3/7/12 10:52am
;;1.0;TEXT INTEGRATION UTILITIES;**232,256**;Jun 20, 1997;Build 11
;;ISA^USRLM: ICA 2324
ISSURG(TIUDA) ;
NEW TIUY
I +$$ISADDNDM^TIULC1(TIUDA) S TIUDA=+$P($G(^TIU(8925,TIUDA,0)),U,6)
D ISSURG^TIUSROI(.TIUY,+$G(^TIU(8925,+TIUDA,0)))
G SURGEX:TIUY'>0
;SEE IF IT IS AN NIR OR AR
N TIUS0,TIUSNAME
S TIUY=0
G SURGEX:'$L(TIUDA)
G SURGEX:'$D(^TIU(8925,+TIUDA,0))
S TIUS0=+$G(^TIU(8925,+TIUDA,0))
G SURGEX:'$L(TIUS0)
S TIUSNAME=$$PNAME^TIULC1(+TIUS0)
G SURGEX:'$L(TIUSNAME)
I TIUSNAME="NURSE INTRAOPERATIVE REPORT" S TIUY=1 G SURGEX
I TIUSNAME="ANESTHESIA REPORT" S TIUY=1 G SURGEX
SURGEX Q TIUY
ACTION(TIUACTW) ;CHECK ACTION
NEW TIUY S TIUY=0
I (($G(TIUACTW)["EDIT RECORD")!($G(TIUACTW)["ADDEND")) S TIUY=1 G ACTEX
ACTEX Q TIUY
AUTHUSR(PERSON) ;Check to see if user is Privacy Act Officer or Chief Mis/Hims
N TIUY S TIUY=0
I ($$ISA^USRLM(PERSON,"PRIVACY ACT OFFICER"))!($$ISA^USRLM(PERSON,"CHIEF, MIS"))!($$ISA^USRLM(PERSON,"CHIEF, HIMS")) S TIUY=1 G USREX
USREX Q TIUY
SURMSG(TIUACTW) ;SET SURGERY ERROR MSG
NEW TIUY,TIUDOC S TIUDOC=""
I TIUACTW["EDIT" S TIUDOC="EDIT"
I TIUACTW["ADDEND" S TIUDOC="CREATE AN ADDENDUM FOR"
I TIUACTW["AMENDMENT" S TIUDOC="AMEND"
S TIUY="You must use the Surgery Package to "_TIUDOC_" this Document"
Q TIUY
IDMSG(TIUMSG) ;SET DELETE ID MSG
S TIUMSG="You may NOT delete this parent ID note. It has child ID notes attached. "
S TIUMSG=TIUMSG_"If you need to delete this note you must first detach the child from the parent note."
I $G(XQY0)["OR CPRS GUI CHART" D ;DBIA 3356
. S TIUMSG=TIUMSG_" Select Action/Detach from Interdisciplinary Note to accomplish this."
E S TIUMSG=TIUMSG_" Select the child note from the LM screen, then select Interdisciplinary Note."
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HTIULP3 1864 printed Oct 16, 2024@18:43 Page 2
TIULP3 ;BAY PINES/ELR - Functions determining privilege continued ; 3/7/12 10:52am
+1 ;;1.0;TEXT INTEGRATION UTILITIES;**232,256**;Jun 20, 1997;Build 11
+2 ;;ISA^USRLM: ICA 2324
ISSURG(TIUDA) ;
+1 NEW TIUY
+2 IF +$$ISADDNDM^TIULC1(TIUDA)
SET TIUDA=+$PIECE($GET(^TIU(8925,TIUDA,0)),U,6)
+3 DO ISSURG^TIUSROI(.TIUY,+$GET(^TIU(8925,+TIUDA,0)))
+4 if TIUY'>0
GOTO SURGEX
+5 ;SEE IF IT IS AN NIR OR AR
+6 NEW TIUS0,TIUSNAME
+7 SET TIUY=0
+8 if '$LENGTH(TIUDA)
GOTO SURGEX
+9 if '$DATA(^TIU(8925,+TIUDA,0))
GOTO SURGEX
+10 SET TIUS0=+$GET(^TIU(8925,+TIUDA,0))
+11 if '$LENGTH(TIUS0)
GOTO SURGEX
+12 SET TIUSNAME=$$PNAME^TIULC1(+TIUS0)
+13 if '$LENGTH(TIUSNAME)
GOTO SURGEX
+14 IF TIUSNAME="NURSE INTRAOPERATIVE REPORT"
SET TIUY=1
GOTO SURGEX
+15 IF TIUSNAME="ANESTHESIA REPORT"
SET TIUY=1
GOTO SURGEX
SURGEX QUIT TIUY
ACTION(TIUACTW) ;CHECK ACTION
+1 NEW TIUY
SET TIUY=0
+2 IF (($GET(TIUACTW)["EDIT RECORD")!($GET(TIUACTW)["ADDEND"))
SET TIUY=1
GOTO ACTEX
ACTEX QUIT TIUY
AUTHUSR(PERSON) ;Check to see if user is Privacy Act Officer or Chief Mis/Hims
+1 NEW TIUY
SET TIUY=0
+2 IF ($$ISA^USRLM(PERSON,"PRIVACY ACT OFFICER"))!($$ISA^USRLM(PERSON,"CHIEF, MIS"))!($$ISA^USRLM(PERSON,"CHIEF, HIMS"))
SET TIUY=1
GOTO USREX
USREX QUIT TIUY
SURMSG(TIUACTW) ;SET SURGERY ERROR MSG
+1 NEW TIUY,TIUDOC
SET TIUDOC=""
+2 IF TIUACTW["EDIT"
SET TIUDOC="EDIT"
+3 IF TIUACTW["ADDEND"
SET TIUDOC="CREATE AN ADDENDUM FOR"
+4 IF TIUACTW["AMENDMENT"
SET TIUDOC="AMEND"
+5 SET TIUY="You must use the Surgery Package to "_TIUDOC_" this Document"
+6 QUIT TIUY
IDMSG(TIUMSG) ;SET DELETE ID MSG
+1 SET TIUMSG="You may NOT delete this parent ID note. It has child ID notes attached. "
+2 SET TIUMSG=TIUMSG_"If you need to delete this note you must first detach the child from the parent note."
+3 ;DBIA 3356
IF $GET(XQY0)["OR CPRS GUI CHART"
Begin DoDot:1
+4 SET TIUMSG=TIUMSG_" Select Action/Detach from Interdisciplinary Note to accomplish this."
End DoDot:1
+5 IF '$TEST
SET TIUMSG=TIUMSG_" Select the child note from the LM screen, then select Interdisciplinary Note."
+6 QUIT