PXAIMOD ;ISA/KWP - MODIFIER SUB FOR DATA2PCE;7/19/99
;;1.0;PCE PATIENT CARE ENCOUNTER;**73**;Aug 12, 1996
;
SET ;--SET AND NEW VARIABLES
Q
SETVARA ;--SET VISIT VARIABLES
N PXMOD
S PXMOD=""
F S PXMOD=$O(PXAA("MODIFIERS",PXMOD)) Q:PXMOD="" S AFTER1(PXMOD)=""
Q
SETPXKA ;
N PXMOD,PXCNT,PXMODIEN
S PXMOD=""
F PXCNT=1:1 S PXMOD=$O(AFTER1(PXMOD)) Q:PXMOD="" D
. S PXMODIEN=$$MODP^ICPTMOD($P(AFTER0,U),PXMOD,"E")
. Q:PXMODIEN<1
. S ^TMP("PXK",$J,"CPT",PXAK,1,PXCNT,"AFTER")=+PXMODIEN
Q
SETVARB ;--SET VARIABLES BEFORE
N PXMODIEN,PXIEN
S PXIEN=0
F S PXIEN=$O(^AUPNVCPT(IENB,1,PXIEN)) Q:'PXIEN D
. S PXMODIEN=^AUPNVCPT(IENB,1,PXIEN,0)
. S ^TMP("PXK",$J,"CPT",PXAK,1,PXIEN,"BEFORE")=PXMODIEN
Q
SETPXKB ;--SET PXK ARRAY BEFORE
N PXMOD,PXCNT,PXMODIEN
S PXMOD=""
F PXCNT=1:1 S PXMOD=$O(BEFOR1(PXMOD)) Q:PXMOD="" D
. S PXMODIEN=$$MODP^ICPTMOD($P(BEFOR0,U),PXMOD,"E")
. Q:PXMODIEN<1
. S ^TMP("PXK",$J,"CPT",PXAK,1,PXCNT,"BEFORE")=+PXMODIEN
Q
PXAIMOD ;ISA/KWP - MODIFIER SUB FOR DATA2PCE;7/19/99
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**73**;Aug 12, 1996
+2 ;
SET ;--SET AND NEW VARIABLES
+1 QUIT
SETVARA ;--SET VISIT VARIABLES
+1 NEW PXMOD
+2 SET PXMOD=""
+3 FOR
SET PXMOD=$ORDER(PXAA("MODIFIERS",PXMOD))
IF PXMOD=""
QUIT
SET AFTER1(PXMOD)=""
+4 QUIT
SETPXKA ;
+1 NEW PXMOD,PXCNT,PXMODIEN
+2 SET PXMOD=""
+3 FOR PXCNT=1:1
SET PXMOD=$ORDER(AFTER1(PXMOD))
IF PXMOD=""
QUIT
Begin DoDot:1
+4 SET PXMODIEN=$$MODP^ICPTMOD($PIECE(AFTER0,U),PXMOD,"E")
+5 IF PXMODIEN<1
QUIT
+6 SET ^TMP("PXK",$JOB,"CPT",PXAK,1,PXCNT,"AFTER")=+PXMODIEN
End DoDot:1
+7 QUIT
SETVARB ;--SET VARIABLES BEFORE
+1 NEW PXMODIEN,PXIEN
+2 SET PXIEN=0
+3 FOR
SET PXIEN=$ORDER(^AUPNVCPT(IENB,1,PXIEN))
IF 'PXIEN
QUIT
Begin DoDot:1
+4 SET PXMODIEN=^AUPNVCPT(IENB,1,PXIEN,0)
+5 SET ^TMP("PXK",$JOB,"CPT",PXAK,1,PXIEN,"BEFORE")=PXMODIEN
End DoDot:1
+6 QUIT
SETPXKB ;--SET PXK ARRAY BEFORE
+1 NEW PXMOD,PXCNT,PXMODIEN
+2 SET PXMOD=""
+3 FOR PXCNT=1:1
SET PXMOD=$ORDER(BEFOR1(PXMOD))
IF PXMOD=""
QUIT
Begin DoDot:1
+4 SET PXMODIEN=$$MODP^ICPTMOD($PIECE(BEFOR0,U),PXMOD,"E")
+5 IF PXMODIEN<1
QUIT
+6 SET ^TMP("PXK",$JOB,"CPT",PXAK,1,PXCNT,"BEFORE")=+PXMODIEN
End DoDot:1
+7 QUIT