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

BPSSCRV2.m

Go to the documentation of this file.
  1. BPSSCRV2 ;AITC/PD - ECME SCREEN CHANGE VIEW continued;1/17/2018
  1. ;;1.0;E CLAIMS MGMT ENGINE;**23**;JUN 2004;Build 44
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;USER SCREEN continued
  1. Q
  1. ;****
  1. ;
  1. ; New'ing of BPS* arrays and variables handled in routine BPSSCRCV
  1. ;
  1. BPS106(BPARR) ; FIELD 1.06 - Rejects / Payables / Unstranded / All
  1. BPS106A ;
  1. ;
  1. S BPS106STR=",R,P,U,A,"
  1. S DIR(0)="FO^0:7"
  1. S DIR("A",1)=""
  1. S DIR("A",2)=" Select one of the following:"
  1. S DIR("A",3)=""
  1. S DIR("A",4)=" R REJECTS"
  1. S DIR("A",5)=" P PAYABLES"
  1. S DIR("A",6)=" U UNSTRANDED"
  1. S DIR("A",7)=" A ALL"
  1. S DIR("A",8)=""
  1. S DIR("A")="Display (R)ejects or (P)ayables or (U)nstranded or (A)ll"
  1. S DIR("B")="A"
  1. I $G(BPARR(1.06))'="" S DIR("B")=BPARR(1.06)
  1. S DIR("?",1)="Enter a single response or multiple responses separated by commas."
  1. S DIR("?",2)=" Example:"
  1. S DIR("?",3)=" P"
  1. S DIR("?")=" P,R"
  1. D ^DIR K DIR
  1. ;
  1. I $D(DIRUT) Q 0
  1. ;
  1. ; Loop through user input (returned in variable X).
  1. ; Display warning message if any user input selection is not included
  1. ; in the string of acceptable codes (BPS106STR) and re-prompt question.
  1. ; Assign valid selections to BPS106 array. This array will prevent
  1. ; duplicate entries from being saved to the user's profile.
  1. ;
  1. K BPS106
  1. S BPSERR=0
  1. S X=$TR(X,"rpua","RPUA")
  1. S X=$TR(X," ","")
  1. F BPSX=1:1:$L(X,",") D
  1. . S BPSSEL=$P(X,",",BPSX)
  1. . I BPS106STR'[(","_BPSSEL_",") W !," ",BPSSEL," is not a valid entry." S BPSERR=1 Q
  1. . S BPS106(BPSSEL)=""
  1. ;
  1. I $G(BPSERR)=1 G BPS106A
  1. ;
  1. ; If user included (A)ll as a selection, set profile setting to A.
  1. ;
  1. I $D(BPS106("A")) S BPARR(1.06)="A"
  1. E D ; User did not enter "A"
  1. . ;
  1. . ; At this point user selections are valid and do not include "A".
  1. . ; Loop through valid user selections. Set selections into a
  1. . ; comma delimited string before assigning to BPARR array.
  1. . ;
  1. . S BPSSEL=""
  1. . W !,?2,"Selected:"
  1. . F S BPSSEL=$O(BPS106(BPSSEL)) Q:BPSSEL="" D
  1. . . S BPS106=$G(BPS106)_BPSSEL_","
  1. . . I BPSSEL="P" W !,?10,"PAYABLES"
  1. . . I BPSSEL="U" W !,?10,"UNSTRANDED"
  1. . . I BPSSEL="R" W !,?10,"REJECTS"
  1. . S BPS106=$E(BPS106,1,($L(BPS106)-1))
  1. . S BPARR(1.06)=BPS106
  1. ;
  1. Q 1
  1. ;
  1. ; ^^^^^^^^^^ End of BPS106 Logic ^^^^^^^^^^
  1. ;
  1. ; ********** Start of BPS108 Logic **********
  1. ;
  1. ; BPS108STR = string of valid codes
  1. ;
  1. ; Upon completion of prompt, values will be placed into a string delimited
  1. ; by commas. e.g. C,M
  1. ;
  1. ; If user includes (A)ll as a code, only A will be stored in BPARR
  1. ; array. e.g. Entry of C,M,A will save as BPARR(1.08)="A"
  1. ;
  1. ; User input values are temporary stored in array BPS108 to eliminate duplicate
  1. ; entries. e.g. Entry of C,M,C will save as BPARR(1.08)="C,M"
  1. ;
  1. BPS108(BPARR) ; FIELD 1.08 - CMOP / Mail / Window / All
  1. BPS108A ;
  1. ;
  1. S BPS108STR=",C,M,W,A,"
  1. S DIR(0)="FO^0:7"
  1. S DIR("A",1)=""
  1. S DIR("A",2)=" Select one of the following:"
  1. S DIR("A",3)=""
  1. S DIR("A",4)=" C CMOP"
  1. S DIR("A",5)=" M MAIL"
  1. S DIR("A",6)=" W WINDOW"
  1. S DIR("A",7)=" A ALL"
  1. S DIR("A",8)=""
  1. S DIR("A")="Display (C)MOP or (M)ail or (W)indow or (A)ll"
  1. S DIR("B")="A" S:$G(BPARR(1.08))'="" DIR("B")=BPARR(1.08)
  1. S DIR("?",1)="Enter a single response or multiple responses separated by commas."
  1. S DIR("?",2)=" Example:"
  1. S DIR("?",3)=" C"
  1. S DIR("?")=" C,M"
  1. D ^DIR K DIR
  1. ;
  1. I $D(DIRUT) Q 0
  1. ;
  1. ; Loop through user input (returned in variable X).
  1. ; Display warning message if any user input selection is not included
  1. ; in the string of acceptable codes (BPS108STR) and re-prompt question.
  1. ; Assign valid selections to BPS108 array. This array will prevent
  1. ; duplicate entries from being saved to the user's profile.
  1. ;
  1. K BPS108
  1. S BPSERR=""
  1. S X=$TR(X,"cmwa","CMWA")
  1. S X=$TR(X," ","")
  1. F BPSX=1:1:$L(X,",") D
  1. . S BPSSEL=$P(X,",",BPSX)
  1. . I BPS108STR'[(","_BPSSEL_",") W !," ",BPSSEL," is not a valid entry." S BPSERR=1 Q
  1. . S BPS108(BPSSEL)=""
  1. ;
  1. I $G(BPSERR)=1 G BPS108A
  1. ;
  1. ; If user included (A)ll as a seleection, set profile setting to A.
  1. ;
  1. I $D(BPS108("A")) S BPARR(1.08)="A"
  1. E D ; User did not enter "A".
  1. . ;
  1. . ; At this point user selections are valid and do not include "A".
  1. . ; Loop through valid user selections. Set selections into a
  1. . ; comma delimited string before assigning to BPARR array.
  1. . ;
  1. . S BPSSEL=""
  1. . W !,?2,"Selected:"
  1. . F S BPSSEL=$O(BPS108(BPSSEL)) Q:BPSSEL="" D
  1. . . S BPS108=$G(BPS108)_BPSSEL_","
  1. . . I BPSSEL="C" W !,?10,"CMOP"
  1. . . I BPSSEL="M" W !,?10,"MAIL"
  1. . . I BPSSEL="W" W !,?10,"WINDOW"
  1. . S BPS108=$E(BPS108,1,($L(BPS108)-1))
  1. . S BPARR(1.08)=BPS108
  1. ;
  1. Q 1
  1. ;
  1. ; ^^^^^^^^^^ End of BPS108 Logic ^^^^^^^^^^
  1. ;
  1. ; ********** Start of BPS109 Logic **********
  1. ;
  1. ; BPS109STR = string of valid codes
  1. ;
  1. ; Upon completion of prompt, values will be placed into a string delimited
  1. ; by commas. e.g. P,R
  1. ;
  1. ; If user includes (A)ll as a code, only A will be stored in BPARR
  1. ; array. e.g. Entry of R,P,A will save as BPARR(1.09)="A"'
  1. ;
  1. ; User input values are temporary stored in array BPS106 to eliminate duplicate
  1. ; entries. e.g. Entry of R,P,R will save as BPARR(1.09)="P,R"
  1. ;
  1. BPS109(BPARR) ; FIELD 1.09 - Realtime / Backbills / Pro Option / Resubmission / All
  1. BPS109A ;
  1. ;
  1. S BPS109STR=",R,B,P,S,A,"
  1. S DIR(0)="FO^0:7"
  1. S DIR("A",1)=""
  1. S DIR("A",2)=" Select one of the following:"
  1. S DIR("A",3)=""
  1. S DIR("A",4)=" R REALTIME"
  1. S DIR("A",5)=" B BACKBILLS"
  1. S DIR("A",6)=" P PRO OPTION"
  1. S DIR("A",7)=" S RESUBMISSION"
  1. S DIR("A",8)=" A ALL"
  1. S DIR("A",9)=""
  1. S DIR("A")="Display (R)ealTime, (B)ackbills, (P)RO Option, Re(S)ubmission or (A)ll"
  1. S DIR("B")="A"
  1. I $G(BPARR(1.09))'="" S DIR("B")=BPARR(1.09)
  1. S DIR("?",1)="Enter a single response or multiple responses separated by commas."
  1. S DIR("?",2)=" Example:"
  1. S DIR("?",3)=" B"
  1. S DIR("?")=" B,P"
  1. D ^DIR K DIR
  1. ;
  1. I $D(DIRUT) Q 0
  1. ;
  1. ; Loop through user input (returned in variable X).
  1. ; Display warning message if any user input selection is not included
  1. ; in the string of acceptable codes (BPS109STR) and re-prompt question.
  1. ; Assign valid selections to BPS109 array. This array will prevent
  1. ; duplicate entries from being saved to the user's profile.
  1. ;
  1. K BPS109
  1. S X=$TR(X,"rbpsa","RBPSA")
  1. S X=$TR(X," ","")
  1. S BPSERR=""
  1. F BPSX=1:1:$L(X,",") D
  1. . S BPSSEL=$P(X,",",BPSX)
  1. . I BPS109STR'[(","_BPSSEL_",") W !," ",BPSSEL," is not a valid entry." S BPSERR=1 Q
  1. . S BPS109(BPSSEL)=""
  1. ;
  1. I $G(BPSERR)=1 G BPS109A
  1. ;
  1. ; If user included (A)ll as a selection, set profile setting to A.
  1. ;
  1. I $D(BPS109("A")) S BPARR(1.09)="A"
  1. E D ; User did not enter "A".
  1. . ;
  1. . ; At this point user selections are valid and do not include "A".
  1. . ; Loop through valid user selections. Set selections into a
  1. . ; comma delimited string before assigning to BPARR array.
  1. . ;
  1. . S BPSSEL=""
  1. . W !,?2,"Selected:"
  1. . F S BPSSEL=$O(BPS109(BPSSEL)) Q:BPSSEL="" D
  1. . . S BPS109=$G(BPS109)_BPSSEL_","
  1. . . I BPSSEL="B" W !,?10,"BACKBILLS"
  1. . . I BPSSEL="P" W !,?10,"PRO OPTION"
  1. . . I BPSSEL="R" W !,?10,"REALTIME"
  1. . . I BPSSEL="S" W !,?10,"RESUBMISSION"
  1. . S BPS109=$E(BPS109,1,($L(BPS109)-1))
  1. . S BPARR(1.09)=BPS109
  1. ;
  1. Q 1
  1. ;
  1. ; ^^^^^^^^^^ End of BPS109 Logic ^^^^^^^^^^
  1. ;
  1. ; ********** Start of BPS110 / BPS115 Logic **********
  1. ;
  1. ; User input will be temporarily stored in BPS115AR for display to user
  1. ; of selected REJECT CODES while in CV Action.
  1. ;
  1. ; If R is selected, at least one REJECT CODE must be selected. If not, selection
  1. ; will default to (A)ll and the current question will be re-prompted.
  1. ;
  1. ; Upon completion of REJECT CODEs entry, values will be placed into a string
  1. ; delimited by semicolons. e.g. BPARR(1.15)=";50;60;"
  1. ;
  1. ; BPS115AR = array containing REJECT CODE information
  1. ; BPS115AR(BPS115)=BPS115NM BPS115 = IEN from File #9002313.93
  1. ; BPS115NM = Reject Code Explanation
  1. ;
  1. BPS110(BPARR) ; Fields 1.10 and 1.15 - Reject Code(s)
  1. BPS110A ;
  1. ;
  1. N BPSI
  1. ;
  1. S BPINP=$$EDITFLD^BPSSCRCV(1.1,+BPDUZ7,"S^R:REJECT CODE;A:ALL","Display Specific (R)eject Code or (A)LL","ALL",.BPARR)
  1. I BPINP=-1 Q 0
  1. ;
  1. S BPSERR=0
  1. ;
  1. ; If user selection is R, assign existing entry(s) into BPS115AR array.
  1. ;
  1. I $P(BPINP,U,2)="R" D
  1. . S BPS115=$G(BPARR(1.15))
  1. . I BPS115'="" D
  1. . . S BPSCNT=$L(BPS115,";")
  1. . . I BPSCNT=1 D
  1. . . . S BPS115CD=$$GET1^DIQ(9002313.93,BPS115,.01)
  1. . . . S BPS115NM=$$GET1^DIQ(9002313.93,BPS115,.02)
  1. . . . S BPS115AR(BPS115)=BPS115CD_"^"_BPS115NM
  1. . . I +BPSCNT>2 D
  1. . . . F BPSI=2:1:BPSCNT-1 D
  1. . . . . S BPS115X=$P(BPS115,";",BPSI)
  1. . . . . S BPS115CD=$$GET1^DIQ(9002313.93,BPS115X,.01)
  1. . . . . S BPS115NM=$$GET1^DIQ(9002313.93,BPS115X,.02)
  1. . . . . S BPS115AR(BPS115X)=BPS115CD_"^"_BPS115NM
  1. . ;
  1. . ; Display existing entry(s) to user.
  1. . ;
  1. . I $D(BPS115AR) D
  1. . . W !,?2,"Selected:"
  1. . . S BPS115="" F S BPS115=$O(BPS115AR(BPS115)) Q:BPS115="" D
  1. . . . W !,?10,$P(BPS115AR(BPS115),"^")
  1. . . . W ?20,$P(BPS115AR(BPS115),"^",2)
  1. . ;
  1. . S BPS115="" F D Q:BPS115=-1
  1. . . S DIR0="P^BPSF(9002313.93,"
  1. . . S PRMTMSG="Select Reject Code"
  1. . . S DFLTVAL=""
  1. . . S BPS115=$$PROMPT^BPSSCRCV(DIR0,PRMTMSG,DFLTVAL)
  1. . . ;
  1. . . ; Exit 'Select Reject Code' loop if user entered nil.
  1. . . ;
  1. . . I BPS115=-1 Q
  1. . . ;
  1. . . S BPS115CD=$$GET1^DIQ(9002313.93,BPS115,.01)
  1. . . S BPS115NM=$$GET1^DIQ(9002313.93,BPS115,.02)
  1. . .
  1. . . ;
  1. . . ; If entry exists in BPS115AR array, prompt user to delete from list.
  1. . . ;
  1. . . I $D(BPS115AR(BPS115)) D
  1. . . . S DIR(0)="S^Y:YES;N:NO"
  1. . . . S DIR("A")="Delete "_$P(BPS115AR(BPS115),"^")_" from your list?"
  1. . . . S DIR("B")="NO"
  1. . . . D ^DIR
  1. . . . I Y="Y" K BPS115AR(BPS115)
  1. . . . ;
  1. . . E D
  1. . . . ;
  1. . . . ; Set new entry intp BPS115AR array.
  1. . . . ;
  1. . . . S BPS115AR(BPS115)=BPS115CD_"^"_BPS115NM
  1. . . ;
  1. . . ; Display existing entry(s) to user.
  1. . . ;
  1. . . I $D(BPS115AR) D
  1. . . . W !,?2,"Selected:"
  1. . . . S BPS115="" F S BPS115=$O(BPS115AR(BPS115)) Q:BPS115="" D
  1. . . . . W !,?10,$P(BPS115AR(BPS115),"^")
  1. . . . . W ?20,$P(BPS115AR(BPS115),"^",2)
  1. . ;
  1. . ; If user selected (R)eject but has not selected any Reject Codes,
  1. . ; set profile setting to ALL and set BPSERR flag to re-prompt question.
  1. . ;
  1. . I '$D(BPS115AR) S BPARR(1.1)="A",BPARR(1.15)="" S BPSERR=1 Q
  1. . ;
  1. . ; Loop through selected reject codes, setting selected reject codes into
  1. . ; BPARR array - delimited by semi-colon.
  1. . ;
  1. . S BPARR(1.15)=";"
  1. . S BPS115=0 F S BPS115=$O(BPS115AR(BPS115)) Q:+BPS115=0 S BPARR(1.15)=BPARR(1.15)_BPS115_";"
  1. E D ; User selected ALL
  1. . S BPARR(1.1)="A"
  1. . S BPARR(1.15)=""
  1. ;
  1. ; If BPSERR flag is 1, re-prompt question.
  1. ;
  1. I $G(BPSERR)=1 G BPS110A
  1. ;
  1. Q 1
  1. ;
  1. ; ^^^^^^^^^^ End of BPS110 / BPS115 Logic ^^^^^^^^^^
  1. ;
  1. Q