SCUTBK2 ;ALB/MJK - Scheduling Broker Utilities ;[ 03/07/95 10:02 AM ]
;;5.3;Scheduling;**41**;AUG 13, 1993
;
Q
;
FINDC(SCDATA,SC) ; -- broker callback to actually use FIND^DIC
N SCFILE,SCIENS,SCFIELDS,SCFLAGS,SCFROM,SCPART,SCVAL,SCMAX,SCXREF,SCREEN,SCID,SCROOT,SCDILIST
D CHK^SCUTBK
;
; -- parse array to parameters
D PARSE^SCUTBK(.SC)
D TMP^SCUTBK
;
D FIND^DIC(SCFILE,SCIENS,SCFIELDS,SCFLAGS,SCVAL,SCMAX,SCXREF,SCREEN,SCID,"SCDATA")
;
Q
;
GETSC(SCDATA,SC) ; -- broker callback to actually use GETS^DIQ
;
N SCFILE,SCIENS,SCFIELDS,SCFLAGS,SCFROM,SCPART,SCVAL,SCMAX,SCXREF,SCREEN,SCID,SCROOT,SCERR
D CHK^SCUTBK
;
; -- parse array to parameters
D PARSE^SCUTBK(.SC)
D TMP^SCUTBK
;
D GETS^DIQ(SCFILE,SCIENS,SCFIELDS,SCFLAGS,"SCDATA","SCERR")
;
N Y,SCFLD,N,X,J,C
S N=0
D SET("[Data]")
S SCFLD=0 F S SCFLD=$O(SCDATA(SCFILE,SCIENS,SCFLD)) Q:'SCFLD D
. S X=SCFILE_"^"_$E(SCIENS,1,$L(SCIENS)-1)_"^"_SCFLD_"^"
. ; -- below call to $$GET1 is too slow...working w/FM team for speed
. ;IF $$GET1^DID(SCFILE,SCFLD,"","TYPE")="WORD-PROCESSING" D
. IF $P($G(^DD(SCFILE,SCFLD,0)),U,4)[";0" D
. . D SET(X_"[WORD PROCESSING]")
. . S J=0 F S J=$O(SCDATA(SCFILE,SCIENS,SCFLD,J)) Q:'J D
. . . D SET(SCDATA(SCFILE,SCIENS,SCFLD,J))
. . D SET("$$END$$")
. E D
. . D SET(X_$G(SCDATA(SCFILE,SCIENS,SCFLD,"I"))_"^"_$G(SCDATA(SCFILE,SCIENS,SCFLD,"E")))
;
IF $D(SCERR) D
. D SET("[ERROR]")
;
K SCDATA M SCDATA=Y
Q
;
SET(X) ;
S N=N+1
S Y(N)=X
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSCUTBK2 1526 printed Oct 16, 2024@18:44:55 Page 2
SCUTBK2 ;ALB/MJK - Scheduling Broker Utilities ;[ 03/07/95 10:02 AM ]
+1 ;;5.3;Scheduling;**41**;AUG 13, 1993
+2 ;
+3 QUIT
+4 ;
FINDC(SCDATA,SC) ; -- broker callback to actually use FIND^DIC
+1 NEW SCFILE,SCIENS,SCFIELDS,SCFLAGS,SCFROM,SCPART,SCVAL,SCMAX,SCXREF,SCREEN,SCID,SCROOT,SCDILIST
+2 DO CHK^SCUTBK
+3 ;
+4 ; -- parse array to parameters
+5 DO PARSE^SCUTBK(.SC)
+6 DO TMP^SCUTBK
+7 ;
+8 DO FIND^DIC(SCFILE,SCIENS,SCFIELDS,SCFLAGS,SCVAL,SCMAX,SCXREF,SCREEN,SCID,"SCDATA")
+9 ;
+10 QUIT
+11 ;
GETSC(SCDATA,SC) ; -- broker callback to actually use GETS^DIQ
+1 ;
+2 NEW SCFILE,SCIENS,SCFIELDS,SCFLAGS,SCFROM,SCPART,SCVAL,SCMAX,SCXREF,SCREEN,SCID,SCROOT,SCERR
+3 DO CHK^SCUTBK
+4 ;
+5 ; -- parse array to parameters
+6 DO PARSE^SCUTBK(.SC)
+7 DO TMP^SCUTBK
+8 ;
+9 DO GETS^DIQ(SCFILE,SCIENS,SCFIELDS,SCFLAGS,"SCDATA","SCERR")
+10 ;
+11 NEW Y,SCFLD,N,X,J,C
+12 SET N=0
+13 DO SET("[Data]")
+14 SET SCFLD=0
FOR
SET SCFLD=$ORDER(SCDATA(SCFILE,SCIENS,SCFLD))
if 'SCFLD
QUIT
Begin DoDot:1
+15 SET X=SCFILE_"^"_$EXTRACT(SCIENS,1,$LENGTH(SCIENS)-1)_"^"_SCFLD_"^"
+16 ; -- below call to $$GET1 is too slow...working w/FM team for speed
+17 ;IF $$GET1^DID(SCFILE,SCFLD,"","TYPE")="WORD-PROCESSING" D
+18 IF $PIECE($GET(^DD(SCFILE,SCFLD,0)),U,4)[";0"
Begin DoDot:2
+19 DO SET(X_"[WORD PROCESSING]")
+20 SET J=0
FOR
SET J=$ORDER(SCDATA(SCFILE,SCIENS,SCFLD,J))
if 'J
QUIT
Begin DoDot:3
+21 DO SET(SCDATA(SCFILE,SCIENS,SCFLD,J))
End DoDot:3
+22 DO SET("$$END$$")
End DoDot:2
+23 IF '$TEST
Begin DoDot:2
+24 DO SET(X_$GET(SCDATA(SCFILE,SCIENS,SCFLD,"I"))_"^"_$GET(SCDATA(SCFILE,SCIENS,SCFLD,"E")))
End DoDot:2
End DoDot:1
+25 ;
+26 IF $DATA(SCERR)
Begin DoDot:1
+27 DO SET("[ERROR]")
End DoDot:1
+28 ;
+29 KILL SCDATA
MERGE SCDATA=Y
+30 QUIT
+31 ;
SET(X) ;
+1 SET N=N+1
+2 SET Y(N)=X
+3 QUIT
+4 ;