source: FOIAVistA/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXPXRM.m@ 1169

Last change on this file since 1169 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 4.0 KB
Line 
1PXPXRM ;SLC/PKR - APIs for Clinical Reminder indexes. ;08/31/2004
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**119**;Aug 12, 1996
3 Q
4 ;===============================================================
5KVFILE(FILENUM,X,DA) ;Delete indexes for a regular V File.
6 N VDATE,VISIT
7 S VISIT=$G(^AUPNVSIT(X(3),0))
8 I VISIT="" Q
9 S VDATE=$P(VISIT,U,1)
10 K ^PXRMINDX(FILENUM,"IP",X(1),X(2),VDATE,DA)
11 K ^PXRMINDX(FILENUM,"PI",X(2),X(1),VDATE,DA)
12 Q
13 ;
14 ;===============================================================
15KVFILEC(FILENUM,X,DA) ;Delete indexes for V Files with coded entries.
16 N CTYPE,VDATE,VISIT
17 S VISIT=$G(^AUPNVSIT(X(3),0))
18 I VISIT="" Q
19 S CTYPE=$S(X(4)="":"U",1:X(4))
20 S VDATE=$P(VISIT,U,1)
21 K ^PXRMINDX(FILENUM,"IPP",X(1),CTYPE,X(2),VDATE,DA)
22 K ^PXRMINDX(FILENUM,"PPI",X(2),CTYPE,X(1),VDATE,DA)
23 Q
24 ;
25 ;===============================================================
26SVFILE(FILENUM,X,DA) ;Set indexes for a regular V File.
27 ;X(1)=ITEM, X(2)=DFN, X(3)=VISIT.
28 N VDATE,VISIT
29 S VISIT=$G(^AUPNVSIT(X(3),0))
30 I VISIT="" Q
31 S VDATE=$P(VISIT,U,1)
32 S ^PXRMINDX(FILENUM,"IP",X(1),X(2),VDATE,DA)=""
33 S ^PXRMINDX(FILENUM,"PI",X(2),X(1),VDATE,DA)=""
34 Q
35 ;
36 ;===============================================================
37SVFILEC(FILENUM,X,DA) ;Set indexes for V Files with coded entries. These
38 ;are V CPT and VPOV
39 ;X(1)=ITEM, X(2)=DFN, X(3)=VISIT,
40 ;X(4)=PRINCIPAL PROCEDURE for V CPT
41 ;X(4)=PRIMARY/SECONDARY for V POV
42 N CTYPE,VDATE,VISIT
43 S VISIT=$G(^AUPNVSIT(X(3),0))
44 I VISIT="" Q
45 S CTYPE=$S(X(4)="":"U",1:X(4))
46 S VDATE=$P(VISIT,U,1)
47 S ^PXRMINDX(FILENUM,"IPP",X(1),CTYPE,X(2),VDATE,DA)=""
48 S ^PXRMINDX(FILENUM,"PPI",X(2),CTYPE,X(1),VDATE,DA)=""
49 Q
50 ;
51 ;===============================================================
52VCPT(DA,DATA) ;Return data for a specified V CPT entry.
53 N TEMP
54 S TEMP=^AUPNVCPT(DA,0)
55 S DATA("VISIT")=$P(TEMP,U,3)
56 S DATA("PROVIDER NARRATIVE")=$P(TEMP,U,4)
57 S DATA("DIAGNOSIS")=$P(TEMP,U,5)
58 S DATA("PRINCIPAL PROCEDURE")=$P(TEMP,U,7)
59 S DATA("QUANTITY")=$P(TEMP,U,16)
60 S DATA("COMMENTS")=$G(^AUPNVCPT(DA,811))
61 Q
62 ;
63 ;===============================================================
64VHF(DA,DATA) ;Return data for a specified V Health Factor entry.
65 N TEMP
66 S TEMP=^AUPNVHF(DA,0)
67 S DATA("VISIT")=$P(TEMP,U,3)
68 S (DATA("LEVEL/SEVERITY"),DATA("VALUE"))=$P(TEMP,U,4)
69 S DATA("COMMENTS")=$G(^AUPNVHF(DA,811))
70 Q
71 ;
72 ;===============================================================
73VIMM(DA,DATA) ;Return data, for a specified V Immunization entry.
74 N TEMP
75 S TEMP=^AUPNVIMM(DA,0)
76 S DATA("VISIT")=$P(TEMP,U,3)
77 S (DATA("SERIES"),DATA("VALUE"))=$P(TEMP,U,4)
78 S DATA("REACTION")=$P(TEMP,U,6)
79 S DATA("CONTRAINDICATED")=$P(TEMP,U,7)
80 S DATA("COMMENTS")=$G(^AUPNVIMM(DA,811))
81 Q
82 ;
83 ;===============================================================
84VPEDU(DA,DATA) ;Return data, for a specified V Patient ED entry.
85 N TEMP
86 S TEMP=^AUPNVPED(DA,0)
87 S DATA("VISIT")=$P(TEMP,U,3)
88 S (DATA("LEVEL OF UNDERSTANDING"),DATA("VALUE"))=$P(TEMP,U,6)
89 S DATA("COMMENTS")=$G(^AUPNVPED(DA,811))
90 Q
91 ;
92 ;===============================================================
93VPOV(DA,DATA) ;Return data for a specified V POV entry.
94 N TEMP
95 S TEMP=^AUPNVPOV(DA,0)
96 S DATA("VISIT")=$P(TEMP,U,3)
97 S DATA("PROVIDER NARRATIVE")=$P(TEMP,U,4)
98 S DATA("MODIFIER")=$P(TEMP,U,6)
99 S DATA("PRIMARY/SECONDARY")=$P(TEMP,U,12)
100 S DATA("DATE OF INJURY")=$P(TEMP,U,13)
101 S DATA("CLINICAL TERM")=$P(TEMP,U,15)
102 S DATA("PROBLEM LIST ENTRY")=$P(TEMP,U,16)
103 S DATA("COMMENTS")=$G(^AUPNVPOV(DA,811))
104 Q
105 ;
106 ;===============================================================
107VSKIN(DA,DATA) ;Return data for a specified V Skin Test entry.
108 N TEMP
109 S TEMP=^AUPNVSK(DA,0)
110 S DATA("VISIT")=$P(TEMP,U,3)
111 S (DATA("RESULTS"),DATA("VALUE"))=$P(TEMP,U,4)
112 S DATA("READING")=$P(TEMP,U,5)
113 S DATA("DATE READ")=$P(TEMP,U,6)
114 S DATA("COMMENTS")=$G(^AUPNVSK(DA,811))
115 Q
116 ;
117 ;===============================================================
118VXAM(DA,DATA) ;Return data, for a specified V Exam entry.
119 N TEMP
120 S TEMP=^AUPNVXAM(DA,0)
121 S DATA("VISIT")=$P(TEMP,U,3)
122 S (DATA("RESULT"),DATA("VALUE"))=$P(TEMP,U,4)
123 S DATA("COMMENTS")=$G(^AUPNVXAM(DA,811))
124 Q
125 ;
Note: See TracBrowser for help on using the repository browser.