source: cprs/branches/tmg-cprs/m_files/TMGKIDS.m

Last change on this file was 796, checked in by Kevin Toppenberg, 14 years ago

Initial upload

File size: 2.4 KB
Line 
1TMGKIDS ;TMG/kst/Code used for pre and post routines for KIDS build ;04/16/08
2 ;;1.0;TMG-LIB;**1**;04/16/08
3
4POSTINST
5 ;"Purpose: To provide a function that KIDS can call after installing patch.
6 ;"This particular function will add custom RPC entries to the RPC field in
7 ;"the OPTION field in OR CPRS GUI CHART.
8
9D1 ;"Below is a data list, not simple comments
10 ;;TMG ADD PATIENT
11 ;;TMG AUTOSIGN TIU DOCUMENT
12 ;;TMG BARCODE DECODE
13 ;;TMG BARCODE ENCODE
14 ;;TMG DOWNLOAD FILE
15 ;;TMG DOWNLOAD FILE DROPBOX
16 ;;TMG GET BLANK TIU DOCUMENT
17 ;;TMG GET DFN
18 ;;TMG GET IMAGE LONG DESCRIPTION
19 ;;TMG GET PATIENT DEMOGRAPHICS
20 ;;TMG SET PATIENT DEMOGRAPHICS
21 ;;TMG UPLOAD FILE
22 ;;TMG UPLOAD FILE DROPBOX
23 ;;TMG CPRS GET URL LIST
24 ;;--END OF LIST--
25
26 new ienORCPRS,DIC,X,Y
27 ;"set ienORCPRS= ... find in OPTION file.
28 set DIC=19 ;"OPTION file
29 set X="OR CPRS GUI CHART"
30 do ^DIC
31 set ienORCPRS=+$piece(Y,"^",1)
32 if ienORCPRS'>0 do goto PostDone
33 . write !,!,"Sorry, unable to locate OR CPRS GUI CHART in OPTION file.",!
34 . write "Unable to add TMG's RPC's to allowed list of RPC's for CPRS.",!
35
36 new i,rpcName
37 for i=1:1 do quit:(rpcName="")
38 . set rpcName=$text(D1+i^TMGKIDS)
39 . set rpcName=$piece(rpcName,";;",2)
40 . if rpcName="--END OF LIST--" set rpcName=""
41 . if rpcName="" quit
42 . do AddRPC(ienORCPRS,rpcName)
43
44PostDone
45 quit
46
47
48
49AddRPC(IENOption,RPCName)
50 ;"Purpose: To add the RPC Name to the RPC subfile in the Option record,
51 ;" given by IENOption
52 ;"Note: If IENRPC is already present, then it won't be added again.
53
54 ;"See if RPC is already present, to avoid duplication
55 new DIC,TMGD0,X,Y
56 set TMGD0=IENOption
57 set X=RPCName
58 set DIC="^DIC(19,"_IENOption_",""RPC"","
59 set DIC(0)="MZ"
60 do ^DIC
61
62 write RPCName
63 if +Y'>0 do
64 . ;"code to add RPC here.
65 . new TMGFDA,TMGIEN,TMGMSG
66 . set TMGFDA(19.05,"+1,"_IENOption_",",.01)=RPCName
67 . do UPDATE^DIE("E","TMGFDA","TMGIEN","TMGMSG")
68 . do ShowIfDIERR^TMGDEBUG(.TMGMSG)
69 . write ?30,"... Added as allowed RPC from CPRS",!
70 else do
71 . write ?30,"... already present",!
72
73 quit
74
75
76
Note: See TracBrowser for help on using the repository browser.