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

RMPRCPTU.m

Go to the documentation of this file.
  1. RMPRCPTU ;HIN/RVD-EXTRINSIC FUNCTION FOR CPT MOD ;5/16/00
  1. ;;3.0;PROSTHETICS;**41,69**;Feb 09, 1996
  1. ;
  1. ;RVD 5/15/02 PATCH #69 - changed GX modifier to GY.
  1. ;process CPT field
  1. ;Set variable RMCPT for all valid CPT modifier.
  1. ;X=PSAS HCPCS^TYPE OF TRANSACTION^SOURCE^FILE
  1. ;rmcphc=PSAS HCPCS
  1. ;rmcpty=TYPE OF TRANSACTION
  1. ;rmcpso=SOURCE
  1. ;rmcpfi=file used (660,664 or 664.1)
  1. ;rmcpt=CPT Modifier dilimited by comma; RETURN VARIABLE
  1. CPT(RDA) ;entry point for CPT.
  1. N Y,DIR,DIE,DA,RM6611,RMCPT1,RMCPSO,RMCP0,RMCP4,RMCRF,RMCBW,RMCPT5,RMHCPCS,RMCP11,RMCLEN,RMCPFI,RMCPTY,RMCPHC,RMCP5,RMCPHC2
  1. S RMCPHC=$P(RDA,U,1),RMCPTY=$P(RDA,U,2),RMCPSO=$P(RDA,U,3),RMCPFI=$P(RDA,U,4)
  1. S RMCPT=""
  1. I (RMCPHC="")!(RMCPTY="") Q
  1. K RMCPT1,DIR
  1. S RM6611=RMCPHC,RMCP4=$G(^RMPR(661.1,RM6611,4))
  1. S RMCP11=$G(^RMPR(661.1,RM6611,0))
  1. S RMCP5=$G(^RMPR(661.1,RM6611,5))
  1. S RMCRF=$P(RMCP5,U,1)
  1. S (RMCPT1,RMCPHC)=$P(RMCP4,U,1),RMCPT=""
  1. S RMHCPCS=$P(RMCP11,U,1),RMCPHC2=$E(RMHCPCS,1,2)
  1. Q:RMCPT1=""
  1. ;next code will be used for different CPT Modifiers.
  1. I (RMCPT1["LT"),(RMCPT1["RT") D LRT G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
  1. I (RMCPT1["KM"),(RMCPT1["KN") D KMN G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
  1. I RMCPT1["RR",$G(RMCRF) D RR G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
  1. I RMCPT1["RP" D RP G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
  1. I RMCPT1["UE",RMCPSO="V" D UE G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
  1. I RMCPT1["NU",RMCPSO="C" D NU G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
  1. I RMCPT1["PL" D PL G:$D(DUOUT)!$D(DTOUT)!$D(DIRUT) EXIT
  1. I RMCPT1["GY" D GY
  1. I RMCPT1["QH" D QH
  1. I RMCPT1["KA" D KA
  1. EXIT ;remove comma @ the end and return to calling program
  1. S RMCLEN=$L(RMCPT),RMCPT=$E(RMCPT,1,RMCLEN-1)
  1. Q
  1. ;
  1. LRT ;prompt for LEFT OR RIGHT CPT modifier
  1. K DIR
  1. S DIR(0)="SBO^LT:Left;RT:Right;B:Both Left and Right"
  1. S DIR("A")="Enter a CPT MODIFIER for HCPCS "_RMHCPCS
  1. D ^DIR I $D(DUOUT)!$D(DTOUT)!($D(Y)&(Y="")) W !,"This is a required field!!!" G LRT
  1. I Y="B" S Y="LT,RT"
  1. S RMCPT=RMCPT_Y_","
  1. Q
  1. ;
  1. KMN ;prompt for new impression/moulage or previous master model.
  1. K DIR
  1. S DIR(0)="SBO^KM:new impression/moulage;KN:previous master model"
  1. S DIR("A")="Enter a CPT MODIFIER for HCPCS "_RMHCPCS
  1. D ^DIR I $D(DUOUT)!$D(DTOUT)!($D(Y)&(Y="")) W !,"This is a required field!!!" G KMN
  1. S RMCPT=RMCPT_Y_","
  1. Q
  1. ;
  1. RR ;Append "RR" cpt modifier"
  1. S DIR(0)="Y"
  1. S DIR("A")="Is this RENTAL "
  1. S DIR("?")="Enter 'Y for YES' or 'N for NO' ",DIR("B")="Y"
  1. D ^DIR K DIR I $D(DUOUT)!$D(DTOUT) W !,"This is a required field!!!" G RR
  1. S:$G(Y) RMCPT=RMCPT_"RR,"
  1. Q
  1. ;
  1. RP ;append "RP" cpt modifier.
  1. I (RMCPTY="R")!(RMCPTY="X") S RMCPT=RMCPT_"RP,"
  1. Q
  1. ;
  1. UE ;append "UE" cpt modifier.
  1. S:RMCPSO="V" RMCPT=RMCPT_"UE,"
  1. Q
  1. ;
  1. NU ;append "NU" cpt modifier.
  1. I (RMCPSO="C"),(RMCPT'["RR") S RMCPT=RMCPT_"NU,"
  1. Q
  1. ;
  1. QH ;append "QH" CPT modifier for Home Oxygen.
  1. S RMCPT=RMCPT_"QH,"
  1. Q
  1. ;
  1. PL ;Append PL cpt modifier.
  1. S RMCPT=RMCPT_"PL,"
  1. Q
  1. ;
  1. KA ;Append KA cpt modifier for HCPCS that contains wheelchair accessories.
  1. S RMCPT=RMCPT_"KA,"
  1. Q
  1. ;
  1. GY ;Append GY CPT Modifier.
  1. S RMCPT=RMCPT_"GY,"
  1. Q