source: FOIAVistA/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPR29BG.m@ 897

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

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1RMPR29BG ;OI-HINES/SPS -OWL BASE HCPCS ENTER/EDIT/DELETE RPC;12/27/2004
2 ;;3.0;PROSTHETICS;**75,142**;Feb 09, 1996;Build 2
3A1(RMAED,RMPRSITE,RMIE1,RMIE16,RMITM,RMQTY,RMUI,RMTT,RMPC,RMSN,RMHCPC,RMCPTM,RMVEN) ;roll and scroll entry point
4 G A2
5EN(RESULTS,RMAED,RMPRSITE,RMIE1,RMIE16,RMITM,RMQTY,RMUI,RMTT,RMPC,RMSN,RMHCPC,RMCPTM,RMVEN,RMBD,RMHTECH,RMPRTXT) ;RPC entry point
6A2 ;
7 N J,L,RESULTS,RMIE16C,RMIE16F,R6641,RSITE
8 S RESULTS(0)=""
9 K ^TMP($J)
10 ; If no Tech assigned then self assign here
11 I +$P(^RMPR(664.1,RMIE1,0),U,16)'>0 S $P(^(0),U,16)=DUZ,$P(^(0),U,17)="A",$P(^(7),U,1)=DT,$P(^(7),U,3)=DUZ
12 ;
13 I RMAED="D" G DEL
14 ;
15 S RMERR=0
16 S ^TMP("SPS",0)=RMAED_U_RMPRSITE_U_RMIE1_U_RMIE16_U_RMITM_U_RMQTY_U_RMUI_U_RMTT_U_RMPC_U_RMSN_U_RMHCPC_U_RMCPTM_U_RMVEN
17 S RMIE16F=$O(^RMPR(664.1,RMIE1,2,0))
18 S R6641=$G(^RMPR(664.1,RMIE1,0))
19 S RSITE=$P(R6641,U,15),RSITE=$O(^RMPR(669.9,"C",RSITE,0))
20 I RSITE'=RMPRSITE S RMPRSITE=RSITE
21 I RMIE16F>0 S:RMIE16'=RMIE16F RMTT=$P(^RMPR(664.1,RMIE1,2,RMIE16F,0),U,7),RMPC=$P(^(0),U,8)
22 I RMIE16=RMIE16F D:RMTT'=$P(^RMPR(664.1,RMIE1,2,RMIE16F,0),U,7)!(RMPC'=$P(^(0),U,8))
23 . S RMIE16C="" F S RMIE16C=$O(^RMPR(664.1,RMIE1,2,RMIE16C)) Q:RMIE16C="" D
24 .. Q:RMIE16C=RMIE16
25 .. Q:'$D(^RMPR(664.1,RMIE1,2,RMIE16C,0))
26 .. S $P(^RMPR(664.1,RMIE1,2,RMIE16C,0),U,7)=RMTT
27 .. S $P(^RMPR(664.1,RMIE1,2,RMIE16C,0),U,8)=RMPC
28 I RMIE16="" S RMIE16="+1,"_RMIE1
29 E S RMIE16E=RMIE16,RMIE16=RMIE16_","_RMIE1
30 S RMDAT(664.16,RMIE16_",",.01)=RMITM
31 S RMDAT(664.16,RMIE16_",",2)=RMQTY
32 S RMDAT(664.16,RMIE16_",",3)=RMUI
33 S RMDAT(664.16,RMIE16_",",6.5)=RMBD
34 S RMDAT(664.16,RMIE16_",",8)=RMTT
35 S RMDAT(664.16,RMIE16_",",9)=RMPC
36 S RMDAT(664.16,RMIE16_",",12)=RMSN
37 S RMDAT(664.16,RMIE16_",",13)=RMHCPC
38 S RMDAT(664.16,RMIE16_",",13.1)=RMCPTM
39 S RMDAT(664.16,RMIE16_",",13.2)=RMHTECH
40 S RMDAT(664.16,RMIE16_",",15)=RMVEN
41 D UPDATE^DIE("","RMDAT","RMIEN","RMERROR")
42 L -^RMPR(664.1,RMIE1)
43 I $D(RMERROR) S RMERR=1 G ERR
44 S J=""
45 F S J=$O(RMPRTXT(J)) Q:J="" D
46 . S L=J+1,RMPRTXTF(L)=RMPRTXT(J)
47 I '$D(RMIEN(1)) S RMIEN(1)=RMIE16E
48 D WP^DIE(664.16,RMIEN(1)_","_RMIE1_",",7,,"RMPRTXTF","RMWPERR")
49 I $D(RMWPERR) S ^TMP("SPS","WP")=RMWPERR("DIERR","1","TEXT","1")
50 ;
51 S RMPRDA=RMIE1 D INF^RMPRSIT,POST^RMPR29GA
52QUIT K RMAED,RMBD,RMTECH,RMDAT,RMIE16E,RMIE2,RMPRDA,RMPRTXT,RMPRTXTF,RMERROR
53 K RMERR,RMAED,RMPRSITE,RMIE1,RMIE16,RMIEN,RMITM,RMQTY,RMUI,RMTT,RMPC
54 K RMSN,RMHCPC,RMCPTM,RMVEN,RMWPERR,RMHTK
55 Q
56ERR S RESUTLS(0)=1_RMERROR("DIERR",1,"TEXT",1)
57 S ^TMP("SPS",1)=1_RMERROR("DIERR",1,"TEXT",1)
58 G QUIT
59 Q
60DEL ;
61 S DA=$P(^RMPR(664.1,RMIE1,2,RMIE16,0),U,5)
62 I DA'="" D
63 . S DIK="^RMPR(660," D ^DIK
64 . K DA,DIK
65 S DA=$P(^RMPR(664.1,RMIE1,2,RMIE16,0),U,6)
66 I DA'="" D
67 . S DIK="^RMPR(664.2," D ^DIK
68 . K DA,DIK
69 S DA(1)=RMIE1,DA=RMIE16,DIK="^RMPR(664.1,"_DA(1)_",2," D ^DIK
70 K DA,DIK
71 S RMPRDA=RMIE1 D INF^RMPRSIT,POST^RMPR29GA
72 L -^RMPR(664.1,RMIE1)
73 G QUIT
74 Q
75EN1(RESULTS,DA) ;Broker entry to kill WO
76 ;DA is passed
77 S DIK="^RMPR(664.1," D ^DIK
78 K DIK
79 Q
Note: See TracBrowser for help on using the repository browser.