ORY274 ;SLC/SLCOIFO-Pre and Post-init for patch OR*3*274 ;09/27/07 13:44 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**274**;Dec 17, 1997;Build 20 ; PRE ; initiate pre-init processes D PEOMRPT Q ; PEOMRPT ;Remove new & changed reports from OE/RR REPORTS file (101.24) N ORI,ORVIT S ORVIT=0 I $P($G(^ORD(101.24,1032,0)),"^",1)="ORRPW ALLERGIES ADV" D . S ORVIT=1,DA=1032,DIK="^ORD(101.24," D ^DIK . S ^ORD(101.24,1032,0)="ORRPW ALLERGIES ADV",^ORD(101.24,"B","ORRPW ALLERGIES ADV",1032)="" I $P($G(^ORD(101.24,1100,0)),"^",1)="ORRPW ORDERS CURRENT" D . S ORVIT=1,DA=1100,DIK="^ORD(101.24," D ^DIK . S ^ORD(101.24,1100,0)="ORRPW ORDERS CURRENT",^ORD(101.24,"B","ORRPW ORDERS CURRENT",1100)="" I $P($G(^ORD(101.24,1079,0)),"^",1)="ORRPW PHARMACY ALL OUT" D . S ORVIT=1,DA=1079,DIK="^ORD(101.24," D ^DIK . S ^ORD(101.24,1079,0)="ORRPW PHARMACY ALL OUT",^ORD(101.24,"B","ORRPW PHARMACY ALL OUT",1079)="" I $P($G(^ORD(101.24,48,0)),"^",1)="ORRP SURGERIES" D . S ORVIT=1,DA=48,DIK="^ORD(101.24," D ^DIK . S ^ORD(101.24,48,0)="ORRP SURGERIES",^ORD(101.24,"B","ORRP SURGERIES",48)="" I $P($G(^ORD(101.24,1137,0)),"^",1)="ORRPW DOD ALLERGIES ADV" D . S ORVIT=1,DA=1137,DIK="^ORD(101.24," D ^DIK . S ^ORD(101.24,1137,0)="ORRPW DOD ALLERGIES ADV",^ORD(101.24,"B","ORRPW DOD ALLERGIES ADV",1137)="" I $P($G(^ORD(101.24,1551,0)),"^",1)="ORRPW HDR ALLERGIES" D . S ORVIT=1,DA=1551,DIK="^ORD(101.24," D ^DIK . S ^ORD(101.24,1551,0)="ORRPW HDR ALLERGIES",^ORD(101.24,"B","ORRPW HDR ALLERGIES",1551)="" I $P($G(^ORD(101.24,1553,0)),"^",1)="ORRPW HDR PHARMACY OUT" D . S ORVIT=1,DA=1553,DIK="^ORD(101.24," D ^DIK . S ^ORD(101.24,1553,0)="ORRPW HDR PHARMACY OUT",^ORD(101.24,"B","ORRPW HDR PHARMACY OUT",1553)="" I $P($G(^ORD(101.24,1105,0)),"^",1)="ORRPW DOD PHARM ALL OUT" D . S ORVIT=1,DA=1105,DIK="^ORD(101.24," D ^DIK . S ^ORD(101.24,1105,0)="ORRPW DOD PHARM ALL OUT",^ORD(101.24,"B","ORRPW DOD PHARM ALL OUT",1105)="" I $P($G(^ORD(101.24,1078,0)),"^",1)="ORRPW PHARMACY ACT OUT" D . S ORVIT=1,DA=1078,DIK="^ORD(101.24," D ^DIK . S ^ORD(101.24,1078,0)="ORRPW PHARMACY ACT OUT",^ORD(101.24,"B","ORRPW PHARMACY ACT OUT",1078)="" Q POST ; initiate post-init processes ; N RESULT S RESULT=$$BSESETUP I '+RESULT W "***BSE SETUP FAILED: POST INSTALL *NOT* COMPLETED SUCCESSFULLY***",! Q S RESULT=$$DETSETUP I '+RESULT W "***DETAIL SETUP FAILED: POST INSTALL *NOT* COMPLETED SUCCESSFULLY***",! Q W "=== POST INSTALL COMPLETED SUCCESSFULLY ===" Q ; BSESETUP() ; N NAME S NAME=".w387LyM\4E-t7g*SgPl" W !,"REMOVING OLD BSE V/W ENTRY",! I +$$DELBSE(NAME) D Q $$SAVEBSE(NAME) .W "ADDING NEW BSE V/W ENTRY",! W "V/W BSE SETUP *NOT* COMPLETED SUCCESSFULLY",! Q 0 ; DETSETUP() ; Q 1 ; DELBSE(NAME) ; W "LOOKING FOR OLD V/W ENTRY",! N ERR,LIST D FIND^DIC(8994.5,"","@","X",NAME,"*","ACODE","","","LIST","ERR") I '+$D(LIST("DILIST",0)) D Q 0 .W "ERROR LOOKING UP OLD V/W ENTRY",! .W ERR I '+$P(LIST("DILIST",0),"^",1) D Q 1 .W "NO OLD V/W ENTRIES FOUND",! N I,FDA S I=0 F S I=$O(LIST("DILIST",2,I)) Q:'I D .K FDA S FDA(8994.5,LIST("DILIST",2,I)_",",.01)="@" .D FILE^DIE("","FDA","ERR") .W "REMOVED OLD V/W BSE ENTRY:"_LIST("DILIST",2,I),! .I $D(ERR) D ..W "ERROR LOOKING UP OLD V/W ENTRY",! ..W ERR Q 1 ; SAVEBSE(NAME) ; N FDA,ERR,INDEX S FDA(8994.5,"+1,",.01)="VISTAWEB" S INDEX=$$CPRSOPT I +$G(INDEX)'>0 D Q 0 .W "COULD NOT FIND CPRS OPTION:"_INDEX,! S FDA(8994.5,"+1,",.02)=INDEX S FDA(8994.5,"+1,",.03)=NAME S FDA(8994.51,"+2,+1,",.01)="H" S FDA(8994.51,"+2,+1,",.02)="12181" S FDA(8994.51,"+2,+1,",.03)="10.2.48.11" S FDA(8994.51,"+2,+1,",.04)="/resolve.do" W "WRITING TO (BSE) REMOTE APPLICATION FILE",! D UPDATE^DIE("","FDA","","ERR") I +$D(ERR) D Q 0 .W ERR W "VISTAWEB ENTRY SUCCESSFULLY ADDED",! Q 1 ; CPRSOPT() ;Finds the IEN of the option for "OR CPRS GUI CHART" N OPTNAME S OPTNAME="OR CPRS GUI CHART" W "LOOKING FOR '"_OPTNAME_"'",! N INDEX,ERR S INDEX=$$FIND1^DIC(19,"","X",OPTNAME,"B","","ERR") I +$D(ERR) D Q 0 .W "ERROR TRYING TO FIND OPTION",! .W ERR W "FOUND OPTION",! Q INDEX ;