- SD53138B ;ALB/SEK - BULLETIN FOR PATCH 138;12-JAN-1998
- ;;5.3;Scheduling;**138**;Aug 13, 1993
- ;
- BULL1 ;Generate/send completion bulletin for clean-up (see EN^SD53138A)
- ;
- ;Input : ^TMP($J,"SD53138A") defined as follows
- ; ^("XMIT") = Total Checked
- ; ^ Total marked for retransmission
- ; ^("TIME") = Start (FM) ^ End (FM)
- ; ^("STOP") = Task asked to stop (1/0)
- ;Output : None
- ;Notes : Existance of ^TMP($J,"SD53138A") is assumed
- ;
- ;Declare varibales
- N XMB,XMTEXT,XMY,XMDUZ,XMZ,NODE,LINE
- ;Initialize bulletin space
- K ^TMP($J,"SD53138-BULL1")
- S LINE=1
- ;Asked to stop
- I (^TMP($J,"SD53138A","STOP")) D
- .S ^TMP($J,"SD53138-BULL1",LINE)="*** Note that process was asked to stop and did not run to completion ***"
- .S ^TMP($J,"SD53138-BULL1",(LINE+1))=" "
- .S LINE=LINE+2
- ;Time summary
- S NODE=^TMP($J,"SD53138A","TIME")
- S ^TMP($J,"SD53138-BULL1",LINE)="Process began on "_$$FMTE^XLFDT($P(NODE,"^",1))_" and completed on "_$$FMTE^XLFDT($P(NODE,"^",2))
- S ^TMP($J,"SD53138-BULL1",(LINE+1))=" "
- S LINE=LINE+2
- ;Transmitted Outpatient Encounter file summary
- S NODE=^TMP($J,"SD53138A","XMIT")
- S ^TMP($J,"SD53138-BULL1",LINE)="A total of "_(+$P(NODE,"^",1))_" entries in the Transmitted Outpatient Encounter file were"
- S ^TMP($J,"SD53138-BULL1",(LINE+1))="checked and "_(+$P(NODE,"^",2))_" entries were marked for re-transmission because they were"
- S ^TMP($J,"SD53138-BULL1",(LINE+2))="rejected and did not contain a reason for rejection in the"
- S ^TMP($J,"SD53138-BULL1",(LINE+3))="Transmitted Outpatient Encounter Error file."
- S ^TMP($J,"SD53138-BULL1",(LINE+4))=" "
- S LINE=LINE+5
- ;Send completion bulletin
- S XMB="SCDX AMBCARE TO NPCDB SUMMARY"
- S XMB(1)="ACRP clean-up of file 409.75"
- S XMTEXT="^TMP($J,""SD53138-BULL1"","
- S XMY(DUZ)=""
- S XMDUZ="ACRP - SD*5.3*138"
- D ^XMB
- ;Done - clean-up and quit
- K ^TMP($J,"SD53138-BULL1")
- Q
- ;
- ;
- LATEBULL() ;Determine if user wishes to prevent generation of Late ACRP
- ; Related Activity bulletin
- ;
- ;Input : None
- ;Output : 1 = Yes
- ; 0 = No
- ; -1 = User abort/time out
- ;
- ;Declare variables
- N DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
- ;Set up call to Reader
- S DIR("?",1)="Generation of the Late ACRP Related Activity bulletin will be prevented"
- S DIR("?",2)="by removing the mail group contained in the LATE ACTIVITY MAIL GROUP"
- S DIR("?",3)="field (#217) of the MAS PARAMETERS file (#43) at the beginning of the"
- S DIR("?")="process and restoring it at the end of the process"
- S DIR(0)="Y"
- S DIR("A")="Prevent generation of Late ACRP Related Activity bulletin"
- S DIR("B")="NO"
- ;Call Reader
- D ^DIR
- ;Abort/time out
- Q:($D(DIRUT)) -1
- ;Convert answer to proper output
- Q $S((+Y<1):0,1:1)
- ;
- OK() ;Determine if user wishes to continue
- ;
- ;Input : None
- ;Output : 1 = Yes
- ; 0 = No
- ;Notes : Zero (0) is returned on user abort/time out
- ;
- ;Declare variables
- N DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
- ;Set up call to Reader
- S DIR(0)="Y"
- S DIR("A")="OK to continue"
- S DIR("B")="NO"
- ;Call Reader
- D ^DIR
- ;Convert answer to proper output
- Q $S((+Y<1):0,1:1)
- ;
- GETLAMG() ;Return pointer to and name of mail group contained in LATE
- ; ACTIVITY MAIL GROUP field (#217) of the MAS PARAMETERS file (#43)
- ;
- ;Input : None
- ;Output : Ptr ^ Name - Pointer to mail group ^ Name of mail group
- ;Notes : NULL will be returned if a valid mail group isn't found
- ;
- ;Declare variables
- N MGPTR,MGNAME,SD53138T,SD53138M
- ;Get internal & external value of field
- D GETS^DIQ(43,"1,",217,"IE","SD53138T","SD53138M")
- Q:($D(SD53138M)) ""
- ;Grab pointer and name from array
- S MGPTR=SD53138T(43,"1,",217,"I")
- S MGNAME=SD53138T(43,"1,",217,"E")
- ;No value - return NULL
- Q:(('MGPTR)!(MGNAME="")) ""
- ;Done
- Q MGPTR_"^"_MGNAME
- ;
- SETLAMG(MGPTR,DELOK) ;Update value contained in the LATE ACTIVITY MAIL GROUP
- ; field (#217) of the MAS PARAMETERS file (#43)
- ;
- ;Input : MGPTR - Pointer to mail group
- ; DELOK - Flag indicating if deletion is allowed
- ; 1 = Yes - MGPTR can be zero
- ; 0 = No - MGPTR can not be zero (default)
- ;Output : None
- ;
- ;Check input
- S MGPTR=+$G(MGPTR)
- S DELOK=+$G(DELOK)
- Q:(('MGPTR)&('DELOK))
- ;Declare variables
- N SD53138F,SD53138M
- ;Validate pointer
- I (MGPTR) Q:($$EXTERNAL^DILFD(43,217,"",MGPTR,"SD53138M")="")
- ;Convert 0 to @ (if deleting)
- S:('MGPTR) MGPTR="@"
- ;Set up FDA array
- S SD53138F(43,"1,",217)=MGPTR
- ;Update
- D FILE^DIE("S","SD53138F","SD53138M")
- ;Done
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSD53138B 4607 printed Jan 18, 2025@03:46:02 Page 2
- SD53138B ;ALB/SEK - BULLETIN FOR PATCH 138;12-JAN-1998
- +1 ;;5.3;Scheduling;**138**;Aug 13, 1993
- +2 ;
- BULL1 ;Generate/send completion bulletin for clean-up (see EN^SD53138A)
- +1 ;
- +2 ;Input : ^TMP($J,"SD53138A") defined as follows
- +3 ; ^("XMIT") = Total Checked
- +4 ; ^ Total marked for retransmission
- +5 ; ^("TIME") = Start (FM) ^ End (FM)
- +6 ; ^("STOP") = Task asked to stop (1/0)
- +7 ;Output : None
- +8 ;Notes : Existance of ^TMP($J,"SD53138A") is assumed
- +9 ;
- +10 ;Declare varibales
- +11 NEW XMB,XMTEXT,XMY,XMDUZ,XMZ,NODE,LINE
- +12 ;Initialize bulletin space
- +13 KILL ^TMP($JOB,"SD53138-BULL1")
- +14 SET LINE=1
- +15 ;Asked to stop
- +16 IF (^TMP($JOB,"SD53138A","STOP"))
- Begin DoDot:1
- +17 SET ^TMP($JOB,"SD53138-BULL1",LINE)="*** Note that process was asked to stop and did not run to completion ***"
- +18 SET ^TMP($JOB,"SD53138-BULL1",(LINE+1))=" "
- +19 SET LINE=LINE+2
- End DoDot:1
- +20 ;Time summary
- +21 SET NODE=^TMP($JOB,"SD53138A","TIME")
- +22 SET ^TMP($JOB,"SD53138-BULL1",LINE)="Process began on "_$$FMTE^XLFDT($PIECE(NODE,"^",1))_" and completed on "_$$FMTE^XLFDT($PIECE(NODE,"^",2))
- +23 SET ^TMP($JOB,"SD53138-BULL1",(LINE+1))=" "
- +24 SET LINE=LINE+2
- +25 ;Transmitted Outpatient Encounter file summary
- +26 SET NODE=^TMP($JOB,"SD53138A","XMIT")
- +27 SET ^TMP($JOB,"SD53138-BULL1",LINE)="A total of "_(+$PIECE(NODE,"^",1))_" entries in the Transmitted Outpatient Encounter file were"
- +28 SET ^TMP($JOB,"SD53138-BULL1",(LINE+1))="checked and "_(+$PIECE(NODE,"^",2))_" entries were marked for re-transmission because they were"
- +29 SET ^TMP($JOB,"SD53138-BULL1",(LINE+2))="rejected and did not contain a reason for rejection in the"
- +30 SET ^TMP($JOB,"SD53138-BULL1",(LINE+3))="Transmitted Outpatient Encounter Error file."
- +31 SET ^TMP($JOB,"SD53138-BULL1",(LINE+4))=" "
- +32 SET LINE=LINE+5
- +33 ;Send completion bulletin
- +34 SET XMB="SCDX AMBCARE TO NPCDB SUMMARY"
- +35 SET XMB(1)="ACRP clean-up of file 409.75"
- +36 SET XMTEXT="^TMP($J,""SD53138-BULL1"","
- +37 SET XMY(DUZ)=""
- +38 SET XMDUZ="ACRP - SD*5.3*138"
- +39 DO ^XMB
- +40 ;Done - clean-up and quit
- +41 KILL ^TMP($JOB,"SD53138-BULL1")
- +42 QUIT
- +43 ;
- +44 ;
- LATEBULL() ;Determine if user wishes to prevent generation of Late ACRP
- +1 ; Related Activity bulletin
- +2 ;
- +3 ;Input : None
- +4 ;Output : 1 = Yes
- +5 ; 0 = No
- +6 ; -1 = User abort/time out
- +7 ;
- +8 ;Declare variables
- +9 NEW DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
- +10 ;Set up call to Reader
- +11 SET DIR("?",1)="Generation of the Late ACRP Related Activity bulletin will be prevented"
- +12 SET DIR("?",2)="by removing the mail group contained in the LATE ACTIVITY MAIL GROUP"
- +13 SET DIR("?",3)="field (#217) of the MAS PARAMETERS file (#43) at the beginning of the"
- +14 SET DIR("?")="process and restoring it at the end of the process"
- +15 SET DIR(0)="Y"
- +16 SET DIR("A")="Prevent generation of Late ACRP Related Activity bulletin"
- +17 SET DIR("B")="NO"
- +18 ;Call Reader
- +19 DO ^DIR
- +20 ;Abort/time out
- +21 if ($DATA(DIRUT))
- QUIT -1
- +22 ;Convert answer to proper output
- +23 QUIT $SELECT((+Y<1):0,1:1)
- +24 ;
- OK() ;Determine if user wishes to continue
- +1 ;
- +2 ;Input : None
- +3 ;Output : 1 = Yes
- +4 ; 0 = No
- +5 ;Notes : Zero (0) is returned on user abort/time out
- +6 ;
- +7 ;Declare variables
- +8 NEW DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
- +9 ;Set up call to Reader
- +10 SET DIR(0)="Y"
- +11 SET DIR("A")="OK to continue"
- +12 SET DIR("B")="NO"
- +13 ;Call Reader
- +14 DO ^DIR
- +15 ;Convert answer to proper output
- +16 QUIT $SELECT((+Y<1):0,1:1)
- +17 ;
- GETLAMG() ;Return pointer to and name of mail group contained in LATE
- +1 ; ACTIVITY MAIL GROUP field (#217) of the MAS PARAMETERS file (#43)
- +2 ;
- +3 ;Input : None
- +4 ;Output : Ptr ^ Name - Pointer to mail group ^ Name of mail group
- +5 ;Notes : NULL will be returned if a valid mail group isn't found
- +6 ;
- +7 ;Declare variables
- +8 NEW MGPTR,MGNAME,SD53138T,SD53138M
- +9 ;Get internal & external value of field
- +10 DO GETS^DIQ(43,"1,",217,"IE","SD53138T","SD53138M")
- +11 if ($DATA(SD53138M))
- QUIT ""
- +12 ;Grab pointer and name from array
- +13 SET MGPTR=SD53138T(43,"1,",217,"I")
- +14 SET MGNAME=SD53138T(43,"1,",217,"E")
- +15 ;No value - return NULL
- +16 if (('MGPTR)!(MGNAME=""))
- QUIT ""
- +17 ;Done
- +18 QUIT MGPTR_"^"_MGNAME
- +19 ;
- SETLAMG(MGPTR,DELOK) ;Update value contained in the LATE ACTIVITY MAIL GROUP
- +1 ; field (#217) of the MAS PARAMETERS file (#43)
- +2 ;
- +3 ;Input : MGPTR - Pointer to mail group
- +4 ; DELOK - Flag indicating if deletion is allowed
- +5 ; 1 = Yes - MGPTR can be zero
- +6 ; 0 = No - MGPTR can not be zero (default)
- +7 ;Output : None
- +8 ;
- +9 ;Check input
- +10 SET MGPTR=+$GET(MGPTR)
- +11 SET DELOK=+$GET(DELOK)
- +12 if (('MGPTR)&('DELOK))
- QUIT
- +13 ;Declare variables
- +14 NEW SD53138F,SD53138M
- +15 ;Validate pointer
- +16 IF (MGPTR)
- if ($$EXTERNAL^DILFD(43,217,"",MGPTR,"SD53138M")="")
- QUIT
- +17 ;Convert 0 to @ (if deleting)
- +18 if ('MGPTR)
- SET MGPTR="@"
- +19 ;Set up FDA array
- +20 SET SD53138F(43,"1,",217)=MGPTR
- +21 ;Update
- +22 DO FILE^DIE("S","SD53138F","SD53138M")
- +23 ;Done
- +24 QUIT