BSDX03 ; IHS/OIT/HMW/MSC/SAT - WINDOWS SCHEDULING RPCS ;
;;3.0;IHS WINDOWS SCHEDULING;;DEC 09, 2010
;
;
Q
;
XR2S(BSDXDA) ;EP
;XR2 is the ARSRC xref for the
;RESOURCE field of the BSDX APPOINTMENT file
;Format is ^BSDXAPPT("ARSRC",RESOURCEID,STARTTIME,APPTID)
Q:'$D(^BSDXAPPT(BSDXDA,0))
N BSDXNOD,BSDXAPPID,BSDXRSID,BSDXS
S BSDXNOD=^BSDXAPPT(BSDXDA,0)
S BSDXAPPID=BSDXDA
S BSDXRSID=$P(BSDXNOD,U,7)
Q:'+BSDXAPPID>0
Q:'+BSDXRSID>0
S BSDXS=$P(BSDXNOD,U)
Q:'+BSDXS
S ^BSDXAPPT("ARSRC",BSDXRSID,BSDXS,BSDXAPPID)=""
Q
;
XR2K(BSDXA) ;EP
Q:'$D(^BSDXAPPT(BSDXA,0))
N BSDXNOD,BSDXAPPID,BSDXRSID,BSDXS
S BSDXNOD=^BSDXAPPT(BSDXA,0)
S BSDXAPPID=BSDXA
S BSDXRSID=$P(BSDXNOD,U,7)
S BSDXS=$P(BSDXNOD,U)
Q:'+BSDXAPPID>0
Q:'+BSDXRSID>0
Q:'+BSDXS>0
K ^BSDXAPPT("ARSRC",BSDXRSID,BSDXS,BSDXAPPID)
Q
XR4S(BSDXDA) ;EP
;XR4 is the ARSCT xref for the
;STARTTIME field of the BSDX ACCESS BLOCK file
;Format is ^BSDXAB("ARSCT",RESOURCEID,STARTTIME,DA)
Q:'$D(^BSDXAB(BSDXDA,0))
N BSDXNOD,BSDXR,BSDXS
S BSDXNOD=^BSDXAB(BSDXDA,0)
S BSDXR=$P(BSDXNOD,U)
S BSDXS=$P(BSDXNOD,U,2)
Q:'+BSDXR>0
Q:'+BSDXS>0
S ^BSDXAB("ARSCT",BSDXR,BSDXS,BSDXDA)=""
Q
;
XR4K(BSDXDA) ;EP
Q:'$D(^BSDXAB(BSDXDA,0))
N BSDXNOD,BSDXR,BSDXS
S BSDXNOD=^BSDXAB(BSDXDA,0)
S BSDXR=$P(BSDXNOD,U)
S BSDXS=$P(BSDXNOD,U,2)
Q:'+BSDXR>0
Q:'+BSDXS>0
K ^BSDXAB("ARSCT",BSDXR,BSDXS,BSDXDA)
Q
BSDX03 ; IHS/OIT/HMW/MSC/SAT - WINDOWS SCHEDULING RPCS ;
+1 ;;3.0;IHS WINDOWS SCHEDULING;;DEC 09, 2010
+2 ;
+3 ;
+4 QUIT
+5 ;
XR2S(BSDXDA) ;EP
+1 ;XR2 is the ARSRC xref for the
+2 ;RESOURCE field of the BSDX APPOINTMENT file
+3 ;Format is ^BSDXAPPT("ARSRC",RESOURCEID,STARTTIME,APPTID)
+4 IF '$DATA(^BSDXAPPT(BSDXDA,0))
QUIT
+5 NEW BSDXNOD,BSDXAPPID,BSDXRSID,BSDXS
+6 SET BSDXNOD=^BSDXAPPT(BSDXDA,0)
+7 SET BSDXAPPID=BSDXDA
+8 SET BSDXRSID=$PIECE(BSDXNOD,U,7)
+9 IF '+BSDXAPPID>0
QUIT
+10 IF '+BSDXRSID>0
QUIT
+11 SET BSDXS=$PIECE(BSDXNOD,U)
+12 IF '+BSDXS
QUIT
+13 SET ^BSDXAPPT("ARSRC",BSDXRSID,BSDXS,BSDXAPPID)=""
+14 QUIT
+15 ;
XR2K(BSDXA) ;EP
+1 IF '$DATA(^BSDXAPPT(BSDXA,0))
QUIT
+2 NEW BSDXNOD,BSDXAPPID,BSDXRSID,BSDXS
+3 SET BSDXNOD=^BSDXAPPT(BSDXA,0)
+4 SET BSDXAPPID=BSDXA
+5 SET BSDXRSID=$PIECE(BSDXNOD,U,7)
+6 SET BSDXS=$PIECE(BSDXNOD,U)
+7 IF '+BSDXAPPID>0
QUIT
+8 IF '+BSDXRSID>0
QUIT
+9 IF '+BSDXS>0
QUIT
+10 KILL ^BSDXAPPT("ARSRC",BSDXRSID,BSDXS,BSDXAPPID)
+11 QUIT
XR4S(BSDXDA) ;EP
+1 ;XR4 is the ARSCT xref for the
+2 ;STARTTIME field of the BSDX ACCESS BLOCK file
+3 ;Format is ^BSDXAB("ARSCT",RESOURCEID,STARTTIME,DA)
+4 IF '$DATA(^BSDXAB(BSDXDA,0))
QUIT
+5 NEW BSDXNOD,BSDXR,BSDXS
+6 SET BSDXNOD=^BSDXAB(BSDXDA,0)
+7 SET BSDXR=$PIECE(BSDXNOD,U)
+8 SET BSDXS=$PIECE(BSDXNOD,U,2)
+9 IF '+BSDXR>0
QUIT
+10 IF '+BSDXS>0
QUIT
+11 SET ^BSDXAB("ARSCT",BSDXR,BSDXS,BSDXDA)=""
+12 QUIT
+13 ;
XR4K(BSDXDA) ;EP
+1 IF '$DATA(^BSDXAB(BSDXDA,0))
QUIT
+2 NEW BSDXNOD,BSDXR,BSDXS
+3 SET BSDXNOD=^BSDXAB(BSDXDA,0)
+4 SET BSDXR=$PIECE(BSDXNOD,U)
+5 SET BSDXS=$PIECE(BSDXNOD,U,2)
+6 IF '+BSDXR>0
QUIT
+7 IF '+BSDXS>0
QUIT
+8 KILL ^BSDXAB("ARSCT",BSDXR,BSDXS,BSDXDA)
+9 QUIT