source: WorldVistAEHR/trunk/r/E_CLAIMS_MGMT_ENGINE-BPS/BPSSCRSL.m@ 1361

Last change on this file since 1361 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 5.3 KB
RevLine 
[613]1BPSSCRSL ;BHAM ISC/SS - ECME SCREEN SORT LIST ;05-APR-05
2 ;;1.0;E CLAIMS MGMT ENGINE;**1**;JUN 2004
3 ;; Per VHA Directive 10-93-142, this routine should not be modified.
4 ;USER SCREEN
5 Q
6 ;****
7 ;This software is using PARAMETER TOOLS (see XT*7.3*26) to store user's settings:
8 ;PARAMETER DEFINITION NAME="BPS USRSCR" (file #8989.51, IA# 2263)
9 ;ENTITY is "USR" , i.e. IEN in ^VA(200 -- see definition for "BPS USRSCR"
10 ;INSTANCEs are as follows:
11 ;1.01 ONE/ALL USERS --'U' ONE USER, 'A' ALL; Display claims for ONE or ALL users
12 ;1.02 ONE/ALL PATIENTS --'P' FOR ONE PATIENT; 'A' FOR ALL; Display claims for ONE/ALL PATIENTS
13 ;1.03 ONE/ALL RX --'R' FOR ONE RX; 'A' FOR ALL; Display claims for ONE or ALL RX
14 ;1.04 HOURS/DAYS -- 'D' FOR DAYS; 'H' FOR HOURS; Use HOURS or DAYS to specify timeframe
15 ;1.05 TIMEFRAME -- NUMBER Depends on the value of the field "USR SCR HOURS/DAYS" this field will
16 ;store the default number of HOURS from NOW or DAYS from TODAY to select claims to display
17 ;1.06 REJECTED/PAYABLE --'R' FOR REJECTS; 'P' FOR PAYABLES 'A' FOR ALL; Display Rejects or Payables or ALL claims
18 ;1.07 RELEASED/NOT RELEASED --'R' FOR RELEASED; 'N' FOR NON-RELEASED; 'A' FOR ALL; Display Released Rxs or Non-Released Rxs or ALL
19 ;1.08 CMOP/MAIL/WINDOW --'C' FOR CMOP; 'M' FOR MAIL;'W' FOR WINDOW;'A' FOR ALL; Display CMOP or Mail or Window or ALL Rxs
20 ;1.09 REALTIME/BACKBILL --'R' FOR REALTIME; 'B' FOR BACKBILLS; 'A' FOR ALL; Display RealTime Fills or Backbills or ALL
21 ;1.1 REJECT CODE/ALL --'R' FOR REJECT CODE; 'A' FOR ALL; Display Specific Reject Code or ALL Reject
22 ;Codes 0 means ALL Reject Codes otherwise - Reject Code value
23 ;1.11 SINGLE/ALL INSURANCES --'I' FOR SINGLE INSURANCE;'A' FOR ALL; Display Single Insurance Company or All null - ALL otherwise - pointer to INSURANCE COMPANY file #36
24 ;1.12 SORT LIST --'T' FOR TRANSACTION DATE;'D' FOR DIVISION; 'I' FOR INSURANCE; 'C' FOR REJECT CODE;
25 ;'P' FOR PATIENT NAME -- 'N' FOR DRUG NAME; 'B' FOR BILL TYPE (BB/RT); 'L' FOR FILL LOCATION;
26 ;'R' FOR RELEASED/NON-RELEASED -- 'A' FOR ACTIVE/DISCONTINUED; the field used to sort claims in the list
27 ;1.13 ALL ECME PHARMACY DIVISIONS --'D' FOR DIVISION; 'A' FOR ALL;
28 ;1.14 SELECTED INSURANCE -- Single insurance to select claims for the User Screen, to store INSURANCE COMPANY pointer (#36)
29 ;1.15 SELECTED REJECTED CODE --POINTER TO BPS NCPDP REJECT CODES FILE (#9002313.93) Reject code selected by the user to filter claims.
30 ;1.16 SELECTED USER -- POINTER TO NEW PERSON FILE (#200) Selected user for the user screen
31 ;1.17 SELECTED PATIENT -- POINTER TO PATIENT FILE (#2) Selected patient for the User Screen
32 ;1.18 SELECTED RX -- POINTER TO PRESCRIPTION FILE (#52) Selected RX
33 ;2 ECME PHARMACY DIVISION -- the list of POINTERs TO BPS PHARMACIES FILE (#9002313.56) separated by "^"
34 ;should start and end with ";", example: ";4;5;"
35 ;
36 ;NOTE: use D ^XPAREDIT to add/edit values
37 ;
38 ;*****
39SL ;
40 D FULL^VALM1
41 W @IOF
42 K BPARR
43 I +$G(DUZ)=0 D ERRMSG^BPSSCRCV("Unknown User") Q
44 N BPDUZ7
45 S BPDUZ7=+DUZ
46 ;always get current profile from the file
47 ;D READPRFP(.BPARR,+DUZ)
48 D READPROF(.BPARR,+BPDUZ7)
49 D SAVEVIEW^BPSSCR01(.BPARR)
50 ;edit current profile
51 D EDITPROF(.BPARR,.BPDUZ7)
52 D SAVEVIEW^BPSSCR01(.BPARR)
53 ;save it if necessary only for SORT LIST field
54 ;(so we used a separate array for this and save it only)
55 N BPSRT S BPSRT(1.12)=BPARR(1.12)
56 D ENDEDIT(.BPSRT,+BPDUZ7)
57 D SAVEVIEW^BPSSCR01(.BPARR)
58 ;redraw screen
59 D REDRAW^BPSSCRUD("Updating screen...")
60 Q
61 ;
62 ;input:
63 ;BPARRAY - array that all settings:
64 ; in the form BPARRAY(instance in "BPS USRSCR" parameter tool entry) = value
65 ;BPDUZ7 - DUZ
66EDITPROF(BPARR,BPDUZ7) ;
67 N BP1
68 N BPRET
69 N BPSTR
70 S BPSTR="S^T:TRANSACTION DATE;D:DIVISION;I:INSURANCE;C:REJECT CODE;P:PATIENT NAME;N:DRUG NAME;B:BILL TYPE (BB/RT);L:FILL LOCATION;R:RELEASED/NON-RELEASED;A:ACTIVE/DISCONTINUED"
71 I $$EDITFLD^BPSSCRCV(1.12,+BPDUZ7,BPSTR,"ENTER SORT TYPE","TRANSACTION DATE",.BPARR)=-1 S BPDUZ7=0 Q
72 Q
73 ;
74 ;input:
75 ;BPARRAY - array that all settings:
76 ;in the form BPARRAY(instance in "BPS USRSCR" parameter tool entry) = value
77 ;BPDUZ7 - DUZ
78 ;
79ENDEDIT(BPARRAY,BPDUZ7) ;
80 I $$PROMPT^BPSSCRCV("S^Y:YES;N:NO","DO YOU WANT TO SAVE THIS VIEW AS YOUR PREFERRED VIEW (Y/N)?","")="Y" D
81 . D FILEALL^BPSSCRCV(.BPARRAY,BPDUZ7)
82 Q
83 ;read profile information (used in other routines as well)
84 ;input:
85 ;BPDUZ7 - DUZ
86 ;input/output:
87 ;BPARRAY - to return back profile information, as reference
88 ;see description in the top of the routine
89READPROF(BPARRAY,BPDUZ7) ;
90 N RETV,RETARR,BPFLDNO,BPDIV,BP1
91 N RECIENS
92 S RECIENS=BPDUZ7_","
93 F BPFLDNO=1.01,1.02,1.03,1.04,1.05,1.06,1.07,1.08,1.09,1.1,1.11,1.12,1.13,1.14,1.15,1.16,1.17,1.18 D
94 . S RETV=$$GETPARAM(BPFLDNO,+BPDUZ7)
95 . S BPARRAY(BPFLDNO)=RETV
96 I BPARRAY(1.13)="D" D
97 . S BPARRAY("DIVS")=$$GETPARAM(2,+BPDUZ7)
98 Q
99 ;
100SORTTYPE(BPSTYPE) ;
101 Q:(BPSTYPE="T") "Transaction Date"
102 Q:(BPSTYPE="D") "ECME division"
103 Q:(BPSTYPE="I") "Insurance"
104 Q:(BPSTYPE="C") "Reject Code"
105 Q:(BPSTYPE="P") "Patient Name"
106 Q:(BPSTYPE="N") "Drug Name"
107 Q:(BPSTYPE="B") "Claim's Origin (BB/RT)"
108 Q:(BPSTYPE="L") "Fill Location"
109 Q:(BPSTYPE="R") "Released/Non-released"
110 Q:(BPSTYPE="A") "Active/Discontinued"
111 Q ""
112 ;
113 ;
114GETPARAM(BPFLDNO,BPDUZ) ;
115 Q $$GET^XPAR(BPDUZ_";VA(200,","BPS USRSCR",BPFLDNO,"I")
116 ;
117 ;save value of the parameter
118SAVEPAR(BPFLDNO,BPDUZ,BPVAL) ;
119 D EN^XPAR(BPDUZ_";VA(200,","BPS USRSCR",BPFLDNO,BPVAL,.BPERR)
120 I BPERR'="0" W !,BPERR,! Q 0
121 Q 1
122 ;
Note: See TracBrowser for help on using the repository browser.