Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/DGYACPT.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/DGYACPT.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/DGYACPT.m	(revision 636)
@@ -1,4 +1,4 @@
 DGYACPT ;ALB/ABR - CPT Utilities ;3/15/97
- ;;6.0;CPT/HCPCS;;May 19, 1997
+ ;;6.0;CPT/HCPCS;;May 19, 1997;Build 1
  ;
  ;    ************************************************
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTAPIU.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTAPIU.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTAPIU.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTAPIU  ;ALB/DEK/KER - CPT UTILITIES FOR APIS ; 04/18/2004
- ;;6.0;CPT/HCPCS;**1,6,12,14,16,19,22**;May 19, 1997
+ ;;6.0;CPT/HCPCS;**1,6,12,14,16,19,22**;May 19, 1997;Build 1
  ;
  ; External References
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTCOD.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTCOD.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTCOD.m	(revision 636)
@@ -1,4 +1,4 @@
-ICPTCOD ;ALB/DEK/KER - CPT CODE APIS ;11/29/2007
- ;;6.0;CPT/HCPCS;**6,12,13,14,16,19,40**;May 19, 1997;Build 6
+ICPTCOD ;ALB/DEK/KER - CPT CODE APIS ; 04/18/2004
+ ;;6.0;CPT/HCPCS;**6,12,13,14,16,19**;May 19, 1997;Build 1
  ;
  ; External References
@@ -127,7 +127,5 @@
  .S ER="" F  S ER=$O(^DIC(81.3,"M",BR,ER)) Q:'ER  I CODA'>ER D
  ..S MI=0 F  S MI=$O(^DIC(81.3,"M",BR,ER,MI)) Q:'MI  D
- ...N MDPS
  ...S MDST=$G(^DIC(81.3,MI,0)) Q:'$L(MDST)
