source: FOIAVistA/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRN73.m@ 1611

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

initial load of FOIAVistA 6/30/08 version

File size: 4.1 KB
Line 
1RMPRN73 ;HINES/HNC -NPPD CALCULATIONS - CONT; 02/14/01
2 ;;3.0;PROSTHETICS;**57,70,72,77**;Feb 09, 1996
3 ;
4 ;DBIA # 801 - for this routine, the agreement covers the field
5 ; #.05 Short Description, file #441
6 ;
7 ;DBIA #10060 - Fileman read of file #200
8 ;RVD patch 77 - defined the WHO variable.
9CODE N I,NULINE
10 ;
11 ; read in NPPD new
12 F I=1:1 S NULINE=$P($T(DES+I^RMPRN72),";;",2) Q:$E(NULINE)="R" D
13 . S $P(^TMP($J,"N",STN,$P(NULINE,";",1)),U,15)=$P(NULINE,";",2)
14 . S ^TMP($J,"RMPRCODE",$P(NULINE,";",1))=$P(NULINE,";",2)
15 . Q
16 S $P(^TMP($J,"RMPRCODE"),U,1)=I-1 ;store number of new lines
17 ;
18 ; read in NPPD repair
19 F I=0:1 S NULINE=$P($T(REP+I^RMPRN72),";;",2) Q:$E(NULINE)'="R" D
20 . S $P(^TMP($J,"R",STN,$P(NULINE,";",1)),U,15)=$P(NULINE,";",2)
21 . S ^TMP($J,"RMPRCODE",$P(NULINE,";",1))=$P(NULINE,";",2)
22 . Q
23 S $P(^TMP($J,"RMPRCODE"),U,2)=I ;store number of repair lines
24 Q
25HOLD ;hold screen
26 K DIR I IOST["C-" W !! S DIR(0)="E" D ^DIR S:+Y'>0 FL=1
27 Q
28HDR W @IOF S PAGE=PAGE+1
29 W !,LN,!,CODE
30 W ?10,^TMP($J,"RMPRCODE",CODE)
31 W ?35,DATE(3)," - ",DATE(4)
32 W ?70,"Page: ",PAGE
33 W !,LN,!
34 I IOM<119 W "NAME",?10,"SSN",?16,"HCPCS",?22,"QTY",?27,"TYPE",?32,"COST",?42,"DATE",?48,"ITEM",?62,"HCPCS DES",?76,"WHO",!,LN
35 I IOM>119 W "NAME",?10,"SSN",?16,"HCPCS",?22,"QTY",?27,"TYPE",?32,"COST",?42,"DATE",?48,"ITEM",?80,"HCPCS DES",?112,"WHO",?117,"#",!,LN
36 Q
37DESP ;desplay detail records
38 S FL=""
39 S CODE=""
40 F S CODE=$O(^TMP($J,CODE)) Q:CODE="N" G:FL=1 EXIT D
41 .D HDR
42 .S RDX=0
43 .F S RDX=$O(^TMP($J,CODE,RDX)) D:RDX'>0 HOLD Q:RDX'>0 Q:FL=1 D
44 ..S DFN=$P(^RMPR(660,RDX,0),U,2) Q:DFN=""
45 ..D DEM^VADPT
46 ..I $Y+6>IOSL,IOST["C-" K DIR W !! S DIR(0)="E" D ^DIR S:+Y'>0 FL=1 Q:+Y'>0 D HDR
47 ..I $Y+6>IOSL,IOST'["C-" D HDR
48 ..W !,$E($P(VADM(1),",",1),1,9)
49 ..W ?10,$P(VADM(2),"-",3)
50 ..S TYPE=$P(^RMPR(660,RDX,0),U,4)
51 ..S QTY=$P(^RMPR(660,RDX,0),U,7)
52 ..S HCPCS=$P(^RMPR(661.1,$P(^RMPR(660,RDX,1),U,4),0),U,1)
53 ..S HCPCSD=$P(^RMPR(661.1,$P(^RMPR(660,RDX,1),U,4),0),U,2)
54 ..S WHO=$$GET1^DIQ(200,$P($G(^RMPR(660,RDX,0)),U,27),1)
55 ..I $G(RDX) S OPEN=$P(^RMPR(660,RDX,0),U,12)
56 ..I OPEN="" S OPEN="*"
57 ..E S OPEN=" "
58 ..S COST=^TMP($J,CODE,RDX)
59 ..S SOURCE=$P(^RMPR(660,RDX,0),U,14)
60 ..S DATE=$P(^RMPR(660,RDX,0),U,1),DATE=$E(DATE,4,5)_"/"_$E(DATE,6,7)
61 ..S ITEM=$P(^PRC(441,$P(^RMPR(661,$P(^RMPR(660,RDX,0),U,6),0),U,1),0),U,2)
62 ..I IOM<119 W ?16,HCPCS,?22,QTY,?27,TYPE,?29,SOURCE,?32,OPEN,COST,?42,DATE,?48,$E(ITEM,1,11),?61,"|",?62,$E(HCPCSD,1,12),?76,WHO
63 ..I IOM>118 W ?16,HCPCS,?22,QTY,?27,TYPE,?29,SOURCE,?32,OPEN,COST,?42,DATE,?48,$E(ITEM,1,29),?79,"|",?80,$E(HCPCSD,1,30),?112,WHO,?117,RDX
64 Q
65DESPR ;repair dispaly
66 ;
67 S CODE="R1"
68 F S CODE=$O(^TMP($J,CODE)) Q:CODE["RMPR" Q:FL=1 D
69 .D HDR
70 .S RDX=0
71 .F S RDX=$O(^TMP($J,CODE,RDX)) D:RDX'>0 HOLD Q:RDX'>0 Q:FL=1 D
72 ..S DFN=$P(^RMPR(660,RDX,0),U,2) Q:DFN=""
73 ..D DEM^VADPT
74 ..Q:FL=1
75 ..I $Y+6>IOSL,IOST["C-" K DIR W !! S DIR(0)="E" D ^DIR S:+Y'>0 FL=1 Q:+Y'>0 D HDR
76 ..I $Y+6>IOSL,IOST'["C-" D HDR
77 ..W !,$E($P(VADM(1),",",1),1,9)
78 ..W ?10,$P(VADM(2),"-",3)
79 ..S TYPE=$P(^RMPR(660,RDX,0),U,4)
80 ..S QTY=$P(^RMPR(660,RDX,0),U,7)
81 ..S SOURCE=$P(^RMPR(660,RDX,0),U,14)
82 ..I $P(^RMPR(660,RDX,0),U,17)'="" S HCPCS="#SHIP",ITEM="SHIPPING"
83 ..I $P(^RMPR(660,RDX,0),U,26)'="" S HCPCS="#PICK",ITEM="PICKUP/DEL"
84 ..S:$G(HCPCS)'["#" HCPCS=$P(^RMPR(661.1,$P(^RMPR(660,RDX,1),U,4),0),U,1)
85 ..S:$G(HCPCS)'["#" HCPCSD=$P(^RMPR(661.1,$P(^RMPR(660,RDX,1),U,4),0),U,2)
86 ..I $G(HCPCS)["#S" S HCPCSD="SHIPPING"
87 ..I $G(HCPCS)["#P" S HCPCSD="PICKUP/DEL",SOURCE="C"
88 ..I $G(RDX) S OPEN=$P(^RMPR(660,RDX,0),U,12)
89 ..S WHO=$$GET1^DIQ(200,$P($G(^RMPR(660,RDX,0)),U,27),1)
90 ..I OPEN="" S OPEN="*"
91 ..E S OPEN=" "
92 ..S COST=^TMP($J,CODE,RDX)
93 ..;S SOURCE=$P(^RMPR(660,RDX,0),U,14)
94 ..S DATE=$P(^RMPR(660,RDX,0),U,1),DATE=$E(DATE,4,5)_"/"_$E(DATE,6,7)
95 ..S:$G(HCPCS)'["#" ITEM=$P(^PRC(441,$P(^RMPR(661,$P(^RMPR(660,RDX,0),U,6),0),U,1),0),U,2)
96 ..I IOM<119 W ?16,HCPCS,?22,QTY,?27,TYPE,?29,SOURCE,?32,OPEN,COST,?42,DATE,?48,$E(ITEM,1,12),?62,$E(HCPCSD,1,12),?76,WHO
97 ..I IOM>118 W ?16,HCPCS,?22,QTY,?27,TYPE,?29,SOURCE,?32,OPEN,COST,?42,DATE,?48,$E(ITEM,1,29),?79,"|",?80,$E(HCPCSD,1,30),?112,WHO,?117,RDX
98 ..K ITEM,HCPCSD,HCPCS
99 Q
100EXIT ;
101 Q
102 ;END
Note: See TracBrowser for help on using the repository browser.