source: cprs/branches/tmg-cprs/m_files/TMGRPC1B.m@ 1035

Last change on this file since 1035 was 894, checked in by Kevin Toppenberg, 14 years ago

interval update

File size: 2.9 KB
Line 
1TMGRPC1B ;TMG/kst-RPC Functions ;3/28/10, 7/11/10
2 ;;1.0;TMG-LIB;**1**;3/28/10
3 ;
4 ;"TMG RPC FUNCTIONS
5 ;
6 ;"Copyright Kevin Toppenberg MD
7 ;"Released under GNU General Public License (GPL)
8 ;"
9 ;"=======================================================================
10 ;" RPC -- Public Functions.
11 ;"=======================================================================
12 ;"ENSUREALL -- Ensure all needed TMG RPC entries have been added
13 ;
14 ;"=======================================================================
15 ;"PRIVATE API FUNCTIONS
16 ;"=======================================================================
17 ;"ENSURE1(RPCNAME) -- ensure 1 RPC is in OPTION record OR CPRS GUI CHART
18 ;
19 ;"=======================================================================
20 ;"=======================================================================
21 ;"Dependencies:
22 ;" DIC
23 ;"=======================================================================
24 ;"=======================================================================
25 ;
26ENSUREAL
27 ;"Ensure all needed TMG RPC entries have been added
28L1 ;;TMG ADD PATIENT
29 ;;TMG AUTOSIGN TIU DOCUMENT
30 ;;TMG BARCODE DECODE
31 ;;TMG BARCODE ENCODE
32 ;;TMG CHANNEL
33 ;;TMG CPRS GET URL LIST
34 ;;TMG DOWNLOAD FILE
35 ;;TMG DOWNLOAD FILE DROPBOX
36 ;;TMG GET BLANK TIU DOCUMENT
37 ;;TMG GET DFN
38 ;;TMG GET IMAGE LONG DESCRIPTION
39 ;;TMG GET PATIENT DEMOGRAPHICS
40 ;;TMG INIFILE GET
41 ;;TMG INIFILE SET
42 ;;TMG MSGLINK CHANNEL
43 ;;TMG SEARCH CHANNEL
44 ;;TMG SET PATIENT DEMOGRAPHICS
45 ;;TMG UPLOAD FILE
46 ;;TMG UPLOAD FILE DROPBOX
47 ;;TMG IMAGE DELETE
48 ;;MAGGADDIMAGE
49 ;;MAG3 TIU IMAGE
50 ;;MAG3 CPRS TIU NOTE
51 ;;<END>
52 ;
53 NEW TMGI
54 NEW DONE SET DONE=0
55 FOR TMGI=0:1 DO QUIT:DONE
56 . NEW RPC SET RPC=$PIECE($TEXT(L1+TMGI^TMGRPC1B),";;",2)
57 . IF (RPC="")!(RPC="<END>") SET DONE=1 QUIT
58 . DO ENSURE1(RPC)
59 QUIT
60 ;
61ENSURE1(RPCNAME) ;
62 ;"Purpose: to ensure 1 RPC is in OPTION record OR CPRS GUI CHART
63 ;" (add if needed)
64 NEW DIC,X,Y,DA
65 SET DIC="^DIC(19,",DIC(0)="M"
66 SET X="OR CPRS GUI CHART"
67 DO ^DIC
68 IF +Y'>0 DO QUIT
69 . WRITE "ERROR. Unable to find [OR CPRS GUI CHART] in file OPTION (#19)",!
70 . NEW TEMP READ "Press [ENTER] to continue...",TEMP:($GET(DTIME,3600))
71 . WRITE !
72 SET DA(1)=+Y
73 SET DIC=DIC_DA(1)_",""RPC"","
74 SET DIC(0)="ML" ;"LAYGO --> add entry if not found
75 SET X=RPCNAME
76 DO ^DIC
77 IF +Y'>0 DO
78 . WRITE "ERROR. Unable to add or find "_RPCNAME_" for subfile RPC in record",!
79 . WRITE "OR CPRS GUI CHART in file OPTION (#19)",!
80 . NEW TEMP READ "Press [ENTER] to continue...",TEMP:($GET(DTIME,3600))
81 . WRITE !
82 QUIT
83
84
Note: See TracBrowser for help on using the repository browser.