FSCFORMC ;SLC/STAFF-NOIS Format Custom ;5/18/98 12:38
;;1.1;NOIS;;Sep 06, 1998
;
CUSTOM ; from FSCFORM
N ABBREV,CNT,IEN,LINE,SECTION,TEXT
S CNT=0 F S CNT=$O(STYLE(CNT)) Q:CNT<1 S ABBREV=$P(STYLE(CNT),U,7) I $L(ABBREV) S FIELD(ABBREV)=""
D GET^FSCGET("CUSTOM",CALLNUM,.FIELD)
N FORMAT K FORMAT
S SECTION=1,(CNT,LINE)=0 F S CNT=$O(STYLE(CNT)) Q:CNT<1 S ABBREV=$P(STYLE(CNT),U,7) I $L(ABBREV),ABBREV'="REF",ABBREV'="SUBJECT" D
.S LINE=LINE+1 S TEXT=$J($P(STYLE(CNT),U,2)_": ",14)_$P(FIELD(ABBREV),U,2)
.D SETTEXT^FSCFORM(SECTION,LINE,2,TEXT)
.I ABBREV="DESC" D
..S SECTION=SECTION+1
..D SETMULT^FSCFORM(SECTION,"^FSCD(""CALL"","_CALLNUM_",30)")
..S SECTION=SECTION+1,LINE=0
.I ABBREV="ACTIONS" D
..S SECTION=SECTION+1
..D SETMULT^FSCFORM(SECTION,"^FSCD(""CALL"","_CALLNUM_",50)")
..S SECTION=SECTION+1,LINE=0
.I ABBREV="SUM" D
..S SECTION=SECTION+1
..D SETMULT^FSCFORM(SECTION,"^FSCD(""CALL"","_CALLNUM_",80)")
..S SECTION=SECTION+1,LINE=0
.I ABBREV="STATHIST" D
..S SECTION=SECTION+1
..D SETMULT^FSCFORM(SECTION,"^FSCD(""CALL"","_CALLNUM_",110)")
..S SECTION=SECTION+1,LINE=0
.I ABBREV="PNOTE" D
..S IEN=+$G(^FSCD("CALL USER","AUC",DUZ,CALLNUM))
..I 'IEN Q
..S SECTION=SECTION+1
..D SETMULT^FSCFORM(SECTION,"^FSCD(""CALL USER"","_IEN_",2)")
..S SECTION=SECTION+1,LINE=0
I TYPE["VIEW" D VIEW^FSCFORMU(LISTNUM,CALLNUM,.FORMAT,STYLE,.LASTLINE,TYPE) Q
D SETUP^FSCFORMU(LISTNUM,CALLNUM,.FORMAT,STYLE,.LASTLINE,TYPE)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCFORMC 1486 printed Nov 22, 2024@17:27:47 Page 2
FSCFORMC ;SLC/STAFF-NOIS Format Custom ;5/18/98 12:38
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
CUSTOM ; from FSCFORM
+1 NEW ABBREV,CNT,IEN,LINE,SECTION,TEXT
+2 SET CNT=0
FOR
SET CNT=$ORDER(STYLE(CNT))
if CNT<1
QUIT
SET ABBREV=$PIECE(STYLE(CNT),U,7)
IF $LENGTH(ABBREV)
SET FIELD(ABBREV)=""
+3 DO GET^FSCGET("CUSTOM",CALLNUM,.FIELD)
+4 NEW FORMAT
KILL FORMAT
+5 SET SECTION=1
SET (CNT,LINE)=0
FOR
SET CNT=$ORDER(STYLE(CNT))
if CNT<1
QUIT
SET ABBREV=$PIECE(STYLE(CNT),U,7)
IF $LENGTH(ABBREV)
IF ABBREV'="REF"
IF ABBREV'="SUBJECT"
Begin DoDot:1
+6 SET LINE=LINE+1
SET TEXT=$JUSTIFY($PIECE(STYLE(CNT),U,2)_": ",14)_$PIECE(FIELD(ABBREV),U,2)
+7 DO SETTEXT^FSCFORM(SECTION,LINE,2,TEXT)
+8 IF ABBREV="DESC"
Begin DoDot:2
+9 SET SECTION=SECTION+1
+10 DO SETMULT^FSCFORM(SECTION,"^FSCD(""CALL"","_CALLNUM_",30)")
+11 SET SECTION=SECTION+1
SET LINE=0
End DoDot:2
+12 IF ABBREV="ACTIONS"
Begin DoDot:2
+13 SET SECTION=SECTION+1
+14 DO SETMULT^FSCFORM(SECTION,"^FSCD(""CALL"","_CALLNUM_",50)")
+15 SET SECTION=SECTION+1
SET LINE=0
End DoDot:2
+16 IF ABBREV="SUM"
Begin DoDot:2
+17 SET SECTION=SECTION+1
+18 DO SETMULT^FSCFORM(SECTION,"^FSCD(""CALL"","_CALLNUM_",80)")
+19 SET SECTION=SECTION+1
SET LINE=0
End DoDot:2
+20 IF ABBREV="STATHIST"
Begin DoDot:2
+21 SET SECTION=SECTION+1
+22 DO SETMULT^FSCFORM(SECTION,"^FSCD(""CALL"","_CALLNUM_",110)")
+23 SET SECTION=SECTION+1
SET LINE=0
End DoDot:2
+24 IF ABBREV="PNOTE"
Begin DoDot:2
+25 SET IEN=+$GET(^FSCD("CALL USER","AUC",DUZ,CALLNUM))
+26 IF 'IEN
QUIT
+27 SET SECTION=SECTION+1
+28 DO SETMULT^FSCFORM(SECTION,"^FSCD(""CALL USER"","_IEN_",2)")
+29 SET SECTION=SECTION+1
SET LINE=0
End DoDot:2
End DoDot:1
+30 IF TYPE["VIEW"
DO VIEW^FSCFORMU(LISTNUM,CALLNUM,.FORMAT,STYLE,.LASTLINE,TYPE)
QUIT
+31 DO SETUP^FSCFORMU(LISTNUM,CALLNUM,.FORMAT,STYLE,.LASTLINE,TYPE)
+32 QUIT