- ...S MDPS=$$MODP^ICPTMOD(CODE,+MI,"I",$G(CDT),$G(SRC)) Q:+MDPS'>0
  ...I '$G(SRC) Q:$P(MDST,"^",4)="V"
  ...I $G(CDT) S ACTMD="",ACTMD=$$MOD^ICPTMOD(MI,"I",CDT,$G(SRC)) Q:($P(ACTMD,"^")=-1)!($P(ACTMD,"^",7)=0)
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTCR.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTCR.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTCR.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTCR ;ALB/ABR - MUMPS CROSS REFERENCE ROUTINE ; 3/10/97
- ;;6.0;CPT/HCPCS;;May 19, 1997
+ ;;6.0;CPT/HCPCS;;May 19, 1997;Build 1
  ;
  ;  VARIABLES
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTID.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTID.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTID.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTID ;SLC/KER - CPT IDENTIFIERS ; 04/18/2004
- ;;6.0;CPT/HCPCS;**19**;May 19, 1997
+ ;;6.0;CPT/HCPCS;**19**;May 19, 1997;Build 1
  ;
  ; External References
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTIDX.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTIDX.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTIDX.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTIDX ;DLS/DEK - MUMPS Cross Reference Routine for History ; 04/28/2003
- ;;6.0;CPT/HCPCS;**14**;May 19, 1997
+ ;;6.0;CPT/HCPCS;**14**;May 19, 1997;Build 1
  ;
  ; ICPTCOD          CPT/HCPC Code from Global
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTMIDX.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTMIDX.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTMIDX.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTMIDX ;DLS/DEK - MUMPS Cross Reference Routine for History ; 04/28/2003
- ;;6.0;CPT/HCPCS;**14**;May 19, 1997
+ ;;6.0;CPT/HCPCS;**14**;May 19, 1997;Build 1
  ;
  ; ICPTMOD          CPT/HCPC Code Modifier from Global
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTMOD.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTMOD.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTMOD.m	(revision 636)
@@ -1,13 +1,7 @@
-ICPTMOD ;ALB/DEK/KER - CPT MODIFIER APIS ;08/18/2007
- ;;6.0;CPT/HCPCS;**6,12,13,14,19,30,37**;May 19, 1997;Build 25
- ;             
- ; Global Variables
- ;    ^DIC(81.3
- ;    ^TMP("ICPTD"     SACC 2.3.2.5.1
- ;             
+ICPTMOD ; ALB/DEK/KER - CPT MODIFIER APIS ; 09/06/2006
+ ;;6.0;CPT/HCPCS;**6,12,13,14,19,30**;May 19, 1997;Build 1
+ ;
  ; External References
- ;    $$DT^XLFDT       DBIA  10103
- ;             
- ; External References
+ ;   DBIA  10103  $$DT^XLFDT
  ;
  Q
@@ -15,5 +9,5 @@
  ;
  ; Input:   MOD   Modifier, Internal or External (Required)
- ;          MFT   Format  "I"=IEN  "E"=.01 field (Default)
+ ;          MFT   Modifier Format  "I" = IEN  "E" = .01 field (Default)
  ;          MDT   Version Date, FileMan format (default = TODAY)
  ;          SRC   Source Screen
@@ -22,5 +16,5 @@
  ;          DFN   Not used
  ; 
- ; Output:  10 piece string delimited by the up-arrow (^)
+ ; Output:  Returns a 10 piece string delimited by the up-arrow (^)
  ; 
  ;            1  IEN
@@ -55,10 +49,9 @@
  S STR=STR_"^"_EFF_"^"_$$MSG^ICPTSUPT(MDT)
  S:$L(MODST) $P(STR,"^",3)=MODST
-MODQ ; Modifier Quit
- Q STR
+MODQ Q STR
  ;
 MODD(CODE,OUTARR,DFN,CDT)       ; returns CPT description in array
  ;
- ; Input:   CODE   CPT Modifier, internal or external (Required)
+ ; Input:   CODE   CPT Modifier code, internal or external (Required)
  ;          ARY    Output Array Name
  ;                   e.g. "ABC" or "ABC("TEST")" 
@@ -66,14 +59,14 @@
  ;          DFN    Not used
  ;          CDT    Versioning Date (default = TODAY)
- ;                   If prior to 1/1/1989, 1/1/1989 will be used
- ;                   If year only, use first of that year
- ;                   If month/year only, use first of the month
- ;                   If later than today, TODAY will be used
+ ;                   If CDT is prior to 1/1/1989, 1/1/1989 will be used
+ ;                   If CDT is year only, the first of that year will be used
+ ;                   If CDT is month/year only, the first of month will be used
+ ;                   If CDT is later than today, TODAY will be used
  ; 
  ; Output:  #      Number of lines in description
  ; 
- ;          @ARY(1:n) - Versioned Description (multiple 62)
+ ;          @ARY(1:n) - Versioned Description (from the 62 multiple)
  ;          @ARY(n+1) - blank
- ;          @ARY(n+1) - message: CODE TEXT MAY BE INACCURATE
+ ;          @ARY(n+1) - a message stating: CODE TEXT MAY BE INACCURATE
  ;      or
  ;          -1^Error
@@ -98,20 +91,83 @@
  . S N=N+1,ARR=OUTARR_N_")",@ARR=$$MSG^ICPTSUPT(CDT,1)
  I +N'>0 S N="-1^VERSIONED DESCRIPTION NOT FOUND FOR MODIFIER "_$P($G(^DIC(81.3,+CODE,0)),"^",1)
-MODDQ ; Modifier Description Quit
- Q N
+MODDQ Q N
  ;
 MODA(CODE,VDT,ARY) ; Return an array of Modifiers for a CPT Code
  D MODA^ICPTMOD2 Q
+ ;
 MODP(CODE,MOD,MFT,MDT,SRC,DFN) ;  Check if modifier can be used with code
- Q $$MODP^ICPTMOD2($G(CODE),$G(MOD),$G(MFT),$G(MDT),$G(SRC),$G(DFN))
+ ;
+ ; Input:
+ ; 
+ ;    CODE   CPT/HCPCS Code ?7N / ?1A4N / ?4N1A
+ ;    MOD    Modifier (External or Internal)
+ ;    MFT    Modifier Format "E" - or "I"
+ ;    VDT    Date service provided
+ ;    SRC    Source Screen
+ ;               If 0 or Null, Level I and II modifiers
+ ;               If >0, Level I, II, and III modifiers
+ ; Output:
+ ;
+ ;    If pair is acceptable - Positive 7 Piece "^" Delimited String
+ ;        
+ ;        1 - IEN of CPT Modifier
+ ;        2 - Versioned Short Text
+ ;        3 - Beginning Code for Code Range
+ ;        4 - Ending Code for Code Range
+ ;        5 - Code Range Activaiton Date
+ ;        6 - Code Range Inactivation Date
+ ;        7 - Modifier Identifier
+ ;        
+ ;    If pair is unacceptable
+ ;    
+ ;        0
+ ;  
+ N ACD,ADT,BEGA,BEGR,CDT,CODEA,CPTS,ENDA,ENDR,ICD,IDT,MIEN,MODEFF,MODI,MODNM,MODST,NEXT,NN,ND,PR,PRN,RIEN,SIEN,SRC,STA,STI,STX,TA,TEFF,TI,TIEN,VDT
+ S:$G(MFT)="" MFT="E" Q:"^E^I^"'[("^"_MFT_"^") "-1^Invalid Modifier Format"
+ S VDT=$P($G(MDT),".",1) Q:+VDT'>0!(VDT'?7N) "-1^Invalid Date"
+ I MFT="E" D  I +($G(MIEN))'>0 Q "-1^Multiple Modifiers with the same name, use IEN"
+ . S MIEN=0 S (TIEN,TI)=0 F  S TIEN=$O(^DIC(81.3,"B",MOD,TIEN)) Q:+TIEN'>0  D
+ . . S TEFF=$$EFF^ICPTSUPT(81.3,TIEN,VDT) Q:'$P(TEFF,"^",2)
+ . . S TI=TI+1,TA(TI)=TIEN,TA(0)=TI
+ . S:+($G(TA(0)))=1 MIEN=+($G(TA(1)))
+ S:MFT="I" MIEN=+MOD S CODE=$G(CODE)
+ S CODN=$S(CODE?1.N:+CODE,1:$$CODEN^ICPTCOD(CODE))
+ I CODN<1!'$D(^ICPT(CODN,0)) Q "-1^NO SUCH CPT CODE"
+ S CODE=$P($G(^ICPT(CODN,0)),"^") I '$L(CODE) Q:"-1^NO SUCH CPT CODE "
+ Q:$L(CODE)'=5 "-1^Invalid Code"
+ S CODEA=$S(CODE?1N.4N:+CODE,CODE?4N1A:$A($E(CODE,5))*10_$E(CODE,1,4),1:$A(CODE)_$E(CODE,2,5)) Q:+CODEA'>0 "-1^Invalid Code Source"
+ S MIEN=$G(MIEN) Q:+MIEN'>0 "-1^Invalid Modifier"
+ S SRC=+($G(SRC)) S SRC=$S(+SRC>0:1,1:0)
+ S SIEN=$O(^ICPT("BA",(CODE_" "),0)) Q:+SIEN'>0 "-3^Invalid Code"
+ S CPTS=$P($G(^ICPT(+SIEN,0)),"^",6)  Q:CPTS="L"&(SRC'>0) "-1^Invalid Code Source"
+ S MODEFF=$$EFF^ICPTSUPT(81.3,MIEN,VDT) Q:'$P(MODEFF,"^",2) "-1^Modifier Inactive"
+ S MODNM=$P($G(^DIC(81.3,MIEN,0)),"^",2) Q:'$L(MODNM) "-1^Invalid Modifier Name"
+ S MODI=$P($G(^DIC(81.3,MIEN,0)),"^",1) Q:'$L(MODI) "-1^Invalid Modifier ID"
+ S MODST=$$VSTCM^ICPTMOD(MIEN,VDT) K STX S (STA,STI)=0 S CDT=($$DTBR^ICPTSUPT(VDT))+.001
+ S RIEN=0 F  S RIEN=$O(^DIC(81.3,MIEN,10,RIEN)) Q:+RIEN'>0  D
+ . S ND=$G(^DIC(81.3,MIEN,10,RIEN,0))
+ . S BEGR=$P(ND,"^",1),BEGA=$S(BEGR?1N.4N:+BEGR,BEGR?4N1A:$A($E(BEGR,5))*10_$E(BEGR,1,4),1:$A(BEGR)_$E(BEGR,2,5)) Q:CODEA<BEGA
+ . S ENDR=$P(ND,"^",2),ENDA=$S(ENDR?1N.4N:+ENDR,ENDR?4N1A:$A($E(ENDR,5))*10_$E(ENDR,1,4),1:$A(ENDR)_$E(ENDR,2,5)) Q:CODEA>ENDA
+ . S (ACD,ADT)=$P(ND,"^",3),(ICD,IDT)=$P(ND,"^",4) S:ADT="" ADT=2890101 S:'$L(IDT) IDT=$$FMADD^XLFDT($$DT^XLFDT,365)
+ . S NN="^DIC(81.3,"_MIEN_",10,"_RIEN_",0)"
+ . S STA=+($G(STA))+1,STX(STA)=MIEN_"^"_MODST_"^"_BEGR_"^"_ENDR_"^"_ADT_"^"_ICD_"^"_MODI,STX("B",+ADT,+STA)=""
+ S ADT=$O(STX("B",+CDT),-1),STA=$O(STX("B",+ADT," "),-1),MOD=$G(STX(+STA)) Q:+MOD'>0 "0"
+ Q MOD
+ ;
 MODC(MOD) ; Checks modifier for range including code
  D MODC^ICPTMOD2($G(MOD))
  Q
+ ;
 MULT ; Finds Duplicate Modifiers
  D MULT^ICPTMOD2 Q
-CODEN(CODE)    ; Return the IEN of a CPT modifier CODE
+ ;
+CODEN(CODE)    ; Return the IEN of a CPT modifier
+ ;   Input:  CPT modifier code
+ ;  Output:  IEN
+ ;
  Q:$G(CODE)="" -1
  N COD S COD=+$O(^DIC(81.3,"BA",(CODE_" "),0))
  Q $S(COD>0:COD,1:-1)
+ ;
 VSTCM(IEN,VDATE) ; Versioned Short Text (CPT Modifier)
  N CPT0,CPTC,CPTI,CPTSTD,CPTSTI,CPTVDT,CPTTXT,CPTTD,CPTTI
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTMOD2.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTMOD2.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTMOD2.m	(revision 636)
@@ -1,13 +1,8 @@
-ICPTMOD2 ;ALB/DEK/KER - CPT MODIFIER APIS ;08/18/2007
- ;;6.0;CPT/HCPCS;**30,37**;May 19, 1997;Build 25
- ;             
- ; Global Variables
- ;    ^DIC(81.3
- ;    ^ICPT(
- ;             
+ICPTMOD2 ; ALB/DEK/KER - CPT MODIFIER APIS ; 09/06/2006
+ ;;6.0;CPT/HCPCS;**30**;May 19, 1997;Build 1
+ ;
  ; External References
- ;    $$DT^XLFDT       DBIA  10103
- ;    $$FMADD^XLFDT    DBIA  10103
- ;             
+ ;   DBIA  10103  $$DT^XLFDT
+ ;
  Q
 MODA ; Create an array of Modifiers for a CPT Code
@@ -49,70 +44,11 @@
  . S (EFF,ST)=$O(^DIC(81.3,MIEN,60,"B"," "),-1) Q:ST'>0  S ST=$O(^DIC(81.3,MIEN,60,"B",ST," "),-1) Q:ST'>0  S ST=$P($G(^DIC(81.3,MIEN,60,ST,0)),"^",2) Q:ST'>0
  . S MOD=$P($G(^DIC(81.3,MIEN,0)),"^",1) Q:'$L(MOD)
- . S X=$$MODP(CODE,MIEN,"I",VDT,0) S ID=$P(X,"^",6) S ID=$S(+ID>0:"I",1:"A")
+ . S X=$$MODP^ICPTMOD(CODE,MIEN,"I",VDT,0) S ID=$P(X,"^",6) S ID=$S(+ID>0:"I",1:"A")
  . S:+X>0 ARY(ID,MOD)=$P(X,"^",1,2)_"^"_EFF_"^"_$P(X,"^",3,7)
  S (A,I)=0,ST="" F  S ST=$O(ARY(ST)) Q:ST=""  S MOD="" F  S MOD=$O(ARY(ST,MOD)) Q:MOD=""  S:ST="A" A=A+1 S:ST="I" I=I+1
  S ST=A+I,ARY(0)=ST_"^"_A_"^"_I_"^"_CODE
  Q
- ;            
-MODP(CODE,MOD,MFT,MDT,SRC,DFN) ;  Check if modifier can be used with code (pair)
  ;
- ; Input:
- ; 
- ;    CODE   CPT/HCPCS Code ?7N / ?1A4N / ?4N1A
- ;    MOD    Modifier (External or Internal)
- ;    MFT    Modifier Format "E" - or "I"
- ;    VDT    Date service provided
- ;    SRC    Source Screen
- ;               If 0 or Null, Level I and II modifiers
- ;               If >0, Level I, II, and III modifiers
- ; Output:
- ;
- ;    If pair is acceptable - Positive "^" Delimited String
- ;        
- ;        1 - IEN of CPT Modifier
- ;        2 - Versioned Short Text
- ;        3 - Beginning Code for Code Range
- ;        4 - Ending Code for Code Range
- ;        5 - Code Range Activaiton Date
- ;        6 - Code Range Inactivation Date
- ;        7 - Modifier Identifier
- ;        
- ;    If pair is unacceptable
- ;    
- ;        0 or
- ;       -1 with error message
- ;  
- N ADT,BEGA,BEGR,CDT,CODEA,CODN,ENDA,ENDR,ICD,IDT,LACT,LINA,MIEN,MODEFF,MODI,MODNM,MODST,ND,NSTA,RIEN,RSTA,SIEN,STA,STI,STX,TA,TEFF,TI,TIEN,VDT
- S:$G(MFT)="" MFT="E" Q:"^E^I^"'[("^"_MFT_"^") "-1^Invalid Modifier Format"  S VDT=$P($G(MDT),".",1)
- S:+VDT'?7N VDT=$$DT^XLFDT S:VDT#10000=0 VDT=VDT+101 S:VDT#100=0 VDT=VDT+1 S VDT=$S(VDT<2890101:2890101,1:VDT)
- Q:+VDT'>0!(VDT'?7N) "-1^Invalid Date"  I MFT="E" D  I +($G(MIEN))'>0 Q "-1^Multiple Modifiers with the same name, use IEN"
- . S MIEN=0 S (TIEN,TI)=0 F  S TIEN=$O(^DIC(81.3,"B",MOD,TIEN)) Q:+TIEN'>0  D
- . . S TEFF=$$EFF^ICPTSUPT(81.3,TIEN,VDT) Q:'$P(TEFF,"^",2)  S TI=TI+1,TA(TI)=TIEN,TA(0)=TI
- . S:+($G(TA(0)))=1 MIEN=+($G(TA(1)))
- S:MFT="I" MIEN=+MOD S CODE=$G(CODE),CODN=$S(CODE?1.N:+CODE,1:$$CODEN^ICPTCOD(CODE)) I CODN<1!'$D(^ICPT(CODN,0)) Q "-1^NO SUCH CPT CODE"
- S CODE=$P($G(^ICPT(CODN,0)),"^") Q:'$L(CODE) "-1^No such CPT Code"  Q:$L(CODE)'=5 "-1^Invalid Code"
- S CODEA=$S(CODE?1N.4N:+CODE,CODE?4N1A:$A($E(CODE,5))*10_$E(CODE,1,4),1:$A(CODE)_$E(CODE,2,5)) Q:+CODEA'>0 "-1^Invalid Code Source"
- S MIEN=$G(MIEN) Q:+MIEN'>0 "-1^Invalid Modifier"  S SRC=$S(+($G(SRC))>0:1,1:0),SIEN=$O(^ICPT("BA",(CODE_" "),0)) Q:+SIEN'>0 "-3^Invalid Code"
- Q:$P($G(^ICPT(+SIEN,0)),"^",6)="L"&(SRC'>0) "-1^Invalid Code Source"
- S MODEFF=$$EFF^ICPTSUPT(81.3,MIEN,VDT) Q:'$P(MODEFF,"^",2) "-1^Modifier Inactive"
- S MODNM=$P($G(^DIC(81.3,MIEN,0)),"^",2) Q:'$L(MODNM) "-1^Invalid Modifier Name"
- S MODI=$P($G(^DIC(81.3,MIEN,0)),"^",1) Q:'$L(MODI) "-1^Invalid Modifier ID"
- S MODST=$$VSTCM^ICPTMOD(MIEN,VDT) K STX S (STA,STI)=0 S CDT=VDT+.001
- S (LINA,LACT)="",RSTA=0,RIEN=0 F  S RIEN=$O(^DIC(81.3,MIEN,10,RIEN)) Q:+RIEN'>0  D
- . N NSTA S NSTA=0,ND=$G(^DIC(81.3,MIEN,10,RIEN,0))
- . S BEGR=$P(ND,"^",1) Q:$L(BEGR)'=5  S BEGA=$S(BEGR?1N.4N:+BEGR,BEGR?4N1A:$A($E(BEGR,5))*10_$E(BEGR,1,4),1:$A(BEGR)_$E(BEGR,2,5)) Q:+CODEA<+BEGA
- . S ENDR=$P(ND,"^",2) S:$L(ENDR)'=5 ENDR=BEGR S ENDA=$S(ENDR?1N.4N:+ENDR,ENDR?4N1A:$A($E(ENDR,5))*10_$E(ENDR,1,4),1:$A(ENDR)_$E(ENDR,2,5))
- . Q:$L(ENDR)&(CODEA>ENDA)  S ADT=$P(ND,"^",3),(ICD,IDT)=$P(ND,"^",4) S:ADT="" ADT=2890101
- . I +CODEA'<+BEGA,+CODEA'>ENDA,+ADT>0,+IDT'>0 S RSTA=1,NSTA=1 S:+ADT>0&(+ADT>(+LACT)) LACT=+ADT
- . I +CODEA'<+BEGA,+CODEA'>ENDA,+ADT>0,+IDT>0,CDT>ADT,CDT'>IDT S RSTA=1,NSTA=1 S:+ADT>0&(+ADT>(+LACT)) LACT=+ADT
- . I +CODEA'<+BEGA,+CODEA'>ENDA,+ADT>0,+IDT>0 S:+IDT>0&(+IDT>(+LINA)) LINA=+IDT
- . Q:NSTA'>0  S:'$L(IDT) IDT=$$FMADD^XLFDT($$DT^XLFDT,365) S ADT=$P(ND,"^",3),(ICD,IDT)=$P(ND,"^",4) S:ADT="" ADT=2890101
- . S:'$L(IDT) IDT=$$FMADD^XLFDT($$DT^XLFDT,365) S STA=+($G(STA))+1,STX(STA)=MIEN_"^"_MODST_"^"_BEGR_"^"_ENDR_"^"_ADT_"^"_ICD_"^"_MODI,STX("B",+ADT,+STA)=""
- S:+LACT>0&(+LINA>0)&(LINA'>CDT)&(+LINA>+LACT) RSTA=0
- S ADT=$O(STX("B",+CDT),-1),STA=$O(STX("B",+ADT," "),-1),MOD=$G(STX(+STA))
- Q:+MOD'>0 "0"  Q:+RSTA'>0 "0"
- Q MOD
- ;            
-MODC(MOD) ; Checks modifier for active range including code
+MODC(MOD) ; Checks modifier for range including code, and active for date desired
  ;
  ; Input:
@@ -132,7 +68,6 @@
  ;
 MULT ; Finds iens for all modifiers with same 2-letter code
- ;  MOD = .01, check B x-ref for dupliate .01 fields
- ;  Output:
- ;     STR - a ";" delimited string of IENS for modifier MOD
+ ;  MOD = .01, check B x-ref for other mods with equivalent .01 fields
+ ;  output concatenates ien of each mod to STR, separated by ":"
  F MODN=0:0 S MODN=$O(^DIC(81.3,"B",MOD,MODN)) Q:'MODN   S STR=STR_MODN_"; "
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTPRN.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTPRN.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTPRN.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTPRN ;ALB/MTC,RMO,ABR,MRY - CPT PRINT-OUT DRIVER ; 1/03/03 3:21pm
- ;;6.0;CPT/HCPCS;**4,8,9,12,13**;May 19, 1997
+ ;;6.0;CPT/HCPCS;**4,8,9,12,13**;May 19, 1997;Build 1
  ;
  ;modified to sort in code name order using temp global;abr 1/96
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR1.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR1.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR1.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR1 ;ALB/ABR,MRY - CPT IENS - REV CPT CODES ; 1/3/03 2:38pm
- ;;6.0;CPT/HCPCS;**3,4,8,9,12,13**;May 19, 1997
+ ;;6.0;CPT/HCPCS;**3,4,8,9,12,13**;May 19, 1997;Build 1
  ;
  ;  This routine points to the ien's of the REVISED CPT codes for 2003
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR10.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR10.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR10.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR10 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR11.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR11.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR11.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR11 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR12.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR12.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR12.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR12 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR13.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR13.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR13.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR13 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR14.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR14.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR14.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR14 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR15.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR15.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR15.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR15 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR16.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR16.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR16.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR16 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR17.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR17.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR17.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR17 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR18.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR18.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR18.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR18 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR19.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR19.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR19.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR19 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR2.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR2.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR2.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR2 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**3,4,8,9,12,13**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**3,4,8,9,12,13**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR20.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR20.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR20.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR20 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR21.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR21.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR21.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR21 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR22.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR22.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR22.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR22 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR23.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR23.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR23.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR23 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR24.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR24.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR24.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR24 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR3.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR3.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR3.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR3 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**8,9,12,13**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**8,9,12,13**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR4.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR4.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR4.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR4 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1 ; 1/28/02 4:17pm
- ;;6.0;CPT/HCPCS;**8,9,12**;May 19, 1997
+ ;;6.0;CPT/HCPCS;**8,9,12**;May 19, 1997;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR5.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR5.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR5.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR5 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR6.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR6.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR6.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR6 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR7.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR7.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR7.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR7 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR8.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR8.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR8.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR8 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR9.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR9.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSR9.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSR9 ;CPT CODES - ICPTSRx DATA FILE FOR ICPTSR1
- ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001
+ ;;6.0;CPT/HCPCS;**9,12**;Feb 27, 2001;Build 1
  ;
  Q
Index: FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSUPT.m
===================================================================
--- FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSUPT.m	(revision 631)
+++ FOIAVistA/tag/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPTSUPT.m	(revision 636)
@@ -1,4 +1,4 @@
 ICPTSUPT ;SLC/KER - CPT SUPPORT FOR APIS ; 04/18/2004
- ;;6.0;CPT/HCPCS;**14,19**;May 19, 1997
+ ;;6.0;CPT/HCPCS;**14,19**;May 19, 1997;Build 1
  ;
  ; External References
