source: FOIAVistA/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPR29L2.m@ 729

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

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1RMPR29L2 ;HOIFO/SPS - WORK ORDER HRS/RATE GRID OWL PROGRAM ;11/8/05 07:12
2 ;;3.0;PROSTHETICS;**75**;Feb 09, 1996;Build 25
3 ;
4 ;
5A1(RMPR6642) ;entry point for testing
6 D A2
7 Q
8EN(RESULT,RMPR6642) ; -- Broker callback to get list to display
9A2 ;
10 S DATE=2010101,CNT=0
11 K ^TMP($J)
12 I '$D(^RMPR(664.2,RMPR6642,0)) Q
13 S RM660=$P(^RMPR(664.2,RMPR6642,0),U,2)
14 I +RM660'>0 S RESULTS=1_"No Appliance/Repair record for this work order" Q
15 D REC
16 G EXIT
17 Q
18 K DATE,RESULTS,RM660,RMDTE
19REC ;records to grid
20 ;
21 ;
22 N DIC,DIQ,DR,STOPDT
23 ;
24 ;Get Work Order Labor Data and add to array
25 S RMIE3="",RMIE33=0
26 F S RMIE3=$O(^RMPR(664.3,"C",RM660,RMIE3)) Q:RMIE3="" D
27 . Q:'$D(^RMPR(664.3,RMIE3,0))
28 . S RMDT=$P(^RMPR(664.3,RMIE3,0),U)
29 . S RMDTE=$$DAT2^RMPRUTL1(RMDT)
30 . S CNT=0
31 . F S RMIE33=$O(^RMPR(664.3,RMIE3,1,RMIE33)) Q:RMIE33="" D
32 .. Q:'$D(^RMPR(664.3,RMIE3,1,RMIE33,0))
33 .. S RMPAI=$P(^RMPR(664.3,RMIE3,1,RMIE33,0),U,1)
34 .. S RMPAE=$$EXTERNAL^DILFD(664.33,.01,"",RMPAI)
35 .. S RMHR=$P(^RMPR(664.3,RMIE3,1,RMIE33,0),U,2),RMRT=$P(^(0),U,3)
36 .. S CNT=CNT+1
37 .. S ^TMP($J,"RMLH",RMDT,CNT)=0_U_RMDTE_U_RMPAE_U_RMHR_U_RMRT_U_RMPR6642_U_RMPAI_U_RMIE3_U_RMIE33
38 K CNT,RMIE3,RMIE33,RMDT,RMPAI,RMPAE,RMHR,RMRT
39 ;PUT RESULTS IN GLOBAL!!
40 Q
41EXIT ;common exit point
42 S RESULT=$NA(^TMP($J))
43 Q
Note: See TracBrowser for help on using the repository browser.