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

BPSSCRCU.m

Go to the documentation of this file.
  1. BPSSCRCU ;BHAM ISC/SS - ECME SCREEN CONTINUOUS UPDATE AND CHANGE VIEW ;05-APR-05
  1. ;;1.0;E CLAIMS MGMT ENGINE;**1,5,7,24**;JUN 2004;Build 43
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. Q
  1. ;
  1. CU ;
  1. N BPKEY,BPTIME,X,Y
  1. S BPTIME=15 ;update every 15 seconds
  1. D RE^VALM4
  1. W "Press ""Q"" to quit."
  1. F D S BPKEY=$$READ^XGF(1,BPTIME) Q:(BPKEY="Q")!(BPKEY="q")
  1. . D UD^BPSSCRUD
  1. . D RE^VALM4
  1. . N %
  1. . D NOW^%DTC S Y=% X ^DD("DD")
  1. . W "The screen has been updated on "_Y_". Press ""Q"" to quit."
  1. Q
  1. ;
  1. ; Select Insurance using IB API - IA 4721
  1. ; Input: BPARR passed by ref to store user selection
  1. ; BPDUZ - User DUZ
  1. ; Output: RETV = -1 if timeout or user enters "^"
  1. ; BPARR(1.11)="I" for individual insurance or "A" for all
  1. ; BPARR("INS")=semi-colon list of IENs from file 36 if individual insurances selected
  1. ; Example output: BPARR(1.11)="I" BPARR("INS")=";7;499;200;"
  1. INSURSEL(BPARR,BPDUZ) ;
  1. N RETV,BPQ,BPINP,BPINSARR,Y,BPCNT
  1. S (BPARR(1.11),BPARR(2.04),BPARR("INS"))=""
  1. S (BPINS,BPCNT)=0
  1. S RETV=$$EDITFLD^BPSSCRCV(1.11,+BPDUZ,"S^I:SPECIFIC INSURANCE(S);A:ALL","Select Certain (I)NSURANCE or (A)LL","ALL",.BPARR)
  1. ; Quit if timeout or ^ entered
  1. Q:RETV<0 +RETV
  1. ; Quit if ALL selected
  1. Q:$P(RETV,U,2)="A" +RETV
  1. ; Get selected insurances from parameters and display them
  1. I $$GETINS(BPDUZ,.BPINSARR) D DISPINS(.BPINSARR)
  1. SELINS1 ;
  1. ; Select specific Insurances to add to BPARR("INS") array
  1. S BPQ=0 F D Q:BPQ'=0
  1. . S BPINP=$$SELINSUR^IBNCPDPI("Select INSURANCE","")
  1. . S:+BPINP=-1 BPQ=-1 I BPQ=-1 Q
  1. . ;
  1. . ; Handle deletes
  1. . I $D(BPINSARR(+BPINP)) D Q
  1. . . W !
  1. . . S Y=$$PROMPT^BPSSCRCV("S^Y:YES;N:NO","Delete "_$P(BPINP,U,2)_" from your list?","NO")
  1. . . I Y="Y" K BPINSARR(+BPINP),BPINSARR("B",$P(BPINP,U,2),+BPINP)
  1. . . ; Display a list of selected Insurance Companies
  1. . . D DISPINS(.BPINSARR)
  1. . ; Save selection in Insurance Company array
  1. . S BPINSARR(+BPINP)=BPINP,BPINSARR("B",$P(BPINP,U,2),+BPINP)=""
  1. . ; Display a list of selected Insurance Companies
  1. . D DISPINS(.BPINSARR)
  1. ;
  1. ;If the user entered "^" Quit returning "^"
  1. I BPQ=-1,X="^" Q "^"
  1. ;
  1. ; Save selected Insurances in BPARR("INS") to be saved in instance 1.14 when filed.
  1. S BPARR("INS")=""
  1. F BPCNT=1:1 S BPINS=$O(BPINSARR(BPINS)) Q:+BPINS=0 D
  1. . S BPARR("INS")=$G(BPARR("INS"))_";"_BPINS
  1. S (BPARR("INS"),BPARR(2.04))=$G(BPARR("INS"))_";"
  1. Q +RETV
  1. ;
  1. ;Reads insurance selection from the USER PROFILE file
  1. ;Input: BPDUZ7 - DUZ
  1. ; BPINSUR by ref - array to return insurances saved in 2.04 Parameter : BPINSUR(IEN of file 36)
  1. ;Return value:
  1. ; 0 nothing saved
  1. ; n number of IENs of #36 selected by the user and stored in BPINSUR
  1. ;Returned by reference:
  1. ; BPINSUR - array with IENs to file #36
  1. GETINS(BPDUZ7,BPINSUR) ;
  1. N BPINS,BPCNT
  1. S BPARRAY("INS")=$$GETPARAM^BPSSCRSL("2.04",BPDUZ7)
  1. F BPCNT=1:1:20 S BPINS=$P($G(BPARRAY("INS")),";",BPCNT+1) Q:+BPINS=0 D
  1. . S BPINSUR(BPINS)=BPINS,BPINSUR("B",$$INSNM^IBNCPDPI(BPINS),BPINS)=""
  1. Q BPCNT-1
  1. ;
  1. ;Display selected Insurances
  1. ;Input: BPINSARR = Array of insurances to display
  1. ; BPINSARR("B",INSURANCE COMPANY NAME)
  1. DISPINS(BPINSARR) ;
  1. I $D(BPINSARR)>9 D
  1. . N X
  1. . W !,?2,"Selected:"
  1. . S X="" F S X=$O(BPINSARR("B",X)) Q:X="" W ?12,X,!
  1. . K X
  1. Q
  1. ;
  1. ;Check if PLAN ID for selected BP59 matches selected insurances
  1. ;Input: BPPLAN = Insurance company IEN from PLAN ID field in BPS TRANSACTION file
  1. ; BPINS = Semi-colon separated list of insurances selected by the user.
  1. ; See INSURSEL
  1. ;Output: 1 = Yes a match was found
  1. ; 0 = No match found
  1. CHKINS(BPPLAN,BPINS) ;
  1. N BPIN,BPRETV
  1. S BPRETV=0
  1. F I=2:1 S BPIN=$P($G(BPINS),";",I) Q:BPIN="" D Q:BPRETV
  1. . S BPRETV=$S(BPIN=BPPLAN:1,1:0)
  1. Q BPRETV
  1. ;