ORY215 ;SLCOIFO - Pre and Post-init for patch OR*3*215 [10/21/04 6:30am] ;1/26/06 15:20
;;3.0;ORDER ENTRY/RESULTS REPORTING;**215**;Dec 17, 1997
;
; DBIA 2336 EN^XPAR ^TMP($J,"XPARRSTR")
;
PRE ; initiate pre-init processes
D PEOMPRE
D PEOMRPT
Q
;
POST ; initiate post-init processes
;
I +$$PATCH^XPDUTL("TIU*1.0*112") D SURGREG
D VITREG ;register Vitals RPC
I +$$PATCH^XPDUTL("MAG*3.0*7") D MAGREG1
I +$$PATCH^XPDUTL("MAG*3.0*37") D MAGREG2
D PEOM ;set-up Outpatient Meals
D DLGBULL
D IVUPDT
D CMUPDT
D PARVAL
D MAIL
D PARAM
D NOTIF
D INISET^ORWGAPIU ; graph setting default
D BULLMG
Q
;
MAIL ; send bulletin of installation time
N COUNT,DIFROM,I,START,TEXT,XMDUZ,XMSUB,XMTEXT,XMY
S COUNT=0,XMDUZ="CPRS PACKAGE",XMTEXT="TEXT("
S XMSUB="Version "_$P($T(VERSION),";;",2)_" Installed"
F I="G.CPRS GUI INSTALL@ISC-SLC.DOMAIN.EXT",DUZ S XMY(I)=""
;
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
;
SURGREG ; Register TIU SURGERY RPCs if TIU*1.0*112 present
N MENU,RPC
S MENU="OR CPRS GUI CHART"
F RPC="TIU IS THIS A SURGERY?","TIU IDENTIFY SURGERY CLASS","TIU LONG LIST SURGERY TITLES","TIU GET DOCUMENTS FOR REQUEST" D INSERT(MENU,RPC)
Q
VITREG ; Register Vitals RPC
D ADDRPCS^GMV3PST ;call tag from vitals patch post init to register
Q
;
MAGREG1 ; Register Imaging RPC if MAG*3.0*7 installed (DBIA 4526)
D INSERT("OR CPRS GUI CHART","MAG4 REMOTE IMPORT")
Q
;
MAGREG2 ; Register Imaging RPCS if MAG*3.0*37 installed (DBIA 4528/4530)
D INSERT("OR CPRS GUI CHART","MAG IMPORT CHECK STATUS")
D INSERT("OR CPRS GUI CHART","MAG IMPORT CLEAR STATUS")
Q
;
LINE(DATA) ; set text into array
S COUNT=COUNT+1
S TEXT(COUNT)=DATA
Q
;
INSERT(OPTION,RPC) ; Call FM Updater with each RPC
; Input -- OPTION Option file (#19) Name field (#.01)
; RPC RPC sub-file (#19.05) RPC field (#.01)
; Output -- None
N FDA,FDAIEN,ERR,DIERR
S FDA(19,"?1,",.01)=OPTION
S FDA(19.05,"?+2,?1,",.01)=RPC
D UPDATE^DIE("E","FDA","FDAIEN","ERR")
Q
;
PEOMPRE ;Remove Print fields and Print format entries before installing new
N Y,DIK,ORK,DA
S DIK="^ORD(100.22,"
F ORK=2002,2003,2004,2005,2006 S DA=ORK D ^DIK
S DIK="^ORD(100.23,"
F ORK=1036,1037,1038 S DA=ORK D ^DIK
Q
PEOMRPT ;Remove new & changed reports from OE/RR REPORTS file (101.24)
N ORVIT,ORI
S ORVIT=0
I $P($G(^ORD(101.24,34,0)),"^",1)="ORCV VITALS" D
. S ORVIT=1,DA=34,DIK="^ORD(101.24," D ^DIK
. S ^ORD(101.24,34,0)="ORCV VITALS",^ORD(101.24,"B","ORCV VITALS",34)=""
N APPTRPT
S APPTRPT=$G(^ORD(101.24,35,0))
I $P(APPTRPT,U)="ORCV APPOINTMENTS",$P(APPTRPT,U,5)="ORWCV",$P(APPTRPT,U,6)="VST" D
. S $P(^ORD(101.24,35,0),U,6)="VST1"
I 'ORVIT S ORVIT=$O(^ORD(101.24,"B","ORCV VITALS",0)) D
. Q:'ORVIT
. S DA=ORVIT,DIK="^ORD(101.24," D ^DIK
. S ^ORD(101.24,ORVIT,0)="ORCV VITALS",^ORD(101.24,"B","ORCV VITALS",ORVIT)=""
N ORI
S ORI=999
F S ORI=$O(^ORD(101.24,ORI)) Q:'ORI I ORI<1110!(ORI>1116) S DA=ORI,DIK="^ORD(101.24," D ^DIK
Q ;Don't step on Rich's patch 151
PEOM ; -- setup Outpatient Meals
N DA,DIC,DIE,DR,DLAYGO,X,Y,DO,DD,ID,ORDG
S ORDG=$O(^ORD(100.98,"B","DIET",0)) Q:'ORDG
; create new Orderable Item
S X="NO MEAL",Y=+$O(^ORD(101.43,"S.DIET",X,0)) Q:Y>0 ;not 1st install
S DIC="^ORD(101.43,",DIC(0)="LX",DLAYGO=101.43,DIE=DIC
K DO,DD D FILE^DICN Q:Y'>0 ; error
S DA=+Y,ID=DA_";99ORD",DR="1.1///NO MEAL;2///^S X=ID;5////"_ORDG D ^DIE
K DA,DIC,DIE,DR,DLAYGO,X,Y,DO,DD
; link new Display Group to DIETETICS
S X=$O(^ORD(100.98,"B","MEAL",0)),DA(1)=ORDG Q:'X
I $O(^ORD(100.98,DA(1),1,"B",X,0)) Q ;not first install - done.
S:'$D(^ORD(100.98,DA(1),1,0)) ^(0)="^100.981P^^"
S DIC="^ORD(100.98,"_DA(1)_",1,",DIC(0)="NLX",DLAYGO=100.98
S X="OUTPATIENT MEALS" D ^DIC
D SETFHPRT
Q
DLGBULL ; send bulletin about modified dialogs <on first install>
N I,ORD
F I="FHW2","FHW7","FHW8","RA OERR EXAM","LR OTHER LAB TESTS" S ORD(I)=""
D EN^ORYDLG(215,.ORD)
Q
;
CMUPDT ;
N AIEN,CIEN,DIE,DR,DA,FDA,NAME
S DA=$O(^ORD(100.98,"B","CLINIC MEDICATIONS","")) I +$G(DA)>0 D
.S CIEN=DA
.S DIE="^ORD(100.98,",DR=".01///CLINIC ORDERS",DR=DR_";2///Clinic Orders"
.D ^DIE
I $G(CIEN)'>0 S CIEN=$O(^ORD(100.98,"B","CLINIC ORDERS",""))
S AIEN=$O(^ORD(100.98,"B","ALL SERVICES",""))
I $D(^ORD(100.98,AIEN,1,"B",CIEN))>0 Q
S FDA(100.981,"+2,"_AIEN_",",.01)=CIEN
D UPDATE^DIE("","FDA","","MSG")
Q
PARVAL ; Set parameter values
; Set VistaWeb Parameter
D EN^XPAR("PKG","ORWRP VISTAWEB ADDRESS",1,"https://vhaiswwebv7.vha.domain.ext/vistaweb/ToolsPage.aspx")
D EN^XPAR("PKG","ORWRP REPORT LIST",6,"ORRPW HDR")
Q
IVUPDT ;
N IVDG S IVDG=0
S IVDG=$O(^ORD(100.98,"B","IV MEDICATIONS",0))
S:IVDG $P(^ORD(100.98,IVDG,0),U,2)="Infusion"
N IVMN,IVODSP S IVMN=0,IVODSP=""
S IVMN=$O(^ORD(101.41,"B","PSJI OR PAT FLUID OE MENU",0))
I IVMN D
. S IVODSP=$P(^ORD(101.41,IVMN,0),U,2)
. S $P(^ORD(101.41,IVMN,0),U,2)="IV FLUIDS AND INFUSION ORDER"
. S ^ORD(101.41,"C","IV FLUIDS AND INFUSION ORDER",IVMN)=""
. K ^ORD(101.41,"C",IVODSP,IVMN)
Q
;
SENDDLG(ANAME) ; Return true if the current order dialog should be sent
; New dialogs for Outpatient Meals:
I ANAME="FHW OP MEAL" Q 1
I ANAME="FHW SPECIAL MEAL" Q 1
I ANAME="FHW2" Q 1
I ANAME="FHW7" Q 1
I ANAME="FHW8" Q 1
I ANAME="OR GTX VISITSTR" Q 1
I ANAME="OR GTX DELIVERY" Q 1
I ANAME="OR GTX DATE/TIME" Q 1
I ANAME="OR GTX MEAL DATE" Q 1
I ANAME="OR GTX ADDL DIETS" Q 1
I ANAME="PSH OERR" Q 1
; Update IV Dialog
I ANAME="PSJI OR PAT FLUID OE" Q 1
I ANAME="RA OERR EXAM" Q 1
I ANAME="LR OTHER LAB TESTS" Q 1
Q 0
;
SETFHPRT ; Set Outpt Meals print formats
N VAL,PKG
S PKG="DIETETICS"
S VAL=$O(^ORD(100.23,"B","FH OUTPT MEAL TICKET",0))
D EN^XPAR("SYS","ORPF WARD REQUISITION FORMAT",PKG,VAL)
S VAL=$O(^ORD(100.23,"B","FH OUTPT MEAL HEADER",0))
D EN^XPAR("SYS","ORPF WARD REQUISITION HEADER",PKG,VAL)
S VAL=$O(^ORD(100.23,"B","FH OUTPT MEAL FOOTER",0))
D EN^XPAR("SYS","ORPF WARD REQUISITION FOOTER",PKG,VAL)
Q
;
VERSION ;;26.66
;
NOTIF ; DO NOT REMOVE WITH VBECS - rename notif 47 (MEDICATIONS EXPIRING)
S $P(^ORD(100.9,47,0),U)="MEDICATIONS EXPIRING - INPT"
K ^ORD(100.9,"B")
S DIK="^ORD(100.9,",DIK(1)=".01^B" D ENALL^DIK
K DIK
Q
;
PARAM ; DO NOT REMOVE WITH VBECS - main (initial) parameter transport routine
K ^TMP($J,"XPARRSTR")
N ENT,IDX,ROOT,REF,VAL,I
S ROOT=$NAME(^TMP($J,"XPARRSTR")),ROOT=$E(ROOT,1,$L(ROOT)-1)_"," ;DBIA 2336
D LOAD
XX2 S IDX=0,ENT="PKG."_"ORDER ENTRY/RESULTS REPORTING"
F S IDX=$O(^TMP($J,"XPARRSTR",IDX)) Q:'IDX D
. N PAR,INST,ORVAL,ORERR K ORVAL
. S PAR=$P(^TMP($J,"XPARRSTR",IDX,"KEY"),U),INST=$P(^("KEY"),U,2)
. M ORVAL=^TMP($J,"XPARRSTR",IDX,"VAL")
. D EN^XPAR(ENT,PAR,INST,.ORVAL,.ORERR) ;DBIA 2336
K ^TMP($J,"XPARRSTR")
Q
LOAD ; load data into ^TMP (expects ROOT to be defined)
S I=1 F S REF=$T(DATA+I) Q:REF="" S VAL=$T(DATA+I+1) D
. S I=I+2,REF=$P(REF,";",3,999),VAL=$P(VAL,";",3,999)
. S @(ROOT_REF)=VAL
Q
BULLMG ;
N MGIEN,FDA,ORERR
S MGIEN=$$FIND1^DIC(3.8,,"MX","OR DRUG ORDER CANCELLED")
S FDA(3.6,"?1,",.01)="OR DRUG ORDER CANCELLED"
S FDA(3.62,"+2,?1,",.01)="OR DRUG ORDER CANCELLED"
D UPDATE^DIE("E","FDA","",.ORERR)
Q
DATA ; parameter data
;;7240,"KEY")
;;ORB ARCHIVE PERIOD^MEDICATIONS EXPIRING - OUTPT
;;7240,"VAL")
;;30
;;7241,"KEY")
;;ORB DELETE MECHANISM^MEDICATIONS EXPIRING - OUTPT
;;7241,"VAL")
;;All Recipients
;;7242,"KEY")
;;ORB FORWARD BACKUP REVIEWER^MEDICATIONS EXPIRING - OUTPT
;;7242,"VAL")
;;0
;;7243,"KEY")
;;ORB FORWARD SUPERVISOR^MEDICATIONS EXPIRING - OUTPT
;;7243,"VAL")
;;0
;;7244,"KEY")
;;ORB FORWARD SURROGATES^MEDICATIONS EXPIRING - OUTPT
;;7244,"VAL")
;;0
;;7245,"KEY")
;;ORB PROCESSING FLAG^MEDICATIONS EXPIRING - OUTPT
;;7245,"VAL")
;;Disabled
;;7246,"KEY")
;;ORB PROVIDER RECIPIENTS^MEDICATIONS EXPIRING - OUTPT
;;7246,"VAL")
;;OAPT
;;7247,"KEY")
;;ORB URGENCY^MEDICATIONS EXPIRING - OUTPT
;;7247,"VAL")
;;High
;;6064,"KEY")
;;ORWOR EXPIRED ORDERS^1
;;6064,"VAL")
;;72
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORY215 8287 printed Dec 13, 2024@02:39:13 Page 2
ORY215 ;SLCOIFO - Pre and Post-init for patch OR*3*215 [10/21/04 6:30am] ;1/26/06 15:20
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**215**;Dec 17, 1997
+2 ;
+3 ; DBIA 2336 EN^XPAR ^TMP($J,"XPARRSTR")
+4 ;
PRE ; initiate pre-init processes
+1 DO PEOMPRE
+2 DO PEOMRPT
+3 QUIT
+4 ;
POST ; initiate post-init processes
+1 ;
+2 IF +$$PATCH^XPDUTL("TIU*1.0*112")
DO SURGREG
+3 ;register Vitals RPC
DO VITREG
+4 IF +$$PATCH^XPDUTL("MAG*3.0*7")
DO MAGREG1
+5 IF +$$PATCH^XPDUTL("MAG*3.0*37")
DO MAGREG2
+6 ;set-up Outpatient Meals
DO PEOM
+7 DO DLGBULL
+8 DO IVUPDT
+9 DO CMUPDT
+10 DO PARVAL
+11 DO MAIL
+12 DO PARAM
+13 DO NOTIF
+14 ; graph setting default
DO INISET^ORWGAPIU
+15 DO BULLMG
+16 QUIT
+17 ;
MAIL ; send bulletin of installation time
+1 NEW COUNT,DIFROM,I,START,TEXT,XMDUZ,XMSUB,XMTEXT,XMY
+2 SET COUNT=0
SET XMDUZ="CPRS PACKAGE"
SET XMTEXT="TEXT("
+3 SET XMSUB="Version "_$PIECE($TEXT(VERSION),";;",2)_" Installed"
+4 FOR I="G.CPRS GUI INSTALL@ISC-SLC.DOMAIN.EXT",DUZ
SET XMY(I)=""
+5 ;
+6 SET X=$PIECE($TEXT(VERSION),";;",2)
+7 DO LINE("Version "_X_" has been installed.")
+8 DO LINE(" ")
+9 DO LINE("Install complete: "_$$FMTE^XLFDT($$NOW^XLFDT()))
+10 ;
+11 DO ^XMD
+12 QUIT
+13 ;
SURGREG ; Register TIU SURGERY RPCs if TIU*1.0*112 present
+1 NEW MENU,RPC
+2 SET MENU="OR CPRS GUI CHART"
+3 FOR RPC="TIU IS THIS A SURGERY?","TIU IDENTIFY SURGERY CLASS","TIU LONG LIST SURGERY TITLES","TIU GET DOCUMENTS FOR REQUEST"
DO INSERT(MENU,RPC)
+4 QUIT
VITREG ; Register Vitals RPC
+1 ;call tag from vitals patch post init to register
DO ADDRPCS^GMV3PST
+2 QUIT
+3 ;
MAGREG1 ; Register Imaging RPC if MAG*3.0*7 installed (DBIA 4526)
+1 DO INSERT("OR CPRS GUI CHART","MAG4 REMOTE IMPORT")
+2 QUIT
+3 ;
MAGREG2 ; Register Imaging RPCS if MAG*3.0*37 installed (DBIA 4528/4530)
+1 DO INSERT("OR CPRS GUI CHART","MAG IMPORT CHECK STATUS")
+2 DO INSERT("OR CPRS GUI CHART","MAG IMPORT CLEAR STATUS")
+3 QUIT
+4 ;
LINE(DATA) ; set text into array
+1 SET COUNT=COUNT+1
+2 SET TEXT(COUNT)=DATA
+3 QUIT
+4 ;
INSERT(OPTION,RPC) ; Call FM Updater with each RPC
+1 ; Input -- OPTION Option file (#19) Name field (#.01)
+2 ; RPC RPC sub-file (#19.05) RPC field (#.01)
+3 ; Output -- None
+4 NEW FDA,FDAIEN,ERR,DIERR
+5 SET FDA(19,"?1,",.01)=OPTION
+6 SET FDA(19.05,"?+2,?1,",.01)=RPC
+7 DO UPDATE^DIE("E","FDA","FDAIEN","ERR")
+8 QUIT
+9 ;
PEOMPRE ;Remove Print fields and Print format entries before installing new
+1 NEW Y,DIK,ORK,DA
+2 SET DIK="^ORD(100.22,"
+3 FOR ORK=2002,2003,2004,2005,2006
SET DA=ORK
DO ^DIK
+4 SET DIK="^ORD(100.23,"
+5 FOR ORK=1036,1037,1038
SET DA=ORK
DO ^DIK
+6 QUIT
PEOMRPT ;Remove new & changed reports from OE/RR REPORTS file (101.24)
+1 NEW ORVIT,ORI
+2 SET ORVIT=0
+3 IF $PIECE($GET(^ORD(101.24,34,0)),"^",1)="ORCV VITALS"
Begin DoDot:1
+4 SET ORVIT=1
SET DA=34
SET DIK="^ORD(101.24,"
DO ^DIK
+5 SET ^ORD(101.24,34,0)="ORCV VITALS"
SET ^ORD(101.24,"B","ORCV VITALS",34)=""
End DoDot:1
+6 NEW APPTRPT
+7 SET APPTRPT=$GET(^ORD(101.24,35,0))
+8 IF $PIECE(APPTRPT,U)="ORCV APPOINTMENTS"
IF $PIECE(APPTRPT,U,5)="ORWCV"
IF $PIECE(APPTRPT,U,6)="VST"
Begin DoDot:1
+9 SET $PIECE(^ORD(101.24,35,0),U,6)="VST1"
End DoDot:1
+10 IF 'ORVIT
SET ORVIT=$ORDER(^ORD(101.24,"B","ORCV VITALS",0))
Begin DoDot:1
+11 if 'ORVIT
QUIT
+12 SET DA=ORVIT
SET DIK="^ORD(101.24,"
DO ^DIK
+13 SET ^ORD(101.24,ORVIT,0)="ORCV VITALS"
SET ^ORD(101.24,"B","ORCV VITALS",ORVIT)=""
End DoDot:1
+14 NEW ORI
+15 SET ORI=999
+16 FOR
SET ORI=$ORDER(^ORD(101.24,ORI))
if 'ORI
QUIT
IF ORI<1110!(ORI>1116)
SET DA=ORI
SET DIK="^ORD(101.24,"
DO ^DIK
+17 ;Don't step on Rich's patch 151
QUIT
PEOM ; -- setup Outpatient Meals
+1 NEW DA,DIC,DIE,DR,DLAYGO,X,Y,DO,DD,ID,ORDG
+2 SET ORDG=$ORDER(^ORD(100.98,"B","DIET",0))
if 'ORDG
QUIT
+3 ; create new Orderable Item
+4 ;not 1st install
SET X="NO MEAL"
SET Y=+$ORDER(^ORD(101.43,"S.DIET",X,0))
if Y>0
QUIT
+5 SET DIC="^ORD(101.43,"
SET DIC(0)="LX"
SET DLAYGO=101.43
SET DIE=DIC
+6 ; error
KILL DO,DD
DO FILE^DICN
if Y'>0
QUIT
+7 SET DA=+Y
SET ID=DA_";99ORD"
SET DR="1.1///NO MEAL;2///^S X=ID;5////"_ORDG
DO ^DIE
+8 KILL DA,DIC,DIE,DR,DLAYGO,X,Y,DO,DD
+9 ; link new Display Group to DIETETICS
+10 SET X=$ORDER(^ORD(100.98,"B","MEAL",0))
SET DA(1)=ORDG
if 'X
QUIT
+11 ;not first install - done.
IF $ORDER(^ORD(100.98,DA(1),1,"B",X,0))
QUIT
+12 if '$DATA(^ORD(100.98,DA(1),1,0))
SET ^(0)="^100.981P^^"
+13 SET DIC="^ORD(100.98,"_DA(1)_",1,"
SET DIC(0)="NLX"
SET DLAYGO=100.98
+14 SET X="OUTPATIENT MEALS"
DO ^DIC
+15 DO SETFHPRT
+16 QUIT
DLGBULL ; send bulletin about modified dialogs <on first install>
+1 NEW I,ORD
+2 FOR I="FHW2","FHW7","FHW8","RA OERR EXAM","LR OTHER LAB TESTS"
SET ORD(I)=""
+3 DO EN^ORYDLG(215,.ORD)
+4 QUIT
+5 ;
CMUPDT ;
+1 NEW AIEN,CIEN,DIE,DR,DA,FDA,NAME
+2 SET DA=$ORDER(^ORD(100.98,"B","CLINIC MEDICATIONS",""))
IF +$GET(DA)>0
Begin DoDot:1
+3 SET CIEN=DA
+4 SET DIE="^ORD(100.98,"
SET DR=".01///CLINIC ORDERS"
SET DR=DR_";2///Clinic Orders"
+5 DO ^DIE
End DoDot:1
+6 IF $GET(CIEN)'>0
SET CIEN=$ORDER(^ORD(100.98,"B","CLINIC ORDERS",""))
+7 SET AIEN=$ORDER(^ORD(100.98,"B","ALL SERVICES",""))
+8 IF $DATA(^ORD(100.98,AIEN,1,"B",CIEN))>0
QUIT
+9 SET FDA(100.981,"+2,"_AIEN_",",.01)=CIEN
+10 DO UPDATE^DIE("","FDA","","MSG")
+11 QUIT
PARVAL ; Set parameter values
+1 ; Set VistaWeb Parameter
+2 DO EN^XPAR("PKG","ORWRP VISTAWEB ADDRESS",1,"https://vhaiswwebv7.vha.domain.ext/vistaweb/ToolsPage.aspx")
+3 DO EN^XPAR("PKG","ORWRP REPORT LIST",6,"ORRPW HDR")
+4 QUIT
IVUPDT ;
+1 NEW IVDG
SET IVDG=0
+2 SET IVDG=$ORDER(^ORD(100.98,"B","IV MEDICATIONS",0))
+3 if IVDG
SET $PIECE(^ORD(100.98,IVDG,0),U,2)="Infusion"
+4 NEW IVMN,IVODSP
SET IVMN=0
SET IVODSP=""
+5 SET IVMN=$ORDER(^ORD(101.41,"B","PSJI OR PAT FLUID OE MENU",0))
+6 IF IVMN
Begin DoDot:1
+7 SET IVODSP=$PIECE(^ORD(101.41,IVMN,0),U,2)
+8 SET $PIECE(^ORD(101.41,IVMN,0),U,2)="IV FLUIDS AND INFUSION ORDER"
+9 SET ^ORD(101.41,"C","IV FLUIDS AND INFUSION ORDER",IVMN)=""
+10 KILL ^ORD(101.41,"C",IVODSP,IVMN)
End DoDot:1
+11 QUIT
+12 ;
SENDDLG(ANAME) ; Return true if the current order dialog should be sent
+1 ; New dialogs for Outpatient Meals:
+2 IF ANAME="FHW OP MEAL"
QUIT 1
+3 IF ANAME="FHW SPECIAL MEAL"
QUIT 1
+4 IF ANAME="FHW2"
QUIT 1
+5 IF ANAME="FHW7"
QUIT 1
+6 IF ANAME="FHW8"
QUIT 1
+7 IF ANAME="OR GTX VISITSTR"
QUIT 1
+8 IF ANAME="OR GTX DELIVERY"
QUIT 1
+9 IF ANAME="OR GTX DATE/TIME"
QUIT 1
+10 IF ANAME="OR GTX MEAL DATE"
QUIT 1
+11 IF ANAME="OR GTX ADDL DIETS"
QUIT 1
+12 IF ANAME="PSH OERR"
QUIT 1
+13 ; Update IV Dialog
+14 IF ANAME="PSJI OR PAT FLUID OE"
QUIT 1
+15 IF ANAME="RA OERR EXAM"
QUIT 1
+16 IF ANAME="LR OTHER LAB TESTS"
QUIT 1
+17 QUIT 0
+18 ;
SETFHPRT ; Set Outpt Meals print formats
+1 NEW VAL,PKG
+2 SET PKG="DIETETICS"
+3 SET VAL=$ORDER(^ORD(100.23,"B","FH OUTPT MEAL TICKET",0))
+4 DO EN^XPAR("SYS","ORPF WARD REQUISITION FORMAT",PKG,VAL)
+5 SET VAL=$ORDER(^ORD(100.23,"B","FH OUTPT MEAL HEADER",0))
+6 DO EN^XPAR("SYS","ORPF WARD REQUISITION HEADER",PKG,VAL)
+7 SET VAL=$ORDER(^ORD(100.23,"B","FH OUTPT MEAL FOOTER",0))
+8 DO EN^XPAR("SYS","ORPF WARD REQUISITION FOOTER",PKG,VAL)
+9 QUIT
+10 ;
VERSION ;;26.66
+1 ;
NOTIF ; DO NOT REMOVE WITH VBECS - rename notif 47 (MEDICATIONS EXPIRING)
+1 SET $PIECE(^ORD(100.9,47,0),U)="MEDICATIONS EXPIRING - INPT"
+2 KILL ^ORD(100.9,"B")
+3 SET DIK="^ORD(100.9,"
SET DIK(1)=".01^B"
DO ENALL^DIK
+4 KILL DIK
+5 QUIT
+6 ;
PARAM ; DO NOT REMOVE WITH VBECS - main (initial) parameter transport routine
+1 KILL ^TMP($JOB,"XPARRSTR")
+2 NEW ENT,IDX,ROOT,REF,VAL,I
+3 ;DBIA 2336
SET ROOT=$NAME(^TMP($JOB,"XPARRSTR"))
SET ROOT=$EXTRACT(ROOT,1,$LENGTH(ROOT)-1)_","
+4 DO LOAD
XX2 SET IDX=0
SET ENT="PKG."_"ORDER ENTRY/RESULTS REPORTING"
+1 FOR
SET IDX=$ORDER(^TMP($JOB,"XPARRSTR",IDX))
if 'IDX
QUIT
Begin DoDot:1
+2 NEW PAR,INST,ORVAL,ORERR
KILL ORVAL
+3 SET PAR=$PIECE(^TMP($JOB,"XPARRSTR",IDX,"KEY"),U)
SET INST=$PIECE(^("KEY"),U,2)
+4 MERGE ORVAL=^TMP($JOB,"XPARRSTR",IDX,"VAL")
+5 ;DBIA 2336
DO EN^XPAR(ENT,PAR,INST,.ORVAL,.ORERR)
End DoDot:1
+6 KILL ^TMP($JOB,"XPARRSTR")
+7 QUIT
LOAD ; load data into ^TMP (expects ROOT to be defined)
+1 SET I=1
FOR
SET REF=$TEXT(DATA+I)
if REF=""
QUIT
SET VAL=$TEXT(DATA+I+1)
Begin DoDot:1
+2 SET I=I+2
SET REF=$PIECE(REF,";",3,999)
SET VAL=$PIECE(VAL,";",3,999)
+3 SET @(ROOT_REF)=VAL
End DoDot:1
+4 QUIT
BULLMG ;
+1 NEW MGIEN,FDA,ORERR
+2 SET MGIEN=$$FIND1^DIC(3.8,,"MX","OR DRUG ORDER CANCELLED")
+3 SET FDA(3.6,"?1,",.01)="OR DRUG ORDER CANCELLED"
+4 SET FDA(3.62,"+2,?1,",.01)="OR DRUG ORDER CANCELLED"
+5 DO UPDATE^DIE("E","FDA","",.ORERR)
+6 QUIT
DATA ; parameter data
+1 ;;7240,"KEY")
+2 ;;ORB ARCHIVE PERIOD^MEDICATIONS EXPIRING - OUTPT
+3 ;;7240,"VAL")
+4 ;;30
+5 ;;7241,"KEY")
+6 ;;ORB DELETE MECHANISM^MEDICATIONS EXPIRING - OUTPT
+7 ;;7241,"VAL")
+8 ;;All Recipients
+9 ;;7242,"KEY")
+10 ;;ORB FORWARD BACKUP REVIEWER^MEDICATIONS EXPIRING - OUTPT
+11 ;;7242,"VAL")
+12 ;;0
+13 ;;7243,"KEY")
+14 ;;ORB FORWARD SUPERVISOR^MEDICATIONS EXPIRING - OUTPT
+15 ;;7243,"VAL")
+16 ;;0
+17 ;;7244,"KEY")
+18 ;;ORB FORWARD SURROGATES^MEDICATIONS EXPIRING - OUTPT
+19 ;;7244,"VAL")
+20 ;;0
+21 ;;7245,"KEY")
+22 ;;ORB PROCESSING FLAG^MEDICATIONS EXPIRING - OUTPT
+23 ;;7245,"VAL")
+24 ;;Disabled
+25 ;;7246,"KEY")
+26 ;;ORB PROVIDER RECIPIENTS^MEDICATIONS EXPIRING - OUTPT
+27 ;;7246,"VAL")
+28 ;;OAPT
+29 ;;7247,"KEY")
+30 ;;ORB URGENCY^MEDICATIONS EXPIRING - OUTPT
+31 ;;7247,"VAL")
+32 ;;High
+33 ;;6064,"KEY")
+34 ;;ORWOR EXPIRED ORDERS^1
+35 ;;6064,"VAL")
+36 ;;72