RMPRPAT6 ;PHX/JLT-DISPLAY JOB RECORD INFO ;10/19/1993
;;3.0;PROSTHETICS;;Feb 09, 1996
S (PAGE,MC,LC,TMC,TLC)=0 D HDR^RMPR29W(RJDA)
ITD G:($Y+6>IOSL) MORE D ITM S RMPRWO=$P(RCK(RI),U,3)
TCH G:'$D(TECH(RMPRWO))!($O(TECH(RMPRWO,0))'>0) MU S RTCD=$O(TECH(RMPRWO,0))
G:($Y+6>IOSL) MORE S RTC=$O(TECH(RMPRWO,RTCD,664.33,0)) I RTC D TDSP G TCH
MU G:($Y+6>IOSL) MORE I $D(TMP(RMPRWO,664.22)) S RJ=$O(TMP(RMPRWO,664.22,0)) I RJ D MDSP G MU
EXT G:($Y+6>IOSL) MORE S RW=$O(^UTILITY($J,"TEXT",RMPRWO,0)) I RW D WDSP G EXT
W !,RMPR("L")
MORE ;DISPLAY MORE INFO
I IOST["C-" I $Y<21 F W ! Q:$Y>21
I IOST["C-" W $C(7) R X:DTIME I '$T G EXIT
S RMPRWO=$P(RCK(RI),U,3)
I $D(^UTILITY($J,"TEXT",RMPRWO)) S RMPRWZ=1
I $D(TECH(RMPRWO)) S RMPRTZ=1
I $D(TMP(RMPRWO,664.22)) S RMPRIZ=1
I $D(RMPRTZ) K RMPRTZ,RMPRIZ,RMPRCZ,RMPRWZ D HDR^RMPR29W(RJDA),ITM G TCH
I $D(RMPRIZ) K RMPRIZ,RMPRCZ,RMPRWZ D HDR^RMPR29W(RJDA),ITM G MU
I $D(RMPRWZ) K RMPRWZ,RMPRCZ D HDR^RMPR29W(RJDA),ITM G EXT
G EXIT
ITM ;DISPLAY ITEM
W !,"JOB#:",?6,"("_RI_")",?10,"ITM#: "_$P(RCK(RI),U),?25,$E(^UTILITY("DIQ1",$J,664.16,$P(RCK(RI),U,4),.01),1,25),?54,"DATE MEASURED: "_$$FMTE^XLFDT(^UTILITY("DIQ1",$J,664.2,$P(RCK(RI),U,3),10,"I"),2)
W !,"DATE COMPLETED: "_$$FMTE^XLFDT(^UTILITY("DIQ1",$J,664.2,$P(RCK(RI),U,3),8,"I"),2)
W ?25,"COMPLETED BY: "_$E(^UTILITY("DIQ1",$J,664.2,$P(RCK(RI),U,3),9,"E"),1,14),?54,"CHECKED BY: "_$E(^UTILITY("DIQ1",$J,664.2,$P(RCK(RI),U,3),11,"E"),1,14),!
D AMC^RMPR293
Q
MDSP ;DISPLAY MATERIALS
W !,"MATERIALS:",?15,$E(TMP(RMPRWO,664.22,RJ,.01),1,20),?37,TMP(RMPRWO,664.22,RJ,1),?42,TMP(RMPRWO,664.22,RJ,6),?47,$E(TMP(RMPRWO,664.22,RJ,3),1),?53,$J(TMP(RMPRWO,664.22,RJ,2),7,2)
S MC=TMP(RMPRWO,664.22,RJ,1)*TMP(RMPRWO,664.22,RJ,2),TMC=TMC+MC W ?64,"TOTAL:",?69,$J(MC,10,2) K TMP(RMPRWO,664.22,RJ)
I $G(TMP(RMPRWO,664.22,RJ,10))'="" S RVA=$O(^RMPR(660,"E",TMP(RMPRWO,664.22,RJ,10),0)) I $D(^RMPR(660,+RVA,0)) S RDEL=$P(^(0),U,12) W !,?15,TMP(RMPRWO,664.22,RJ,10),?37,"DATE DELIVERED: ",?53,$$FMTE^XLFDT(RDEL,2)
K TMP(RMPRWO,664.22,RJ) Q
TDSP ;DISPLAY TECHNICIAN
W !,$$FMTE^XLFDT(RTCD,2)
W ?15,$E(TECH(RMPRWO,RTCD,664.33,RTC,.01,"E"),1,20),?37,"HRS",?42,TECH(RMPRWO,RTCD,664.33,RTC,1,"E"),?47,"RATE:"
S RTR=$P($G(^RMPR(669.2,TECH(RMPRWO,RTCD,664.33,RTC,.01,"I"),0)),U,3) W ?53,$J(RTR,7,0) S LC=TECH(RMPRWO,RTCD,664.33,RTC,1,"I")*RTR,TLC=TLC+LC
W ?64,"TOTAL:",$J(LC,10,2) K TECH(RMPRWO,RTCD,664.33,RTC) S RTHD=RTCD
Q
WDSP ;DISPLAY REMARKS FIELD
W !,^UTILITY($J,"TEXT",RMPRWO,RW) K ^UTILITY($J,"TEXT",RMPRWO,RW),RR Q
EXIT ;EXIT ROUTINE
W !,?45,"TOTAL LABOR COST: ",?69,$J(TLC,10,2)
W !,?45,"TOTAL MATERIAL COST:",?69,$J(TMC,10,2)
W !,?45,"TOTAL COST",?69,$J(TLC+TMC,10,2)
R !,"Press any key to continue ",CONT:DTIME
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRMPRPAT6 2768 printed Dec 13, 2024@02:35:41 Page 2
RMPRPAT6 ;PHX/JLT-DISPLAY JOB RECORD INFO ;10/19/1993
+1 ;;3.0;PROSTHETICS;;Feb 09, 1996
+2 SET (PAGE,MC,LC,TMC,TLC)=0
DO HDR^RMPR29W(RJDA)
ITD if ($Y+6>IOSL)
GOTO MORE
DO ITM
SET RMPRWO=$PIECE(RCK(RI),U,3)
TCH if '$DATA(TECH(RMPRWO))!($ORDER(TECH(RMPRWO,0))'>0)
GOTO MU
SET RTCD=$ORDER(TECH(RMPRWO,0))
+1 if ($Y+6>IOSL)
GOTO MORE
SET RTC=$ORDER(TECH(RMPRWO,RTCD,664.33,0))
IF RTC
DO TDSP
GOTO TCH
MU if ($Y+6>IOSL)
GOTO MORE
IF $DATA(TMP(RMPRWO,664.22))
SET RJ=$ORDER(TMP(RMPRWO,664.22,0))
IF RJ
DO MDSP
GOTO MU
EXT if ($Y+6>IOSL)
GOTO MORE
SET RW=$ORDER(^UTILITY($JOB,"TEXT",RMPRWO,0))
IF RW
DO WDSP
GOTO EXT
+1 WRITE !,RMPR("L")
MORE ;DISPLAY MORE INFO
+1 IF IOST["C-"
IF $Y<21
FOR
WRITE !
if $Y>21
QUIT
+2 IF IOST["C-"
WRITE $CHAR(7)
READ X:DTIME
IF '$TEST
GOTO EXIT
+3 SET RMPRWO=$PIECE(RCK(RI),U,3)
+4 IF $DATA(^UTILITY($JOB,"TEXT",RMPRWO))
SET RMPRWZ=1
+5 IF $DATA(TECH(RMPRWO))
SET RMPRTZ=1
+6 IF $DATA(TMP(RMPRWO,664.22))
SET RMPRIZ=1
+7 IF $DATA(RMPRTZ)
KILL RMPRTZ,RMPRIZ,RMPRCZ,RMPRWZ
DO HDR^RMPR29W(RJDA)
DO ITM
GOTO TCH
+8 IF $DATA(RMPRIZ)
KILL RMPRIZ,RMPRCZ,RMPRWZ
DO HDR^RMPR29W(RJDA)
DO ITM
GOTO MU
+9 IF $DATA(RMPRWZ)
KILL RMPRWZ,RMPRCZ
DO HDR^RMPR29W(RJDA)
DO ITM
GOTO EXT
+10 GOTO EXIT
ITM ;DISPLAY ITEM
+1 WRITE !,"JOB#:",?6,"("_RI_")",?10,"ITM#: "_$PIECE(RCK(RI),U),?25,$EXTRACT(^UTILITY("DIQ1",$JOB,664.16,$PIECE(RCK(RI),U,4),.01),1,25),?54,"DATE MEASURED: "_$$FMTE^XLFDT(^UTILITY("DIQ1",$JOB,664.2,$PIECE(RCK(RI),U,3),10,"I"),2)
+2 WRITE !,"DATE COMPLETED: "_$$FMTE^XLFDT(^UTILITY("DIQ1",$JOB,664.2,$PIECE(RCK(RI),U,3),8,"I"),2)
+3 WRITE ?25,"COMPLETED BY: "_$EXTRACT(^UTILITY("DIQ1",$JOB,664.2,$PIECE(RCK(RI),U,3),9,"E"),1,14),?54,"CHECKED BY: "_$EXTRACT(^UTILITY("DIQ1",$JOB,664.2,$PIECE(RCK(RI),U,3),11,"E"),1,14),!
+4 DO AMC^RMPR293
+5 QUIT
MDSP ;DISPLAY MATERIALS
+1 WRITE !,"MATERIALS:",?15,$EXTRACT(TMP(RMPRWO,664.22,RJ,.01),1,20),?37,TMP(RMPRWO,664.22,RJ,1),?42,TMP(RMPRWO,664.22,RJ,6),?47,$EXTRACT(TMP(RMPRWO,664.22,RJ,3),1),?53,$JUSTIFY(TMP(RMPRWO,664.22,RJ,2),7,2)
+2 SET MC=TMP(RMPRWO,664.22,RJ,1)*TMP(RMPRWO,664.22,RJ,2)
SET TMC=TMC+MC
WRITE ?64,"TOTAL:",?69,$JUSTIFY(MC,10,2)
KILL TMP(RMPRWO,664.22,RJ)
+3 IF $GET(TMP(RMPRWO,664.22,RJ,10))'=""
SET RVA=$ORDER(^RMPR(660,"E",TMP(RMPRWO,664.22,RJ,10),0))
IF $DATA(^RMPR(660,+RVA,0))
SET RDEL=$PIECE(^(0),U,12)
WRITE !,?15,TMP(RMPRWO,664.22,RJ,10),?37,"DATE DELIVERED: ",?53,$$FMTE^XLFDT(RDEL,2)
+4 KILL TMP(RMPRWO,664.22,RJ)
QUIT
TDSP ;DISPLAY TECHNICIAN
+1 WRITE !,$$FMTE^XLFDT(RTCD,2)
+2 WRITE ?15,$EXTRACT(TECH(RMPRWO,RTCD,664.33,RTC,.01,"E"),1,20),?37,"HRS",?42,TECH(RMPRWO,RTCD,664.33,RTC,1,"E"),?47,"RATE:"
+3 SET RTR=$PIECE($GET(^RMPR(669.2,TECH(RMPRWO,RTCD,664.33,RTC,.01,"I"),0)),U,3)
WRITE ?53,$JUSTIFY(RTR,7,0)
SET LC=TECH(RMPRWO,RTCD,664.33,RTC,1,"I")*RTR
SET TLC=TLC+LC
+4 WRITE ?64,"TOTAL:",$JUSTIFY(LC,10,2)
KILL TECH(RMPRWO,RTCD,664.33,RTC)
SET RTHD=RTCD
+5 QUIT
WDSP ;DISPLAY REMARKS FIELD
+1 WRITE !,^UTILITY($JOB,"TEXT",RMPRWO,RW)
KILL ^UTILITY($JOB,"TEXT",RMPRWO,RW),RR
QUIT
EXIT ;EXIT ROUTINE
+1 WRITE !,?45,"TOTAL LABOR COST: ",?69,$JUSTIFY(TLC,10,2)
+2 WRITE !,?45,"TOTAL MATERIAL COST:",?69,$JUSTIFY(TMC,10,2)
+3 WRITE !,?45,"TOTAL COST",?69,$JUSTIFY(TLC+TMC,10,2)
+4 READ !,"Press any key to continue ",CONT:DTIME
+5 QUIT