- DGPFLMT2 ;ALB/RBS - PRF TRANSMISSION ERRORS LM PROTOCOL ACTIONS ; 6/24/05 12:20pm
- ;;5.3;Registration;**650,1015**;Aug 13, 1993;Build 21
- ;
- ;no direct entry
- QUIT
- ;
- ;
- SL ;Entry point for DGPF TRANSMIT SORT LIST action protocol.
- ;
- ;The following Input variable is a 'system wide variable' in the
- ;DGPF TRANSMISSION ERRORS List Manager screen:
- ;
- ; Input:
- ; DGSRTBY - list sort by criteria
- ; "N" = Patient Name
- ; "D" = Date/Time Error Received
- ; Output:
- ; DGSRTBY - list sort by criteria
- ; VALMBCK - 'R' = refresh screen
- ;
- ;is action selection allowed?
- I '$D(@VALMAR@("IDX")) D Q
- . W !
- . D BLD^DIALOG(261129," There are no transmission error records to display.","","DGERR","F")
- . D MSG^DIALOG("WE","","","","DGERR") W *7
- . D WAIT^VALM1
- . S VALMBCK="R"
- ;
- ;change sort (flip / flop)
- S DGSRTBY=$S($G(DGSRTBY)="N":"D",1:"N")
- ;
- ;re-build list for sort criteria
- D BLD^DGPFLMT
- ;
- ;return to LM (refresh screen)
- S VALMBCK="R"
- Q
- ;
- ;
- RM ;Entry point for DGPF TRANSMIT REJECT MESSAGE action protocol.
- ;
- ; Input: None
- ; Output: VALMBCK - 'R' = refresh screen
- ;
- N DGERR ;if error returned
- N DGDFN ;patient dfn
- N DGPFIEN ;ien of record in PRF HL7 TRANSMISSION LOG (#26.17) file
- N DGSEL ;user selection
- N VALMY ;array output of EN^VALM2 call of user selected entry(s)
- ;
- S (DGSEL,DGPFIEN)=""
- ;
- ;- if user selected RM Retransmit Message action while in the
- ; VM View Message details action, use the single entry value at
- ; the ^TMP("DGPFSORT",$J,"SELECTION",<n>) node for retransmission.
- ;- Note, this temp node gets deleted after the RM action processes.
- ;
- S DGSEL=+$O(^TMP("DGPFSORT",$J,"SELECTION",""))
- S:DGSEL VALMY(DGSEL)=""
- ;
- ;- if no single entry found, is action selection allowed?
- ;- Note, this check will also stop the user from trying to retransmit
- ; a single selection multiple times from the VM View Message action.
- ;
- I 'DGSEL,'$D(@VALMAR@("IDX")) D
- . W !
- . D BLD^DIALOG(261129," There are no transmission error messages to select.","","DGERR","F")
- . D MSG^DIALOG("WE","","","","DGERR") W *7
- . D WAIT^VALM1
- . ;- else, if no single entry found, prompt user for selection(s)
- E D:'DGSEL
- . D EN^VALM2($G(XQORNOD(0)))
- . S DGSEL=$O(VALMY(""))
- ;
- ;- call to retransmit error message(s)
- I DGSEL D
- . ;
- . I $$EN^DGPFLMT5(.VALMY)
- . ;
- . D WAIT^VALM1
- . ;
- . ;- don't re-build list if $D(^TMP("DGPFSORT",$J,"SELECTION"))
- . ; because this RM action is being called from the VM action.
- . ;
- . D:'$D(^TMP("DGPFSORT",$J,"SELECTION")) BLD^DGPFLMT
- . ;
- . ;- always clean up single entry so it can't be selected again
- . K ^TMP("DGPFSORT",$J,"SELECTION")
- ;
- ;return to LM (refresh screen)
- S VALMBCK="R"
- Q
- ;
- ;
- VM ;Entry point for DGPF TRANSMIT VIEW MESSAGE action protocol.
- ;
- ; Input: None
- ; Output: VALMBCK - 'R' = refresh screen
- ;
- N DGERR ;if error returned
- N DGDFN ;patient dfn
- N DGPFIEN ;ien of record in PRF HL7 TRANSMISSION LOG (#26.17) file
- N DGSEL ;user selection
- N VALMY ;output of EN^VALM2 call, array of user selected entry
- ;
- ;is action selection allowed?
- I '$D(@VALMAR@("IDX")) D Q
- . W !
- . D BLD^DIALOG(261129," There are no transmission error records to display.","","DGERR","F")
- . D MSG^DIALOG("WE","","","","DGERR") W *7
- . D WAIT^VALM1
- . S VALMBCK="R"
- ;
- ;ask user to select a single error for displaying details
- S (DGSEL,DGPFIEN)=""
- D EN^VALM2($G(XQORNOD(0)),"S")
- ;
- ;process user selection
- S DGSEL=$O(VALMY(""))
- I DGSEL,$D(@VALMAR@("IDX",DGSEL,DGSEL)) D
- . S DGPFIEN=$P($G(@VALMAR@("IDX",DGSEL,DGSEL)),U,3)
- . S DGDFN=$P($G(@VALMAR@("IDX",DGSEL,DGSEL)),U,4)
- . ;
- . ;- capture user single selection in ^TMP() global -
- . ; This is used to determine if the user selected to retransmit a
- . ; single record entry by selecting the Retransmit Message action
- . ; while in the View Message action.
- . ; If undefined after returning from the View Message action, then
- . ; the user did use the Retransmit Message action.
- . ; This would require Quiting the View Message screen back to the
- . ; main screen and doing a rebuild of all display and sort files.
- . ;
- . S ^TMP("DGPFSORT",$J,"SELECTION",DGSEL)=$G(@VALMAR@("IDX",DGSEL,DGSEL))
- . ;
- . ;- call to display error message details
- . D EN^DGPFLMT3(DGDFN,DGPFIEN)
- . ;
- . ;clean-up user single selection when exiting this action.
- . K ^TMP("DGPFSORT",$J,"SELECTION")
- ;
- ;- re-build and display list
- D BLD^DGPFLMT
- ;
- ;return to LM (refresh screen)
- S VALMBCK="R"
- Q
- DGPFLMT2 ;ALB/RBS - PRF TRANSMISSION ERRORS LM PROTOCOL ACTIONS ; 6/24/05 12:20pm
- +1 ;;5.3;Registration;**650,1015**;Aug 13, 1993;Build 21
- +2 ;
- +3 ;no direct entry
- +4 QUIT
- +5 ;
- +6 ;
- SL ;Entry point for DGPF TRANSMIT SORT LIST action protocol.
- +1 ;
- +2 ;The following Input variable is a 'system wide variable' in the
- +3 ;DGPF TRANSMISSION ERRORS List Manager screen:
- +4 ;
- +5 ; Input:
- +6 ; DGSRTBY - list sort by criteria
- +7 ; "N" = Patient Name
- +8 ; "D" = Date/Time Error Received
- +9 ; Output:
- +10 ; DGSRTBY - list sort by criteria
- +11 ; VALMBCK - 'R' = refresh screen
- +12 ;
- +13 ;is action selection allowed?
- +14 IF '$DATA(@VALMAR@("IDX"))
- Begin DoDot:1
- +15 WRITE !
- +16 DO BLD^DIALOG(261129," There are no transmission error records to display.","","DGERR","F")
- +17 DO MSG^DIALOG("WE","","","","DGERR")
- WRITE *7
- +18 DO WAIT^VALM1
- +19 SET VALMBCK="R"
- End DoDot:1
- QUIT
- +20 ;
- +21 ;change sort (flip / flop)
- +22 SET DGSRTBY=$SELECT($GET(DGSRTBY)="N":"D",1:"N")
- +23 ;
- +24 ;re-build list for sort criteria
- +25 DO BLD^DGPFLMT
- +26 ;
- +27 ;return to LM (refresh screen)
- +28 SET VALMBCK="R"
- +29 QUIT
- +30 ;
- +31 ;
- RM ;Entry point for DGPF TRANSMIT REJECT MESSAGE action protocol.
- +1 ;
- +2 ; Input: None
- +3 ; Output: VALMBCK - 'R' = refresh screen
- +4 ;
- +5 ;if error returned
- NEW DGERR
- +6 ;patient dfn
- NEW DGDFN
- +7 ;ien of record in PRF HL7 TRANSMISSION LOG (#26.17) file
- NEW DGPFIEN
- +8 ;user selection
- NEW DGSEL
- +9 ;array output of EN^VALM2 call of user selected entry(s)
- NEW VALMY
- +10 ;
- +11 SET (DGSEL,DGPFIEN)=""
- +12 ;
- +13 ;- if user selected RM Retransmit Message action while in the
- +14 ; VM View Message details action, use the single entry value at
- +15 ; the ^TMP("DGPFSORT",$J,"SELECTION",<n>) node for retransmission.
- +16 ;- Note, this temp node gets deleted after the RM action processes.
- +17 ;
- +18 SET DGSEL=+$ORDER(^TMP("DGPFSORT",$JOB,"SELECTION",""))
- +19 IF DGSEL
- SET VALMY(DGSEL)=""
- +20 ;
- +21 ;- if no single entry found, is action selection allowed?
- +22 ;- Note, this check will also stop the user from trying to retransmit
- +23 ; a single selection multiple times from the VM View Message action.
- +24 ;
- +25 IF 'DGSEL
- IF '$DATA(@VALMAR@("IDX"))
- Begin DoDot:1
- +26 WRITE !
- +27 DO BLD^DIALOG(261129," There are no transmission error messages to select.","","DGERR","F")
- +28 DO MSG^DIALOG("WE","","","","DGERR")
- WRITE *7
- +29 DO WAIT^VALM1
- +30 ;- else, if no single entry found, prompt user for selection(s)
- End DoDot:1
- +31 IF '$TEST
- IF 'DGSEL
- Begin DoDot:1
- +32 DO EN^VALM2($GET(XQORNOD(0)))
- +33 SET DGSEL=$ORDER(VALMY(""))
- End DoDot:1
- +34 ;
- +35 ;- call to retransmit error message(s)
- +36 IF DGSEL
- Begin DoDot:1
- +37 ;
- +38 IF $$EN^DGPFLMT5(.VALMY)
- +39 ;
- +40 DO WAIT^VALM1
- +41 ;
- +42 ;- don't re-build list if $D(^TMP("DGPFSORT",$J,"SELECTION"))
- +43 ; because this RM action is being called from the VM action.
- +44 ;
- +45 IF '$DATA(^TMP("DGPFSORT",$JOB,"SELECTION"))
- DO BLD^DGPFLMT
- +46 ;
- +47 ;- always clean up single entry so it can't be selected again
- +48 KILL ^TMP("DGPFSORT",$JOB,"SELECTION")
- End DoDot:1
- +49 ;
- +50 ;return to LM (refresh screen)
- +51 SET VALMBCK="R"
- +52 QUIT
- +53 ;
- +54 ;
- VM ;Entry point for DGPF TRANSMIT VIEW MESSAGE action protocol.
- +1 ;
- +2 ; Input: None
- +3 ; Output: VALMBCK - 'R' = refresh screen
- +4 ;
- +5 ;if error returned
- NEW DGERR
- +6 ;patient dfn
- NEW DGDFN
- +7 ;ien of record in PRF HL7 TRANSMISSION LOG (#26.17) file
- NEW DGPFIEN
- +8 ;user selection
- NEW DGSEL
- +9 ;output of EN^VALM2 call, array of user selected entry
- NEW VALMY
- +10 ;
- +11 ;is action selection allowed?
- +12 IF '$DATA(@VALMAR@("IDX"))
- Begin DoDot:1
- +13 WRITE !
- +14 DO BLD^DIALOG(261129," There are no transmission error records to display.","","DGERR","F")
- +15 DO MSG^DIALOG("WE","","","","DGERR")
- WRITE *7
- +16 DO WAIT^VALM1
- +17 SET VALMBCK="R"
- End DoDot:1
- QUIT
- +18 ;
- +19 ;ask user to select a single error for displaying details
- +20 SET (DGSEL,DGPFIEN)=""
- +21 DO EN^VALM2($GET(XQORNOD(0)),"S")
- +22 ;
- +23 ;process user selection
- +24 SET DGSEL=$ORDER(VALMY(""))
- +25 IF DGSEL
- IF $DATA(@VALMAR@("IDX",DGSEL,DGSEL))
- Begin DoDot:1
- +26 SET DGPFIEN=$PIECE($GET(@VALMAR@("IDX",DGSEL,DGSEL)),U,3)
- +27 SET DGDFN=$PIECE($GET(@VALMAR@("IDX",DGSEL,DGSEL)),U,4)
- +28 ;
- +29 ;- capture user single selection in ^TMP() global -
- +30 ; This is used to determine if the user selected to retransmit a
- +31 ; single record entry by selecting the Retransmit Message action
- +32 ; while in the View Message action.
- +33 ; If undefined after returning from the View Message action, then
- +34 ; the user did use the Retransmit Message action.
- +35 ; This would require Quiting the View Message screen back to the
- +36 ; main screen and doing a rebuild of all display and sort files.
- +37 ;
- +38 SET ^TMP("DGPFSORT",$JOB,"SELECTION",DGSEL)=$GET(@VALMAR@("IDX",DGSEL,DGSEL))
- +39 ;
- +40 ;- call to display error message details
- +41 DO EN^DGPFLMT3(DGDFN,DGPFIEN)
- +42 ;
- +43 ;clean-up user single selection when exiting this action.
- +44 KILL ^TMP("DGPFSORT",$JOB,"SELECTION")
- End DoDot:1
- +45 ;
- +46 ;- re-build and display list
- +47 DO BLD^DGPFLMT
- +48 ;
- +49 ;return to LM (refresh screen)
- +50 SET VALMBCK="R"
- +51 QUIT