FSCGETS ;SLC/STAFF-NOIS Get Call Info - Short Line of Call ;10/20/97 20:42
;;1.1;NOIS;;Sep 06, 1998
;
SHORT(CALLNUM,NUM) ; $$(call number,number) -> numbered line with call ref and subject
N DEV,LINE,MOD,PRI,REF,SPECD,STATUS,SUBJECT,SUP,USER
Q:'$D(^FSCD("CALL",+CALLNUM,0)) "" S SUBJECT=$G(^(1)),REF=$P(^(0),U)
I '$L($P($G(FSCUD),U)) S LINE=$$SETSTR^VALM1(SUBJECT,REF,20,$L(SUBJECT)),LINE=$$SETSTR^VALM1(LINE,NUM,6,$L(LINE)) Q LINE
S SUP=$P(^FSCD("CALL",+CALLNUM,0),U,2),DEV=$P(^(0),U,17),USER=$P(^(0),U,9),SPECD=$P(^(0),U,21),MOD=$P(^(0),U,8),PRI=$P(^(0),U,10)
S LINE=$$SETSTR^VALM1(REF,NUM,6,$L(REF))
I FSCUD["S" S STATUS=$P($$STAT^FSCESU(SUP,DEV),U,2),LINE=$$SETSTR^VALM1(STATUS,LINE,$L(LINE)+4,1)
I FSCUD["M" S MOD=$$MODINI^FSCUF(MOD),LINE=$$SETSTR^VALM1(MOD,LINE,$L(LINE)+4,5)
I FSCUD["U" S USER=$$USERINI^FSCUF(USER),LINE=$$SETSTR^VALM1(USER,LINE,$L(LINE)+3,3)
I FSCUD["R" S SPECD=$$USERINI^FSCUF(SPECD),LINE=$$SETSTR^VALM1(SPECD,LINE,$L(LINE)+4,3)
I FSCUD["P" S PRI=$E($$VALUE^FSCGET(PRI,7100,6)),LINE=$$SETSTR^VALM1(PRI,LINE,$L(LINE)+4,1)
S LINE=$$SETSTR^VALM1(SUBJECT,LINE,$L(LINE)+4,$L(SUBJECT))
Q LINE
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCGETS 1144 printed Oct 16, 2024@18:18:35 Page 2
FSCGETS ;SLC/STAFF-NOIS Get Call Info - Short Line of Call ;10/20/97 20:42
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
SHORT(CALLNUM,NUM) ; $$(call number,number) -> numbered line with call ref and subject
+1 NEW DEV,LINE,MOD,PRI,REF,SPECD,STATUS,SUBJECT,SUP,USER
+2 if '$DATA(^FSCD("CALL",+CALLNUM,0))
QUIT ""
SET SUBJECT=$GET(^(1))
SET REF=$PIECE(^(0),U)
+3 IF '$LENGTH($PIECE($GET(FSCUD),U))
SET LINE=$$SETSTR^VALM1(SUBJECT,REF,20,$LENGTH(SUBJECT))
SET LINE=$$SETSTR^VALM1(LINE,NUM,6,$LENGTH(LINE))
QUIT LINE
+4 SET SUP=$PIECE(^FSCD("CALL",+CALLNUM,0),U,2)
SET DEV=$PIECE(^(0),U,17)
SET USER=$PIECE(^(0),U,9)
SET SPECD=$PIECE(^(0),U,21)
SET MOD=$PIECE(^(0),U,8)
SET PRI=$PIECE(^(0),U,10)
+5 SET LINE=$$SETSTR^VALM1(REF,NUM,6,$LENGTH(REF))
+6 IF FSCUD["S"
SET STATUS=$PIECE($$STAT^FSCESU(SUP,DEV),U,2)
SET LINE=$$SETSTR^VALM1(STATUS,LINE,$LENGTH(LINE)+4,1)
+7 IF FSCUD["M"
SET MOD=$$MODINI^FSCUF(MOD)
SET LINE=$$SETSTR^VALM1(MOD,LINE,$LENGTH(LINE)+4,5)
+8 IF FSCUD["U"
SET USER=$$USERINI^FSCUF(USER)
SET LINE=$$SETSTR^VALM1(USER,LINE,$LENGTH(LINE)+3,3)
+9 IF FSCUD["R"
SET SPECD=$$USERINI^FSCUF(SPECD)
SET LINE=$$SETSTR^VALM1(SPECD,LINE,$LENGTH(LINE)+4,3)
+10 IF FSCUD["P"
SET PRI=$EXTRACT($$VALUE^FSCGET(PRI,7100,6))
SET LINE=$$SETSTR^VALM1(PRI,LINE,$LENGTH(LINE)+4,1)
+11 SET LINE=$$SETSTR^VALM1(SUBJECT,LINE,$LENGTH(LINE)+4,$LENGTH(SUBJECT))
+12 QUIT LINE