Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ORY109

ORY109.m

Go to the documentation of this file.
ORY109 ; slc/dcm - Patch 109 Post/Pre-init ;06/19/01  16:09 [9/6/01 3:49pm]
 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**109**;Dec 17, 1997
PRE ; pre-install calls
 N VER,ORI
 S VER=+$P($T(VERSION^ORY109),";",3)
 I $P($G(^ORD(101.24,3,0)),"^",1)="ORRP ANATOMIC PATHOLOGY" D
 . S DA=3,DIK="^ORD(101.24," D ^DIK
 . S ^ORD(101.24,3,0)="ORRP AP MENU",^ORD(101.24,"B","ORRP AP MENU",3)=""
 I $P($G(^ORD(101.24,3,0)),"^",1)="ORRP AP MENU" D
 . S DA=3,DIK="^ORD(101.24," D ^DIK
 . S ^ORD(101.24,3,0)="ORRP AP MENU",^ORD(101.24,"B","ORRP AP MENU",3)=""
 I $P($G(^ORD(101.24,2,0)),"^",1)="ORRP BLOOD BANK" D
 . S DA=2,DIK="^ORD(101.24," D ^DIK
 . S ^ORD(101.24,2,0)="ORRP BLOOD BANK",^ORD(101.24,"B","ORRP BLOOD BANK",2)=""
 I $P($G(^ORD(101.24,6,0)),"^",1)="ORRP IMAGING" D
 . S DA=6,DIK="^ORD(101.24," D ^DIK
 . S ^ORD(101.24,6,0)="ORRP IMAGING",^ORD(101.24,"B","ORRP IMAGING",6)=""
 I $P($G(^ORD(101.24,8,0)),"^",1)="ORRP NUTRITIONAL ASSESS" D
 . S DA=8,DIK="^ORD(101.24," D ^DIK
 . S ^ORD(101.24,8,0)="ORRP NUTRITIONAL ASSESS",^ORD(101.24,"B","ORRP NUTRITIONAL ASSESS",8)=""
 I $P($G(^ORD(101.24,9,0)),"^",1)="ORRP PROCEDURES" D
 . S DA=9,DIK="^ORD(101.24," D ^DIK
 . S ^ORD(101.24,9,0)="ORRP PROCEDURES",^ORD(101.24,"B","ORRP PROCEDURES",9)=""
 I $P($G(^ORD(101.24,12,0)),"^",1)="ORRP CHART COPY SUMMARY" D
 . S DA=12,DIK="^ORD(101.24," D ^DIK
 . S ^ORD(101.24,12,0)="ORRP CHART COPY SUMMARY",^ORD(101.24,"B","ORRP CHART COPY SUMMARY",12)=""
 I $P($G(^ORD(101.24,17,0)),"^",1)="ORRP CUSTOM ORDER SUMMARY" D
 . S DA=17,DIK="^ORD(101.24," D ^DIK
 . S ^ORD(101.24,17,0)="ORRP CUSTOM ORDER SUMMARY",^ORD(101.24,"B","ORRP CUSTOM ORDER SUMMARY",17)=""
 F ORI=1,4,5,7,8,10,11,13,42,43,44 I $D(^ORD(101.24,ORI,2)) S $P(^(2),"^",3,4)="^"
 S ORI=999
 F  S ORI=$O(^ORD(101.24,ORI)) Q:'ORI  S DA=ORI,DIK="^ORD(101.24," D ^DIK
 Q
POST ; post-install calls
 N VER
 S VER=$P($T(VERSION^ORY109),";",3)
 D SETSURG
 D SETVAL
 D DORINDV
 D MAIL
 Q
MAIL ; send bulletin of installation time
 N COUNT,DIFROM,I,START,TEXT,XMDUZ,XMSUB,XMTEXT,XMY
 S COUNT=0
 S XMSUB="Version "_$P($T(VERSION),";;",2)_" Installed"
 S XMDUZ="CPRS PACKAGE"
 F I="G.CPRS GUI INSTALL@DOMAIN.NAME",DUZ S XMY(I)=""
 S XMTEXT="TEXT("
 ;
 S X=$P($T(VERSION),";;",2)
 D LINE("Version "_X_" has been installed.")
 D LINE(" ")
 D LINE("Install complete:  "_$$FMTE^XLFDT($$NOW^XLFDT()))
 ;
 D ^XMD
 Q
LINE(DATA)      ; set text into array
 S COUNT=COUNT+1
 S TEXT(COUNT)=DATA
 Q
SENDPAR(ANAME)  ; Return true if the current parameter should be sent
 I ANAME="ORWRP TIME/OCC LIMITS ALL" Q 1
 I ANAME="ORWRP TIME/OCC LIMITS INDV" Q 1
 I ANAME="ORCH CONTEXT SURGERY" Q 1
 I ANAME="ORWOR SHOW SURGERY TAB" Q 1
 I ANAME="ORWCH COLUMNS REPORTS" Q 1
 I ANAME="ORWRP ADHOC LOOKUP" Q 1
 I ANAME="ORWOR REQUIRE CURRENT CLIENT" Q 1
 I $E(ANAME,1,6)="ORWCOM" Q 1
 Q 0
 ;
SETVAL ;Set Package level parameter values
 N ORP,ORT,ORI,X0
 S ORP="ORWRP TIME/OCC LIMITS ALL",ORT="T-7;T;10"
 D PUT^XPAR("PKG",ORP,1,ORT)
 S ORP="ORWRP REPORT LIST",ORT=$O(^ORD(101.24,"B","ORRPW REPORT CATEGORIES",0))
 I ORT D PUT^XPAR("PKG",ORP,2,ORT)
 Q
DORINDV ;Delete ORWRP TIME/OCC LIMITS INDV's Div/Sys/Pkg level setting
 D NDEL^XPAR("DIV","ORWRP TIME/OCC LIMITS INDV","")
 D NDEL^XPAR("SYS","ORWRP TIME/OCC LIMITS INDV","")
 D NDEL^XPAR("PKG","ORWRP TIME/OCC LIMITS INDV","")
 Q
SETSURG ;       Should surgery tab be displayed?
 N TMP,PKG,VAL
 S VAL=$$PATCH^XPDUTL("SR*3.0*100")
 S PKG=$O(^DIC(9.4,"B","ORDER ENTRY/RESULTS REPORTING",0))
 S TMP=$$GET^XPAR(PKG_";DIC(9.4,","ORWOR SHOW SURGERY TAB",1)
 I TMP'="" D  Q
 . D CHG^XPAR(PKG_";DIC(9.4,","ORWOR SHOW SURGERY TAB",1,VAL)
 D ADD^XPAR(PKG_";DIC(9.4,","ORWOR SHOW SURGERY TAB",1,VAL)
 Q
 ;
VERSION ;;16.11