DGPFLMT ;ALB/RBS - PRF TRANSMISSION ERRORS LM SCREEN ; 4/27/05 12:00pm
;;5.3;Registration;**650,960**;Aug 13, 1993;Build 22
; Last Edited: SHRPE/SGM - May 30, 2018 11:01
;- no direct entry
QUIT
;
;
EN ;Main entry point for DGPF TRANSMISSION ERRORS option.
;
; Input: None
; Output: None
;
;invoke DGPF TRANSMISSION ERRORS list template
N DGSORT,DGSRTBY
S DGSRTBY="N"
Q:'$$PROMPT
;
D EN^VALM("DGPF TRANSMISSION ERRORS")
Q
;
;
HDR ;Header Code
N X,Y
S Y=$S($G(DGSORT("BY"))="N":"Patient Name",1:"Date Error Received")
S X="List Sorted By: "_Y
S VALMHDR(2)=""
S VALMHDR(2)=$$SETSTR^VALM1(X,VALMHDR(2),1,$L(X))
S Y=$G(DGSORT("FLAG")) S:Y="" Y="A"
S X="Active, Locally-Owned, Category I Flag"
S X=X_$S(Y="A":"s: ALL",1:": "_$P(Y,U,2))
S VALMHDR(1)=""
S VALMHDR(1)=$$SETSTR^VALM1(X,VALMHDR(1),1,$L(X))
Q
;
;
INIT ;Init variables and list array
D BLD
Q
;
;
BLD ;Build HL7 Transmission Log "RJ" Rejected Status message list
D CLEAN^VALM10
K DGARY,VALMHDR
S:$G(DGSRTBY)="" DGSRTBY="N" S DGSORT("BY")=DGSRTBY
K ^TMP("DGPFSORT",$J)
;
;- init array that will contain list of items to display
S DGARY="DGPFLMT"
K ^TMP(DGARY,$J)
;
;build header area
D HDR
;
;init # of lines in list
S VALMCNT=0
;
;- call to build list area for error messages
D EN^DGPFLMT1(DGARY,DGSORT("BY"),.VALMCNT)
Q
;
;
HELP ;Help Code
N X
S X="?" D DISP^XQORM1 W !!
Q
;
;
EXIT ;Exit Code
D CLEAN^VALM10
D CLEAR^VALM1
K ^TMP("DGPFSORT",$J)
K ^TMP(DGARY,$J)
K DGARY
Q
;
;
EXPND ;Expand Code
Q
;
PROMPT() ; ----- prompts before LM invoked
; Set local variables to be available throughout the LM actions
; I '$$PROMPT then quit the Option
; DGSORT("BY") = "N"
; DGSORT("FLAG") = "A" or variable_pointer^flagname
; DGSORT("STAT") = 1 - active assignments
; DGSORT("OWN") = 1 - OWNER SITE is from local facility
;
N X,Y
;-- sort list (default="N"=Patient Name, also "E"=Date Error Received)
S DGSORT("BY")=DGSRTBY
;
;-- prompt for all flags or single flag
;-- prompt for selection of a single flag or all flags
; DGSORT("FLAG") = "A" or a flag variable pointer
; list (A)ll flags if user selects Both Category's
S X=$P($$FLAG^DGPFUT7,U) I X'="A",X'="S" Q 0
S DGSORT("FLAG")=X
;
; if single flag, now prompt for name of flag
I DGSORT("FLAG")="S" D I X<1 Q 0
. S X=$$ONEFLAG^DGPFUT7("I",0) I X>0 S DGSORT("FLAG")=X
. Q
;
;-- setup filters, allow only active, locally owned assignments
S DGSORT("OWN")=1
S DGSORT("STAT")=1
;
Q 1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGPFLMT 2605 printed Dec 13, 2024@02:48:22 Page 2
DGPFLMT ;ALB/RBS - PRF TRANSMISSION ERRORS LM SCREEN ; 4/27/05 12:00pm
+1 ;;5.3;Registration;**650,960**;Aug 13, 1993;Build 22
+2 ; Last Edited: SHRPE/SGM - May 30, 2018 11:01
+3 ;- no direct entry
+4 QUIT
+5 ;
+6 ;
EN ;Main entry point for DGPF TRANSMISSION ERRORS option.
+1 ;
+2 ; Input: None
+3 ; Output: None
+4 ;
+5 ;invoke DGPF TRANSMISSION ERRORS list template
+6 NEW DGSORT,DGSRTBY
+7 SET DGSRTBY="N"
+8 if '$$PROMPT
QUIT
+9 ;
+10 DO EN^VALM("DGPF TRANSMISSION ERRORS")
+11 QUIT
+12 ;
+13 ;
HDR ;Header Code
+1 NEW X,Y
+2 SET Y=$SELECT($GET(DGSORT("BY"))="N":"Patient Name",1:"Date Error Received")
+3 SET X="List Sorted By: "_Y
+4 SET VALMHDR(2)=""
+5 SET VALMHDR(2)=$$SETSTR^VALM1(X,VALMHDR(2),1,$LENGTH(X))
+6 SET Y=$GET(DGSORT("FLAG"))
if Y=""
SET Y="A"
+7 SET X="Active, Locally-Owned, Category I Flag"
+8 SET X=X_$SELECT(Y="A":"s: ALL",1:": "_$PIECE(Y,U,2))
+9 SET VALMHDR(1)=""
+10 SET VALMHDR(1)=$$SETSTR^VALM1(X,VALMHDR(1),1,$LENGTH(X))
+11 QUIT
+12 ;
+13 ;
INIT ;Init variables and list array
+1 DO BLD
+2 QUIT
+3 ;
+4 ;
BLD ;Build HL7 Transmission Log "RJ" Rejected Status message list
+1 DO CLEAN^VALM10
+2 KILL DGARY,VALMHDR
+3 if $GET(DGSRTBY)=""
SET DGSRTBY="N"
SET DGSORT("BY")=DGSRTBY
+4 KILL ^TMP("DGPFSORT",$JOB)
+5 ;
+6 ;- init array that will contain list of items to display
+7 SET DGARY="DGPFLMT"
+8 KILL ^TMP(DGARY,$JOB)
+9 ;
+10 ;build header area
+11 DO HDR
+12 ;
+13 ;init # of lines in list
+14 SET VALMCNT=0
+15 ;
+16 ;- call to build list area for error messages
+17 DO EN^DGPFLMT1(DGARY,DGSORT("BY"),.VALMCNT)
+18 QUIT
+19 ;
+20 ;
HELP ;Help Code
+1 NEW X
+2 SET X="?"
DO DISP^XQORM1
WRITE !!
+3 QUIT
+4 ;
+5 ;
EXIT ;Exit Code
+1 DO CLEAN^VALM10
+2 DO CLEAR^VALM1
+3 KILL ^TMP("DGPFSORT",$JOB)
+4 KILL ^TMP(DGARY,$JOB)
+5 KILL DGARY
+6 QUIT
+7 ;
+8 ;
EXPND ;Expand Code
+1 QUIT
+2 ;
PROMPT() ; ----- prompts before LM invoked
+1 ; Set local variables to be available throughout the LM actions
+2 ; I '$$PROMPT then quit the Option
+3 ; DGSORT("BY") = "N"
+4 ; DGSORT("FLAG") = "A" or variable_pointer^flagname
+5 ; DGSORT("STAT") = 1 - active assignments
+6 ; DGSORT("OWN") = 1 - OWNER SITE is from local facility
+7 ;
+8 NEW X,Y
+9 ;-- sort list (default="N"=Patient Name, also "E"=Date Error Received)
+10 SET DGSORT("BY")=DGSRTBY
+11 ;
+12 ;-- prompt for all flags or single flag
+13 ;-- prompt for selection of a single flag or all flags
+14 ; DGSORT("FLAG") = "A" or a flag variable pointer
+15 ; list (A)ll flags if user selects Both Category's
+16 SET X=$PIECE($$FLAG^DGPFUT7,U)
IF X'="A"
IF X'="S"
QUIT 0
+17 SET DGSORT("FLAG")=X
+18 ;
+19 ; if single flag, now prompt for name of flag
+20 IF DGSORT("FLAG")="S"
Begin DoDot:1
+21 SET X=$$ONEFLAG^DGPFUT7("I",0)
IF X>0
SET DGSORT("FLAG")=X
+22 QUIT
End DoDot:1
IF X<1
QUIT 0
+23 ;
+24 ;-- setup filters, allow only active, locally owned assignments
+25 SET DGSORT("OWN")=1
+26 SET DGSORT("STAT")=1
+27 ;
+28 QUIT 1