FHWMAS ; HISC/REL - Process MAS Events ;2/1/95 08:53
;;5.5;DIETETICS;;Jan 28, 2005
S FHMAS3=0
S FHZ115="P"_DFN D ADD^FHOMDPA I FHDFN="" Q
F FHMAS1=0:0 S FHMAS1=$O(^UTILITY("DGPM",$J,FHMAS1)) Q:FHMAS1=""!(FHMAS1>3) D:'FHMAS3 A0 F FHMAS2=0:0 S FHMAS2=$O(^UTILITY("DGPM",$J,FHMAS1,FHMAS2)) Q:FHMAS2="" S FHNEW=$G(^(FHMAS2,"A")),FHOLD=$G(^("P")) D A1
K A0,ADM,FHWF,WARD,FHMAS1,FHMAS2,FHMAS3,FHNEW,FHOLD,X Q
A0 S FHMAS3=1 Q
A1 I FHNEW="" G DEL
; New/Edit actions
S ADM=$P(FHNEW,"^",14) Q:'ADM
I FHMAS1=1 Q:$P(FHNEW,"^",17) G ^FHWADM
I FHMAS1=2 G ^FHWTRN
G ^FHWDIS
DEL ; Delete actions
S ADM=$P(FHOLD,"^",14) Q:'ADM
I FHMAS1=1 G ^FHWDIS
I FHMAS1=2 G ^FHWTRN
G ^FHWDISD
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFHWMAS 699 printed Oct 16, 2024@17:56:09 Page 2
FHWMAS ; HISC/REL - Process MAS Events ;2/1/95 08:53
+1 ;;5.5;DIETETICS;;Jan 28, 2005
+2 SET FHMAS3=0
+3 SET FHZ115="P"_DFN
DO ADD^FHOMDPA
IF FHDFN=""
QUIT
+4 FOR FHMAS1=0:0
SET FHMAS1=$ORDER(^UTILITY("DGPM",$JOB,FHMAS1))
if FHMAS1=""!(FHMAS1>3)
QUIT
if 'FHMAS3
DO A0
FOR FHMAS2=0:0
SET FHMAS2=$ORDER(^UTILITY("DGPM",$JOB,FHMAS1,FHMAS2))
if FHMAS2=""
QUIT
SET FHNEW=$GET(^(FHMAS2,"A"))
SET FHOLD=$GET(^("P"))
DO A1
+5 KILL A0,ADM,FHWF,WARD,FHMAS1,FHMAS2,FHMAS3,FHNEW,FHOLD,X
QUIT
A0 SET FHMAS3=1
QUIT
A1 IF FHNEW=""
GOTO DEL
+1 ; New/Edit actions
+2 SET ADM=$PIECE(FHNEW,"^",14)
if 'ADM
QUIT
+3 IF FHMAS1=1
if $PIECE(FHNEW,"^",17)
QUIT
GOTO ^FHWADM
+4 IF FHMAS1=2
GOTO ^FHWTRN
+5 GOTO ^FHWDIS
DEL ; Delete actions
+1 SET ADM=$PIECE(FHOLD,"^",14)
if 'ADM
QUIT
+2 IF FHMAS1=1
GOTO ^FHWDIS
+3 IF FHMAS1=2
GOTO ^FHWTRN
+4 GOTO ^FHWDISD