ACRFDHR3 ;IHS/OIRM/DSD/THL,AEF - UTILITY TO SET X-REFS IN DHR FILE; [ 11/01/2001 9:44 AM ]
;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
;;CALL BY FILEMAN X-REFS
Q
SFYLOC(DA) ;EP;TO SET FY/LOCATION CODE XREF
Q:'DA
D S
Q:$P(ACR1,U,11)=""
Q:$P(ACR10,U)=""
S ^ACRDHRI("FYLOC",$P(ACR1,U,11),$P(ACR10,U),DA)=""
Q
KFYLOC(DA,X) ;EP;TO KILL FY/LOCATION CODE XREF
Q:X=""!'DA
D S
Q:$P(ACR10,U)=""
K ^ACRDHRI("FYLOC",X,$P(ACR10,U),DA)
Q
KFYLOC2(DA,X) ;EP;TO KILL FY/LOCATION CODE XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,11)=""
K ^ACRDHRI("FYLOC",$P(ACR1,U,11),X,DA)
Q
SFYSSA(DA) ;EP;TO SET FY/SSA XREF
Q:'DA
D S
Q:$P(ACR1,U,11)=""
Q:$P(ACR10,U,2)=""
S ^ACRDHRI("FYSSA",$P(ACR1,U,11),$P(ACR10,U,2),DA)=""
Q
KFYSSA(DA,X) ;EP;TO KILL FY/SSA XREF
Q:X=""!'DA
D S
Q:$P(ACR10,U,2)=""
K ^ACRDHRI("FYSSA",X,$P(ACR10,U,2),DA)
Q
KFYSSA2(DA,X) ;EP;TO KILL FY/SSA XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,11)=""
K ^ACRDHRI("FYSSA",$P(ACR1,U,11),X,DA)
Q
SFYCAN(DA) ;EP;TO SET FY/CAN XREF
Q:'DA
D S
Q:$P(ACR1,U,11)=""
Q:$P(ACR1,U,12)=""
S ^ACRDHRI("FYCAN",$P(ACR1,U,11),$P(ACR1,U,12),DA)=""
Q
KFYCAN(DA,X) ;EP;TO KILL FY/CAN XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,12)=""
K ^ACRDHRI("FYCAN",X,$P(ACR1,U,12),DA)
Q
KFYCAN2(DA,X) ;EP;TO KILL FY/CAN XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,11)=""
K ^ACRDHRI("FYCAN",$P(ACR1,U,11),X,DA)
Q
SFYVND(DA) ;EP;TO SET FY/VND XREF
Q:'DA
D S
Q:$P(ACR1,U,11)=""
Q:$P(ACR1,U,16)=""
S ^ACRDHRI("FYVND",$P(ACR1,U,11),$P(ACR1,U,16),DA)=""
Q
KFYVND(DA,X) ;EP;TO KILL FY/VND XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,16)=""
K ^ACRDHRI("FYVND",X,$P(ACR1,U,16),DA)
Q
KFYVND2(DA,X) ;EP;TO KILL FY/VND XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,11)=""
K ^ACRDHRI("FYVND",$P(ACR1,U,11),X,DA)
Q
SFYOCC(DA) ;EP;TO SET FY/OCC XREF
Q:'DA
D S
Q:$P(ACR1,U,11)=""
Q:$P(ACR1,U,13)=""
S ^ACRDHRI("FYOCC",$P(ACR1,U,11),$P(ACR1,U,13),DA)=""
Q
KFYOCC(DA,X) ;EP;TO KILL FY/OCC XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,13)=""
K ^ACRDHRI("FYOCC",X,$P(ACR1,U,13),DA)
Q
KFYOCC2(DA,X) ;EP;TO KILL FY/OCC XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,11)=""
K ^ACRDHRI("FYOCC",$P(ACR1,U,11),X,DA)
Q
S S ACR0=$G(^ACRDHRI(DA,0))
S ACR1=$G(^ACRDHRI(DA,1))
S ACR10=$G(^ACRDHRI(DA,10))
Q
SFYLOCS(DA) ;EP;TO SET FY/LOCATION/SSA CODE XREF
Q:'DA
D S
Q:$P(ACR1,U,11)=""
Q:$P(ACR10,U)=""
Q:$P(ACR10,U,2)=""
S ^ACRDHRI("FYLOCSSA",$P(ACR1,U,11),$P(ACR10,U),$P(ACR10,U,2),DA)=""
Q
KFYLOCS(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
Q:X=""!'DA
D S
Q:$P(ACR10,U)=""
Q:$P(ACR10,U,2)=""
K ^ACRDHRI("FYLOCSSA",X,$P(ACR10,U),$P(ACR10,U,2),DA)
Q
KFYLOCS2(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,11)=""
Q:$P(ACR10,U,2)=""
K ^ACRDHRI("FYLOCSSA",$P(ACR1,U,11),X,$P(ACR10,U,2),DA)
Q
KFYLOCS3(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,11)=""
Q:$P(ACR10,U)=""
K ^ACRDHRI("FYLOCSSA",$P(ACR1,U,11),$P(ACR10,U),X,DA)
Q
SFYSSAL(DA) ;EP;TO SET FY/LOCATION/SSA CODE XREF
Q:'DA
D S
Q:$P(ACR1,U,11)=""
Q:$P(ACR10,U)=""
Q:$P(ACR10,U,2)=""
S ^ACRDHRI("FYSSALOC",$P(ACR1,U,11),$P(ACR10,U,2),$P(ACR10,U),DA)=""
Q
KFYSSAL(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
Q:X=""!'DA
D S
Q:$P(ACR10,U)=""
Q:$P(ACR10,U,2)=""
K ^ACRDHRI("FYSSALOC",X,$P(ACR10,U,2),$P(ACR10,U),DA)
Q
KFYSSAL2(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,11)=""
Q:$P(ACR10,U)=""
K ^ACRDHRI("FYSSALOC",$P(ACR1,U,11),X,$P(ACR10,U),DA)
Q
KFYSSAL3(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
Q:X=""!'DA
D S
Q:$P(ACR1,U,11)=""
Q:$P(ACR10,U,2)=""
K ^ACRDHRI("FYSSALOC",$P(ACR1,U,11),$P(ACR10,U,2),X,DA)
Q
ACRFDHR3 ;IHS/OIRM/DSD/THL,AEF - UTILITY TO SET X-REFS IN DHR FILE; [ 11/01/2001 9:44 AM ]
+1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
+2 ;;CALL BY FILEMAN X-REFS
+3 QUIT
SFYLOC(DA) ;EP;TO SET FY/LOCATION CODE XREF
+1 IF 'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 IF $PIECE(ACR10,U)=""
QUIT
+5 SET ^ACRDHRI("FYLOC",$PIECE(ACR1,U,11),$PIECE(ACR10,U),DA)=""
+6 QUIT
KFYLOC(DA,X) ;EP;TO KILL FY/LOCATION CODE XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR10,U)=""
QUIT
+4 KILL ^ACRDHRI("FYLOC",X,$PIECE(ACR10,U),DA)
+5 QUIT
KFYLOC2(DA,X) ;EP;TO KILL FY/LOCATION CODE XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 KILL ^ACRDHRI("FYLOC",$PIECE(ACR1,U,11),X,DA)
+5 QUIT
SFYSSA(DA) ;EP;TO SET FY/SSA XREF
+1 IF 'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 IF $PIECE(ACR10,U,2)=""
QUIT
+5 SET ^ACRDHRI("FYSSA",$PIECE(ACR1,U,11),$PIECE(ACR10,U,2),DA)=""
+6 QUIT
KFYSSA(DA,X) ;EP;TO KILL FY/SSA XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR10,U,2)=""
QUIT
+4 KILL ^ACRDHRI("FYSSA",X,$PIECE(ACR10,U,2),DA)
+5 QUIT
KFYSSA2(DA,X) ;EP;TO KILL FY/SSA XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 KILL ^ACRDHRI("FYSSA",$PIECE(ACR1,U,11),X,DA)
+5 QUIT
SFYCAN(DA) ;EP;TO SET FY/CAN XREF
+1 IF 'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 IF $PIECE(ACR1,U,12)=""
QUIT
+5 SET ^ACRDHRI("FYCAN",$PIECE(ACR1,U,11),$PIECE(ACR1,U,12),DA)=""
+6 QUIT
KFYCAN(DA,X) ;EP;TO KILL FY/CAN XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,12)=""
QUIT
+4 KILL ^ACRDHRI("FYCAN",X,$PIECE(ACR1,U,12),DA)
+5 QUIT
KFYCAN2(DA,X) ;EP;TO KILL FY/CAN XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 KILL ^ACRDHRI("FYCAN",$PIECE(ACR1,U,11),X,DA)
+5 QUIT
SFYVND(DA) ;EP;TO SET FY/VND XREF
+1 IF 'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 IF $PIECE(ACR1,U,16)=""
QUIT
+5 SET ^ACRDHRI("FYVND",$PIECE(ACR1,U,11),$PIECE(ACR1,U,16),DA)=""
+6 QUIT
KFYVND(DA,X) ;EP;TO KILL FY/VND XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,16)=""
QUIT
+4 KILL ^ACRDHRI("FYVND",X,$PIECE(ACR1,U,16),DA)
+5 QUIT
KFYVND2(DA,X) ;EP;TO KILL FY/VND XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 KILL ^ACRDHRI("FYVND",$PIECE(ACR1,U,11),X,DA)
+5 QUIT
SFYOCC(DA) ;EP;TO SET FY/OCC XREF
+1 IF 'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 IF $PIECE(ACR1,U,13)=""
QUIT
+5 SET ^ACRDHRI("FYOCC",$PIECE(ACR1,U,11),$PIECE(ACR1,U,13),DA)=""
+6 QUIT
KFYOCC(DA,X) ;EP;TO KILL FY/OCC XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,13)=""
QUIT
+4 KILL ^ACRDHRI("FYOCC",X,$PIECE(ACR1,U,13),DA)
+5 QUIT
KFYOCC2(DA,X) ;EP;TO KILL FY/OCC XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 KILL ^ACRDHRI("FYOCC",$PIECE(ACR1,U,11),X,DA)
+5 QUIT
S SET ACR0=$GET(^ACRDHRI(DA,0))
+1 SET ACR1=$GET(^ACRDHRI(DA,1))
+2 SET ACR10=$GET(^ACRDHRI(DA,10))
+3 QUIT
SFYLOCS(DA) ;EP;TO SET FY/LOCATION/SSA CODE XREF
+1 IF 'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 IF $PIECE(ACR10,U)=""
QUIT
+5 IF $PIECE(ACR10,U,2)=""
QUIT
+6 SET ^ACRDHRI("FYLOCSSA",$PIECE(ACR1,U,11),$PIECE(ACR10,U),$PIECE(ACR10,U,2),DA)=""
+7 QUIT
KFYLOCS(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR10,U)=""
QUIT
+4 IF $PIECE(ACR10,U,2)=""
QUIT
+5 KILL ^ACRDHRI("FYLOCSSA",X,$PIECE(ACR10,U),$PIECE(ACR10,U,2),DA)
+6 QUIT
KFYLOCS2(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 IF $PIECE(ACR10,U,2)=""
QUIT
+5 KILL ^ACRDHRI("FYLOCSSA",$PIECE(ACR1,U,11),X,$PIECE(ACR10,U,2),DA)
+6 QUIT
KFYLOCS3(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 IF $PIECE(ACR10,U)=""
QUIT
+5 KILL ^ACRDHRI("FYLOCSSA",$PIECE(ACR1,U,11),$PIECE(ACR10,U),X,DA)
+6 QUIT
SFYSSAL(DA) ;EP;TO SET FY/LOCATION/SSA CODE XREF
+1 IF 'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 IF $PIECE(ACR10,U)=""
QUIT
+5 IF $PIECE(ACR10,U,2)=""
QUIT
+6 SET ^ACRDHRI("FYSSALOC",$PIECE(ACR1,U,11),$PIECE(ACR10,U,2),$PIECE(ACR10,U),DA)=""
+7 QUIT
KFYSSAL(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR10,U)=""
QUIT
+4 IF $PIECE(ACR10,U,2)=""
QUIT
+5 KILL ^ACRDHRI("FYSSALOC",X,$PIECE(ACR10,U,2),$PIECE(ACR10,U),DA)
+6 QUIT
KFYSSAL2(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 IF $PIECE(ACR10,U)=""
QUIT
+5 KILL ^ACRDHRI("FYSSALOC",$PIECE(ACR1,U,11),X,$PIECE(ACR10,U),DA)
+6 QUIT
KFYSSAL3(DA,X) ;EP;TO KILL FY/LOCATION/SSA CODE XREF
+1 IF X=""!'DA
QUIT
+2 DO S
+3 IF $PIECE(ACR1,U,11)=""
QUIT
+4 IF $PIECE(ACR10,U,2)=""
QUIT
+5 KILL ^ACRDHRI("FYSSALOC",$PIECE(ACR1,U,11),$PIECE(ACR10,U,2),X,DA)
+6 QUIT