Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RMPR29L2

RMPR29L2.m

Go to the documentation of this file.
RMPR29L2 ;HOIFO/SPS -  WORK ORDER HRS/RATE GRID OWL PROGRAM ;11/8/05  07:12
 ;;3.0;PROSTHETICS;**75**;Feb 09, 1996;Build 25
 ;
 ;
A1(RMPR6642) ;entry point for testing
 D A2
 Q
EN(RESULT,RMPR6642) ; -- Broker callback to get list to display
A2 ;
 S DATE=2010101,CNT=0
 K ^TMP($J)
 I '$D(^RMPR(664.2,RMPR6642,0)) Q
 S RM660=$P(^RMPR(664.2,RMPR6642,0),U,2)
 I +RM660'>0 S RESULTS=1_"No Appliance/Repair record for this work order" Q
 D REC
 G EXIT
 Q
 K DATE,RESULTS,RM660,RMDTE
REC ;records to grid
 ;
 ;
 N DIC,DIQ,DR,STOPDT
 ;
 ;Get Work Order Labor Data and add to array
 S RMIE3="",RMIE33=0
 F  S RMIE3=$O(^RMPR(664.3,"C",RM660,RMIE3)) Q:RMIE3=""  D
 . Q:'$D(^RMPR(664.3,RMIE3,0))
 . S RMDT=$P(^RMPR(664.3,RMIE3,0),U)
 . S RMDTE=$$DAT2^RMPRUTL1(RMDT)
 . S CNT=0
 . F  S RMIE33=$O(^RMPR(664.3,RMIE3,1,RMIE33)) Q:RMIE33=""  D
 .. Q:'$D(^RMPR(664.3,RMIE3,1,RMIE33,0))
 .. S RMPAI=$P(^RMPR(664.3,RMIE3,1,RMIE33,0),U,1)
 .. S RMPAE=$$EXTERNAL^DILFD(664.33,.01,"",RMPAI)
 .. S RMHR=$P(^RMPR(664.3,RMIE3,1,RMIE33,0),U,2),RMRT=$P(^(0),U,3)
 .. S CNT=CNT+1
 .. S ^TMP($J,"RMLH",RMDT,CNT)=0_U_RMDTE_U_RMPAE_U_RMHR_U_RMRT_U_RMPR6642_U_RMPAI_U_RMIE3_U_RMIE33
 K CNT,RMIE3,RMIE33,RMDT,RMPAI,RMPAE,RMHR,RMRT
 ;PUT RESULTS IN GLOBAL!!
 Q
EXIT ;common exit point
 S RESULT=$NA(^TMP($J))
 Q