source: cprs/branches/tmg-cprs/m_files/TMGRPC6.m@ 1548

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

Initial upload

File size: 7.4 KB
Line 
1TMGRPC6 ;TMG/kst/RPC Functions for tmg-messenger ;09/17/09
2 ;;1.0;TMG-LIB;**1**;09/17/09
3 ;
4 ;"TMG RPC FUNCTIONS for TMG-Messenger program
5 ;
6 ;"Kevin Toppenberg MD
7 ;"GNU Lessor General Public License (LGPL) applies
8 ;"9/17/09
9 ;
10 ;"=======================================================================
11 ;" RPC -- Public Functions.
12 ;"=======================================================================
13 ;"CHANNEL(TMGRESULT,INPUT) -- general purpose channel RPC from a GUI config program
14 ;
15 ;"=======================================================================
16 ;"Dependencies:
17 ;" TMGRPC6A
18 ;"=======================================================================
19 ;
20CHANNEL(TMGRESULT,INPUT) ;
21 ;"Purpose: This will be a general purpose channel RPC from a GUI Email program
22 ;" Called from RPC-- TMG MSGLINK CHANNEL;
23 ;"Input: TMGRESULT -- this is an OUT parameter, and it is always passed by reference
24 ;" INPUT -- this will be array of data sent from the GUI client. Defined below:
25 ;" INPUT("REQUEST")="cmd^params" Valid values for "cmd" are:
26 ;" "GET USERS OF EMAIL ADDRESS"
27 ;" params: email address. e.g. SomeUser@gmail.com
28 ;" e.g. INPUT("REQUEST")="GET USERS OF EMAIL ADDRESS^SomeUser@gmail.com"
29 ;" "GET MULT USERS EMAIL ADDRESSES"
30 ;" params: patient IENs list separated by ';' e.g. 1234;2345;234
31 ;" e.g. INPUT("REQUEST")="GET USERS EMAIL ADDRESSES^1234;2345;234"
32 ;" "SET ONE USER EMAIL ADDRESS"
33 ;" params: patient IEN^NewAddress^AltEmail1^AltEmail2^...
34 ;" e.g. INPUT("REQUEST")="GET USER EMAIL ADDRESS^1234^MyMail@server.com"
35 ;" "SET USERS EMAIL ADDRESSES"
36 ;" params: IEN1=NewAddress1;IEN2=NewAddress2;IEN3=NewAddress3 ....
37 ;" "FILE ENTRY SUBSET"
38 ;" params: FileNum^ListStartValue^direction^MaxCount(optional, def=44)
39 ;" "GET IEN 8925 FOR IMAP UID"
40 ;" params: UID -- this is the ID for message returned by IMAP
41 ;" "SET IMAP UID FOR IEN 8925"
42 ;" params: IEN8925^UID
43 ;" "KILL ASAVE"
44 ;" params: IEN200^IEN8925
45 ;" IEN200 -- the DUZ or user IEN in the NEW PERSON file
46 ;" IEN8925 -- the IEN of the document in file 8925 for which ASAVE needs to be deleted.
47 ;" "KILL USER EMAIL ADDRESS"
48 ;" params: PatientIEN^BadEmailAddress^bademail2^bademail3^...
49 ;" "ALTER USER EMAIL ADDRESS"
50 ;" params: PatientIEN^OldAddressValue^NewAddressValue
51 ;" "GET DOC TITLE EMAIL IEN"
52 ;" params: not used. Values ignored.
53 ;" "GET HIPPA CONSENT CODES"
54 ;" params: PatientIEN^
55 ;" "SET HIPPA CONSENT CODES"
56 ;" params: PatientIEN^Codes
57 ;" Codes should be one of values below:
58 ;" E - Email consented;
59 ;" EC - email & cell msg consented;
60 ;" C - just cell msg consented.
61 ;" N - NOT CONSENTED
62
63 ;"
64 ;"Output: results of this function should be put into TMGRESULTS array.
65 ;" For cmd:
66 ;" "GET USERS OF EMAIL ADDRESS"
67 ;" TMGRESULT(0)="#Found^Success" or "-1^Message"
68 ;" e.g. 1^Success --> 1 match found
69 ;" 2^Success --> 2 matches found
70 ;" 0^Success --> no errors, but no matches found.
71 ;" TMGRESULT(1)=Name^DOB^IEN2
72 ;" TMGRESULT(2)=Name^DOB^IEN2
73 ;" etc ...
74 ;" "GET MULT USERS EMAIL ADDRESSES"
75 ;" TMGRESULT(0)="#Found^Success" or "-1^Message"
76 ;" e.g. 1^Success --> 1 match found
77 ;" 2^Success --> 2 matches found
78 ;" 0^Success --> no errors, but no matches found.
79 ;" TMGRESULT(1)=IEN1^EmailAddress
80 ;" TMGRESULT(2)=IEN1^;ALT;EmailAddress
81 ;" TMGRESULT(3)=IEN2^EmailAddress
82 ;" etc ...
83 ;" "SET USER EMAIL ADDRESS"
84 ;" TMGRESULT(0)="#Found^Success" or "-1^Message"
85 ;" "SET USERS EMAIL ADDRESSES"
86 ;" TMGRESULT(0)="#Found^Success" or "-1^Message"
87 ;" "FILE ENTRY SUBSET"
88 ;" TMGRESULT(0)="1^Success" or "-1^Message"
89 ;" TMGRESULT(1)=Value
90 ;" TMGRESULT(2)=Value
91 ;" etc ...
92 ;" "KILL ASAVE"
93 ;" TMGRESULT(0)="0^Success", or "-1^Message"
94 ;" "KILL USER EMAIL ADDRESS"
95 ;" TMGRESULT(0)="1^Success" or "-1^Message"
96 ;" "ALTER USER EMAIL ADDRESS"
97 ;" TMGRESULT(0)="1^Success" or "-1^Message"
98 ;" "GET DOC TITLE EMAIL IEN"
99 ;" TMGRESULT(0)="-1^Message" or TMG(0)=IEN^Name
100 ;" "GET HIPPA CONSENT CODES"
101 ;" TMGRESULT(0)="1^Codes" or TMG(0)=-1^Codes
102 ;" Codes will be one of values below:
103 ;" E - Email consented;
104 ;" EC - email & cell msg consented;
105 ;" C - just cell msg consented.
106 ;" N - NOT CONSENTED
107 ;" "SET HIPPA CONSENT CODES"
108 ;" TMGRESULT(0)="1^Success" or "-1^Message"
109 ;
110 ;"Result: none
111 ;
112 NEW TMGCOMMAND,TMGCOMMAND
113 SET TMGCOMMAND=$$TRIM^XLFSTR($$UP^XLFSTR($PIECE($GET(INPUT("REQUEST")),"^",1)))
114 SET TMGPARAMS=$PIECE($GET(INPUT("REQUEST")),"^",2,199)
115 SET TMGRESULT(0)="-1^No command requested." ;"default to error state.
116 IF TMGCOMMAND="GET USERS OF EMAIL ADDRESS" DO
117 . DO GETEMULT^TMGRPC6A(.TMGRESULT,TMGPARAMS)
118 ELSE IF TMGCOMMAND="GET MULT USERS EMAIL ADDRESSES" DO
119 . DO GETUEMA^TMGRPC6A(.TMGRESULT,TMGPARAMS)
120 ELSE IF TMGCOMMAND="SET ONE USER EMAIL ADDRESS" DO
121 . DO SETUEMA^TMGRPC6A(.TMGRESULT,TMGPARAMS)
122 ELSE IF TMGCOMMAND="SET USERS EMAIL ADDRESSES" DO
123 . DO SETUSEM^TMGRPC6A(.TMGRESULT,TMGPARAMS)
124 ELSE IF TMGCOMMAND="FILE ENTRY SUBSET" DO
125 . DO GFLSUBST^TMGRPC6A(.TMGRESULT,TMGPARAMS)
126 ELSE IF TMGCOMMAND="KILL ASAVE" DO
127 . DO KILASAVE^TMGRPC6A(.TMGRESULT,TMGPARAMS)
128 ELSE IF TMGCOMMAND="GET IEN 8925 FOR IMAP UID" DO
129 . DO GETIEN8925^TMGRPC6A(.TMGRESULT,TMGPARAMS)
130 ELSE IF TMGCOMMAND="SET IMAP UID FOR IEN 8925" DO
131 . DO SETUID^TMGRPC6A(.TMGRESULT,TMGPARAMS)
132 ELSE IF TMGCOMMAND="KILL USER EMAIL ADDRESS" DO
133 . DO KILLUEMA^TMGRPC6A(.TMGRESULT,TMGPARAMS)
134 ELSE IF TMGCOMMAND="ALTER USER EMAIL ADDRESS" DO
135 . DO ALTEREMA^TMGRPC6A(.TMGRESULT,TMGPARAMS)
136 ELSE IF TMGCOMMAND="GET DOC TITLE EMAIL IEN" DO
137 . DO GETEMDOC^TMGRPC6A(.TMGRESULT,TMGPARAMS)
138 ELSE IF TMGCOMMAND="GET HIPPA CONSENT CODES" DO
139 . DO GETCONSNT^TMGRPC6A(.TMGRESULT,TMGPARAMS)
140 ELSE IF TMGCOMMAND="SET HIPPA CONSENT CODES" DO
141 . DO SETCONSNT^TMGRPC6A(.TMGRESULT,TMGPARAMS)
142 ;
143 QUIT
144 ;
Note: See TracBrowser for help on using the repository browser.