RMPRCPT9 ;HIN/RVD-(2529-3) CPT MODIFIER UTILITY ;11/5/99
;;3.0;PROSTHETICS;**41,69**;Feb 09, 1996
;
;RVD 5/14/03 patch #69 - changed GX modifier to GY.
;process CPT field
;Set variable RMCPT for all valid CPT modifier.
Q:'$D(X)
N DIR,RM6611,RMCPT1,RMCPSO,RMCP0,RMCP4,RMCRF,RMCBW,RMCPT5,RMHCPCS,RMCP11,RMCLEN,DIROUT,DTOUT,DUOUT
S RM6611=X
K RMCPT1,X
S RMCP4=$G(^RMPR(661.1,RM6611,4))
S RMCP11=$G(^RMPR(661.1,RM6611,0))
S RMCP5=$G(^RMPR(661.1,RM6611,5))
S RMCRF=$P(RMCP5,U,1)
S (RMCPT1,RMCPHC)=$P(RMCP4,U,1),RMCPT=""
S RMHCPCS=$P(RMCP11,U,1),RMCPHC2=$E(RMHCPCS,1,2)
S RMCPSO="V"
;set CPT MODIFIER field in 664.1 to null if HCPCS has no CPT modifier.
I RMCPT1="" S $P(^RMPR(664.1,DA(1),2,DA,2),U,2)=RMCPT,X=RM6611 G KILL
;next code will be used for different CPT Modifiers.
;G:$D(D6I) QH
I (RMCPT1["LT"),(RMCPT1["RT") D LRT G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
I (RMCPT1["KM"),(RMCPT1["KN") D KMN G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
I RMCPT1["RR",$G(RMCRF) D RR G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
I RMCPT1["RP" D RP G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
I RMCPT1["PL" D PL G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
I RMCPT1["UE" D UE G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
I RMCPT1["NU" D NU G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
I (RMCPT1["GY") D GY
I (RMCPT1["QH") D QH
I RMCPT1["KA" D KA
EXIT ;CLEAN-UP
S RMCLEN=$L(RMCPT),RMCPT=$E(RMCPT,1,RMCLEN-1)
S $P(^RMPR(664.1,DA(1),2,DA,2),U,2)=RMCPT,X=RM6611
KILL K DIR,RM6611,RMCPT1,RMCPSO,RMCP0,RMCP4,RMCRF,RMCBW,RMCPT5,RMHCPCS,RMCP11,RMCLEN,RMCP5,RMCPHC2,RMCPHC
Q
LRT ;prompt for LEFT OR RIGHT CPT modifier
K DIR
S DIR(0)="SBO^LT:Left;RT:Right;B:Both Left and Right"
S DIR("A")="Enter a CPT MODIFIER for HCPCS "_RMHCPCS
D ^DIR I $D(DUOUT)!$D(DTOUT)!($D(Y)&(Y="")) W !,"This is a required field!!!" G LRT
I Y="B" S Y="LT,RT"
S RMCPT=RMCPT_Y_","
Q
;
KMN ;prompt for new impression/moulage or previous master model.
K DIR
S DIR(0)="SBO^KM:new impression/moulage;KN:previous master model"
S DIR("A")="Enter a CPT MODIFIER for HCPCS "_RMHCPCS
D ^DIR I $D(DUOUT)!$D(DTOUT)!($D(Y)&(Y="")) W !,"This is a required field!!!" G KMN
S RMCPT=RMCPT_Y_","
Q
;
RR ;Append "RR" cpt modifier"
S DIR(0)="Y"
S DIR("A")="Is this RENTAL "
S DIR("?")="Enter 'Y for YES' or 'N for NO' ",DIR("B")="Y"
D ^DIR K DIR I $D(DUOUT)!$D(DTOUT) W !,"This is a required field!!!" G RR
S:$G(Y) RMCPT=RMCPT_"RR,"
Q
;
RP ;append "RP" cpt modifier.
I $D(RMTYPE),((RMTYPE="R")!(RMTYPE="X")) S RMCPT=RMCPT_"RP,"
Q
;
UE ;append "UE" cpt modifier.
I RMCPSO="V" S RMCPT=RMCPT_"UE,"
Q
;
NU ;append "NU" cpt modifier.
I (RMCPSO="C"),(RMCPT'["RR") S RMCPT=RMCPT_"NU,"
Q
;
QH ;append "QH" CPT modifier for Home Oxygen.
S RMCPT=RMCPT_"QH,"
Q
;
PL ;Append PL cpt modifier.
S RMCPT=RMCPT_"PL,"
Q
;
KA ;Append KA cpt modifier for HCPCS that contains wheelchair accessories.
S RMCPT=RMCPT_"KA,"
Q
;
GY ;Append GY CPT Modifier.
S RMCPT=RMCPT_"GY,"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRMPRCPT9 2998 printed Dec 13, 2024@02:34:06 Page 2
RMPRCPT9 ;HIN/RVD-(2529-3) CPT MODIFIER UTILITY ;11/5/99
+1 ;;3.0;PROSTHETICS;**41,69**;Feb 09, 1996
+2 ;
+3 ;RVD 5/14/03 patch #69 - changed GX modifier to GY.
+4 ;process CPT field
+5 ;Set variable RMCPT for all valid CPT modifier.
+6 if '$DATA(X)
QUIT
+7 NEW DIR,RM6611,RMCPT1,RMCPSO,RMCP0,RMCP4,RMCRF,RMCBW,RMCPT5,RMHCPCS,RMCP11,RMCLEN,DIROUT,DTOUT,DUOUT
+8 SET RM6611=X
+9 KILL RMCPT1,X
+10 SET RMCP4=$GET(^RMPR(661.1,RM6611,4))
+11 SET RMCP11=$GET(^RMPR(661.1,RM6611,0))
+12 SET RMCP5=$GET(^RMPR(661.1,RM6611,5))
+13 SET RMCRF=$PIECE(RMCP5,U,1)
+14 SET (RMCPT1,RMCPHC)=$PIECE(RMCP4,U,1)
SET RMCPT=""
+15 SET RMHCPCS=$PIECE(RMCP11,U,1)
SET RMCPHC2=$EXTRACT(RMHCPCS,1,2)
+16 SET RMCPSO="V"
+17 ;set CPT MODIFIER field in 664.1 to null if HCPCS has no CPT modifier.
+18 IF RMCPT1=""
SET $PIECE(^RMPR(664.1,DA(1),2,DA,2),U,2)=RMCPT
SET X=RM6611
GOTO KILL
+19 ;next code will be used for different CPT Modifiers.
+20 ;G:$D(D6I) QH
+21 IF (RMCPT1["LT")
IF (RMCPT1["RT")
DO LRT
if $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIRUT)
GOTO EXIT
+22 IF (RMCPT1["KM")
IF (RMCPT1["KN")
DO KMN
if $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIRUT)
GOTO EXIT
+23 IF RMCPT1["RR"
IF $GET(RMCRF)
DO RR
if $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIRUT)
GOTO EXIT
+24 IF RMCPT1["RP"
DO RP
if $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIRUT)
GOTO EXIT
+25 IF RMCPT1["PL"
DO PL
if $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIRUT)
GOTO EXIT
+26 IF RMCPT1["UE"
DO UE
if $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIRUT)
GOTO EXIT
+27 IF RMCPT1["NU"
DO NU
if $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DIRUT)
GOTO EXIT
+28 IF (RMCPT1["GY")
DO GY
+29 IF (RMCPT1["QH")
DO QH
+30 IF RMCPT1["KA"
DO KA
EXIT ;CLEAN-UP
+1 SET RMCLEN=$LENGTH(RMCPT)
SET RMCPT=$EXTRACT(RMCPT,1,RMCLEN-1)
+2 SET $PIECE(^RMPR(664.1,DA(1),2,DA,2),U,2)=RMCPT
SET X=RM6611
KILL KILL DIR,RM6611,RMCPT1,RMCPSO,RMCP0,RMCP4,RMCRF,RMCBW,RMCPT5,RMHCPCS,RMCP11,RMCLEN,RMCP5,RMCPHC2,RMCPHC
+1 QUIT
LRT ;prompt for LEFT OR RIGHT CPT modifier
+1 KILL DIR
+2 SET DIR(0)="SBO^LT:Left;RT:Right;B:Both Left and Right"
+3 SET DIR("A")="Enter a CPT MODIFIER for HCPCS "_RMHCPCS
+4 DO ^DIR
IF $DATA(DUOUT)!$DATA(DTOUT)!($DATA(Y)&(Y=""))
WRITE !,"This is a required field!!!"
GOTO LRT
+5 IF Y="B"
SET Y="LT,RT"
+6 SET RMCPT=RMCPT_Y_","
+7 QUIT
+8 ;
KMN ;prompt for new impression/moulage or previous master model.
+1 KILL DIR
+2 SET DIR(0)="SBO^KM:new impression/moulage;KN:previous master model"
+3 SET DIR("A")="Enter a CPT MODIFIER for HCPCS "_RMHCPCS
+4 DO ^DIR
IF $DATA(DUOUT)!$DATA(DTOUT)!($DATA(Y)&(Y=""))
WRITE !,"This is a required field!!!"
GOTO KMN
+5 SET RMCPT=RMCPT_Y_","
+6 QUIT
+7 ;
RR ;Append "RR" cpt modifier"
+1 SET DIR(0)="Y"
+2 SET DIR("A")="Is this RENTAL "
+3 SET DIR("?")="Enter 'Y for YES' or 'N for NO' "
SET DIR("B")="Y"
+4 DO ^DIR
KILL DIR
IF $DATA(DUOUT)!$DATA(DTOUT)
WRITE !,"This is a required field!!!"
GOTO RR
+5 if $GET(Y)
SET RMCPT=RMCPT_"RR,"
+6 QUIT
+7 ;
RP ;append "RP" cpt modifier.
+1 IF $DATA(RMTYPE)
IF ((RMTYPE="R")!(RMTYPE="X"))
SET RMCPT=RMCPT_"RP,"
+2 QUIT
+3 ;
UE ;append "UE" cpt modifier.
+1 IF RMCPSO="V"
SET RMCPT=RMCPT_"UE,"
+2 QUIT
+3 ;
NU ;append "NU" cpt modifier.
+1 IF (RMCPSO="C")
IF (RMCPT'["RR")
SET RMCPT=RMCPT_"NU,"
+2 QUIT
+3 ;
QH ;append "QH" CPT modifier for Home Oxygen.
+1 SET RMCPT=RMCPT_"QH,"
+2 QUIT
+3 ;
PL ;Append PL cpt modifier.
+1 SET RMCPT=RMCPT_"PL,"
+2 QUIT
+3 ;
KA ;Append KA cpt modifier for HCPCS that contains wheelchair accessories.
+1 SET RMCPT=RMCPT_"KA,"
+2 QUIT
+3 ;
GY ;Append GY CPT Modifier.
+1 SET RMCPT=RMCPT_"GY,"
+2 QUIT