1 | PXAIMOD ;ISA/KWP - MODIFIER SUB FOR DATA2PCE;7/19/99
|
---|
2 | ;;1.0;PCE PATIENT CARE ENCOUNTER;**73,121**;Aug 12, 1996
|
---|
3 | ;
|
---|
4 | SET ;--SET AND NEW VARIABLES
|
---|
5 | Q
|
---|
6 | SETVARA ;--SET VISIT VARIABLES
|
---|
7 | N PXMOD
|
---|
8 | S PXMOD=""
|
---|
9 | F S PXMOD=$O(PXAA("MODIFIERS",PXMOD)) Q:PXMOD="" S AFTER1(PXMOD)=""
|
---|
10 | Q
|
---|
11 | SETPXKA ;
|
---|
12 | N PXMOD,PXCNT,PXMODIEN
|
---|
13 | S PXMOD=""
|
---|
14 | F PXCNT=1:1 S PXMOD=$O(AFTER1(PXMOD)) Q:PXMOD="" D
|
---|
15 | . ;S PXMODIEN=$$MODP^ICPTMOD($P(AFTER0,U),PXMOD,"E")
|
---|
16 | . S PXMODIEN=$$MODP^ICPTMOD($P(AFTER0,U),PXMOD,"E",+^AUPNVSIT(PXAVISIT,0))
|
---|
17 | . Q:PXMODIEN<1
|
---|
18 | . S ^TMP("PXK",$J,"CPT",PXAK,1,PXCNT,"AFTER")=+PXMODIEN
|
---|
19 | Q
|
---|
20 | SETVARB ;--SET VARIABLES BEFORE
|
---|
21 | N PXMODIEN,PXIEN
|
---|
22 | S PXIEN=0
|
---|
23 | F S PXIEN=$O(^AUPNVCPT(IENB,1,PXIEN)) Q:'PXIEN D
|
---|
24 | . S PXMODIEN=^AUPNVCPT(IENB,1,PXIEN,0)
|
---|
25 | . S ^TMP("PXK",$J,"CPT",PXAK,1,PXIEN,"BEFORE")=PXMODIEN
|
---|
26 | Q
|
---|
27 | SETPXKB ;--SET PXK ARRAY BEFORE
|
---|
28 | N PXMOD,PXCNT,PXMODIEN
|
---|
29 | S PXMOD=""
|
---|
30 | F PXCNT=1:1 S PXMOD=$O(BEFOR1(PXMOD)) Q:PXMOD="" D
|
---|
31 | . ;S PXMODIEN=$$MODP^ICPTMOD($P(BEFOR0,U),PXMOD,"E")
|
---|
32 | . S PXMODIEN=$$MODP^ICPTMOD($P(BEFOR0,U),PXMOD,"E",+^AUPNVSIT(PXAVISIT,0))
|
---|
33 | . Q:PXMODIEN<1
|
---|
34 | . S ^TMP("PXK",$J,"CPT",PXAK,1,PXCNT,"BEFORE")=+PXMODIEN
|
---|
35 | Q
|
---|