source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORY274.m@ 700

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

initial load of WorldVistAEHR

File size: 4.0 KB
RevLine 
[613]1ORY274 ;SLC/SLCOIFO-Pre and Post-init for patch OR*3*274 ;09/27/07 13:44
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**274**;Dec 17, 1997;Build 20
3 ;
4PRE ; initiate pre-init processes
5 D PEOMRPT
6 Q
7 ;
8PEOMRPT ;Remove new & changed reports from OE/RR REPORTS file (101.24)
9 N ORI,ORVIT
10 S ORVIT=0
11 I $P($G(^ORD(101.24,1032,0)),"^",1)="ORRPW ALLERGIES ADV" D
12 . S ORVIT=1,DA=1032,DIK="^ORD(101.24," D ^DIK
13 . S ^ORD(101.24,1032,0)="ORRPW ALLERGIES ADV",^ORD(101.24,"B","ORRPW ALLERGIES ADV",1032)=""
14 I $P($G(^ORD(101.24,1100,0)),"^",1)="ORRPW ORDERS CURRENT" D
15 . S ORVIT=1,DA=1100,DIK="^ORD(101.24," D ^DIK
16 . S ^ORD(101.24,1100,0)="ORRPW ORDERS CURRENT",^ORD(101.24,"B","ORRPW ORDERS CURRENT",1100)=""
17 I $P($G(^ORD(101.24,1079,0)),"^",1)="ORRPW PHARMACY ALL OUT" D
18 . S ORVIT=1,DA=1079,DIK="^ORD(101.24," D ^DIK
19 . S ^ORD(101.24,1079,0)="ORRPW PHARMACY ALL OUT",^ORD(101.24,"B","ORRPW PHARMACY ALL OUT",1079)=""
20 I $P($G(^ORD(101.24,48,0)),"^",1)="ORRP SURGERIES" D
21 . S ORVIT=1,DA=48,DIK="^ORD(101.24," D ^DIK
22 . S ^ORD(101.24,48,0)="ORRP SURGERIES",^ORD(101.24,"B","ORRP SURGERIES",48)=""
23 I $P($G(^ORD(101.24,1137,0)),"^",1)="ORRPW DOD ALLERGIES ADV" D
24 . S ORVIT=1,DA=1137,DIK="^ORD(101.24," D ^DIK
25 . S ^ORD(101.24,1137,0)="ORRPW DOD ALLERGIES ADV",^ORD(101.24,"B","ORRPW DOD ALLERGIES ADV",1137)=""
26 I $P($G(^ORD(101.24,1551,0)),"^",1)="ORRPW HDR ALLERGIES" D
27 . S ORVIT=1,DA=1551,DIK="^ORD(101.24," D ^DIK
28 . S ^ORD(101.24,1551,0)="ORRPW HDR ALLERGIES",^ORD(101.24,"B","ORRPW HDR ALLERGIES",1551)=""
29 I $P($G(^ORD(101.24,1553,0)),"^",1)="ORRPW HDR PHARMACY OUT" D
30 . S ORVIT=1,DA=1553,DIK="^ORD(101.24," D ^DIK
31 . S ^ORD(101.24,1553,0)="ORRPW HDR PHARMACY OUT",^ORD(101.24,"B","ORRPW HDR PHARMACY OUT",1553)=""
32 I $P($G(^ORD(101.24,1105,0)),"^",1)="ORRPW DOD PHARM ALL OUT" D
33 . S ORVIT=1,DA=1105,DIK="^ORD(101.24," D ^DIK
34 . S ^ORD(101.24,1105,0)="ORRPW DOD PHARM ALL OUT",^ORD(101.24,"B","ORRPW DOD PHARM ALL OUT",1105)=""
35 I $P($G(^ORD(101.24,1078,0)),"^",1)="ORRPW PHARMACY ACT OUT" D
36 . S ORVIT=1,DA=1078,DIK="^ORD(101.24," D ^DIK
37 . S ^ORD(101.24,1078,0)="ORRPW PHARMACY ACT OUT",^ORD(101.24,"B","ORRPW PHARMACY ACT OUT",1078)=""
38 Q
39POST ; initiate post-init processes
40 ;
41 N RESULT
42 S RESULT=$$BSESETUP
43 I '+RESULT W "***BSE SETUP FAILED: POST INSTALL *NOT* COMPLETED SUCCESSFULLY***",! Q
44 S RESULT=$$DETSETUP
45 I '+RESULT W "***DETAIL SETUP FAILED: POST INSTALL *NOT* COMPLETED SUCCESSFULLY***",! Q
46 W "=== POST INSTALL COMPLETED SUCCESSFULLY ==="
47 Q
48 ;
49BSESETUP() ;
50 N NAME S NAME=".w387LyM\4E-t7g*SgPl"
51 W !,"REMOVING OLD BSE V/W ENTRY",!
52 I +$$DELBSE(NAME) D Q $$SAVEBSE(NAME)
53 .W "ADDING NEW BSE V/W ENTRY",!
54 W "V/W BSE SETUP *NOT* COMPLETED SUCCESSFULLY",!
55 Q 0
56 ;
57DETSETUP() ;
58 Q 1
59 ;
60DELBSE(NAME) ;
61 W "LOOKING FOR OLD V/W ENTRY",!
62 N ERR,LIST
63 D FIND^DIC(8994.5,"","@","X",NAME,"*","ACODE","","","LIST","ERR")
64 I '+$D(LIST("DILIST",0)) D Q 0
65 .W "ERROR LOOKING UP OLD V/W ENTRY",!
66 .W ERR
67 I '+$P(LIST("DILIST",0),"^",1) D Q 1
68 .W "NO OLD V/W ENTRIES FOUND",!
69 N I,FDA S I=0
70 F S I=$O(LIST("DILIST",2,I)) Q:'I D
71 .K FDA S FDA(8994.5,LIST("DILIST",2,I)_",",.01)="@"
72 .D FILE^DIE("","FDA","ERR")
73 .W "REMOVED OLD V/W BSE ENTRY:"_LIST("DILIST",2,I),!
74 .I $D(ERR) D
75 ..W "ERROR LOOKING UP OLD V/W ENTRY",!
76 ..W ERR
77 Q 1
78 ;
79SAVEBSE(NAME) ;
80 N FDA,ERR,INDEX
81 S FDA(8994.5,"+1,",.01)="VISTAWEB"
82 S INDEX=$$CPRSOPT
83 I +$G(INDEX)'>0 D Q 0
84 .W "COULD NOT FIND CPRS OPTION:"_INDEX,!
85 S FDA(8994.5,"+1,",.02)=INDEX
86 S FDA(8994.5,"+1,",.03)=NAME
87 S FDA(8994.51,"+2,+1,",.01)="H"
88 S FDA(8994.51,"+2,+1,",.02)="12181"
89 S FDA(8994.51,"+2,+1,",.03)="10.2.48.11"
90 S FDA(8994.51,"+2,+1,",.04)="/resolve.do"
91 W "WRITING TO (BSE) REMOTE APPLICATION FILE",!
92 D UPDATE^DIE("","FDA","","ERR")
93 I +$D(ERR) D Q 0
94 .W ERR
95 W "VISTAWEB ENTRY SUCCESSFULLY ADDED",!
96 Q 1
97 ;
98CPRSOPT() ;Finds the IEN of the option for "OR CPRS GUI CHART"
99 N OPTNAME S OPTNAME="OR CPRS GUI CHART"
100 W "LOOKING FOR '"_OPTNAME_"'",!
101 N INDEX,ERR S INDEX=$$FIND1^DIC(19,"","X",OPTNAME,"B","","ERR")
102 I +$D(ERR) D Q 0
103 .W "ERROR TRYING TO FIND OPTION",!
104 .W ERR
105 W "FOUND OPTION",!
106 Q INDEX
107 ;
Note: See TracBrowser for help on using the repository browser.