42 lines
2.9 KiB
Mathematica
42 lines
2.9 KiB
Mathematica
RMPR71 ;PHX/JLT-CALCULATE AND PRINT 2927a ;10/01/1994
|
|
;;3.0;PROSTHETICS;**2**;Feb 09, 1996
|
|
S (PAGE,TCI,TSC,TNSC,TCM,TCLH,TCLM,TCLHM,TCLC,TBI,TBH,TBM,TBC)=0
|
|
D DIS Q
|
|
HDR ;PRINT WORKSHEETS
|
|
W @IOF W !,?3,"WORKSHEET FOR ORTHOTICS LABORATORY OR RESTORATIONS CLINIC REPORT",?69,"PAGE: " S PAGE=PAGE+1 W PAGE K RL S $P(RL,"-",IOM)="" W !,RL
|
|
W !,"|IDENTIFICATION DATA",?21,"| APPLIANCES/SERVICES COMPLETED",?61,"| BACKLOG",?79,"|" K RL S $P(RL,"-",IOM)="" W !,RL
|
|
W !,$$STAN^RMPR31U(RMPR("STA"))_"_"_$P(CODE,U)_"_"_$P($G(^RMPR(663,+$P(CODE,U,2),0)),U)
|
|
W ?22,"#",?27,"PATIENTS",?37,"MATERIAL",?48,"LBR",?56,"LBR",?62,"#",?67,"LBR",?74,"COSTS"
|
|
W !,"REQUEST",?9,"WORK",?17,"REQ",?22,"ITM",?27,"SC",?31,"NSC",?39,"COST",?48,"HRS",?56,"COST",?62,"ITM",?67,"HRS",?73,"CHARGED"
|
|
W !,"DATE",?9,"ORDER",?17,"STA",?22,"(1)",?27,"(2)",?31,"(3)",?40,"(4)",?48,"(5)",?57,"(6)",?62,"(7)",?67,"(8)",?75,"(9)" K RL S $P(RL,"-",IOM)="" W !,RL
|
|
Q
|
|
TOT ;TOTALS
|
|
I IOST["C-" I $Y<15 F W ! Q:$Y>14
|
|
I IOST'["C-" I $Y<53 F W ! Q:$Y>53
|
|
W !,?12,"TOTALS: ",?23,TCI,?27,TSC,?31,TNSC,?33,$J(TCM,10,2)
|
|
W ?46,TCLHM
|
|
W ?50,$J(TCLC,10,2),?63,TBI,?65
|
|
W:TBM'<60 $J(TBH+$P(TBM/60,".")_"."_$S(TBM#60>9:TBM#60,1:"0"_TBM#60),5,2)
|
|
W:TBM<60 $J(TBH_"."_$S(TBM>9:TBM,1:"0"_TBM),5,2) W ?70,$J(TBC,10,2)
|
|
K RL S $P(RL,"-",IOM)="" W !,RL
|
|
W !,"Period Covered",?22,"Name of Item",?59,"Segment No.",?71,"Item No." K RL S $P(RL,"-",IOM)="" W !,RL
|
|
W !,$$FMTE^XLFDT(DATE(1),2)_" TO "_$$FMTE^XLFDT(DATE(2),2),?22,$P($G(^RMPR(663,+$P(CODE,U,2),0)),U,3),?62,$P(CODE,U),?73,$P($G(^RMPR(663,+$P(CODE,U,2),0)),U)
|
|
I IOST["C-" S DIR(0)="E" D ^DIR I X="^" S RMPROUT=1
|
|
S (PAGE,TCI,TSC,TNSC,TCM,TCLH,TCLM,TCLC,TCLHM,TBI,TBH,TBM,TBC)=0
|
|
Q
|
|
DIS S (RMPRWO,CODE)="" F S CODE=$O(^TMP($J,CODE)) Q:CODE=""!$D(RMPROUT) D HDR F RMPRDT=0:0 S RMPRDT=$O(^TMP($J,CODE,RMPRDT)) D:RMPRDT'>0 TOT Q:RMPRDT'>0!$D(RMPROUT) F S RMPRWO=$O(^TMP($J,CODE,RMPRDT,RMPRWO)) Q:RMPRWO=""!$D(RMPROUT) D
|
|
.I $Y+4>IOSL,IOST["C-" S DIR(0)="E" D ^DIR S:X="^" RMPROUT=1 Q:X="^" D HDR
|
|
.S RDATA=^TMP($J,CODE,RMPRDT,RMPRWO)
|
|
.W !,$$FMTE^XLFDT(RMPRDT,2),?9,$P(RMPRWO,"-",4)_"-"_$P(RMPRWO,"-",5),?17,$$STAN^RMPR31U($P(RDATA,U)),?23,$P(RDATA,U,2),?27,$P(RDATA,U,3),?31,$P(RDATA,U,4)
|
|
.N RMPRHRS
|
|
.S RMPRHRS=$P(RDATA,U,6)_"."_$P(RDATA,U,7)
|
|
.W ?35,$J($P(RDATA,U,5),8,2)
|
|
.W ?46,$J(RMPRHRS,5,2)
|
|
.W ?52,$J($P(RDATA,U,8),8,2),?63,$P(RDATA,U,9)
|
|
.W ?65 W:$P(RDATA,U,11)'<60 $J($P(RDATA,U,10)+$P($P(RDATA,U,11)/60,".")_"."_$S($P(RDATA,U,11)#60>9:($P(RDATA,U,11)#60),1:"0"_($P(RDATA,U,11)#60)),5,2)
|
|
.W:$P(RDATA,U,11)<60 $J($P(RDATA,U,10)_"."_$S($P(RDATA,U,11)>9:$P(RDATA,U,11),1:"0"_$P(RDATA,U,11)),5,2)
|
|
.W ?72,$J($P(RDATA,U,12),8,2)
|
|
.S TCI=TCI+$P(RDATA,U,2),TSC=TSC+$P(RDATA,U,3),TNSC=TNSC+$P(RDATA,U,4),TCM=TCM+$P(RDATA,U,5),TCLH=TCLH+$P(RDATA,U,6),TCLM=TCLM+$P(RDATA,U,7),TCLHM=TCLHM+($P(RDATA,U,6)_"."_$P(RDATA,U,7))
|
|
.S TCLC=TCLC+$P(RDATA,U,8),TBI=TBI+$P(RDATA,U,9),TBH=TBH+$P(RDATA,U,10),TBM=TBM+$P(RDATA,U,11),TBC=TBC+$P(RDATA,U,12)
|
|
.Q
|