1 | PXAPIIB ;ISA/AAS - SUPPORTED REFERENCES FOR AICS ; 1/5/07 4:59pm ; Compiled January 18, 2007 10:03:16
|
---|
2 | ;;1.0;PCE PATIENT CARE ENCOUNTER;**183**;Aug 12, 1996;Build 3
|
---|
3 | ;
|
---|
4 | ; -- Output transforms, used for outputting entry during formatting
|
---|
5 | ; and after scanning before sending to PCE.
|
---|
6 | ; -- called by the package interface file and IBDFBK3
|
---|
7 | ;
|
---|
8 | DSPLYED(IEN) ; -- function, returns .01 field of entry ien
|
---|
9 | ; -- output transform for Education Topics (file #9999999.09)
|
---|
10 | ; -- example of use: S Y=$$DSPLYED^PXAPIIB(Y)
|
---|
11 | Q $P($G(^AUTTEDT(+$G(IEN),0)),"^")
|
---|
12 | ;
|
---|
13 | DSPLYIM(IEN) ; -- function, returns .01 field of entry ien
|
---|
14 | ; -- output transform for Immunizations (file #9999999.14)
|
---|
15 | Q $P($G(^AUTTIMM(+$G(IEN),0)),"^")
|
---|
16 | ;
|
---|
17 | DSPLYEX(IEN) ; -- function, returns .01 field of entry ien
|
---|
18 | ; -- output transform for EXAMS (file #9999999.15)
|
---|
19 | Q $P($G(^AUTTEXAM(+$G(IEN),0)),"^")
|
---|
20 | ;
|
---|
21 | DSPLYTR(IEN) ; -- function, returns .01 field of entry ien
|
---|
22 | ; -- output transform for TREATMENTS (file #9999999.17)
|
---|
23 | Q $P($G(^AUTTTRT(+$G(IEN),0)),"^")
|
---|
24 | ;
|
---|
25 | DSPLYSK(IEN) ; -- function, returns .01 field of entry ien
|
---|
26 | ; -- output transform for Education Topics (file #9999999.28)
|
---|
27 | Q $P($G(^AUTTSK(+$G(IEN),0)),"^")
|
---|
28 | ;
|
---|
29 | DSPLYHF(IEN) ; -- function, returns .01 field of entry ien
|
---|
30 | ; -- output transform for Health Factors (file #9999999.64)
|
---|
31 | Q $P($G(^AUTTHF(+$G(IEN),0)),"^")
|
---|
32 | ;
|
---|
33 | ;
|
---|
34 | ; -- Validation routines, used by the utility to validate active
|
---|
35 | ; entries on a form, called from package interface file.
|
---|
36 | ;
|
---|
37 | TESTEDT ; -- does X point to a valid Education Topic? Kills X if not.
|
---|
38 | ; input X := pointer to 9999999.09
|
---|
39 | ; output := if valid x=x,y=""
|
---|
40 | ; := if entry not exist x is killed, y=""
|
---|
41 | ; := if entry exist but inactive x is killed, y=.01 field
|
---|
42 | ;
|
---|
43 | I '$G(X) K X S Y="" Q
|
---|
44 | I '$D(^AUTTEDT(X,0)) K X S Y="" Q
|
---|
45 | I $P($G(^AUTTEDT(X,0)),"^",3) S Y=$P(^AUTTEDT(X,0),"^") K X
|
---|
46 | Q
|
---|
47 | ;
|
---|
48 | TESTIMM ; -- does X point to a valid Immunization? Kills X if not.
|
---|
49 | ; input X := pointer to 9999999.14
|
---|
50 | ; output := if valid x=x,y=""
|
---|
51 | ; := if entry not exist x is killed, y=""
|
---|
52 | ; := if entry exist but inactive x is killed, y=.01 field
|
---|
53 | ;
|
---|
54 | I '$G(X) K X S Y="" Q
|
---|
55 | I '$D(^AUTTIMM(X,0)) K X S Y="" Q
|
---|
56 | I $P($G(^AUTTIMM(X,0)),"^",7) S Y=$P(^AUTTIMM(X,0),"^") K X
|
---|
57 | Q
|
---|
58 | ;
|
---|
59 | TESTEXM ; -- does X point to a valid EXAM? Kills X if not.
|
---|
60 | ; input X := pointer to 9999999.15
|
---|
61 | ; output := if valid x=x,y=""
|
---|
62 | ; := if entry not exist x is killed, y=""
|
---|
63 | ; := if entry exist but inactive x is killed, y=.01 field
|
---|
64 | ;
|
---|
65 | I '$G(X) K X S Y="" Q
|
---|
66 | I '$D(^AUTTEXAM(X,0)) K X S Y="" Q
|
---|
67 | I $P($G(^AUTTEXAM(X,0)),"^",4) S Y=$P(^AUTTEXAM(X,0),"^") K X
|
---|
68 | Q
|
---|
69 | ;
|
---|
70 | TESTTRT ; -- does X point to a valid Treatment? Kills X if not.
|
---|
71 | ; input X := pointer to 9999999.17
|
---|
72 | ; output := if valid x=x,y=""
|
---|
73 | ; := if entry not exist x is killed, y=""
|
---|
74 | ; := if entry exist but inactive x is killed, y=.01 field
|
---|
75 | ;
|
---|
76 | I '$G(X) K X S Y="" Q
|
---|
77 | I '$D(^AUTTTRT(X,0)) K X S Y="" Q
|
---|
78 | I $P($G(^AUTTTRT(X,0)),"^",4) S Y=$P(^AUTTTRT(X,0),"^") K X
|
---|
79 | Q
|
---|
80 | ;
|
---|
81 | TESTSK ; -- does X point to a valid Skin Test? Kills X if not.
|
---|
82 | ; input X := pointer to 9999999.28
|
---|
83 | ; output := if valid x=x,y=""
|
---|
84 | ; := if entry not exist x is killed, y=""
|
---|
85 | ; := if entry exist but inactive x is killed, y=.01 field
|
---|
86 | ;
|
---|
87 | I '$G(X) K X S Y="" Q
|
---|
88 | I '$D(^AUTTSK(X,0)) K X S Y="" Q
|
---|
89 | I $P($G(^AUTTSK(X,0)),"^",3) S Y=$P(^AUTTSK(X,0),"^") K X
|
---|
90 | Q
|
---|
91 | ;
|
---|
92 | TESTHF ; -- does X point to a valid Health Factor? Kills X if not.
|
---|
93 | ; input X := pointer to 9999999.64
|
---|
94 | ; output := if valid x=x,y=""
|
---|
95 | ; := if entry not exist x is killed, y=""
|
---|
96 | ; := if entry exist but inactive x is killed, y=.01 field
|
---|
97 | ;
|
---|
98 | I '$G(X) K X S Y="" Q
|
---|
99 | I '$D(^AUTTHF(X,0)) K X S Y="" Q
|
---|
100 | I $P($G(^AUTTHF(X,0)),"^",11) S Y=$P(^AUTTHF(X,0),"^") K X
|
---|
101 | Q
|
---|
102 | ;
|
---|
103 | POV(VISIT,ARRAY) ;
|
---|
104 | ; -- return purpose of visit for a visit pointer
|
---|
105 | ; Input Visit := visit pointer
|
---|
106 | ; Array := call by reference the array to put the POV into
|
---|
107 | ; Output Array
|
---|
108 | ;
|
---|
109 | N I K ARRAY
|
---|
110 | I $G(VISIT)<0 G POVQ
|
---|
111 | S I=0 F S I=$O(^AUPNVPOV("AD",VISIT,I)) Q:'I S ARRAY(I)=^AUPNVPOV(I,0)
|
---|
112 | POVQ Q
|
---|