[613] | 1 | BPSSCR01 ;BHAM ISC/SS - USER SCREEN ;10-MAR-2005
|
---|
| 2 | ;;1.0;E CLAIMS MGMT ENGINE;**1,5**;JUN 2004;Build 45
|
---|
| 3 | ;;Per VHA Directive 2004-038, this routine should not be modified.
|
---|
| 4 | ;USER SCREEN
|
---|
| 5 | Q
|
---|
| 6 | ;User Screen header
|
---|
| 7 | ;input:
|
---|
| 8 | ; BPSLN - line of the header
|
---|
| 9 | ;output:
|
---|
| 10 | ; text string for the header
|
---|
| 11 | HDR(BPSLN) ; -- header code
|
---|
| 12 | N BPARR,BPX,BPXSL
|
---|
| 13 | Q:'$D(@VALMAR@("VIEWPARAMS"))
|
---|
| 14 | D RESTVIEW(.BPARR)
|
---|
| 15 | I BPSLN=1 Q "SELECTED DIVISION(S): "_$$GETVDIVS(.BPARR,58)
|
---|
| 16 | I BPSLN=2 Q $$GETVDETS(.BPARR)
|
---|
| 17 | I BPSLN=3 D Q $$LINE^BPSSCRU3(80-$L(BPX)," ")_BPX
|
---|
| 18 | . S BPXSL=$$SORTTYPE^BPSSCRSL($G(BPARR(1.12)))
|
---|
| 19 | . I BPXSL="" S BPXSL="Transaction date by default"
|
---|
| 20 | . S BPX="Sorted by: "_BPXSL
|
---|
| 21 | Q ""
|
---|
| 22 | ;/**
|
---|
| 23 | ;get current view details
|
---|
| 24 | GETVDETS(BPARR) ;*/
|
---|
| 25 | N BPSTR
|
---|
| 26 | I $G(BPARR(1.01))="A" S BPSTR=$$LJ^BPSSCR02("Transmitted by ALL users",31)
|
---|
| 27 | E S BPSTR=$$LJ^BPSSCR02("Transmitted by "_$$GETUSRNM^BPSSCRU1($G(BPARR(1.16))),31)
|
---|
| 28 | S BPSTR=BPSTR_$$LJ^BPSSCR02(" Activity Date Range: within the past "_$G(BPARR(1.05))_$S($G(BPARR(1.04))="H":" hour(s)",1:" day(s)"),49)
|
---|
| 29 | Q BPSTR
|
---|
| 30 | ;
|
---|
| 31 | ;/**
|
---|
| 32 | ;get divisions selected
|
---|
| 33 | GETVDIVS(BPARRAY,BPMLEN) ;*/
|
---|
| 34 | I $G(BPARRAY(1.13))="A" Q "ALL"
|
---|
| 35 | N BPDIV,BPCNT,BPSTR,BPQUIT
|
---|
| 36 | S BPQUIT=0,BPSTR=""
|
---|
| 37 | F BPCNT=1:1:20 S BPDIV=$P($G(BPARRAY("DIVS")),";",BPCNT+1) Q:+BPDIV=0 D Q:BPQUIT=1
|
---|
| 38 | . I $L(BPSTR_$$DIVNAME^BPSSCRDS(BPDIV))>(BPMLEN-4) D S BPQUIT=1 Q
|
---|
| 39 | . . S BPSTR=$$LJ^BPSSCR02(BPSTR_",...",BPMLEN)
|
---|
| 40 | . S BPSTR=BPSTR_$S(BPCNT>1:", ",1:"")_$$DIVNAME^BPSSCRDS(BPDIV)
|
---|
| 41 | Q BPSTR
|
---|
| 42 | ;/**
|
---|
| 43 | ;input:
|
---|
| 44 | ; BPARR - local array to store user profile info
|
---|
| 45 | ;returns:
|
---|
| 46 | ; the last number in LM ARRAY
|
---|
| 47 | INIT() ; -- init variables and list array*/
|
---|
| 48 | N BPLN,BPLM,BP59,BPSORT,BPTMPGL,BPRET
|
---|
| 49 | N BPARR
|
---|
| 50 | ;get user's ien in BPS PRFILE file
|
---|
| 51 | ;if array is not defined then read information from file,
|
---|
| 52 | ;otherwise use current info from the array, because the user
|
---|
| 53 | ;may specify criteria in array without saving it in file for
|
---|
| 54 | ;the temporary use
|
---|
| 55 | I '$D(@VALMAR@("VIEWPARAMS")) D
|
---|
| 56 | . D READPROF^BPSSCRSL(.BPARR,+DUZ)
|
---|
| 57 | . D SAVEVIEW(.BPARR)
|
---|
| 58 | E D RESTVIEW(.BPARR)
|
---|
| 59 | ;get date/time range
|
---|
| 60 | I $$GETDT^BPSSCRU1(.BPARR)=0 Q
|
---|
| 61 | S BPTMPGL=$NA(^TMP($J,"BPSSCR"))
|
---|
| 62 | K @BPTMPGL,@VALMAR
|
---|
| 63 | D COLLECT^BPSSCR04(BPTMPGL,.BPARR)
|
---|
| 64 | D SAVEVIEW(.BPARR)
|
---|
| 65 | S BPRET=$$LMARRAY(BPTMPGL,.BPARR)
|
---|
| 66 | K @BPTMPGL
|
---|
| 67 | S:BPRET>1 BPRET=BPRET-1
|
---|
| 68 | Q BPRET
|
---|
| 69 | ;
|
---|
| 70 | ;/**
|
---|
| 71 | ;make elements for List Manager array
|
---|
| 72 | ;input:
|
---|
| 73 | ;BPTMPGL - TMP global to store selected claims
|
---|
| 74 | ;BPARR - local array to store user profile info
|
---|
| 75 | ;returns:
|
---|
| 76 | ; the last number in LM ARRAY
|
---|
| 77 | ;indexing (example):
|
---|
| 78 | ;S ^TMP("BPSSCR",$J,"VALM",1,0)="2 BUMSTEAD,CHARLE 5444 WEBMD"
|
---|
| 79 | ;S ^TMP("BPSSCR",$J,"VALM",2,0)=" 2.1 CEFACLOR 500MG CAP"
|
---|
| 80 | ;S ^TMP("BPSSCR",$J,"VALM",3,0)=" 2.2 AMPICILLIN 250MG CAP"
|
---|
| 81 | ;S ^TMP("BPSSCR",$J,"VALM","LMIND",2,437272,7008776.00001,0)=""
|
---|
| 82 | ;S ^TMP("BPSSCR",$J,"VALM","LMIND",2.1,437272,7008778.00011,1)=""
|
---|
| 83 | ;S ^TMP("BPSSCR",$J,"VALM","LMIND",2.2,437272,7009457.00001,2)=""
|
---|
| 84 | LMARRAY(BPTMPGL,BPARR) ;*/
|
---|
| 85 | N BPSRTVAL,BP59,BPSORT,BPLN,BPLM,BPSTR1,BPCLM,BPPREV
|
---|
| 86 | S BPLM=0 ;patient_AND_insurance level counter
|
---|
| 87 | S BPCLM=0 ;claim level counter
|
---|
| 88 | S BP59=0
|
---|
| 89 | S BPLN=1 ;line counter for List manager array to display on the screen
|
---|
| 90 | S BPPREV=0 ;to store data from previous patient group
|
---|
| 91 | ;sort type:
|
---|
| 92 | ;'T' FOR TRANSACTION DATE
|
---|
| 93 | ;'D' FOR DIVISION (ECME pharmacy)
|
---|
| 94 | ;'I' FOR INSURANCE
|
---|
| 95 | ;'C' FOR REJECT CODE
|
---|
| 96 | ;'P' FOR PATIENT NAME
|
---|
| 97 | ;'N' FOR DRUG NAME
|
---|
| 98 | ;'B' FOR BILL TYPE (BB/RT)
|
---|
| 99 | ;'L' FOR FILL LOCATION (Windows/Mail/CMOP)
|
---|
| 100 | ;'R' FOR RELEASED/NON-RELEASED RX
|
---|
| 101 | ;'A' FOR ACTIVE/DISCONTINUED RX
|
---|
| 102 | S BPSORT=$G(BPARR(1.12))
|
---|
| 103 | S:BPSORT="" BPSORT="T" ;default
|
---|
| 104 | S BPSRTVAL="" ;a value that "makes" an order, can be a string
|
---|
| 105 | F S BPSRTVAL=$O(@BPTMPGL@("SORT",BPSORT,BPSRTVAL)) Q:BPSRTVAL="" D
|
---|
| 106 | . I BPSORT="D" D
|
---|
| 107 | . . S BPSTR1="---- Division: "_$$DIVNAME^BPSSCRDS(+$P(BPSRTVAL,U,2))_" "
|
---|
| 108 | . . D SET^VALM10(BPLN,BPSTR1_$$LINE^BPSSCRU3(79-$L(BPSTR1),"-"),0)
|
---|
| 109 | . . S BPLN=BPLN+1
|
---|
| 110 | . I BPSORT="C" D
|
---|
| 111 | . . S BPSTR1=$E("---- Reject code: "_$$GETRJNAM^BPSSCRU3(BPSRTVAL)_" ",1,79)
|
---|
| 112 | . . D SET^VALM10(BPLN,BPSTR1_$$LINE^BPSSCRU3(79-$L(BPSTR1),"-"),0)
|
---|
| 113 | . . S BPLN=BPLN+1
|
---|
| 114 | . S BP59=0
|
---|
| 115 | . F S BP59=+$O(@BPTMPGL@("SORT",BPSORT,BPSRTVAL,BP59)) Q:+BP59=0 D
|
---|
| 116 | . . I BP59'=0 D MKARRELM^BPSSCR02(.BPLN,VALMAR,BP59,.BPLM,.BPCLM,.BPPREV)
|
---|
| 117 | D UPDPREV^BPSSCR02(VALMAR,BPLM,BPPREV)
|
---|
| 118 | Q BPLN
|
---|
| 119 | ;
|
---|
| 120 | HELP ; -- help code
|
---|
| 121 | N X S X="?" D DISP^XQORM1 W !!
|
---|
| 122 | Q
|
---|
| 123 | ;
|
---|
| 124 | EXIT ; -- exit code
|
---|
| 125 | Q
|
---|
| 126 | ;
|
---|
| 127 | EXPND ; -- expand code
|
---|
| 128 | Q
|
---|
| 129 | ;/**
|
---|
| 130 | ;store current view params in VALMAR("VIEWPARAMS") TMP global array
|
---|
| 131 | ;to display in the header
|
---|
| 132 | ;input:
|
---|
| 133 | ; BPARR - array with user profile info to store
|
---|
| 134 | SAVEVIEW(BPARR) ; S @VALMAR@("VIEWPARAMS",BPLMIND,BPDFN,BP59,BPLINE)=""
|
---|
| 135 | Q:'$D(BPARR)
|
---|
| 136 | M @VALMAR@("VIEWPARAMS")=BPARR
|
---|
| 137 | Q
|
---|
| 138 | ;
|
---|
| 139 | ;/**
|
---|
| 140 | ;restore current view params from VALMAR("VIEWPARAMS") TMP global array
|
---|
| 141 | ;input:
|
---|
| 142 | ; BPARR - array with user profile info to store
|
---|
| 143 | RESTVIEW(BPARR) ; S @VALMAR@("VIEWPARAMS",BPLMIND,BPDFN,BP59,BPLINE)=""
|
---|
| 144 | Q:'$D(@VALMAR@("VIEWPARAMS"))
|
---|
| 145 | M BPARR=@VALMAR@("VIEWPARAMS")
|
---|
| 146 | Q
|
---|
| 147 | ;
|
---|