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

ORY280.m

Go to the documentation of this file.
  1. ORY280 ;ISL/TC,JER - Pre- and Post-install for patch OR*3*280 ;09/22/10 07:12
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**280**;Dec 17, 1997;Build 85
  1. ;
  1. ;
  1. PRE ; Initiate pre-init processes
  1. Q
  1. ;
  1. POST ; Initiate post-init processes
  1. D DLGBULL
  1. D UPDNAT
  1. D OC
  1. D UPDPAR
  1. D ^ORY280ES ;expert system changes
  1. D MAIN^ORY280P ;install parameter values
  1. K ^DIC(100.05,0,"RD") ; REMOVE @ ACCESS CODE FROM READ OF FILE 100.05
  1. ;D UPDPAR1
  1. Q
  1. ;
  1. SENDDLG(ANAME) ; Return true if the current order dialog should be sent
  1. I ANAME="OR GTX EARLIEST DATE" Q 1
  1. I ANAME="GMRCOR CONSULT" Q 1
  1. I ANAME="GMRCOR REQUEST" Q 1
  1. I ANAME="OR GTX ADDITIVE FREQUENCY" Q 1
  1. I ANAME="PSJI OR PAT FLUID OE" Q 1
  1. I ANAME="PSJ OR PAT OE" Q 1
  1. I ANAME="PSO OERR" Q 1
  1. I ANAME="PS MEDS" Q 1
  1. Q 0
  1. ;
  1. DLGBULL ; send bulletin about modified dialogs <on first install>
  1. N I,ORD
  1. F I="GMRCOR CONSULT","GMRCOR REQUEST","PSJI OR PAT FLUID OE" S ORD(I)=""
  1. D EN^ORYDLG(280,.ORD)
  1. Q
  1. ;
  1. OC ; setup new order checks
  1. S ^ORD(100.8,34,0)="DRUG DOSAGE"
  1. S ^ORD(100.8,34,1,0)="^^2^2^3090623^"
  1. S ^ORD(100.8,34,1,1,0)="This is an order check that Pharmacy performs to check the dosage of a "
  1. S ^ORD(100.8,34,1,2,0)="drug order for various problems."
  1. S ^ORD(100.8,35,0)="CLINICAL REMINDER TEST"
  1. S ^ORD(100.8,35,1,0)="^^4^4^3090706^"
  1. S ^ORD(100.8,35,1,1,0)="This order check refers to Clinical Reminder Rules that will look at the "
  1. S ^ORD(100.8,35,1,2,0)="Orderable Item that is getting placed and determin if a Reminder Rule "
  1. S ^ORD(100.8,35,1,3,0)="should fire. The CLINICAL REMINDER TEST order check is for testing "
  1. S ^ORD(100.8,35,1,4,0)="Reminder Order checks before deploying them to production."
  1. S ^ORD(100.8,36,0)="CLINICAL REMINDER LIVE"
  1. S ^ORD(100.8,36,1,0)="^^3^3^3090706^"
  1. S ^ORD(100.8,36,1,1,0)="This order check refers to Clinical Reminder Rules that will look at the "
  1. S ^ORD(100.8,36,1,2,0)="Orderable Item that is getting placed and determin if a Reminder Rule "
  1. S ^ORD(100.8,36,1,3,0)="should fire. "
  1. S ^ORD(100.8,"B","DRUG DOSAGE",34)=""
  1. S ^ORD(100.8,"B","CLINICAL REMINDER LIVE",36)=""
  1. S ^ORD(100.8,"B","CLINICAL REMINDER TEST",35)=""
  1. D EN^XPAR("PKG","ORK PROCESSING FLAG","DRUG DOSAGE","Enabled",.ERR)
  1. D EN^XPAR("PKG","ORK PROCESSING FLAG","CLINICAL REMINDER TEST","Disabled",.ERR)
  1. D EN^XPAR("PKG","ORK PROCESSING FLAG","CLINICAL REMINDER LIVE","Enabled",.ERR)
  1. D EN^XPAR("PKG","ORK CLINICAL DANGER LEVEL","CLINICAL REMINDER LIVE","Moderate",.ERR)
  1. D EN^XPAR("PKG","ORK CLINICAL DANGER LEVEL","CLINICAL REMINDER TEST","Low",.ERR)
  1. D EN^XPAR("PKG","ORK CLINICAL DANGER LEVEL","DRUG DOSAGE","High",.ERR)
  1. Q
  1. ;
  1. UPDNAT ;
  1. N DA,DIE,DR,UPDATED,XUMF
  1. S XUMF=1
  1. S DIE="^ORD(100.02,"
  1. S DA=$O(^ORD(100.02,"B","SERVICE REJECT","")) I DA'>0 Q
  1. ;DBIA 4631
  1. S UPDATED=$$SETVUID^XTID(100.02,.01,DA_",",4712356)
  1. I +$P(UPDATED,U)=0 D Q
  1. .D EN^DDIOL("Nature of Order file entry 'Service Reject' not updated")
  1. .D EN^DDIOL($P(UPDATED,U,2))
  1. S DR=".01///REJECTED BY SERVICE"
  1. D ^DIE
  1. D EN^DDIOL("Nature of Order file entry 'Service Reject' renamed to 'Rejected by Service'.")
  1. Q
  1. ;
  1. UPDPAR ;
  1. N ZTDESC,ZTDTH,ZTRTN,ZTSAVE,ZTIO,TEXT,ZTSK
  1. S ZTDESC="Session Order Dialog setting update"
  1. S TEXT=ZTDESC_" has been queued, task number "
  1. S ZTRTN="UPDPARQ^ORY280"
  1. S ZTIO=""
  1. S ZTDTH=$$NOW^XLFDT
  1. D ^%ZTLOAD
  1. I $D(ZTSK) S TEXT=TEXT_ZTSK D MES^XPDUTL(.TEXT)
  1. Q
  1. ;
  1. UPDPARQ ;
  1. N ENT,INST,ORERR,ORLIST,PAR,VALUE
  1. S PAR="ORWCH BOUNDS",INST="frmOCSession",VALUE="0,0,0,0"
  1. D ENVAL^XPAR(.ORLIST,PAR,INST,.ORERR)
  1. S ENT=""
  1. F S ENT=$O(ORLIST(ENT)) Q:ENT="" D DEL^XPAR(ENT,PAR,INST,.ORERR)
  1. ;F S ENT=$O(ORLIST(ENT)) Q:ENT="" D CHG^XPAR(ENT,PAR,INST,VALUE,.ORERR)
  1. Q
  1. ;
  1. UPDPAR1 ;Update ORWT TOOLS MENU parameter description
  1. N TMP,DIE,ARRAY,ERR,X
  1. D BMES^XPDUTL("Starting update of ORWT TOOLS MENU parameter definition description...")
  1. S TMP("OR*3*280",8989.51,1)="This parameter may be used to identify which items should appear on the"
  1. S TMP("OR*3*280",8989.51,2)="tools menu which is displayed by the CPRS GUI. Each item should contain"
  1. S TMP("OR*3*280",8989.51,3)="a name that should be displayed on the menu, followed by an equal sign,"
  1. S TMP("OR*3*280",8989.51,4)="followed by the command string used to invoke the executable. This"
  1. S TMP("OR*3*280",8989.51,5)="string may also include parameters that are passed to the executable."
  1. S TMP("OR*3*280",8989.51,6)="Some example entries are:"
  1. S TMP("OR*3*280",8989.51,7)=" "
  1. S TMP("OR*3*280",8989.51,8)=" Hospital Policy=C:\WINNT\SYSTEM32\VIEWERS\QUIKVIEW.EXE LOCPLCY.DOC"
  1. S TMP("OR*3*280",8989.51,9)=" VISTA Terminal=C:\PROGRA~1\KEA\KEAVT.EXE VISTA.KTC"
  1. S TMP("OR*3*280",8989.51,10)=" "
  1. S TMP("OR*3*280",8989.51,11)="An ampersand may be used in the name portion to identify a letter that"
  1. S TMP("OR*3*280",8989.51,12)="should be underlined on the menu for quick keyboard access. For example,"
  1. S TMP("OR*3*280",8989.51,13)="to underscore the letter H in Hospital Policy, enter &Hospital Policy as"
  1. S TMP("OR*3*280",8989.51,14)="the name part."
  1. S TMP("OR*3*280",8989.51,15)=" "
  1. S TMP("OR*3*280",8989.51,16)="To use submenus on the tools menu, you must place special text in the"
  1. S TMP("OR*3*280",8989.51,17)="caption and action values. Submenus must have action text SUBMENU ID,"
  1. S TMP("OR*3*280",8989.51,18)="where ID is a unique identifier for the submenu. Menu items belonging to"
  1. S TMP("OR*3*280",8989.51,19)="the submenu must specify which submenu they belong to by appending [ID]"
  1. S TMP("OR*3*280",8989.51,20)="after the caption. Thus the following entries create a Utilities submenu"
  1. S TMP("OR*3*280",8989.51,21)="with 2 child items:"
  1. S TMP("OR*3*280",8989.51,22)=" "
  1. S TMP("OR*3*280",8989.51,23)=" Utilities=SUBMENU 1"
  1. S TMP("OR*3*280",8989.51,24)=" Calculator[1]=calc.exe"
  1. S TMP("OR*3*280",8989.51,25)=" Notepad[1]=notepad.exe"
  1. S TMP("OR*3*280",8989.51,26)=" "
  1. S TMP("OR*3*280",8989.51,27)="To create a nested submenu, you create a submenu that belongs to another"
  1. S TMP("OR*3*280",8989.51,28)="submenu s ID. For example, to create a nested submenu belonging the"
  1. S TMP("OR*3*280",8989.51,29)="above Utilities submenu, you would do the following:"
  1. S TMP("OR*3*280",8989.51,30)=" "
  1. S TMP("OR*3*280",8989.51,31)=" Utility Web Sites[1]=SUBMENU UtilWeb"
  1. S TMP("OR*3*280",8989.51,32)=" MicroSoft Tools[UtilWeb]=http:\\www.msdn"
  1. S TMP("OR*3*280",8989.51,33)=" "
  1. S TMP("OR*3*280",8989.51,34)="While submenu IDs at the end of a caption are not displayed on the Tools"
  1. S TMP("OR*3*280",8989.51,35)="menu, this is only true if a corresponding menu ID is found. If no Menu"
  1. S TMP("OR*3*280",8989.51,36)="ID is found, the square brackets and included text will appear as part of"
  1. S TMP("OR*3*280",8989.51,37)="the caption on the Tools menu. This allows for existing bracketed text"
  1. S TMP("OR*3*280",8989.51,38)="to remain displayed."
  1. S TMP("OR*3*280",8989.51,39)=" "
  1. S TMP("OR*3*280",8989.51,40)="If two submenus share the same menu ID, the second submenu will be"
  1. S TMP("OR*3*280",8989.51,41)="treated as belonging to the first menu."
  1. S TMP("OR*3*280",8989.51,42)=" "
  1. S TMP("OR*3*280",8989.51,43)="One point worth noting. If you have a caption of a single dash (or a"
  1. S TMP("OR*3*280",8989.51,44)="single dash followed by a submenu id), it will create a separator line in"
  1. S TMP("OR*3*280",8989.51,45)="the menu or submenu. This is not new functionality, but may not have"
  1. S TMP("OR*3*280",8989.51,46)="been previously documented."
  1. S TMP("OR*3*280",8989.51,47)=" "
  1. S TMP("OR*3*280",8989.51,48)="Finally, if more than 30 menu items are assigned to the top level menu"
  1. S TMP("OR*3*280",8989.51,49)="(i.e. they are not part of a submenu), a ""More..."" submenu will"
  1. S TMP("OR*3*280",8989.51,50)="automatically be created at the top of the Tools menu, with additional"
  1. S TMP("OR*3*280",8989.51,51)="menu items spilling into the newly created ""More..."" submenu. If more"
  1. S TMP("OR*3*280",8989.51,52)="than 30 menu items spill into the ""More..."" submenu, another ""More..."""
  1. S TMP("OR*3*280",8989.51,53)="submenu will be created inside the first ""More..."" submenu, with"
  1. S TMP("OR*3*280",8989.51,54)="additional menu items spilling into it, and so on, as needed. Note,"
  1. S TMP("OR*3*280",8989.51,55)="however, that there is a limit of 99 total menu items, since you can only"
  1. S TMP("OR*3*280",8989.51,56)="enter an integer sequence number from 1-99 when defining the ORWT TOOLS"
  1. S TMP("OR*3*280",8989.51,57)="MENU parameter."
  1. S X=$$FIND1^DIC(8989.51,,"BX","ORWT TOOLS MENU",,,)
  1. S ARRAY=$NA(TMP("OR*3*280",8989.51))
  1. S ERR=$NA(TMP("OR*3*280","ERR"))
  1. D WP^DIE(8989.51,X_",",20,"K",ARRAY,ERR)
  1. I $D(TMP("OR*3*280","ERR")) D Q
  1. . N ERRORS,LINES,FILE,IENS,TXT,TEXT,Y
  1. . S FILE=8989.51
  1. . S ERRORS=0 F S ERRORS=$O(TMP("OR*3*280","ERR","DIERR",ERRORS)) Q:+ERRORS=0 D
  1. .. S IENS=$G(TMP("OR*3*280","ERR","DIERR",ERRORS,"PARAM","IENS"))
  1. .. S Y=0
  1. .. F S Y=$O(TMP("OR*3*280","ERR","DIERR",ERRORS,"TEXT",Y)) Q:+Y=0 D
  1. ... S TXT(Y)=$G(TMP("OR*3*280","ERR","DIERR",ERRORS,"TEXT",Y))
  1. . D BMES^XPDUTL(" Error occurred during update of ORWT TOOLS MENU parameter definition.")
  1. . D MES^XPDUTL(" Entry"_$S($G(IENS)'="":" "_IENS,1:"")_" in file "_FILE_$S($G(IENS)'="":",",1:"")_" failed to update with the following")
  1. . D MES^XPDUTL(" error message:")
  1. . D MES^XPDUTL(" ")
  1. . S Y=0 F S Y=$O(TXT(Y)) Q:Y="" D
  1. .. S TEXT=$G(TXT(Y))
  1. .. D MES^XPDUTL(" "_TEXT)
  1. . K TMP
  1. D BMES^XPDUTL("Update of ORWT TOOLS MENU parameter definition description has")
  1. D MES^XPDUTL(" successfully completed")
  1. Q
  1. ;