- TIULP3 ;BAY PINES/ELR - Functions determining privilege continued ;11/15/2006
- ;;1.0;TEXT INTEGRATION UTILITIES;**232**;Jun 20, 1997;Build 19
- 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)["DELETE RECORD")!($G(TIUACTW)["EDIT RECORD")!($G(TIUACTW)["ADDEND")) S TIUY=1 G ACTEX
- ACTEX Q TIUY
- SURMSG(TIUACTW) ;SET SURGERY ERROR MSG
- NEW TIUY,TIUDOC S TIUDOC=""
- I TIUACTW["DELETE" S TIUDOC="DELETE"
- 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
- TIULP3 ;BAY PINES/ELR - Functions determining privilege continued ;11/15/2006
- +1 ;;1.0;TEXT INTEGRATION UTILITIES;**232**;Jun 20, 1997;Build 19
- 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)["DELETE RECORD")!($GET(TIUACTW)["EDIT RECORD")!($GET(TIUACTW)["ADDEND"))
- SET TIUY=1
- GOTO ACTEX
- ACTEX QUIT TIUY
- SURMSG(TIUACTW) ;SET SURGERY ERROR MSG
- +1 NEW TIUY,TIUDOC
- SET TIUDOC=""
- +2 IF TIUACTW["DELETE"
- SET TIUDOC="DELETE"
- +3 IF TIUACTW["EDIT"
- SET TIUDOC="EDIT"
- +4 IF TIUACTW["ADDEND"
- SET TIUDOC="CREATE AN ADDENDUM FOR"
- +5 IF TIUACTW["AMENDMENT"
- SET TIUDOC="AMEND"
- +6 SET TIUY="You must use the Surgery Package to "_TIUDOC_" this Document"
- +7 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