- FSCNAR ;SLC/STAFF-NOIS Notification Alert Receive ;12/27/96 15:20
- ;;1.1;NOIS;;Sep 06, 1998
- ;
- ALERT ; from Menu Alerts (set up in FSCNAS)
- I '$O(^FSCD("SEND","B",+XQADATA,0)) W !,"Alert has already been processed." H 2 Q
- I $D(^FSC("SPEC",DUZ,0))#2 D
- .S $P(^FSC("SPEC",DUZ,0),U,5)=$P($$NOW^XLFDT,".")
- .S DTIME=$S($P(^(0),U,12):$P(^(0),U,12),1:DTIME)
- N CALL,COUNT,FSCLNAME,FSCQUERY,NUM
- K ^TMP("FSC LIST",$J)
- K ^TMP("FSC LIST CLEANUP",$J)
- S FSCLNAME="Temporary List",FSCQUERY=1,FSCLNUM=0,COUNT=0
- S NUM=0 F S NUM=$O(^FSCD("SEND","B",+XQADATA,NUM)) Q:NUM<1 D
- .S CALL=+$P($G(^FSCD("SEND",NUM,0)),U,2)
- .S ^TMP("FSC LIST",$J,CALL)="",COUNT=COUNT+1
- .D MRA^FSCMR(DUZ,CALL)
- .S ^TMP("FSC LIST CLEANUP",$J,CALL)=$P($G(^FSCD("ALERT",+XQADATA,0)),U,3)
- I COUNT<8 S XQORM("B")=$$ALERT^FSCUF(DUZ)
- D EN^VALM("FSC LIST CALLS")
- ;S DIK="^FSCD(""SEND"","
- S NUM=0 F S NUM=$O(^FSCD("SEND","B",+XQADATA,NUM)) Q:NUM<1 D
- .;S DA=NUM D ^DIK
- .I '$L($P($G(^FSCD("SEND",NUM,0)),U,3)) S $P(^(0),U,3)=DT
- ;S DIK="^FSCD(""ALERT"",",DA=+XQADATA D ^DIK
- K XQADATA D TMP^FSCOPTU
- I '$D(^TMP("FSC SESSION",$J)) S DTIME=$$DTIME^XUP(DUZ)
- Q
- ;
- USER ;
- I $D(^FSC("SPEC",DUZ,0))#2 D
- .S $P(^FSC("SPEC",DUZ,0),U,5)=$P($$NOW^XLFDT,".")
- .S DTIME=$S($P(^(0),U,12):$P(^(0),U,12),1:DTIME)
- N CALL,COUNT,DA,DIK,FSCLNAME,FSCQUERY,NUM,X,Y
- K ^FSCD("ALERT","ALERT",DUZ)
- K ^TMP("FSC LIST",$J)
- K ^TMP("FSC LIST CLEANUP",$J)
- S FSCLNAME="Temporary List",FSCQUERY=1,FSCLNUM=0,COUNT=0
- S DIK="^FSCD(""ALERT"","
- S CALL=0 F S CALL=$O(^FSCD("ALERT","AUC",DUZ,CALL)) Q:CALL<1 S NUM=^(CALL) D
- .S ^TMP("FSC LIST",$J,CALL)="",COUNT=COUNT+1
- .D MRA^FSCMR(DUZ,CALL)
- .S ^TMP("FSC LIST CLEANUP",$J,CALL)=$P(^FSCD("ALERT",NUM,0),U,3)
- .S DA=+NUM D ^DIK
- I COUNT<8 S XQORM("B")=$$ALERT^FSCUF(DUZ)
- D EN^VALM("FSC LIST CALLS")
- D TMP^FSCOPTU
- I '$D(^TMP("FSC SESSION",$J)) S DTIME=$$DTIME^XUP(DUZ)
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCNAR 1908 printed Dec 13, 2024@02:18:44 Page 2
- FSCNAR ;SLC/STAFF-NOIS Notification Alert Receive ;12/27/96 15:20
- +1 ;;1.1;NOIS;;Sep 06, 1998
- +2 ;
- ALERT ; from Menu Alerts (set up in FSCNAS)
- +1 IF '$ORDER(^FSCD("SEND","B",+XQADATA,0))
- WRITE !,"Alert has already been processed."
- HANG 2
- QUIT
- +2 IF $DATA(^FSC("SPEC",DUZ,0))#2
- Begin DoDot:1
- +3 SET $PIECE(^FSC("SPEC",DUZ,0),U,5)=$PIECE($$NOW^XLFDT,".")
- +4 SET DTIME=$SELECT($PIECE(^(0),U,12):$PIECE(^(0),U,12),1:DTIME)
- End DoDot:1
- +5 NEW CALL,COUNT,FSCLNAME,FSCQUERY,NUM
- +6 KILL ^TMP("FSC LIST",$JOB)
- +7 KILL ^TMP("FSC LIST CLEANUP",$JOB)
- +8 SET FSCLNAME="Temporary List"
- SET FSCQUERY=1
- SET FSCLNUM=0
- SET COUNT=0
- +9 SET NUM=0
- FOR
- SET NUM=$ORDER(^FSCD("SEND","B",+XQADATA,NUM))
- if NUM<1
- QUIT
- Begin DoDot:1
- +10 SET CALL=+$PIECE($GET(^FSCD("SEND",NUM,0)),U,2)
- +11 SET ^TMP("FSC LIST",$JOB,CALL)=""
- SET COUNT=COUNT+1
- +12 DO MRA^FSCMR(DUZ,CALL)
- +13 SET ^TMP("FSC LIST CLEANUP",$JOB,CALL)=$PIECE($GET(^FSCD("ALERT",+XQADATA,0)),U,3)
- End DoDot:1
- +14 IF COUNT<8
- SET XQORM("B")=$$ALERT^FSCUF(DUZ)
- +15 DO EN^VALM("FSC LIST CALLS")
- +16 ;S DIK="^FSCD(""SEND"","
- +17 SET NUM=0
- FOR
- SET NUM=$ORDER(^FSCD("SEND","B",+XQADATA,NUM))
- if NUM<1
- QUIT
- Begin DoDot:1
- +18 ;S DA=NUM D ^DIK
- +19 IF '$LENGTH($PIECE($GET(^FSCD("SEND",NUM,0)),U,3))
- SET $PIECE(^(0),U,3)=DT
- End DoDot:1
- +20 ;S DIK="^FSCD(""ALERT"",",DA=+XQADATA D ^DIK
- +21 KILL XQADATA
- DO TMP^FSCOPTU
- +22 IF '$DATA(^TMP("FSC SESSION",$JOB))
- SET DTIME=$$DTIME^XUP(DUZ)
- +23 QUIT
- +24 ;
- USER ;
- +1 IF $DATA(^FSC("SPEC",DUZ,0))#2
- Begin DoDot:1
- +2 SET $PIECE(^FSC("SPEC",DUZ,0),U,5)=$PIECE($$NOW^XLFDT,".")
- +3 SET DTIME=$SELECT($PIECE(^(0),U,12):$PIECE(^(0),U,12),1:DTIME)
- End DoDot:1
- +4 NEW CALL,COUNT,DA,DIK,FSCLNAME,FSCQUERY,NUM,X,Y
- +5 KILL ^FSCD("ALERT","ALERT",DUZ)
- +6 KILL ^TMP("FSC LIST",$JOB)
- +7 KILL ^TMP("FSC LIST CLEANUP",$JOB)
- +8 SET FSCLNAME="Temporary List"
- SET FSCQUERY=1
- SET FSCLNUM=0
- SET COUNT=0
- +9 SET DIK="^FSCD(""ALERT"","
- +10 SET CALL=0
- FOR
- SET CALL=$ORDER(^FSCD("ALERT","AUC",DUZ,CALL))
- if CALL<1
- QUIT
- SET NUM=^(CALL)
- Begin DoDot:1
- +11 SET ^TMP("FSC LIST",$JOB,CALL)=""
- SET COUNT=COUNT+1
- +12 DO MRA^FSCMR(DUZ,CALL)
- +13 SET ^TMP("FSC LIST CLEANUP",$JOB,CALL)=$PIECE(^FSCD("ALERT",NUM,0),U,3)
- +14 SET DA=+NUM
- DO ^DIK
- End DoDot:1
- +15 IF COUNT<8
- SET XQORM("B")=$$ALERT^FSCUF(DUZ)
- +16 DO EN^VALM("FSC LIST CALLS")
- +17 DO TMP^FSCOPTU
- +18 IF '$DATA(^TMP("FSC SESSION",$JOB))
- SET DTIME=$$DTIME^XUP(DUZ)
- +19 QUIT