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

BPSSCRSL.m

Go to the documentation of this file.
  1. BPSSCRSL ;BHAM ISC/SS - ECME SCREEN SORT LIST ;05-APR-05
  1. ;;1.0;E CLAIMS MGMT ENGINE;**1,7,11,20,22,23**;JUN 2004;Build 44
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;USER SCREEN
  1. ;
  1. ;This software is using PARAMETER TOOLS (see XT*7.3*26) to store user's settings:
  1. ;PARAMETER DEFINITION NAME="BPS USRSCR" (file #8989.51, IA# 2263)
  1. ;ENTITY is "USR" , i.e. IEN in ^VA(200 -- see definition for "BPS USRSCR"
  1. ;INSTANCEs are as follows:
  1. ;1.01 ONE/ALL USERS --'U' ONE USER, 'A' ALL; Display claims for ONE or ALL users
  1. ;1.02 ONE/ALL PATIENTS --'P' FOR ONE PATIENT; 'A' FOR ALL; Display claims for ONE/ALL PATIENTS
  1. ;1.03 ONE/ALL RX --'R' FOR ONE RX; 'A' FOR ALL; Display claims for ONE or ALL RX
  1. ;1.031 DATE RANGE/TIMEFRAME -- 'D' FOR DATE RANGE; 'T' FOR TIMEFRAME
  1. ;1.032 ACTIVITY BEGINNING DATE - Beginning Date of the Date Range
  1. ;1.033 ACTIVITY ENDING DATE - Ending Date of the Date Range
  1. ;1.04 HOURS/DAYS -- 'D' FOR DAYS; 'H' FOR HOURS; Use HOURS or DAYS to specify timeframe
  1. ;1.05 TIMEFRAME -- NUMBER Depends on the value of the field "USR SCR HOURS/DAYS" this field will
  1. ;store the default number of HOURS from NOW or DAYS from TODAY to select claims to display
  1. ;1.06 REJECTED/PAYABLE --'R' FOR REJECTS; 'P' FOR PAYABLES; 'U' FOR UNSTRANDED; 'A' FOR ALL; Display Rejects or Payables or Unstranded or ALL claims
  1. ;1.07 RELEASED/NOT RELEASED --'R' FOR RELEASED; 'N' FOR NON-RELEASED; 'A' FOR ALL; Display Released Rxs or Non-Released Rxs or ALL
  1. ;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
  1. ;1.09 REALTIME/BACKBILL --'R' FOR REALTIME; 'B' FOR BACKBILLS; 'P' FOR PRO OPTION; 'R' FOR RESUBMISSION; 'A' FOR ALL;
  1. ; Display (R)ealTime, (B)ackbills, (P)RO Option, Re(S)ubmission or (A)LL
  1. ;1.1 REJECT CODE/ALL --'R' FOR REJECT CODE; 'A' FOR ALL; Display Specific Reject Code or ALL Reject
  1. ;Codes 0 means ALL Reject Codes otherwise - Reject Code value
  1. ;1.11 SPECIFIC/ALL INSURANCES --'I' FOR SPECIFIC INSURANCE(S);'A' FOR ALL; Display Specific Insurance Company(s) or All null - ALL otherwise - pointer to INSURANCE COMPANY file #36
  1. ;1.12 SORT LIST --'T' FOR TRANSACTION DATE;'D' FOR DIVISION; 'I' FOR INSURANCE; 'C' FOR REJECT CODE;
  1. ;'P' FOR PATIENT NAME -- 'N' FOR DRUG NAME; 'B' FOR BILL TYPE (BB/P2/RT/RS); 'L' FOR FILL LOCATION;
  1. ;'R' FOR RELEASED/NON-RELEASED -- 'A' FOR ACTIVE/DISCONTINUED; the field used to sort claims in the list
  1. ;1.13 ALL ECME PHARMACY DIVISIONS --'D' FOR DIVISION; 'A' FOR ALL;
  1. ;1.14 SELECTED INSURANCE -- Single, or multiple, insurance(s) to select claims for the User Screen, to store INSURANCE COMPANY pointer (#36)
  1. ;1.15 SELECTED REJECTED CODE --POINTER TO BPS NCPDP REJECT CODES FILE (#9002313.93) Reject code selected by the user to filter claims.
  1. ;1.16 SELECTED USER -- POINTER TO NEW PERSON FILE (#200) Selected user for the user screen
  1. ;1.17 SELECTED PATIENT -- POINTER TO PATIENT FILE (#2) Selected patient for the User Screen
  1. ;1.18 SELECTED RX -- POINTER TO PRESCRIPTION FILE (#52) Selected RX
  1. ;1.19 NON-BILLABLE TRI/CVA ENTRIES OPEN/CLOSED/ALL -- 'O' Open; 'C' Closed; 'A' All
  1. ;2 ECME PHARMACY DIVISION -- the list of POINTERs TO BPS PHARMACIES FILE (#9002313.56) separated by "^"
  1. ;2.01 ELIGIBILITY TYPE --'V' FOR VETERAN;'T' FOR TRICARE;'C' FOR CHAMPVA;'A' FOR ALL; Display claims for specific Eligibility Type or ALL
  1. ;2.02 OPEN/CLOSED/ALL --'O' OPEN CLAIMS;'C' CLOSED CLAIMS;'A' FOR ALL; Display Open, Closed, or ALL claims
  1. ;2.03 SUBMISSION TYPE --'B' BILLING REQUESTS;'R' REVERSALS;'A' FOR ALL; Display specific submission type claims or ALL
  1. ;2.04 INSURANCES -- List of POINTERs to the INSURANCE COMPANY FILE (#36) separated by ";"
  1. ;should start and end with ";", example: ";4;5;"
  1. ;
  1. ;NOTE: use D ^XPAREDIT to add/edit values
  1. ;
  1. ;*****
  1. SL ;
  1. D FULL^VALM1
  1. W @IOF
  1. K BPARR
  1. I +$G(DUZ)=0 D ERRMSG^BPSSCRCV("Unknown User") Q
  1. N BPDUZ7
  1. S BPDUZ7=+DUZ
  1. ;always get current profile from the file
  1. ;D READPRFP(.BPARR,+DUZ)
  1. D READPROF(.BPARR,+BPDUZ7)
  1. D SAVEVIEW^BPSSCR01(.BPARR)
  1. ;edit current profile
  1. D EDITPROF(.BPARR,.BPDUZ7)
  1. D SAVEVIEW^BPSSCR01(.BPARR)
  1. ;save it if necessary only for SORT LIST field
  1. ;(so we used a separate array for this and save it only)
  1. N BPSRT S BPSRT(1.12)=BPARR(1.12)
  1. D ENDEDIT(.BPSRT,+BPDUZ7)
  1. D SAVEVIEW^BPSSCR01(.BPARR)
  1. ;redraw screen
  1. D REDRAW^BPSSCRUD("Updating screen...")
  1. Q
  1. ;
  1. ;input:
  1. ;BPARRAY - array that all settings:
  1. ; in the form BPARRAY(instance in "BPS USRSCR" parameter tool entry) = value
  1. ;BPDUZ7 - DUZ
  1. EDITPROF(BPARR,BPDUZ7) ;
  1. N BP1
  1. N BPRET
  1. N BPSTR
  1. S BPSTR="S^T:TRANSACTION DATE;D:DIVISION;I:INSURANCE;C:REJECT CODE;P:PATIENT NAME;N:DRUG NAME;B:BILL TYPE (BB/P2/RT/RS);L:FILL LOCATION;R:RELEASED/NON-RELEASED;A:ACTIVE/DISCONTINUED"
  1. I $$EDITFLD^BPSSCRCV(1.12,+BPDUZ7,BPSTR,"ENTER SORT TYPE","TRANSACTION DATE",.BPARR)=-1 S BPDUZ7=0 Q
  1. Q
  1. ;
  1. ;input:
  1. ;BPARRAY - array that all settings:
  1. ;in the form BPARRAY(instance in "BPS USRSCR" parameter tool entry) = value
  1. ;BPDUZ7 - DUZ
  1. ;
  1. ENDEDIT(BPARRAY,BPDUZ7) ;
  1. S BPARRAY("TEMPCV")=1 ; Default as Temporary View defined
  1. I $$PROMPT^BPSSCRCV("S^Y:YES;N:NO","DO YOU WANT TO SAVE THIS VIEW AS YOUR PREFERRED VIEW (Y/N)?","")="Y" D
  1. . D FILEALL^BPSSCRCV(.BPARRAY,BPDUZ7)
  1. . K BPARRAY("TEMPCV") ; User agreed to save view as preferred - Remove TEMPCV flag
  1. Q
  1. ;read profile information (used in other routines as well)
  1. ;input:
  1. ;BPDUZ7 - DUZ
  1. ;input/output:
  1. ;BPARRAY - to return back profile information, as reference
  1. ;see description in the top of the routine
  1. READPROF(BPARRAY,BPDUZ7) ;
  1. N RETV,RETARR,BPFLDNO,BPDIV,BP1
  1. N RECIENS
  1. S RECIENS=BPDUZ7_","
  1. F BPFLDNO=1.01,1.02,1.03,1.031,1.032,1.033,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,1.19,2.01,2.02,2.03,2.04 D
  1. . S RETV=$$GETPARAM(BPFLDNO,+BPDUZ7)
  1. . S BPARRAY(BPFLDNO)=RETV
  1. I BPARRAY(1.13)="D" D
  1. . S BPARRAY("DIVS")=$$GETPARAM(2,+BPDUZ7)
  1. I BPARRAY(1.11)="I" D
  1. . S BPARRAY("INS")=$$GETPARAM(2.04,+BPDUZ7)
  1. Q
  1. ;
  1. SORTTYPE(BPSTYPE) ;
  1. Q:(BPSTYPE="T") "Transaction Date"
  1. Q:(BPSTYPE="D") "ECME division"
  1. Q:(BPSTYPE="I") "Insurance"
  1. Q:(BPSTYPE="C") "Reject Code"
  1. Q:(BPSTYPE="P") "Patient Name"
  1. Q:(BPSTYPE="N") "Drug Name"
  1. Q:(BPSTYPE="B") "Claim's Origin (BB/P2/RT/RS)"
  1. Q:(BPSTYPE="L") "Fill Location"
  1. Q:(BPSTYPE="R") "Released/Non-released"
  1. Q:(BPSTYPE="A") "Active/Discontinued"
  1. Q ""
  1. ;
  1. ;
  1. GETPARAM(BPFLDNO,BPDUZ) ;
  1. Q $$GET^XPAR(BPDUZ_";VA(200,","BPS USRSCR",BPFLDNO,"I")
  1. ;
  1. ;save value of the parameter
  1. SAVEPAR(BPFLDNO,BPDUZ,BPVAL) ;
  1. D EN^XPAR(BPDUZ_";VA(200,","BPS USRSCR",BPFLDNO,BPVAL,.BPERR)
  1. I BPERR'="0" W !,BPERR,! Q 0
  1. Q 1
  1. ;