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

BPSSCR01.m

Go to the documentation of this file.
  1. BPSSCR01 ;BHAM ISC/SS - USER SCREEN ;10-MAR-2005
  1. ;;1.0;E CLAIMS MGMT ENGINE;**1,5,11,20,23**;JUN 2004;Build 44
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;USER SCREEN
  1. Q
  1. ;User Screen header
  1. ;input:
  1. ; BPSLN - line of the header
  1. ;output:
  1. ; text string for the header
  1. HDR(BPSLN) ; -- header code
  1. N BPARR,BPX,BPXSL
  1. Q:'$D(@VALMAR@("VIEWPARAMS"))
  1. D RESTVIEW(.BPARR)
  1. I BPSLN=1 Q "SELECTED DIVISION(S): "_$$GETVDIVS(.BPARR,58)
  1. I BPSLN=2 Q $$GETVDETS(.BPARR)
  1. I BPSLN=3 D Q BPX
  1. . S BPXSL=$$SORTTYPE^BPSSCRSL($G(BPARR(1.12)))
  1. . I BPXSL="" S BPXSL="Transaction date by default"
  1. . S BPX=" Sorted by: "_BPXSL
  1. Q ""
  1. ;/**
  1. ;get current view details
  1. GETVDETS(BPARR) ;*/
  1. N BPSTR
  1. ; If Date Range was selected display the Activity Beginning and Ending Dates.
  1. I $G(BPARR(1.031))="D" S BPSTR=$$LJ^BPSSCR02(" Activity Date Range: "_$$FMTE^XLFDT(BPARR(1.032))_" - "_$$FMTE^XLFDT(BPARR(1.033)),61)
  1. ;
  1. ; If Timeframe was selected display the number of hours or days.
  1. E S BPSTR=" Activity Date Range: within the past "_$G(BPARR(1.05))_$S($G(BPARR(1.04))="H":" hour(s)",1:" day(s)")
  1. Q BPSTR
  1. ;
  1. ;/**
  1. ;get divisions selected
  1. GETVDIVS(BPARRAY,BPMLEN) ;*/
  1. I $G(BPARRAY(1.13))="A" Q "ALL"
  1. N BPDIV,BPCNT,BPSTR,BPQUIT
  1. S BPQUIT=0,BPSTR=""
  1. F BPCNT=1:1:20 S BPDIV=$P($G(BPARRAY("DIVS")),";",BPCNT+1) Q:+BPDIV=0 D Q:BPQUIT=1
  1. . I $L(BPSTR_$$DIVNAME^BPSSCRDS(BPDIV))>(BPMLEN-4) D S BPQUIT=1 Q
  1. . . S BPSTR=$$LJ^BPSSCR02(BPSTR_",...",BPMLEN)
  1. . S BPSTR=BPSTR_$S(BPCNT>1:", ",1:"")_$$DIVNAME^BPSSCRDS(BPDIV)
  1. Q BPSTR
  1. ;/**
  1. ;input:
  1. ; BPARR - local array to store user profile info
  1. ;returns:
  1. ; the last number in LM ARRAY
  1. INIT() ; -- init variables and list array*/
  1. N BPLN,BPLM,BP59,BPSORT,BPTMPGL,BPRET
  1. N BPARR
  1. ;
  1. ;get user's ien in BPS PRFILE file
  1. ;if array is not defined then read information from file,
  1. ;otherwise use current info from the array, because the user
  1. ;may specify criteria in array without saving it in file for
  1. ;the temporary use
  1. I '$D(@VALMAR@("VIEWPARAMS")) D
  1. . D READPROF^BPSSCRSL(.BPARR,+DUZ)
  1. . D SAVEVIEW(.BPARR)
  1. E D RESTVIEW(.BPARR)
  1. ;get date/time range
  1. I $$GETDT^BPSSCRU1(.BPARR)=0 Q
  1. ;
  1. S BPTMPGL=$NA(^TMP($J,"BPSSCR"))
  1. K @BPTMPGL,@VALMAR
  1. D COLLECT^BPSSCR04(BPTMPGL,.BPARR)
  1. D SAVEVIEW(.BPARR)
  1. S BPRET=$$LMARRAY(BPTMPGL,.BPARR)
  1. K @BPTMPGL
  1. S:BPRET>1 BPRET=BPRET-1
  1. Q BPRET
  1. ;
  1. ;/**
  1. ;make elements for List Manager array
  1. ;input:
  1. ;BPTMPGL - TMP global to store selected claims
  1. ;BPARR - local array to store user profile info
  1. ;returns:
  1. ; the last number in LM ARRAY
  1. ;indexing (example):
  1. ;S ^TMP("BPSSCR",$J,"VALM",1,0)="2 BUMSTEAD,CHARLE 5444 WEBMD"
  1. ;S ^TMP("BPSSCR",$J,"VALM",2,0)=" 2.1 CEFACLOR 500MG CAP"
  1. ;S ^TMP("BPSSCR",$J,"VALM",3,0)=" 2.2 AMPICILLIN 250MG CAP"
  1. ;S ^TMP("BPSSCR",$J,"VALM","LMIND",2,437272,7008776.00001,0)=""
  1. ;S ^TMP("BPSSCR",$J,"VALM","LMIND",2.1,437272,7008778.00011,1)=""
  1. ;S ^TMP("BPSSCR",$J,"VALM","LMIND",2.2,437272,7009457.00001,2)=""
  1. LMARRAY(BPTMPGL,BPARR) ;*/
  1. N BPSRTVAL,BP59,BPSORT,BPLN,BPLM,BPSTR1,BPCLM,BPPREV
  1. S BPLM=0 ;patient_AND_insurance level counter
  1. S BPCLM=0 ;claim level counter
  1. S BP59=0
  1. S BPLN=1 ;line counter for List manager array to display on the screen
  1. S BPPREV=0 ;to store data from previous patient group
  1. ;sort type:
  1. ;'T' FOR TRANSACTION DATE
  1. ;'D' FOR DIVISION (ECME pharmacy)
  1. ;'I' FOR INSURANCE
  1. ;'C' FOR REJECT CODE
  1. ;'P' FOR PATIENT NAME
  1. ;'N' FOR DRUG NAME
  1. ;'B' FOR BILL TYPE (BB/P2/RT/RS)
  1. ;'L' FOR FILL LOCATION (Windows/Mail/CMOP)
  1. ;'R' FOR RELEASED/NON-RELEASED RX
  1. ;'A' FOR ACTIVE/DISCONTINUED RX
  1. S BPSORT=$G(BPARR(1.12))
  1. S:BPSORT="" BPSORT="T" ;default
  1. S BPSRTVAL="" ;a value that "makes" an order, can be a string
  1. F S BPSRTVAL=$O(@BPTMPGL@("SORT",BPSORT,BPSRTVAL)) Q:BPSRTVAL="" D
  1. . I BPSORT="D" D
  1. . . S BPSTR1="---- Division: "_$$DIVNAME^BPSSCRDS(+$P(BPSRTVAL,U,2))_" "
  1. . . D SET^VALM10(BPLN,BPSTR1_$$LINE^BPSSCRU3(79-$L(BPSTR1),"-"),0)
  1. . . S BPLN=BPLN+1
  1. . I BPSORT="C" D
  1. . . S BPSTR1=$E("---- Reject code: "_$$GETRJNAM^BPSSCRU3(BPSRTVAL)_" ",1,79)
  1. . . D SET^VALM10(BPLN,BPSTR1_$$LINE^BPSSCRU3(79-$L(BPSTR1),"-"),0)
  1. . . S BPLN=BPLN+1
  1. . S BP59=0
  1. . F S BP59=+$O(@BPTMPGL@("SORT",BPSORT,BPSRTVAL,BP59)) Q:+BP59=0 D
  1. . . I BP59'=0 D MKARRELM^BPSSCR02(.BPLN,VALMAR,BP59,.BPLM,.BPCLM,.BPPREV)
  1. D UPDPREV^BPSSCR02(VALMAR,BPLM,BPPREV)
  1. Q BPLN
  1. ;
  1. HELP ; -- help code
  1. N X S X="?" D DISP^XQORM1 W !!
  1. Q
  1. ;
  1. EXIT ; -- exit code
  1. Q
  1. ;
  1. EXPND ; -- expand code
  1. Q
  1. ;/**
  1. ;store current view params in VALMAR("VIEWPARAMS") TMP global array
  1. ;to display in the header
  1. ;input:
  1. ; BPARR - array with user profile info to store
  1. SAVEVIEW(BPARR) ; S @VALMAR@("VIEWPARAMS",BPLMIND,BPDFN,BP59,BPLINE)=""
  1. Q:'$D(BPARR)
  1. M @VALMAR@("VIEWPARAMS")=BPARR
  1. Q
  1. ;
  1. ;/**
  1. ;restore current view params from VALMAR("VIEWPARAMS") TMP global array
  1. ;input:
  1. ; BPARR - array with user profile info to store
  1. RESTVIEW(BPARR) ; S @VALMAR@("VIEWPARAMS",BPLMIND,BPDFN,BP59,BPLINE)=""
  1. Q:'$D(@VALMAR@("VIEWPARAMS"))
  1. M BPARR=@VALMAR@("VIEWPARAMS")
  1. Q
  1. ;