PXAIMOD ;ISA/KWP ISL/PKR - MODIFIER SUB FOR DATA2PCE ;11/03/2017
;;1.0;PCE PATIENT CARE ENCOUNTER;**73,121,211**;Aug 12, 1996;Build 454
;
Q
;
SETPXKA(IENB,PXKA,PXAA) ;
N PXCNT,PXMOD
I $D(PXAA("MODIFIERS")) D
. S PXCNT=0,PXMOD=""
. F S PXMOD=$O(PXAA("MODIFIERS",PXMOD)) Q:PXMOD="" D
.. S PXCNT=PXCNT+1
.. S ^TMP("PXK",$J,"CPT",PXAK,1,PXCNT,"AFTER")=PXAA("MODIFIERS",PXMOD)
I ($G(PXAA("DELETE"))=1),(IENB>0) D
. S PXCNT=0
. F S PXCNT=+$O(^AUPNVCPT(IENB,1,PXCNT)) Q:PXCNT=0 D
.. S ^TMP("PXK",$J,"CPT",PXAK,1,PXCNT,"AFTER")=""
Q
;
SETPXKB(IENB,PXKA,PXAA) ;--SET PXK ARRAY BEFORE
N PXCNT,PXMOD
I IENB=0 D
. S PXCNT=0,PXMOD=""
. F S PXMOD=$O(PXAA("MODIFIERS",PXMOD)) Q:PXMOD="" D
.. S PXCNT=PXCNT+1
.. S ^TMP("PXK",$J,"CPT",PXAK,1,PXCNT,"BEFORE")=""
E D
. S PXCNT=0
. F S PXCNT=+$O(^AUPNVCPT(IENB,1,PXCNT)) Q:PXCNT=0 D
.. S ^TMP("PXK",$J,"CPT",PXAK,1,PXCNT,"BEFORE")=^AUPNVCPT(IENB,1,PXCNT,0)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXAIMOD 959 printed Dec 13, 2024@02:25:53 Page 2
PXAIMOD ;ISA/KWP ISL/PKR - MODIFIER SUB FOR DATA2PCE ;11/03/2017
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**73,121,211**;Aug 12, 1996;Build 454
+2 ;
+3 QUIT
+4 ;
SETPXKA(IENB,PXKA,PXAA) ;
+1 NEW PXCNT,PXMOD
+2 IF $DATA(PXAA("MODIFIERS"))
Begin DoDot:1
+3 SET PXCNT=0
SET PXMOD=""
+4 FOR
SET PXMOD=$ORDER(PXAA("MODIFIERS",PXMOD))
if PXMOD=""
QUIT
Begin DoDot:2
+5 SET PXCNT=PXCNT+1
+6 SET ^TMP("PXK",$JOB,"CPT",PXAK,1,PXCNT,"AFTER")=PXAA("MODIFIERS",PXMOD)
End DoDot:2
End DoDot:1
+7 IF ($GET(PXAA("DELETE"))=1)
IF (IENB>0)
Begin DoDot:1
+8 SET PXCNT=0
+9 FOR
SET PXCNT=+$ORDER(^AUPNVCPT(IENB,1,PXCNT))
if PXCNT=0
QUIT
Begin DoDot:2
+10 SET ^TMP("PXK",$JOB,"CPT",PXAK,1,PXCNT,"AFTER")=""
End DoDot:2
End DoDot:1
+11 QUIT
+12 ;
SETPXKB(IENB,PXKA,PXAA) ;--SET PXK ARRAY BEFORE
+1 NEW PXCNT,PXMOD
+2 IF IENB=0
Begin DoDot:1
+3 SET PXCNT=0
SET PXMOD=""
+4 FOR
SET PXMOD=$ORDER(PXAA("MODIFIERS",PXMOD))
if PXMOD=""
QUIT
Begin DoDot:2
+5 SET PXCNT=PXCNT+1
+6 SET ^TMP("PXK",$JOB,"CPT",PXAK,1,PXCNT,"BEFORE")=""
End DoDot:2
End DoDot:1
+7 IF '$TEST
Begin DoDot:1
+8 SET PXCNT=0
+9 FOR
SET PXCNT=+$ORDER(^AUPNVCPT(IENB,1,PXCNT))
if PXCNT=0
QUIT
Begin DoDot:2
+10 SET ^TMP("PXK",$JOB,"CPT",PXAK,1,PXCNT,"BEFORE")=^AUPNVCPT(IENB,1,PXCNT,0)
End DoDot:2
End DoDot:1
+11 QUIT
+12 ;