source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXDI02F.m@ 1724

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

initial load of FOIAVistA 6/30/08 version

File size: 4.9 KB
Line 
1OCXDI02F ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC ROUTINES ;SEP 7,1999 at 10:30
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
3 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
4 ;
5S ;
6 ;
7 D DOT^OCXDIAG
8 ;
9 ;
10 K REMOTE,LOCAL,OPCODE,REF
11 F LINE=1:1:500 S TEXT=$P($T(DATA+LINE),";",2,999) Q:TEXT I $L(TEXT) D Q:QUIT
12 .S ^TMP("OCXDIAG",$J,$O(^TMP("OCXDIAG",$J,"A"),-1)+1)=TEXT
13 ;
14 G ^OCXDI02G
15 ;
16 Q
17 ;
18DATA ;
19 ;
20 ;;R^"860.8:",100,2
21 ;;D^ ; ; orderable item (determined via order number ORNUM) to trigger a
22 ;;R^"860.8:",100,3
23 ;;D^ ; ; notification when resulted
24 ;;R^"860.8:",100,4
25 ;;D^ ; N ORBFLAG,OI S ORBFLAG="",OI=""
26 ;;R^"860.8:",100,5
27 ;;D^ ; Q:+$G(ORNUM)<1 ORBFLAG
28 ;;R^"860.8:",100,6
29 ;;D^ ; S OI=$$OI^ORQOR2(ORNUM)
30 ;;R^"860.8:",100,7
31 ;;D^ ; Q:+$G(OI)<1 ORBFLAG
32 ;;R^"860.8:",100,8
33 ;;D^ ; S ORBFLAG=$$GET^XPAR("ALL","ORB ORDERABLE ITEM RESULTS","`"_OI,"Q")
34 ;;R^"860.8:",100,9
35 ;;D^ ; Q ORBFLAG
36 ;;R^"860.8:",100,10
37 ;;D^ ; ;
38 ;;EOR^
39 ;;KEY^860.8:^WARD ROOM-BED
40 ;;R^"860.8:",.01,"E"
41 ;;D^WARD ROOM-BED
42 ;;R^"860.8:",.02,"E"
43 ;;D^WARDRMBD
44 ;;R^"860.8:",1,1
45 ;;D^Returns the patient's ward and room-bed if they exist. Can be used to
46 ;;R^"860.8:",1,2
47 ;;D^determine if the patient is inpatient or outpatient. Official MAS policy
48 ;;R^"860.8:",1,3
49 ;;D^indicates that if the patient has a ward (^DPT(DFN,.1)), then they are an
50 ;;R^"860.8:",1,4
51 ;;D^inpatient. If the .1 node does not exist, they are an outpatient.
52 ;;R^"860.8:",100,1
53 ;;D^ ;WARDRMBD(DFN) ;
54 ;;R^"860.8:",100,2
55 ;;D^ ; ;
56 ;;R^"860.8:",100,3
57 ;;D^ ; Q:'$G(DFN) 0
58 ;;R^"860.8:",100,4
59 ;;D^ ; N OUT S OUT=$G(^DPT(DFN,.1)) Q:'$L(OUT) 0
60 ;;R^"860.8:",100,5
61 ;;D^ ; S OUT=1_"^"_OUT_" "_$G(^DPT(DFN,.101)) Q OUT
62 ;;R^"860.8:",100,6
63 ;;D^ ; ;
64 ;;EOR^
65 ;;KEY^860.8:^IN LIST OPERATOR
66 ;;R^"860.8:",.01,"E"
67 ;;D^IN LIST OPERATOR
68 ;;R^"860.8:",.02,"E"
69 ;;D^LIST
70 ;;R^"860.8:",100,1
71 ;;D^ ;LIST(DATA,LIST) ; IS THE DATA FIELD IN THE LIST
72 ;;R^"860.8:",100,2
73 ;;D^ ; ;
74 ;;R^"860.8:",100,3
75 ;;D^T+; W:$G(OCXTRACE) !,"%%%%",?20," $$LIST(""",DATA,""",""",LIST,""")"
76 ;;R^"860.8:",100,4
77 ;;D^ ; S:'($E(LIST,1)=",") LIST=","_LIST S:'($E(LIST,$L(LIST))=",") LIST=LIST_"," S DATA=","_DATA_","
78 ;;R^"860.8:",100,5
79 ;;D^ ; Q (LIST[DATA)
80 ;;R^"860.8:",100,6
81 ;;D^ ; ;
82 ;;EOR^
83 ;;KEY^860.8:^RECENT CHOLECYSTOGRAM PREOCEDURE
84 ;;R^"860.8:",.01,"E"
85 ;;D^RECENT CHOLECYSTOGRAM PREOCEDURE
86 ;;R^"860.8:",.02,"E"
87 ;;D^RECCH
88 ;;R^"860.8:",100,1
89 ;;D^ ;RECCH(DFN,DAYS) ;
90 ;;R^"860.8:",100,2
91 ;;D^ ; ;
92 ;;R^"860.8:",100,3
93 ;;D^ ; Q:'$G(DFN) 0 Q:'$G(DAYS) 0 N OUT S OUT=$$RECENTCH^ORKRA(DFN,DAYS) Q:'$L(OUT) 0 Q 1_U_OUT
94 ;;R^"860.8:",100,4
95 ;;D^ ; ;
96 ;;EOR^
97 ;;KEY^860.8:^FORMATTED LAB RESULTS
98 ;;R^"860.8:",.01,"E"
99 ;;D^FORMATTED LAB RESULTS
100 ;;R^"860.8:",.02,"E"
101 ;;D^FLAB
102 ;;R^"860.8:",100,1
103 ;;D^ ;FLAB(DFN,OCXLIST,OCXSPEC) ;
104 ;;R^"860.8:",100,2
105 ;;D^ ; ;
106 ;;R^"860.8:",100,3
107 ;;D^ ; Q:'$G(DFN) "<Patient Not Specified>"
108 ;;R^"860.8:",100,4
109 ;;D^ ; Q:'$L($G(OCXLIST)) "<Lab Tests Not Specified>"
110 ;;R^"860.8:",100,5
111 ;;D^ ; N OCXLAB,OCXOUT,OCXPC,OCXSL,SPEC S OCXOUT="",SPEC=""
112 ;;R^"860.8:",100,6
113 ;;D^ ; I $L($G(OCXSPEC)) S OCXSL=$$TERMLKUP(OCXSPEC,.OCXSL)
114 ;;R^"860.8:",100,7
115 ;;D^ ; F OCXPC=1:1:$L(OCXLIST,U) S OCXLAB=$P(OCXLIST,U,OCXPC) I $L(OCXLAB) D
116 ;;R^"860.8:",100,8
117 ;;D^ ; .N OCXX,OCXY,X,Y,DIC,TEST,SPEC,OCXTL
118 ;;R^"860.8:",100,9
119 ;;D^ ; .S OCXTL="" Q:'$$TERMLKUP(OCXLAB,.OCXTL)
120 ;;R^"860.8:",100,10
121 ;;D^ ; .S OCXX="",TEST=0 F S TEST=$O(OCXTL(TEST)) Q:'TEST D Q:$L(OCXX)
122 ;;R^"860.8:",100,11
123 ;;D^ ; ..I $L($G(OCXSL)) D
124 ;;R^"860.8:",100,12
125 ;;D^ ; ...S SPEC=0 F S SPEC=$O(OCXSL(SPEC)) Q:'SPEC D Q:$L(OCXX)
126 ;;R^"860.8:",100,13
127 ;;D^ ; ....S OCXX=$$LOCL^ORQQLR1(DFN,TEST,SPEC)
128 ;;R^"860.8:",100,14
129 ;;D^ ; ..I '$L($G(OCXSL)) S OCXX=$$LOCL^ORQQLR1(DFN,TEST,"")
130 ;;R^"860.8:",100,15
131 ;;D^ ; ..Q:'$L(OCXX)
132 ;;R^"860.8:",100,16
133 ;;D^ ; ..S OCXY=$P(OCXX,U,2)_": "_$P(OCXX,U,3)_" "_$P(OCXX,U,4)
134 ;;R^"860.8:",100,17
135 ;;D^ ; ..S OCXY=OCXY_" "_$S($L($P(OCXX,U,5)):"["_$P(OCXX,U,5)_"]",1:"")
136 ;;R^"860.8:",100,18
137 ;;D^ ; ..I $L($P(OCXX,U,7)) S OCXY=OCXY_" "_$$FMTE^XLFDT($P(OCXX,U,7),"2P")
138 ;;R^"860.8:",100,19
139 ;;D^ ; ..S:$L(OCXOUT) OCXOUT=OCXOUT_" " S OCXOUT=OCXOUT_OCXY
140 ;;R^"860.8:",100,20
141 ;;D^ ; Q:'$L(OCXOUT) "<Results Not Found>" Q OCXOUT
142 ;;R^"860.8:",100,21
143 ;;D^ ; ;
144 ;;EOR^
145 ;;KEY^860.8:^CONTRAST MEDIA CODE TRANSLATION
146 ;;R^"860.8:",.01,"E"
147 ;;D^CONTRAST MEDIA CODE TRANSLATION
148 ;;R^"860.8:",.02,"E"
149 ;;D^CONTRANS
150 ;;R^"860.8:",100,1
151 ;;D^ ;CONTRANS(OCXC) ;
152 ;;R^"860.8:",100,2
153 ;;D^ ; ;
154 ;;R^"860.8:",100,3
155 ;;D^ ; N OCXX
156 ;;R^"860.8:",100,4
157 ;;D^ ; Q:'$L($G(OCXC)) "" S OCXX=$S((OCXC["B"):"Barium",1:"")
158 ;;R^"860.8:",100,5
159 ;;D^ ; I (OCXC["M") S:$L(OCXX) OCXX=OCXX_" and/or " S OCXX=OCXX_"Unspecified contrast media"
160 ;;R^"860.8:",100,6
161 ;;D^ ; Q OCXX
162 ;;R^"860.8:",100,7
163 ;;D^ ; ;
164 ;;EOR^
165 ;;KEY^860.8:^MISSING TESTS DURING SESSION
166 ;;R^"860.8:",.01,"E"
167 ;;D^MISSING TESTS DURING SESSION
168 ;;R^"860.8:",.02,"E"
169 ;;D^MTSTF
170 ;;R^"860.8:",100,1
171 ;;D^ ;MTSTF(OILIST) ;
172 ;;R^"860.8:",100,2
173 ;;D^ ; ;
174 ;1;
175 ;
Note: See TracBrowser for help on using the repository browser.