source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORY190.m@ 1704

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

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1ORY190 ; slc/CLA - Pre and Post-init for patch OR*3*190 ; Aug 6, 2003@11:02:31 [6/17/04 12:59pm]
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**190**;Dec 17, 1997
3 ;
4PRE ;initiate pre-init processes
5 ;
6 Q
7 ;
8POST ;initiate post-init processes
9 ;
10 N VER
11 ;
12 S VER=$P($T(VERSION^ORY190),";",3)
13 I +$$PATCH^XPDUTL("TIU*1.0*112") D SURGREG
14 D SETVAL
15 D SORTCHG
16 D PSIV
17 D MAIL
18 ;
19 Q
20 ;
21SURGREG ; Register TIU SURGERY RPCs if TIU*1.0*112 present
22 N MENU,RPC
23 S MENU="OR CPRS GUI CHART"
24 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)
25 Q
26 ;
27INSERT(OPTION,RPC) ; Call FM Updater with each RPC
28 ; Input -- OPTION Option file (#19) Name field (#.01)
29 ; RPC RPC sub-file (#19.05) RPC field (#.01)
30 ; Output -- None
31 N FDA,FDAIEN,ERR,DIERR
32 S FDA(19,"?1,",.01)=OPTION
33 S FDA(19.05,"?+2,?1,",.01)=RPC
34 D UPDATE^DIE("E","FDA","FDAIEN","ERR")
35 Q
36 ;
37SETVAL ; Set package-level values for params
38 N X
39 S X=0,X=$O(^ORD(100.98,"B","NON-VA MEDICATIONS",X)) Q:'X D
40 . D PUT^XPAR("PKG","ORWOR CATEGORY SEQUENCE",68,X)
41 S X=0,X=$O(^ORD(101.41,"B","PSH OERR",X)) Q:'X D
42 . D PUT^XPAR("PKG","ORWOR WRITE ORDERS LIST",53,X)
43 D PUT^XPAR("PKG","ORWD NONVA REASON",1,"Non-VA medication not recommended by VA provider.")
44 D PUT^XPAR("PKG","ORWD NONVA REASON",2,"Non-VA medication recommended by VA provider.")
45 D PUT^XPAR("PKG","ORWD NONVA REASON",3,"Patient wants to buy from Non-VA pharmacy.")
46 D PUT^XPAR("PKG","ORWD NONVA REASON",4,"Medication prescribed by Non-VA provider.")
47 ;
48 D PUT^XPAR("PKG","ORB SORT METHOD",1,"D") ; Date/Time
49 Q
50 ;
51SORTCHG ; conver "T" sort method values to "M"
52 N ORLST,ORERR,ORBX,ORBE,ORBERR
53 S ORBE=0,ORBX=0
54 D ENVAL^XPAR(.ORLST,"ORB SORT METHOD",1,.ORERR)
55 I 'ORERR,$G(ORLST)>0 D
56 .F ORBX=1:1:ORLST S ORBE=$O(ORLST(ORBE)) I ORLST(ORBE,1)="T" D
57 ..D EN^XPAR(ORBE,"ORB SORT METHOD",1,"M",.ORBERR)
58 ..I +ORBERR>0 D
59 ...S X="Error: "_ORBERR_" converting ORB SORT METHOD value 'T' to 'M' for entity "_ORBE
60 ...D BMES^XPDUTL(X)
61 Q
62 ;
63PSIV ; convert package ptrs in #101.41 from PSIV to PSJ
64 N ORPSIV,ORPSJ,ORI,X
65 S ORPSIV=+$$PKG^ORMPS1("PSIV"),ORPSJ=+$$PKG^ORMPS1("PSJ") Q:ORPSJ<1
66 S ORI=$O(^ORD(101.41,"B","PSJI OR PAT FLUID OE",0)) I ORI,$D(^ORD(101.41,ORI,0)) S X=$P(^(0),U,7),$P(^(0),U,7)=ORPSJ K ^ORD(101.41,"APKG",X,ORI) S ^ORD(101.41,"APKG",ORPSJ,ORI)="" ;ensure IV dlg is correct
67 I ORPSIV S ORI=0 F S ORI=$O(^ORD(101.41,"APKG",ORPSIV,ORI)) Q:ORI<1 D
68 . K ^ORD(101.41,"APKG",ORPSIV,ORI)
69 . S $P(^ORD(101.41,ORI,0),U,7)=ORPSJ,^ORD(101.41,"APKG",ORPSJ,ORI)=""
70 Q
71 ;
72MAIL ; send bulletin of installation time
73 N COUNT,DIFROM,I,START,TEXT,XMDUZ,XMSUB,XMTEXT,XMY
74 S COUNT=0
75 S XMSUB="Version "_$P($T(VERSION),";;",2)_" Installed"
76 S XMDUZ="CPRS PACKAGE"
77 F I="G.CPRS GUI INSTALL@ISC-SLC.VA.GOV",DUZ S XMY(I)=""
78 S XMTEXT="TEXT("
79 ;
80 S X=$P($T(VERSION),";;",2)
81 D LINE("Version "_X_" has been installed.")
82 D LINE(" ")
83 D LINE("Install complete: "_$$FMTE^XLFDT($$NOW^XLFDT()))
84 ;
85 D ^XMD
86 Q
87 ;
88LINE(DATA) ; set text into array
89 S COUNT=COUNT+1
90 S TEXT(COUNT)=DATA
91 Q
92 ;
93VERSION ;;24.26
Note: See TracBrowser for help on using the repository browser.