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

BPSCMT.m

Go to the documentation of this file.
  1. BPSCMT ;BHAM ISC/SS - ECME SCREEN ADD/VIEW COMMENTS ;28-MAR-2005
  1. ;;1.0;E CLAIMS MGMT ENGINE;**1**;JUN 2004
  1. ;; Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;USER SCREEN
  1. Q
  1. ;
  1. CMT ;to invoke Add/View comments LM screen from main LM User Screen
  1. N BPRET,BPSEL
  1. I '$D(@(VALMAR)) Q
  1. D FULL^VALM1
  1. W !,"Enter the line number for which you wish to Add/View comments."
  1. S BPSEL=$$ASKLINE^BPSSCRU4("Select item","PC","Please select a SINGLE Patient Line item or a SINGLE Rx Line item when accessing Comments")
  1. I BPSEL<1 S VALMBCK="R" Q
  1. ;save some User Screen's configuration information VALVAR
  1. D SAVESEL(BPSEL,VALMAR)
  1. ;invoke Add/View comments LM screen
  1. D EN
  1. ;update the content of the main User Screen and redraw it
  1. I $G(^TMP("BPSSCR",$J,"VALM","UPDATE"))=1 D
  1. . D REDRAW^BPSSCRUD("Updating user screen for new comment(s)...")
  1. . K ^TMP("BPSSCR",$J,"VALM","UPDATE")
  1. ;return to main User Screen
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. EN ; -- main entry point for BPS LSTMN COMMENTS
  1. D EN^VALM("BPS LSTMN COMMENTS")
  1. Q
  1. ;
  1. HDR ; -- header code
  1. N BPARR,BPX
  1. Q:'$D(@VALMAR@("VIEWPARAMS"))
  1. D RESTVIEW^BPSSCR01(.BPARR) ;Note: restore settings from current
  1. ;("BPSCMT") TMP (because we have already put main screen setting in this TMP, see SAVESEL)
  1. S VALMHDR(1)="PHARMACY ECME"
  1. S VALMHDR(2)="SELECTED DIVISION(S): "_$$GETVDIVS^BPSSCR01(.BPARR,58)
  1. S VALMHDR(3)=$$GETVDETS^BPSSCR01(.BPARR)
  1. Q
  1. ;
  1. INIT ; -- init variables and list array
  1. ;
  1. N BP59,BP59ARR,BPJSTPAT,BPINSDAT
  1. N BPX,BPPATIND,BPCLMIND,BPDFN,BPSSTR,BPPRNTGL,BPSINSUR,BP1LN
  1. I '$D(@VALMAR@("SELLN")) D SET^VALM10(1,"Needs to be called from BPS LSTMN ECME USRSCR template") Q
  1. S BPX=@VALMAR@("SELLN")
  1. S BPDFN=+$P(BPX,U,2)
  1. S BPSINSUR=+$P(BPX,U,3)
  1. S BP1LN=+$P(BPX,U,5)
  1. S BPPRNTGL=@VALMAR@("PARENT")
  1. S BPPATIND=+$P(BPX,U,6)
  1. S BPCLMIND=+$P(BPX,U,7)
  1. S BPJSTPAT=0
  1. I BPCLMIND=0 S BPJSTPAT=1
  1. I BPJSTPAT D
  1. . D MKPATARR(BPPRNTGL,BPPATIND,.BP59ARR)
  1. . S BPCLMIND=0
  1. . S BPPATIND=$S(BPPATIND<1:0,1:BPPATIND-1) ;since the MKARRELM will increase it by 1
  1. E D
  1. . S BP59ARR(+$P(BPX,U,4))="" ;
  1. . S BPCLMIND=$S(BPCLMIND<1:0,1:BPCLMIND-1) ;since the MKARRELM will increase it by 1
  1. ;make LM array element(s)
  1. S BPPREV=0 ;to store data from previous patient/insurance group
  1. S BPLINE=1
  1. S BPINSDAT=$$GETINSUR^BPSSCRU2(+$O(BP59ARR(0)))
  1. S BPSINSUR=+BPINSDAT ;patient's insurance IEN
  1. I BPJSTPAT D MKPATELM^BPSCMT01(.BPLINE,VALMAR,BPDFN,BPINSDAT,.BPPATIND,.BPCLMIND,.BPPREV)
  1. S BP59=0
  1. F S BP59=$O(BP59ARR(BP59)) Q:+BP59=0 D
  1. . D MKCLMELM^BPSCMT01(.BPLINE,VALMAR,BP59,BPDFN,BPSINSUR,.BPPATIND,.BPCLMIND,.BPPREV)
  1. . ;S BPLINE=BPLINE+1
  1. I BPJSTPAT D UPDPREV^BPSCMT01(VALMAR,.BPPATIND,.BPPREV)
  1. S VALMCNT=$S(BPLINE>1:BPLINE-1,1:BPLINE)
  1. Q
  1. ;/**
  1. ;make array of all claims (ptrs to #9002313.59)
  1. ;for the patient/insurance pair
  1. ;input
  1. ;BPPRNTGL - tmp global in parent LM
  1. ;BPPATIND - patient summary index
  1. ;BP59ARR - array to return results
  1. MKPATARR(BPPRNTGL,BPPATIND,BP59ARR) ;
  1. N BPCLM,BPDFN,BPINS,BP59
  1. S BPCLM=0 F S BPCLM=$O(@BPPRNTGL@("LMIND",BPPATIND,BPCLM)) Q:+BPCLM=0 D
  1. . S BPDFN=0 F S BPDFN=$O(@BPPRNTGL@("LMIND",BPPATIND,BPCLM,BPDFN)) Q:+BPDFN=0 D
  1. . . S BPINS="" F S BPINS=$O(@BPPRNTGL@("LMIND",BPPATIND,BPCLM,BPDFN,BPINS)) Q:BPINS="" D
  1. . . . S BP59=0 F S BP59=$O(@BPPRNTGL@("LMIND",BPPATIND,BPCLM,BPDFN,BPINS,BP59)) Q:+BP59=0 D
  1. . . . . S BP59ARR(BP59)=""
  1. Q
  1. ;
  1. ;/**
  1. HELP ; -- help code
  1. S X="?" D DISP^XQORM1 W !!
  1. Q
  1. ;
  1. EXIT ; -- exit code
  1. K @VALMAR
  1. Q
  1. ;
  1. EXPND ; -- expand code
  1. Q
  1. ;
  1. ;/**
  1. ;save selection in order to use inside enclosed ListManager copy
  1. ;input:
  1. ;BPSEL - selected line
  1. ;BPVALMR - parent VALMAR
  1. SAVESEL(BPSEL,BPVALMR) ;
  1. D CLEANIT
  1. S ^TMP("BPSCMT",$J,"VALM","SELLN")=BPSEL
  1. S ^TMP("BPSCMT",$J,"VALM","PARENT")=BPVALMR
  1. M ^TMP("BPSCMT",$J,"VALM","VIEWPARAMS")=@BPVALMR@("VIEWPARAMS")
  1. Q
  1. ;
  1. CLEANIT ;
  1. K ^TMP("BPSCMT",$J,"VALM")
  1. Q
  1. ;
  1. ;redraw the screen for Add/View comments option
  1. REDRWCMT ;
  1. N BPARR,BPVALMR,BPSEL
  1. S BPSEL=$G(@VALMAR@("SELLN"))
  1. S BPVALMR=$G(@VALMAR@("PARENT"))
  1. D CLEAN^VALM10
  1. K @VALMAR
  1. S @VALMAR@("SELLN")=BPSEL
  1. S @VALMAR@("PARENT")=BPVALMR
  1. M @VALMAR@("VIEWPARAMS")=@BPVALMR@("VIEWPARAMS")
  1. D INIT^BPSCMT
  1. D HDR^BPSCMT
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. ;
  1. ;