source: FOIAVistA/tag/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRPCEG.m@ 1437

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1RMPRPCEG ;HCIOFO/RVD - Prosthetics/PCE GET 2319/SET ICD9; 06/28/01
2 ;;3.0;PROSTHETICS;**62**;Feb 09, 1996
3 ;
4 ;
5 ;RMDFN - IEN of the patient.
6 ;returns the IEN of patient transaction from file #660.
7G60(RMDFN) ;select the 2319 transaction.
8 D NEWVAR
9 S RMDOUT=0
10 S DIC("A")="Enter Patient Transaction for PCE Entry: "
11 S DIC("?")="Enter a 2319 transaction where this suspense entry is being closed.."
12 S DIC="^RMPR(660,",DIC(0)="AEQMN"
13 S DIC("S")="I ($P(^RMPR(660,+Y,0),U,2)=RMDFN),('$D(^RMPR(660,+Y,10)))"
14 D ^DIC
15 I $D(DTOUT)!$D(DUOUT)!$D(DIRUT) S RMDOUT=0 G GETX
16 S RMDOUT=+Y
17 S:Y<1 RMDOUT=0
18GETX ;exit
19 Q RMDOUT
20 ;
21 ;RMDFN - IEN of the patient.
22 ;returns the IEN of the Patient Suspense entry from file #668.
23G68(RMDFN) ;select the suspense transaction.
24 D NEWVAR
25 S RMDOUT=0
26AS68 W !
27 S DIC("A")="Enter Patient Suspense Entry: "
28 S DIC("?")="Enter a Suspense Entry for the Patient 2319 Record..."
29 S DIC="^RMPR(668,",DIC(0)="AEQMN"
30 S DIC("S")="I ($P(^RMPR(668,+Y,0),U,2)=RMDFN),(($P(^(0),U,10)=""O"")!($P(^(0),U,10)=""P"")),($D(^(8))),($P(^(8),U,3)),('$D(^(11)))"
31 S DIC("W")="S R8=$G(^RMPR(668,+Y,0)),RN=$E($P(^DPT(RMDFN,0),U,1),1,10) W ?38,RN,?50,$P(R8,U,10),"" DESC: "",$G(^RMPR(668,+Y,2,1,0))"
32 D ^DIC
33 I $D(DTOUT)!$D(DUOUT)!$D(DIRUT) S RMDOUT=X G G68X
34 S RMDOUT=+Y
35G68X ;exit
36 Q RMDOUT
37 ;
38SETICD ;entry for post init #62
39 W !!,"Setting ICD9 pointer in file #668:"
40 S DIE="^RMPR(668,"
41 F I=0:0 S I=$O(^RMPR(668,I)) Q:I'>0 I $D(^RMPR(668,I,8)) D
42 .S RMPR8=$G(^RMPR(668,I,8))
43 .S RI=$P(RMPR8,"^",2)
44 .Q:$P(RMPR8,"^",3)
45 .K RIC,RB,RE
46 .F K=1:1:$L(RI) S RX=$E(RI,K,K) S:RX="(" RB=K S:RX=")" RE=K I $G(RB),$G(RE) S RIC=$E(RI,RB+1,RE-1) Q:RIC>1 K RB,RE
47 .S RMIECD=""
48 .I $D(RIC),RIC'="" D
49 ..S RMIECD=$O(^ICD9("BA",RIC,0))
50 ..I '$G(RMIECD) S RMIECD=$O(^ICD9("BA",RIC_" ",0))
51 .I $G(RMIECD) S DA=I,DR="1.6////^S X=RMIECD" D ^DIE
52 .W "."
53 W !!,"DONE setting ICD9 pointer to file #668."
54 K DIE,DR,DA,RMPR8,I,K,J,RB,RE,RIC,RMIECD,RI,RX
55 I $D(^RMPR(661.1,3025,0)),$P(^RMPR(661.1,3025,0),U,1)="C1116" S $P(^RMPR(661.1,3025,0),U,8)=1
56 ;update HCPCS to a new CPT Code
57 W !!,"Updating CPT Codes.."
58 S DIE="^RMPR(661.1,"
59 F RI=1:1 Q:$P($T(TAB+RI),";",3)="END" S RD=$T(TAB+RI) D
60 .S RMHCPC=$P(RD,";",3),RMCPT=$P(RD,";",5)
61 .S DA=$P(RD,";",4)
62 .I RMHCPC'=$P(^RMPR(661.1,DA,0),U,1) W !!,"** HCPCS ",RMHCPC," has incorrect IEN in file #661.1, please investigate!!!" Q
63 .S DR="2///^S X=RMCPT"
64 .D ^DIE
65 K DA,DIE,DR,RMHCPC,RMCPT,RI
66 W !!,"Done Updating CPT Codes!!",!
67 Q
68 ;
69TAB ;list of HCPCS need to be updated.
70 ;;K0280;1389;105120
71 ;;E0240;2051;101067
72 ;;A9010;2429;103242
73 ;;A9040;2524;103356
74 ;;A9070;2525;101873
75 ;;SI102;2806;105228
76 ;;SI103;2807;105357
77 ;;SI213;2836;105126
78 ;;SI302;2848;104713
79 ;;SI303;2849;104713
80 ;;SI304;2850;104713
81 ;;SI305;2851;104713
82 ;;SI306;2852;104713
83 ;;SI405;2859;104713
84 ;;SI516;2881;105799
85 ;;SI517;2882;105800
86 ;;SI518;2883;105799
87 ;;SI519;2884;105357
88 ;;SI199;2902;104713
89 ;;SI299;2903;104713
90 ;;SI399;2904;104713
91 ;;SI499;2905;104713
92 ;;SI599;2906;104713
93 ;;END
94 ;
95NEWVAR N DA,DIE,DIC,Y,R8
96 Q
Note: See TracBrowser for help on using the repository browser.