Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DGPFLMT2

DGPFLMT2.m

Go to the documentation of this file.
  1. 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
  1. ;
  1. ;no direct entry
  1. QUIT
  1. ;
  1. ;
  1. SL ;Entry point for DGPF TRANSMIT SORT LIST action protocol.
  1. ;
  1. ;The following Input variable is a 'system wide variable' in the
  1. ;DGPF TRANSMISSION ERRORS List Manager screen:
  1. ;
  1. ; Input:
  1. ; DGSRTBY - list sort by criteria
  1. ; "N" = Patient Name
  1. ; "D" = Date/Time Error Received
  1. ; Output:
  1. ; DGSRTBY - list sort by criteria
  1. ; VALMBCK - 'R' = refresh screen
  1. ;
  1. ;is action selection allowed?
  1. I '$D(@VALMAR@("IDX")) D Q
  1. . W !
  1. . D BLD^DIALOG(261129," There are no transmission error records to display.","","DGERR","F")
  1. . D MSG^DIALOG("WE","","","","DGERR") W *7
  1. . D WAIT^VALM1
  1. . S VALMBCK="R"
  1. ;
  1. ;change sort (flip / flop)
  1. S DGSRTBY=$S($G(DGSRTBY)="N":"D",1:"N")
  1. ;
  1. ;re-build list for sort criteria
  1. D BLD^DGPFLMT
  1. ;
  1. ;return to LM (refresh screen)
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. ;
  1. RM ;Entry point for DGPF TRANSMIT REJECT MESSAGE action protocol.
  1. ;
  1. ; Input: None
  1. ; Output: VALMBCK - 'R' = refresh screen
  1. ;
  1. N DGERR ;if error returned
  1. N DGDFN ;patient dfn
  1. N DGPFIEN ;ien of record in PRF HL7 TRANSMISSION LOG (#26.17) file
  1. N DGSEL ;user selection
  1. N VALMY ;array output of EN^VALM2 call of user selected entry(s)
  1. ;
  1. S (DGSEL,DGPFIEN)=""
  1. ;
  1. ;- if user selected RM Retransmit Message action while in the
  1. ; VM View Message details action, use the single entry value at
  1. ; the ^TMP("DGPFSORT",$J,"SELECTION",<n>) node for retransmission.
  1. ;- Note, this temp node gets deleted after the RM action processes.
  1. ;
  1. S DGSEL=+$O(^TMP("DGPFSORT",$J,"SELECTION",""))
  1. S:DGSEL VALMY(DGSEL)=""
  1. ;
  1. ;- if no single entry found, is action selection allowed?
  1. ;- Note, this check will also stop the user from trying to retransmit
  1. ; a single selection multiple times from the VM View Message action.
  1. ;
  1. I 'DGSEL,'$D(@VALMAR@("IDX")) D
  1. . W !
  1. . D BLD^DIALOG(261129," There are no transmission error messages to select.","","DGERR","F")
  1. . D MSG^DIALOG("WE","","","","DGERR") W *7
  1. . D WAIT^VALM1
  1. . ;- else, if no single entry found, prompt user for selection(s)
  1. E D:'DGSEL
  1. . D EN^VALM2($G(XQORNOD(0)))
  1. . S DGSEL=$O(VALMY(""))
  1. ;
  1. ;- call to retransmit error message(s)
  1. I DGSEL D
  1. . ;
  1. . I $$EN^DGPFLMT5(.VALMY)
  1. . ;
  1. . D WAIT^VALM1
  1. . ;
  1. . ;- don't re-build list if $D(^TMP("DGPFSORT",$J,"SELECTION"))
  1. . ; because this RM action is being called from the VM action.
  1. . ;
  1. . D:'$D(^TMP("DGPFSORT",$J,"SELECTION")) BLD^DGPFLMT
  1. . ;
  1. . ;- always clean up single entry so it can't be selected again
  1. . K ^TMP("DGPFSORT",$J,"SELECTION")
  1. ;
  1. ;return to LM (refresh screen)
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. ;
  1. VM ;Entry point for DGPF TRANSMIT VIEW MESSAGE action protocol.
  1. ;
  1. ; Input: None
  1. ; Output: VALMBCK - 'R' = refresh screen
  1. ;
  1. N DGERR ;if error returned
  1. N DGDFN ;patient dfn
  1. N DGPFIEN ;ien of record in PRF HL7 TRANSMISSION LOG (#26.17) file
  1. N DGSEL ;user selection
  1. N VALMY ;output of EN^VALM2 call, array of user selected entry
  1. ;
  1. ;is action selection allowed?
  1. I '$D(@VALMAR@("IDX")) D Q
  1. . W !
  1. . D BLD^DIALOG(261129," There are no transmission error records to display.","","DGERR","F")
  1. . D MSG^DIALOG("WE","","","","DGERR") W *7
  1. . D WAIT^VALM1
  1. . S VALMBCK="R"
  1. ;
  1. ;ask user to select a single error for displaying details
  1. S (DGSEL,DGPFIEN)=""
  1. D EN^VALM2($G(XQORNOD(0)),"S")
  1. ;
  1. ;process user selection
  1. S DGSEL=$O(VALMY(""))
  1. I DGSEL,$D(@VALMAR@("IDX",DGSEL,DGSEL)) D
  1. . S DGPFIEN=$P($G(@VALMAR@("IDX",DGSEL,DGSEL)),U,3)
  1. . S DGDFN=$P($G(@VALMAR@("IDX",DGSEL,DGSEL)),U,4)
  1. . ;
  1. . ;- capture user single selection in ^TMP() global -
  1. . ; This is used to determine if the user selected to retransmit a
  1. . ; single record entry by selecting the Retransmit Message action
  1. . ; while in the View Message action.
  1. . ; If undefined after returning from the View Message action, then
  1. . ; the user did use the Retransmit Message action.
  1. . ; This would require Quiting the View Message screen back to the
  1. . ; main screen and doing a rebuild of all display and sort files.
  1. . ;
  1. . S ^TMP("DGPFSORT",$J,"SELECTION",DGSEL)=$G(@VALMAR@("IDX",DGSEL,DGSEL))
  1. . ;
  1. . ;- call to display error message details
  1. . D EN^DGPFLMT3(DGDFN,DGPFIEN)
  1. . ;
  1. . ;clean-up user single selection when exiting this action.
  1. . K ^TMP("DGPFSORT",$J,"SELECTION")
  1. ;
  1. ;- re-build and display list
  1. D BLD^DGPFLMT
  1. ;
  1. ;return to LM (refresh screen)
  1. S VALMBCK="R"
  1. Q