source: FOIAVistA/trunk/r/E_CLAIMS_MGMT_ENGINE-BPS/BPSCMT.m@ 1140

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

initial load of FOIAVistA 6/30/08 version

File size: 4.1 KB
Line 
1BPSCMT ;BHAM ISC/SS - ECME SCREEN ADD/VIEW COMMENTS ;28-MAR-2005
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 ;
7CMT ;to invoke Add/View comments LM screen from main LM User Screen
8 N BPRET,BPSEL
9 I '$D(@(VALMAR)) Q
10 D FULL^VALM1
11 W !,"Enter the line number for which you wish to Add/View comments."
12 S BPSEL=$$ASKLINE^BPSSCRU4("Select item","PC","Please select a SINGLE Patient Line item or a SINGLE Rx Line item when accessing Comments")
13 I BPSEL<1 S VALMBCK="R" Q
14 ;save some User Screen's configuration information VALVAR
15 D SAVESEL(BPSEL,VALMAR)
16 ;invoke Add/View comments LM screen
17 D EN
18 ;update the content of the main User Screen and redraw it
19 I $G(^TMP("BPSSCR",$J,"VALM","UPDATE"))=1 D
20 . D REDRAW^BPSSCRUD("Updating user screen for new comment(s)...")
21 . K ^TMP("BPSSCR",$J,"VALM","UPDATE")
22 ;return to main User Screen
23 S VALMBCK="R"
24 Q
25 ;
26EN ; -- main entry point for BPS LSTMN COMMENTS
27 D EN^VALM("BPS LSTMN COMMENTS")
28 Q
29 ;
30HDR ; -- header code
31 N BPARR,BPX
32 Q:'$D(@VALMAR@("VIEWPARAMS"))
33 D RESTVIEW^BPSSCR01(.BPARR) ;Note: restore settings from current
34 ;("BPSCMT") TMP (because we have already put main screen setting in this TMP, see SAVESEL)
35 S VALMHDR(1)="PHARMACY ECME"
36 S VALMHDR(2)="SELECTED DIVISION(S): "_$$GETVDIVS^BPSSCR01(.BPARR,58)
37 S VALMHDR(3)=$$GETVDETS^BPSSCR01(.BPARR)
38 Q
39 ;
40INIT ; -- init variables and list array
41 ;
42 N BP59,BP59ARR,BPJSTPAT,BPINSDAT
43 N BPX,BPPATIND,BPCLMIND,BPDFN,BPSSTR,BPPRNTGL,BPSINSUR,BP1LN
44 I '$D(@VALMAR@("SELLN")) D SET^VALM10(1,"Needs to be called from BPS LSTMN ECME USRSCR template") Q
45 S BPX=@VALMAR@("SELLN")
46 S BPDFN=+$P(BPX,U,2)
47 S BPSINSUR=+$P(BPX,U,3)
48 S BP1LN=+$P(BPX,U,5)
49 S BPPRNTGL=@VALMAR@("PARENT")
50 S BPPATIND=+$P(BPX,U,6)
51 S BPCLMIND=+$P(BPX,U,7)
52 S BPJSTPAT=0
53 I BPCLMIND=0 S BPJSTPAT=1
54 I BPJSTPAT D
55 . D MKPATARR(BPPRNTGL,BPPATIND,.BP59ARR)
56 . S BPCLMIND=0
57 . S BPPATIND=$S(BPPATIND<1:0,1:BPPATIND-1) ;since the MKARRELM will increase it by 1
58 E D
59 . S BP59ARR(+$P(BPX,U,4))="" ;
60 . S BPCLMIND=$S(BPCLMIND<1:0,1:BPCLMIND-1) ;since the MKARRELM will increase it by 1
61 ;make LM array element(s)
62 S BPPREV=0 ;to store data from previous patient/insurance group
63 S BPLINE=1
64 S BPINSDAT=$$GETINSUR^BPSSCRU2(+$O(BP59ARR(0)))
65 S BPSINSUR=+BPINSDAT ;patient's insurance IEN
66 I BPJSTPAT D MKPATELM^BPSCMT01(.BPLINE,VALMAR,BPDFN,BPINSDAT,.BPPATIND,.BPCLMIND,.BPPREV)
67 S BP59=0
68 F S BP59=$O(BP59ARR(BP59)) Q:+BP59=0 D
69 . D MKCLMELM^BPSCMT01(.BPLINE,VALMAR,BP59,BPDFN,BPSINSUR,.BPPATIND,.BPCLMIND,.BPPREV)
70 . ;S BPLINE=BPLINE+1
71 I BPJSTPAT D UPDPREV^BPSCMT01(VALMAR,.BPPATIND,.BPPREV)
72 S VALMCNT=$S(BPLINE>1:BPLINE-1,1:BPLINE)
73 Q
74 ;/**
75 ;make array of all claims (ptrs to #9002313.59)
76 ;for the patient/insurance pair
77 ;input
78 ;BPPRNTGL - tmp global in parent LM
79 ;BPPATIND - patient summary index
80 ;BP59ARR - array to return results
81MKPATARR(BPPRNTGL,BPPATIND,BP59ARR) ;
82 N BPCLM,BPDFN,BPINS,BP59
83 S BPCLM=0 F S BPCLM=$O(@BPPRNTGL@("LMIND",BPPATIND,BPCLM)) Q:+BPCLM=0 D
84 . S BPDFN=0 F S BPDFN=$O(@BPPRNTGL@("LMIND",BPPATIND,BPCLM,BPDFN)) Q:+BPDFN=0 D
85 . . S BPINS="" F S BPINS=$O(@BPPRNTGL@("LMIND",BPPATIND,BPCLM,BPDFN,BPINS)) Q:BPINS="" D
86 . . . S BP59=0 F S BP59=$O(@BPPRNTGL@("LMIND",BPPATIND,BPCLM,BPDFN,BPINS,BP59)) Q:+BP59=0 D
87 . . . . S BP59ARR(BP59)=""
88 Q
89 ;
90 ;/**
91HELP ; -- help code
92 S X="?" D DISP^XQORM1 W !!
93 Q
94 ;
95EXIT ; -- exit code
96 K @VALMAR
97 Q
98 ;
99EXPND ; -- expand code
100 Q
101 ;
102 ;/**
103 ;save selection in order to use inside enclosed ListManager copy
104 ;input:
105 ;BPSEL - selected line
106 ;BPVALMR - parent VALMAR
107SAVESEL(BPSEL,BPVALMR) ;
108 D CLEANIT
109 S ^TMP("BPSCMT",$J,"VALM","SELLN")=BPSEL
110 S ^TMP("BPSCMT",$J,"VALM","PARENT")=BPVALMR
111 M ^TMP("BPSCMT",$J,"VALM","VIEWPARAMS")=@BPVALMR@("VIEWPARAMS")
112 Q
113 ;
114CLEANIT ;
115 K ^TMP("BPSCMT",$J,"VALM")
116 Q
117 ;
118 ;redraw the screen for Add/View comments option
119REDRWCMT ;
120 N BPARR,BPVALMR,BPSEL
121 S BPSEL=$G(@VALMAR@("SELLN"))
122 S BPVALMR=$G(@VALMAR@("PARENT"))
123 D CLEAN^VALM10
124 K @VALMAR
125 S @VALMAR@("SELLN")=BPSEL
126 S @VALMAR@("PARENT")=BPVALMR
127 M @VALMAR@("VIEWPARAMS")=@BPVALMR@("VIEWPARAMS")
128 D INIT^BPSCMT
129 D HDR^BPSCMT
130 S VALMBCK="R"
131 Q
132 ;
133 ;
134 ;
Note: See TracBrowser for help on using the repository browser.