source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORY85.m@ 789

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

initial load of WorldVistAEHR

File size: 8.0 KB
RevLine 
[613]1ORY85 ; slc/dcm - Patch 85 Post-init ;5/1/01 13:47 [6/15/01 12:37pm]
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**85**;Dec 17, 1997
3 ;
4PRE ; pre-install calls
5 N VER
6 S VER=+$P($T(VERSION^ORY85),";",3)
7 I $O(^ORD(101.24,0)) D
8 . D EN,COV,RPT,LAB
9 . K ^ORD(101.24)
10 . S ^ORD(101.24,0)="OE/RR REPORT^101.24"
11 Q
12POST ; post-install calls
13 N VER
14 S VER=$P($T(VERSION^ORY85),";",3)
15 D EN,COV,RPT,LAB
16 I +$$PATCH^XPDUTL("TIU*1.0*100") D IDNOTES
17 D MVALL^ORWUL
18 D REMOK
19 D CLEANT0
20 D MAIL
21 Q
22EN ;Convert a parameter
23 N ORX,ORI,DA,PARAM
24 D GETLST^XPAR(.ORX,"SYS","ORWOR COVER RETRIEVAL NEW","Q")
25 I $O(ORX(0)) Q ;New parameter has already been setup
26 K ORX
27 D GETLST^XPAR(.ORX,"PKG","ORWOR COVER RETRIEVAL","Q")
28 S PARAM="ORWOR COVER RETRIEVAL NEW",ORI=0
29 F S ORI=$O(ORX(ORI)) Q:'ORI S ORY=ORX(ORI) D
30 . I $P(ORY,"^")="c" D
31 .. S DA=$O(^ORD(101.24,"B","Postings",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
32 .. S DA=$O(^ORD(101.24,"B","ORCV POSTINGS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
33 . I $P(ORY,"^")="e" D
34 .. S DA=$O(^ORD(101.24,"B","Appointments/Visits/Admissions",0)) Q:'DA D DEL^XPAR("PKG",PARAM,DA)
35 .. S DA=$O(^ORD(101.24,"B","ORCV APPOINTMENTS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
36 . I $P(ORY,"^")="l" D
37 .. S DA=$O(^ORD(101.24,"B","Recent Lab Results",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
38 .. S DA=$O(^ORD(101.24,"B","ORCV RECENT LAB RESULTS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
39 . I $P(ORY,"^")="m" D
40 .. S DA=$O(^ORD(101.24,"B","Active Medications",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
41 .. S DA=$O(^ORD(101.24,"B","ORCV ACTIVE MEDICATIONS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
42 . I $P(ORY,"^")="p" D
43 .. S DA=$O(^ORD(101.24,"B","Active Problems",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
44 .. S DA=$O(^ORD(101.24,"B","ORCV ACTIVE PROBLEMS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
45 . I $P(ORY,"^")="r" D
46 .. S DA=$O(^ORD(101.24,"B","Clinical Reminders ",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
47 .. S DA=$O(^ORD(101.24,"B","ORCV CLINICAL REMINDERS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
48 . I $P(ORY,"^")="v" D
49 .. S DA=$O(^ORD(101.24,"B","Vitals",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
50 .. S DA=$O(^ORD(101.24,"B","ORCV VITALS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
51 K ORX
52 D GETLST^XPAR(.ORX,"SYS","ORWOR COVER RETRIEVAL","Q")
53 S ORI=0
54 F S ORI=$O(ORX(ORI)) Q:'ORI S ORY=ORX(ORI) D
55 . I $P(ORY,"^")="c" D
56 .. S DA=$O(^ORD(101.24,"B","Postings",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
57 .. S DA=$O(^ORD(101.24,"B","ORCV POSTINGS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
58 . I $P(ORY,"^")="e" D
59 .. S DA=$O(^ORD(101.24,"B","Appointments/Visits/Admissions",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
60 .. S DA=$O(^ORD(101.24,"B","ORCV APPOINTMENTS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
61 . I $P(ORY,"^")="l" D
62 .. S DA=$O(^ORD(101.24,"B","Recent Lab Results",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
63 .. S DA=$O(^ORD(101.24,"B","ORCV RECENT LAB RESULTS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
64 . I $P(ORY,"^")="m" D
65 .. S DA=$O(^ORD(101.24,"B","Active Medications",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
66 .. S DA=$O(^ORD(101.24,"B","ORCV ACTIVE MEDICATIONS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
67 . I $P(ORY,"^")="p" D
68 .. S DA=$O(^ORD(101.24,"B","Active Problems",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
69 .. S DA=$O(^ORD(101.24,"B","ORCV ACTIVE PROBLEMS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
70 . I $P(ORY,"^")="r" D
71 .. S DA=$O(^ORD(101.24,"B","Clinical Reminders ",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
72 .. S DA=$O(^ORD(101.24,"B","ORCV CLINICAL REMINDERS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
73 . I $P(ORY,"^")="v" D
74 .. S DA=$O(^ORD(101.24,"B","Vitals",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
75 .. S DA=$O(^ORD(101.24,"B","ORCV VITALS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
76 Q
77COV ;Setup Package level parameters for ORWCV1 COVERSHEET LIST
78 N P,T
79 S P="ORWCV1 COVERSHEET LIST",T="C"
80 D SET("Active Problems","ORCV ACTIVE PROBLEMS",P,1,T)
81 D SET("Allergies / Adverse Reactions","ORCV ALLERGIES",P,2,T)
82 D SET("Postings","ORCV POSTINGS",P,3,T)
83 D SET("Active Medications","ORCV ACTIVE MEDICATIONS",P,4,T)
84 D SET("Clinical Reminders ","ORCV CLINICAL REMINDERS",P,5,T)
85 D SET("Recent Lab Results","ORCV RECENT LAB RESULTS",P,6,T)
86 D SET("Vitals","ORCV VITALS",P,7,T)
87 D SET("Appointments/Visits/Admissions","ORCV APPOINTMENTS",P,8,T)
88 Q
89RPT ;Setup Package level parameters for ORWRP REPORT LIST
90 N P,T
91 S P="ORWRP REPORT LIST",T="R"
92 D SET("HEALTH SUMMARY","ORRP HEALTH SUMMARY",P,5,T)
93 D SET("IMAGING","ORRP IMAGING",P,10,T)
94 D SET("LAB STATUS","ORRP LAB STATUS",P,15,T)
95 D SET("BLOOD BANK","ORRP BLOOD BANK",P,20,T)
96 D SET("ANATOMIC PATHOLOGY","ORRP ANATOMIC PATHOLOGY",P,25,T)
97 D SET("DIETETICS PROFILE","ORRP DIETETICS PROFILE",P,30,T)
98 D SET("NUTRITIONAL ASSESSMENT","ORRP NUTRITIONAL ASSESS",P,35,T)
99 D SET("VITALS CUMULATIVE","ORRP VITALS CUM",P,40,T)
100 D SET("PROCEDURES","ORRP PROCEDURES",P,45,T)
101 D SET("DAILY ORDER SUMMARY","ORRP DAILY ORDER SUMMARY",P,50,T)
102 D SET("ORDER SUMMARY FOR A DATE RANGE","ORRP ORDER SUM FOR A DATE RNG",P,55,T)
103 D SET("CHART COPY SUMMARY","ORRP CHART COPY SUMMARY",P,60,T)
104 D SET("OUTPATIENT RX PROFILE","ORRP OUTPATIENT RX PROFILE",P,65,T)
105 D SET("ZZNONAMEZZ","ORRP BCMA MED LOG",P,70,T)
106 D SET("ZZNONAMEZZ","ORRP BCMA MAH",P,75,T)
107 Q
108LAB ;Setup Package level parameters for ORWRP REPORT LAB LIST
109 N P,T
110 S P="ORWRP REPORT LAB LIST",T="L"
111 D SET("MOST RECENT","ORL MOST RECENT",P,5,T)
112 D SET("CUMULATIVE","ORL CUMULATIVE",P,10,T)
113 D SET("ALL TESTS BY DATE","ORL ALL TESTS BY DATE",P,15,T)
114 D SET("SELECTED TESTS BY DATE","ORL SELECTED TESTS BY DATE",P,20,T)
115 D SET("WORKSHEET","ORL WORKSHEET",P,25,T)
116 D SET("GRAPH","ORL GRAPH",P,30,T)
117 D SET("MICROBIOLOGY","ORL MICROBIOLOGY",P,35,T)
118 D SET("ANATOMIC PATHOLOGY","ORL ANATOMIC PATHOLOGY",P,40,T)
119 D SET("BLOOD BANK","ORL BLOOD BANK",P,45,T)
120 D SET("LAB STATUS","ORL LAB STATUS",P,50,T)
121 Q
122SET(ONAME,NAME,P,S,T) ;Set the parameter
123 ;ONAME=OLD Report name
124 ;NAME=Report name
125 ;P=Parameter name
126 ;S=Sequence (count)
127 ;T=Tab
128 N DA
129 S DA=0
130 F S DA=$O(^ORD(101.24,"B",ONAME,DA)) Q:'DA I $P(^ORD(101.24,DA,0),"^",8)=T D DEL^XPAR("PKG",P,S)
131 S DA=0
132 F S DA=$O(^ORD(101.24,"B",NAME,DA)) Q:'DA I $P(^ORD(101.24,DA,0),"^",8)=T D PUT^XPAR("PKG",P,S,DA)
133 Q
134 ;
135REMOK ; Set up ORB ERASE ALL
136 D EN^XPAR("PKG","ORB ERASE ALL",1,"Y")
137 Q
138 ;
139CLEANT0 ; clean any T+0 set into parameters by mistake
140 N ENTITY,INST,PARAMS,PIEN,RNG
141 F RNG="START","STOP" D
142 .F PARAMS="ORQQAP SEARCH RANGE "_RNG,"ORQQVS SEARCH RANGE "_RNG,"ORLP DEFAULT CLINIC "_RNG_" DATE" D
143 ..S PIEN=+$O(^XTV(8989.51,"B",PARAMS,0)) I 'PIEN Q
144 ..S ENTITY="" F S ENTITY=$O(^XTV(8989.5,"AC",PIEN,ENTITY)) Q:ENTITY="" D
145 ...I ENTITY'[";VA(200," Q
146 ...I $G(^XTV(8989.5,"AC",PIEN,ENTITY,1))="T+0" D
147 ....D EN^XPAR("USR.`"_ENTITY,PARAMS,1,"T")
148 Q
149 ;
150MAIL ; send bulletin of installation time
151 N COUNT,DIFROM,I,START,TEXT,XMDUZ,XMSUB,XMTEXT,XMY
152 S COUNT=0
153 S XMSUB="Version "_$P($T(VERSION),";;",2)_" Installed"
154 S XMDUZ="CPRS PACKAGE"
155 F I="G.CPRS GUI INSTALL@ISC-SLC.VA.GOV",DUZ S XMY(I)=""
156 S XMTEXT="TEXT("
157 ;
158 S X=$P($T(VERSION),";;",2)
159 D LINE("Version "_X_" has been installed.")
160 D LINE(" ")
161 D LINE("Install complete: "_$$FMTE^XLFDT($$NOW^XLFDT()))
162 ;
163 D ^XMD
164 Q
165LINE(DATA) ; set text into array
166 S COUNT=COUNT+1
167 S TEXT(COUNT)=DATA
168 Q
169SENDPAR(ANAME) ; Return true if the current parameter should be sent
170 I ANAME="ORWCV1 COVERSHEET LIST" Q 1
171 I ANAME="ORWOR COVER RETRIEVAL NEW" Q 1
172 I ANAME="ORWDQ QUICK VIEW" Q 1
173 I ANAME="ORK EDITABLE BY USER" Q 1
174 I ANAME="ORK PROCESSING FLAG" Q 1
175 I ANAME="ORWDPS SUPPRESS DISPENSE MSG" Q 1
176 I ANAME="ORWDPS ROUTING DEFAULT" Q 1
177 I ANAME="ORB ERASE ALL" Q 1
178 I $E(ANAME,1,12)="ORWRP REPORT" Q 1
179 I $E(ANAME,1,6)="ORQQPX" Q 1
180 I $E(ANAME,1,6)="ORWPCE" Q 1
181 Q 0
182IDNOTES ; Re-register TIU RPCs if TIU patch 100 previously installed
183 ; TIU patch 100 registers these in its post-init
184 N MENU,I
185 S MENU="OR CPRS GUI CHART"
186 F I="TIU ID ATTACH ENTRY","TIU ID CAN ATTACH","TIU ID CAN RECEIVE","TIU ID DETACH ENTRY" D INSERT(MENU,I)
187 Q
188 ;
189INSERT(OPTION,RPC) ;
190 N FDA,FDAIEN,ERR,DIERR
191 S FDA(19,"?1,",.01)=OPTION
192 S FDA(19.05,"?+2,?1,",.01)=RPC
193 D UPDATE^DIE("E","FDA","FDAIEN","ERR")
194 Q
195 ;
196VERSION ;;15.12
Note: See TracBrowser for help on using the repository browser.