RMPRN6PL ;HINES/HNC -NPPD CALCULATIONS - SINGLE LINE; 02/14/98
;;3.0;PROSTHETICS;**32,34,36,51,70,72,133**;Feb 09, 1996;Build 2
;
;DBIA # 801 - for this routine, the agreement covers the field
; #.05 Short Description, file #441.
;
;DBIA #10060 - Fileman read of file #200
Q
HOLD ;hold screen
K DIR I IOST["C-" W !! S DIR(0)="E" D ^DIR S:+Y'>0 FL=1
Q
HDR W @IOF S PAGE=PAGE+1
W !,LN,!,CODE
W ?10,^TMP($J,"RMPRCODE",CODE)
W ?35,DATE(3)," - ",DATE(4)
W ?70,"Page: ",PAGE
W !,LN,!
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
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
Q
DESP ;desplay detail records
S FL=""
;code is user defined
;F S CODE=$O(^TMP($J,CODE)) Q:CODE="N" G:FL=1 EXIT D
D HDR
S RDX=0
F S RDX=$O(^TMP($J,CODE,RDX)) D:RDX'>0 HOLD Q:RDX'>0 Q:FL=1 D
.S DFN=$P(^RMPR(660,RDX,0),U,2) Q:DFN=""
.D DEM^VADPT
.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
.I $Y+6>IOSL,IOST'["C-" D HDR
.W !,$E($P(VADM(1),",",1),1,9)
.W ?10,$P(VADM(2),"-",3)
.S ITEM="",HCPCSD=""
.S TYPE=$P(^RMPR(660,RDX,0),U,4)
.S QTY=$P(^RMPR(660,RDX,0),U,7)
.S HCPCS=$P($G(^RMPR(660,RDX,1)),U,4)
.I HCPCS=""&($P(^RMPR(660,RDX,0),U,17)'="") S HCPCS=2676,ITEM="SHIPPING",HCPCSD="SHIPPING"
.I $P(^RMPR(660,RDX,0),U,26)'="" S ITEM="PICKUP/DEL"
.I HCPCSD="" S HCPCSD=$P($G(^RMPR(661.1,HCPCS,0)),U,2)
.S HCPCS=$P($G(^RMPR(661.1,HCPCS,0)),U,1)
.S WHO=$$GET1^DIQ(200,$P($G(^RMPR(660,RDX,0)),U,27),1)
.I $G(RDX) S OPEN=$P(^RMPR(660,RDX,0),U,12)
.I OPEN="" S OPEN="*"
.E S OPEN=" "
.S COST=^TMP($J,CODE,RDX)
.S SOURCE=$P(^RMPR(660,RDX,0),U,14)
.S DATE=$P(^RMPR(660,RDX,0),U,1),DATE=$E(DATE,4,5)_"/"_$E(DATE,6,7)
.I ITEM="" S ITEM=$P($G(^PRC(441,+$P($G(^RMPR(661,+$P($G(^RMPR(660,RDX,0)),U,6),0)),U,1),0)),U,2)
.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
.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
K ITEM,HCPCSD
Q
DESPR ;repair dispaly
;
;S CODE="R1"
;code is user defined
F S CODE=$O(^TMP($J,CODE)) Q:CODE["RMPR" Q:FL=1 D
.D HDR
.S RDX=0
.F S RDX=$O(^TMP($J,CODE,RDX)) D:RDX'>0 HOLD Q:RDX'>0 Q:FL=1 D
..S DFN=$P(^RMPR(660,RDX,0),U,2) Q:DFN=""
..D DEM^VADPT
..Q:FL=1
..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
..I $Y+6>IOSL,IOST'["C-" D HDR
..W !,$E($P(VADM(1),",",1),1,9)
..W ?10,$P(VADM(2),"-",3)
..S TYPE=$P(^RMPR(660,RDX,0),U,4)
..S QTY=$P(^RMPR(660,RDX,0),U,7)
..I $P(^RMPR(660,RDX,0),U,17)'="" S HCPCS="#SHIP",ITEM="SHIPPING"
..S:$G(HCPCS)'["#" HCPCS=$P(^RMPR(661.1,$P(^RMPR(660,RDX,1),U,4),0),U,1)
..S:$G(HCPCS)'["#" HCPCSD=$P(^RMPR(661.1,$P(^RMPR(660,RDX,1),U,4),0),U,2)
..I $G(HCPCS)["#" S HCPCSD="SHIPPING"
..S WHO=$$GET1^DIQ(200,$P($G(^RMPR(660,RDX,0)),U,27),1)
..S OPEN=""
..I $G(RDZ) S OPEN=$P(^RMPR(660,RDZ,0),U,12)
..I OPEN="" S OPEN="*"
..E S OPEN=" "
..S COST=^TMP($J,CODE,RDX)
..S SOURCE=$P(^RMPR(660,RDX,0),U,14)
..S DATE=$P(^RMPR(660,RDX,0),U,1),DATE=$E(DATE,4,5)_"/"_$E(DATE,6,7)
..S:$G(ITEM)'["SHIPPING" ITEM=$P(^PRC(441,$P(^RMPR(661,$P(^RMPR(660,RDX,0),U,6),0),U,1),0),U,2)
..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
..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
Q
EXIT ;
Q
;END
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRMPRN6PL 3758 printed Oct 16, 2024@18:35:45 Page 2
RMPRN6PL ;HINES/HNC -NPPD CALCULATIONS - SINGLE LINE; 02/14/98
+1 ;;3.0;PROSTHETICS;**32,34,36,51,70,72,133**;Feb 09, 1996;Build 2
+2 ;
+3 ;DBIA # 801 - for this routine, the agreement covers the field
+4 ; #.05 Short Description, file #441.
+5 ;
+6 ;DBIA #10060 - Fileman read of file #200
+7 QUIT
HOLD ;hold screen
+1 KILL DIR
IF IOST["C-"
WRITE !!
SET DIR(0)="E"
DO ^DIR
if +Y'>0
SET FL=1
+2 QUIT
HDR WRITE @IOF
SET PAGE=PAGE+1
+1 WRITE !,LN,!,CODE
+2 WRITE ?10,^TMP($JOB,"RMPRCODE",CODE)
+3 WRITE ?35,DATE(3)," - ",DATE(4)
+4 WRITE ?70,"Page: ",PAGE
+5 WRITE !,LN,!
+6 IF IOM<119
WRITE "NAME",?10,"SSN",?16,"HCPCS",?22,"QTY",?27,"TYPE",?32,"COST",?42,"DATE",?48,"ITEM",?62,"HCPCS DES",?76,"WHO",!,LN
+7 IF IOM>119
WRITE "NAME",?10,"SSN",?16,"HCPCS",?22,"QTY",?27,"TYPE",?32,"COST",?42,"DATE",?48,"ITEM",?80,"HCPCS DES",?112,"WHO",?117,"#",!,LN
+8 QUIT
DESP ;desplay detail records
+1 SET FL=""
+2 ;code is user defined
+3 ;F S CODE=$O(^TMP($J,CODE)) Q:CODE="N" G:FL=1 EXIT D
+4 DO HDR
+5 SET RDX=0
+6 FOR
SET RDX=$ORDER(^TMP($JOB,CODE,RDX))
if RDX'>0
DO HOLD
if RDX'>0
QUIT
if FL=1
QUIT
Begin DoDot:1
+7 SET DFN=$PIECE(^RMPR(660,RDX,0),U,2)
if DFN=""
QUIT
+8 DO DEM^VADPT
+9 IF $Y+6>IOSL
IF IOST["C-"
KILL DIR
WRITE !!
SET DIR(0)="E"
DO ^DIR
if +Y'>0
SET FL=1
if +Y'>0
QUIT
DO HDR
+10 IF $Y+6>IOSL
IF IOST'["C-"
DO HDR
+11 WRITE !,$EXTRACT($PIECE(VADM(1),",",1),1,9)
+12 WRITE ?10,$PIECE(VADM(2),"-",3)
+13 SET ITEM=""
SET HCPCSD=""
+14 SET TYPE=$PIECE(^RMPR(660,RDX,0),U,4)
+15 SET QTY=$PIECE(^RMPR(660,RDX,0),U,7)
+16 SET HCPCS=$PIECE($GET(^RMPR(660,RDX,1)),U,4)
+17 IF HCPCS=""&($PIECE(^RMPR(660,RDX,0),U,17)'="")
SET HCPCS=2676
SET ITEM="SHIPPING"
SET HCPCSD="SHIPPING"
+18 IF $PIECE(^RMPR(660,RDX,0),U,26)'=""
SET ITEM="PICKUP/DEL"
+19 IF HCPCSD=""
SET HCPCSD=$PIECE($GET(^RMPR(661.1,HCPCS,0)),U,2)
+20 SET HCPCS=$PIECE($GET(^RMPR(661.1,HCPCS,0)),U,1)
+21 SET WHO=$$GET1^DIQ(200,$PIECE($GET(^RMPR(660,RDX,0)),U,27),1)
+22 IF $GET(RDX)
SET OPEN=$PIECE(^RMPR(660,RDX,0),U,12)
+23 IF OPEN=""
SET OPEN="*"
+24 IF '$TEST
SET OPEN=" "
+25 SET COST=^TMP($JOB,CODE,RDX)
+26 SET SOURCE=$PIECE(^RMPR(660,RDX,0),U,14)
+27 SET DATE=$PIECE(^RMPR(660,RDX,0),U,1)
SET DATE=$EXTRACT(DATE,4,5)_"/"_$EXTRACT(DATE,6,7)
+28 IF ITEM=""
SET ITEM=$PIECE($GET(^PRC(441,+$PIECE($GET(^RMPR(661,+$PIECE($GET(^RMPR(660,RDX,0)),U,6),0)),U,1),0)),U,2)
+29 IF IOM<119
WRITE ?16,HCPCS,?22,QTY,?27,TYPE,?29,SOURCE,?32,OPEN,COST,?42,DATE,?48,$EXTRACT(ITEM,1,11),?61,"|",?62,$EXTRACT(HCPCSD,1,12),?76,WHO
+30 IF IOM>118
WRITE ?16,HCPCS,?22,QTY,?27,TYPE,?29,SOURCE,?32,OPEN,COST,?42,DATE,?48,$EXTRACT(ITEM,1,29),?79,"|",?80,$EXTRACT(HCPCSD,1,30),?112,WHO,?117,RDX
End DoDot:1
+31 KILL ITEM,HCPCSD
+32 QUIT
DESPR ;repair dispaly
+1 ;
+2 ;S CODE="R1"
+3 ;code is user defined
+4 FOR
SET CODE=$ORDER(^TMP($JOB,CODE))
if CODE["RMPR"
QUIT
if FL=1
QUIT
Begin DoDot:1
+5 DO HDR
+6 SET RDX=0
+7 FOR
SET RDX=$ORDER(^TMP($JOB,CODE,RDX))
if RDX'>0
DO HOLD
if RDX'>0
QUIT
if FL=1
QUIT
Begin DoDot:2
+8 SET DFN=$PIECE(^RMPR(660,RDX,0),U,2)
if DFN=""
QUIT
+9 DO DEM^VADPT
+10 if FL=1
QUIT
+11 IF $Y+6>IOSL
IF IOST["C-"
KILL DIR
WRITE !!
SET DIR(0)="E"
DO ^DIR
if +Y'>0
SET FL=1
if +Y'>0
QUIT
DO HDR
+12 IF $Y+6>IOSL
IF IOST'["C-"
DO HDR
+13 WRITE !,$EXTRACT($PIECE(VADM(1),",",1),1,9)
+14 WRITE ?10,$PIECE(VADM(2),"-",3)
+15 SET TYPE=$PIECE(^RMPR(660,RDX,0),U,4)
+16 SET QTY=$PIECE(^RMPR(660,RDX,0),U,7)
+17 IF $PIECE(^RMPR(660,RDX,0),U,17)'=""
SET HCPCS="#SHIP"
SET ITEM="SHIPPING"
+18 if $GET(HCPCS)'["#"
SET HCPCS=$PIECE(^RMPR(661.1,$PIECE(^RMPR(660,RDX,1),U,4),0),U,1)
+19 if $GET(HCPCS)'["#"
SET HCPCSD=$PIECE(^RMPR(661.1,$PIECE(^RMPR(660,RDX,1),U,4),0),U,2)
+20 IF $GET(HCPCS)["#"
SET HCPCSD="SHIPPING"
+21 SET WHO=$$GET1^DIQ(200,$PIECE($GET(^RMPR(660,RDX,0)),U,27),1)
+22 SET OPEN=""
+23 IF $GET(RDZ)
SET OPEN=$PIECE(^RMPR(660,RDZ,0),U,12)
+24 IF OPEN=""
SET OPEN="*"
+25 IF '$TEST
SET OPEN=" "
+26 SET COST=^TMP($JOB,CODE,RDX)
+27 SET SOURCE=$PIECE(^RMPR(660,RDX,0),U,14)
+28 SET DATE=$PIECE(^RMPR(660,RDX,0),U,1)
SET DATE=$EXTRACT(DATE,4,5)_"/"_$EXTRACT(DATE,6,7)
+29 if $GET(ITEM)'["SHIPPING"
SET ITEM=$PIECE(^PRC(441,$PIECE(^RMPR(661,$PIECE(^RMPR(660,RDX,0),U,6),0),U,1),0),U,2)
+30 IF IOM<119
WRITE ?16,HCPCS,?22,QTY,?27,TYPE,?29,SOURCE,?32,OPEN,COST,?42,DATE,?48,$EXTRACT(ITEM,1,12),?62,$EXTRACT(HCPCSD,1,12),?76,WHO
+31 IF IOM>118
WRITE ?16,HCPCS,?22,QTY,?27,TYPE,?29,SOURCE,?32,OPEN,COST,?42,DATE,?48,$EXTRACT(ITEM,1,29),?79,"|",?80,$EXTRACT(HCPCSD,1,30),?112,WHO,?117,RDX
End DoDot:2
End DoDot:1
+32 QUIT
EXIT ;
+1 QUIT
+2 ;END