source: FOIAVistA/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPR9LNP.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 3.3 KB
Line 
1RMPR9LNP ;Hines OIFO/HNC - REMOTE PROCEDURE, LIST NPPD DATA ;9/8/03 07:23
2 ;;3.0;PROSTHETICS;**71,77,90,75,60**;Feb 09, 1996;Build 18
3 ;
4 ; HNC - Sept 2, 2003 - patch 77 remove the " for Excel CSV
5 ; HNC - Feb 14, 2005 - patch 90 add flex field to GUI display
6 ; HNC - Nov 15, 2005 - patch 75 add 2 additional flex field to gui
7 ;
8 ;RESULTS passed to broker in ^TMP($J,
9 ;delimited by "^"
10 ;piece 1 = ENTRY DATE
11 ;piece 2 = PATIENT NAME IF OEF/OIF <!> PRECEDES THE NAME
12 ;piece 3 = PSAS HCPCS with * if hcpcs has Calculation Flag
13 ;piece 4 = QTY
14 ;piece 5 = VENDOR
15 ;piece 6 = INITIAL ACTION DATE
16 ;piece 7 = TOTAL COST
17 ;piece 8 = DESCRIPTION
18 ;piece 9 = INITIATOR
19 ;piece 10 = NPPD LINE BEFORE GROUPER
20 ;piece 11 = STATION
21 ;piece 12 = GROUPER NUMBER
22 ;piece 13 = FORM REQUESTED ON
23 ;piece 14 = TYPE OF TRANSACTION
24 ;piece 15 = SSN
25 ;piece 16 = IEN TO FILE 660
26 ;piece 17 = HCPCS SHORT DESCRIPTION
27 ;piece 18 = SOURCE
28 ;piece 19 = Optional Flex Field
29 ;piece 20 = Optional Flex Field
30 ;piece 21 = Optional Flex Field
31 Q
32 ;
33EN(RESULT,DATE1,DATE2,FLEXF,FLEX2,FLEX3) ;broker entry point
34 ;
35 K ^TMP($J)
36 I '$D(DATE1)!('$D(DATE2)) G EXIT
37 S DATE=DATE1-1
38 F S DATE=$O(^RMPR(660,"B",DATE)) Q:(DATE="")!($P(DATE,".",1)>DATE2) D
39 .S RMPRB=0
40 .F S RMPRB=$O(^RMPR(660,"B",DATE,RMPRB)) Q:RMPRB="" D
41 ..I $P(^RMPR(660,RMPRB,0),U,15)["*" Q:$P($G(^RMPR(660,RMPRB,"HSTV1")),U,3)=""
42 ..S PHCPCS=$P($G(^RMPR(660,RMPRB,1)),U,4)
43 ..Q:PHCPCS=""
44 ..Q:PHCPCS'>0
45 ..S HDES=$P(^RMPR(661.1,PHCPCS,0),U,2)
46 ..S TYPE=$P($G(^RMPR(660,RMPRB,0)),U,4)
47 ..I TYPE'="X" S LINE=$P(^RMPR(661.1,PHCPCS,0),U,7)
48 ..I TYPE="X" S LINE=$P(^RMPR(661.1,PHCPCS,0),U,6)
49 ..S CAL=$P(^RMPR(661.1,PHCPCS,0),U,8)
50 ..I CAL'="" S CAL="*"
51 ..S DFN=$P(^RMPR(660,RMPRB,0),U,2)
52 ..D DEM^VADPT,SVC^VADPT
53 ..S RMPROEOI=$S(VASV(11)>0:"<!>",VASV(12)>0:"<!>",VASV(13)>0:"<!>",1:0)
54 ..D DATA
55 S RESULT=$NA(^TMP($J))
56 K DATE,DFN,HDES,LINE,PHCPCS,RMPRB,RMPRFLD,TYPE,B
57 Q
58 ;
59DATA ;
60 S B=RMPRB
61 I FLEXF'="" S RMPRFLD=".01;.02;4.5;5;7;8;8.3;11;12;14;24;27;68;"_FLEXF
62 I FLEXF="" S RMPRFLD=".01;.02;4.5;5;7;8;8.3;11;12;14;24;27;68"
63 I FLEX2'="" S RMPRFLD=RMPRFLD_";"_FLEX2
64 I FLEX3'="" S RMPRFLD=RMPRFLD_";"_FLEX3
65 D GETS^DIQ(660,B,RMPRFLD,"","RMXM")
66 S RMPRPTNM=$G(RMXM(660,B_",",.02))
67 I RMPROEOI["<" S RMPRPTNM=RMPROEOI_RMPRPTNM
68 S $P(^TMP($J,B),U,1)=$G(RMXM(660,B_",",.01))
69 S $P(^TMP($J,B),U,2)=RMPRPTNM
70 S $P(^TMP($J,B),U,3)=$G(RMXM(660,B_",",4.5))_CAL
71 S $P(^TMP($J,B),U,4)=$G(RMXM(660,B_",",5))
72 S $P(^TMP($J,B),U,5)=$G(RMXM(660,B_",",7))
73 S $P(^TMP($J,B),U,6)=$G(RMXM(660,B_",",8.3))
74 S $P(^TMP($J,B),U,7)=$G(RMXM(660,B_",",14))
75 ;patch 77 remove the " for Excel CSV
76 S $P(^TMP($J,B),U,8)=$TR($G(RMXM(660,B_",",24)),"""","'")
77 S $P(^TMP($J,B),U,9)=$G(RMXM(660,B_",",27))
78 S $P(^TMP($J,B),U,10)=LINE
79 S $P(^TMP($J,B),U,11)=$G(RMXM(660,B_",",8))
80 S $P(^TMP($J,B),U,12)=$G(RMXM(660,B_",",68))
81 S $P(^TMP($J,B),U,13)=$G(RMXM(660,B_",",11))
82 S $P(^TMP($J,B),U,14)=TYPE
83 S $P(^TMP($J,B),U,15)=$P(VADM(2),U,2)
84 S $P(^TMP($J,B),U,16)=B
85 S $P(^TMP($J,B),U,17)=HDES
86 S $P(^TMP($J,B),U,18)=$E($G(RMXM(660,B_",",12)),0,1)
87 I FLEXF'="" S $P(^TMP($J,B),U,19)=$G(RMXM(660,B_",",FLEXF))
88 I FLEXF="" S $P(^TMP($J,B),U,19)=""
89 I FLEX2'="" S $P(^TMP($J,B),U,20)=$G(RMXM(660,B_",",FLEX2))
90 I FLEX2="" S $P(^TMP($J,B),U,20)=""
91 I FLEX3'="" S $P(^TMP($J,B),U,21)=$G(RMXM(660,B_",",FLEX3))
92 I FLEX3="" S $P(^TMP($J,B),U,21)=""
93 K RMXM,VADM,CAL
94 Q
95EXIT ;common exit point
96 Q
97 ;END
Note: See TracBrowser for help on using the repository browser.