BSDX20 ; IHS/OIT/HMW/MSC/SAT - WINDOWS SCHEDULING RPCS ;
;;3.0;IHS WINDOWS SCHEDULING;;DEC 09, 2010
;
;
DELRGID(BSDXY,BSDXIEN) ;EP
;Entry point for debugging
;
;D DEBUG^%Serenji("DELRGI^BSDX20(.BSDXY,BSDXIEN)")
Q
;
DELRGI(BSDXY,BSDXIEN,BSDXIEN1) ;EP
;Deletes entry BSDXIEN1 from entry BSDXIEN in the RESOURCE GROUP file
;Return recordset containing error message or "" if no error
;Called by BSDX DELETE RES GROUP ITEM
;Test Line:
;D DELRU^BSDX18(.RES,99)
;
N BSDXI,DIK,DA
S BSDXI=0
S BSDXY="^BSDXTMP("_$J_")"
S ^BSDXTMP($J,0)="I00020RESOURCEGROUPID^I00020ERRORID"_$C(30)
I '+BSDXIEN D ERR(BSDXI,BSDXIEN,70) Q
I '+BSDXIEN1 D ERR(BSDXI,BSDXIEN,70) Q
I '$D(^BSDXDEPT(BSDXIEN,1,BSDXIEN1,0)) D ERR(BSDXI,BSDXIEN,70) Q
;
;Delete entry BSDXIEN1
S DIK="^BSDXDEPT("_BSDXIEN_",1,"
S DA=BSDXIEN1,DA(1)=BSDXIEN
D ^DIK
;
S BSDXI=BSDXI+1
S ^BSDXTMP($J,BSDXI)=BSDXIEN_"^"_"-1"_$C(30)_$C(31)
Q
;
ADDRGID(BSDXY,BSDXIEN,BSDXIEN1) ;EP
;Entry point for debugging
;
;D DEBUG^%Serenji("ADDRGI^BSDX20(.BSDXY,BSDXIEN,BSDXIEN1)")
Q
;
ADDRGI(BSDXY,BSDXIEN,BSDXIEN1) ;EP
;Adds RESOURCEID BSEDXIEN1 to RESOURCE GROUP entry BSDXIEN
;Return recordset containing added subentry number error message or "" if no error
;Called by BSDX ADD RES GROUP ITEM
;Test Line:
;D ADDRGI^BSDX20(.RES,1,1)
;
N BSDXI,BSDXIENS,BSDXMSG,BSDXFDA
S X="ETRAP^BSDX20",@^%ZOSF("TRAP")
S BSDXI=0
S BSDXY="^BSDXTMP("_$J_")"
S ^BSDXTMP($J,0)="I00020RESOURCEGROUPITEMID^I00020ERRORID"_$C(30)
I '+BSDXIEN D ERR(BSDXI,BSDXIEN,70) Q
I '+BSDXIEN1 D ERR(BSDXI,BSDXIEN,70) Q
I '$D(^BSDXDEPT(BSDXIEN,0)) D ERR(BSDXI,BSDXIEN,70) Q
I '$D(^BSDXRES(BSDXIEN1,0)) D ERR(BSDXI,BSDXIEN1,70) Q
I $D(^BSDXDEPT(BSDXIEN,1,"B",BSDXIEN1)) D ERR(BSDXI,0,0) Q
;^BSDXDEPT(3,1,"B",3,1)=
;
S BSDXIENS="+1,"_BSDXIEN_","
S BSDXFDA(9002018.21,BSDXIENS,.01)=BSDXIEN1 ;RESOURCEID
K BSDXIEN
D UPDATE^DIE("","BSDXFDA","BSDXIEN","BSDXMSG")
S BSDXI=BSDXI+1
S ^BSDXTMP($J,BSDXI)=+$G(BSDXIEN(1))_"^"_"-1"_$C(30)_$C(31)
Q
;
ERR(BSDXI,BSDXID,BSDXERR) ;Error processing
S BSDXI=BSDXI+1
S ^BSDXTMP($J,BSDXI)=BSDXID_"^"_BSDXERR_$C(30)
S BSDXI=BSDXI+1
S ^BSDXTMP($J,BSDXI)=$C(31)
Q
;
ETRAP ;EP Error trap entry
I '$D(BSDXI) N BSDXI S BSDXI=999
S BSDXI=BSDXI+1
D ERR(BSDXI,99,70)
Q
BSDX20 ; IHS/OIT/HMW/MSC/SAT - WINDOWS SCHEDULING RPCS ;
+1 ;;3.0;IHS WINDOWS SCHEDULING;;DEC 09, 2010
+2 ;
+3 ;
DELRGID(BSDXY,BSDXIEN) ;EP
+1 ;Entry point for debugging
+2 ;
+3 ;D DEBUG^%Serenji("DELRGI^BSDX20(.BSDXY,BSDXIEN)")
+4 QUIT
+5 ;
DELRGI(BSDXY,BSDXIEN,BSDXIEN1) ;EP
+1 ;Deletes entry BSDXIEN1 from entry BSDXIEN in the RESOURCE GROUP file
+2 ;Return recordset containing error message or "" if no error
+3 ;Called by BSDX DELETE RES GROUP ITEM
+4 ;Test Line:
+5 ;D DELRU^BSDX18(.RES,99)
+6 ;
+7 NEW BSDXI,DIK,DA
+8 SET BSDXI=0
+9 SET BSDXY="^BSDXTMP("_$JOB_")"
+10 SET ^BSDXTMP($JOB,0)="I00020RESOURCEGROUPID^I00020ERRORID"_$CHAR(30)
+11 IF '+BSDXIEN
DO ERR(BSDXI,BSDXIEN,70)
QUIT
+12 IF '+BSDXIEN1
DO ERR(BSDXI,BSDXIEN,70)
QUIT
+13 IF '$DATA(^BSDXDEPT(BSDXIEN,1,BSDXIEN1,0))
DO ERR(BSDXI,BSDXIEN,70)
QUIT
+14 ;
+15 ;Delete entry BSDXIEN1
+16 SET DIK="^BSDXDEPT("_BSDXIEN_",1,"
+17 SET DA=BSDXIEN1
SET DA(1)=BSDXIEN
+18 DO ^DIK
+19 ;
+20 SET BSDXI=BSDXI+1
+21 SET ^BSDXTMP($JOB,BSDXI)=BSDXIEN_"^"_"-1"_$CHAR(30)_$CHAR(31)
+22 QUIT
+23 ;
ADDRGID(BSDXY,BSDXIEN,BSDXIEN1) ;EP
+1 ;Entry point for debugging
+2 ;
+3 ;D DEBUG^%Serenji("ADDRGI^BSDX20(.BSDXY,BSDXIEN,BSDXIEN1)")
+4 QUIT
+5 ;
ADDRGI(BSDXY,BSDXIEN,BSDXIEN1) ;EP
+1 ;Adds RESOURCEID BSEDXIEN1 to RESOURCE GROUP entry BSDXIEN
+2 ;Return recordset containing added subentry number error message or "" if no error
+3 ;Called by BSDX ADD RES GROUP ITEM
+4 ;Test Line:
+5 ;D ADDRGI^BSDX20(.RES,1,1)
+6 ;
+7 NEW BSDXI,BSDXIENS,BSDXMSG,BSDXFDA
+8 SET X="ETRAP^BSDX20"
SET @^%ZOSF("TRAP")
+9 SET BSDXI=0
+10 SET BSDXY="^BSDXTMP("_$JOB_")"
+11 SET ^BSDXTMP($JOB,0)="I00020RESOURCEGROUPITEMID^I00020ERRORID"_$CHAR(30)
+12 IF '+BSDXIEN
DO ERR(BSDXI,BSDXIEN,70)
QUIT
+13 IF '+BSDXIEN1
DO ERR(BSDXI,BSDXIEN,70)
QUIT
+14 IF '$DATA(^BSDXDEPT(BSDXIEN,0))
DO ERR(BSDXI,BSDXIEN,70)
QUIT
+15 IF '$DATA(^BSDXRES(BSDXIEN1,0))
DO ERR(BSDXI,BSDXIEN1,70)
QUIT
+16 IF $DATA(^BSDXDEPT(BSDXIEN,1,"B",BSDXIEN1))
DO ERR(BSDXI,0,0)
QUIT
+17 ;^BSDXDEPT(3,1,"B",3,1)=
+18 ;
+19 SET BSDXIENS="+1,"_BSDXIEN_","
+20 ;RESOURCEID
SET BSDXFDA(9002018.21,BSDXIENS,.01)=BSDXIEN1
+21 KILL BSDXIEN
+22 DO UPDATE^DIE("","BSDXFDA","BSDXIEN","BSDXMSG")
+23 SET BSDXI=BSDXI+1
+24 SET ^BSDXTMP($JOB,BSDXI)=+$GET(BSDXIEN(1))_"^"_"-1"_$CHAR(30)_$CHAR(31)
+25 QUIT
+26 ;
ERR(BSDXI,BSDXID,BSDXERR) ;Error processing
+1 SET BSDXI=BSDXI+1
+2 SET ^BSDXTMP($JOB,BSDXI)=BSDXID_"^"_BSDXERR_$CHAR(30)
+3 SET BSDXI=BSDXI+1
+4 SET ^BSDXTMP($JOB,BSDXI)=$CHAR(31)
+5 QUIT
+6 ;
ETRAP ;EP Error trap entry
+1 IF '$DATA(BSDXI)
NEW BSDXI
SET BSDXI=999
+2 SET BSDXI=BSDXI+1
+3 DO ERR(BSDXI,99,70)
+4 QUIT