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

DGPFLF2.m

Go to the documentation of this file.
  1. DGPFLF2 ;ALB/KCL - PRF FLAG MANAGEMENT LM PROTOCOL ACTIONS ; 3/18/03
  1. ;;5.3;Registration;**425**;Aug 13, 1993
  1. ;
  1. ;no direct entry
  1. QUIT
  1. ;
  1. ;
  1. SL ;Entry point for DGPF SORT FLAG LIST action protocol.
  1. ;
  1. ; Input:
  1. ; DGSRTBY - flag list sort by criteria (N=Flag Name, T=Flage Type)
  1. ;
  1. ; Output:
  1. ; DGSRTBY - flag list sort by criteria (N=Flag Name, T=Flage Type)
  1. ; VALMBCK - 'R' = refresh screen
  1. ;
  1. N DGCODE,DGFG
  1. ;
  1. ;set screen to full scrolling region
  1. D FULL^VALM1
  1. ;
  1. D
  1. . ;- prompt for sort criteria
  1. . W !
  1. . S DGFG=DGSRTBY ;save original sort to default to
  1. . S DGCODE="Y" ;DIC(0)="Y" for Yes/No answering
  1. . S DGSRTBY=$$ANSWER^DGPFUT("Would you like to sort the list by '"_$S($G(DGFG)="N":"Flag Type",1:"Flag Name")_"'","Yes",DGCODE)
  1. . I $G(DGSRTBY)'=1 S DGSRTBY=DGFG Q ;no sort change
  1. . S DGSRTBY=$S($G(DGFG)="N":"T",1:"N") ;change sort (flip / flop)
  1. . ;
  1. . ;- re-build list for selected sort criteria
  1. . D BLD^DGPFLF
  1. ;
  1. ;return to LM (refresh screen)
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. ;
  1. CC ;Entry point for DGPF CHANGE CATEGORY action protocol.
  1. ;
  1. ; Input:
  1. ; DGCAT - flag category (1=National, 2=Local)
  1. ;
  1. ; Output:
  1. ; DGCAT - flag category (1=National, 2=Local)
  1. ; VALMBCK - 'R' = refresh screen
  1. ;
  1. N DGCODE
  1. N DGFG
  1. ;
  1. ;set screen to full scrolling region
  1. D FULL^VALM1
  1. ;
  1. ;change category
  1. S DGCAT=$S($G(DGCAT)=1:2,1:1)
  1. ;
  1. ;re-build list for category change
  1. D BLD^DGPFLF
  1. ;
  1. ;return to LM (refresh screen)
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. ;
  1. DF ;Entry point for DGPF DISPLAY FLAG DETAIL action protocol.
  1. ;
  1. ; Input:
  1. ;
  1. ; Output:
  1. ; VALMBCK - 'R' = refresh screen
  1. ;
  1. N SEL ;user selection
  1. N VALMY ;output of EN^VALM2 call, array of user selected entries
  1. N DGPFIEN ;IEN of record in PRF NATIONAL FLAG or PRF LOCAL FLAG file
  1. ; [ex: "1;DGPF(26.15,"]
  1. ;
  1. ;set screen to full scroll region
  1. D FULL^VALM1
  1. ;
  1. ;is action selection allowed?
  1. I '$D(@VALMAR@("IDX")) D Q
  1. . W !!?2,">>> '"_$P($G(XQORNOD(0)),U,3)_"' action not allowed at this point.",*7
  1. . W !?6,"There are no record flags to display."
  1. . D PAUSE^VALM1
  1. . S VALMBCK="R"
  1. ;
  1. ;ask user to select a single flag for displaying details
  1. S (SEL,DGPFIEN,VALMBCK)=""
  1. D EN^VALM2($G(XQORNOD(0)),"S")
  1. ;
  1. ;process user selection
  1. S SEL=$O(VALMY(""))
  1. I SEL,$D(@VALMAR@("IDX",SEL)) D
  1. . S DGPFIEN=$P($G(@VALMAR@("IDX",SEL)),U)
  1. . ;- display flag details
  1. . N VALMHDR
  1. . D EN^DGPFLFD
  1. ;
  1. ;return to LM (refresh screen)
  1. S VALMBCK="R"
  1. Q