source: WorldVistAEHR/trunk/r/EEO_COMPLAINT_TRACKING-EEO/EEOEXMT2.m@ 1144

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

initial load of WorldVistAEHR

File size: 2.2 KB
RevLine 
[613]1EEOEXMT2 ;HISC/JWR - TRANSMIT ROUTINE, CREATES SERVER MESSAGE (VERSION 2.0);11/28/92 12:00
2 ;;2.0;EEO Complaint Tracking;**1**;Apr 27, 1995
3 I '$D(^TMP("EEOXMT",$J)) D EXIT Q
4 D DT^DICRW S SERV=$O(^EEO(789.5,0)),SERV=^EEO(789.5,SERV,0),AEE=+SERV,SERV=$P(^DIC(4.2,$P(SERV,"^",2),0),"^")
5 S XMSUB=$$SITE^EEOEEXMT_" EEO SERVER MESSAGE"_" DATA"
6 K CLIENT,CLIENTNO S BEE=0 F S BEE=$O(^DIC(4.2,BEE)) Q:BEE'>0 I $P($G(^(BEE,0)),"^",13)=AEE S CLIENTNO=AEE,CLIENT=$P(^(0),"^") Q
7 I '$D(CLIENTNO) S CLIENTNO=$O(^EEO(789.5,"B",""))
8 K XMY
9 S XMY("S.EEO UPLINK SERVER@"_SERV)=""
10RES ;Takes the transmit global ^TMP($J, and breaks it down for encryption
11 S XMDUZ=DUZ K ^TMP($J)
12 S VEE=$S(CLIENTNO=$$SITE^EEOEEXMT:AEE,1:CLIENTNO)
13 S ^TMP($J,1)=$$SITE^EEOEEXMT_"^DATA"_"^"_20,FEE=2
14 S ^TMP($J,FEE)="&&&&&",EEE=BEE,BEE="",FEE=FEE+1 F S BEE=$O(^TMP("EEOXMT",$J,BEE)) Q:BEE="" S CEE="" F S CEE=$O(^TMP("EEOXMT",$J,BEE,CEE)) Q:CEE="" S DEE="" F S DEE=$O(^TMP("EEOXMT",$J,BEE,CEE,DEE)) Q:DEE="" D
15 .S EEE="" F S EEE=$O(^TMP("EEOXMT",$J,BEE,CEE,DEE,EEE)) Q:EEE="" S GEE="" F S GEE=$O(^TMP("EEOXMT",$J,BEE,CEE,DEE,EEE,GEE)) Q:GEE="" S DECR=^TMP("EEOXMT",$J,BEE,CEE,DEE,EEE,GEE) D ENCRY
16 S XMTEXT="^TMP($J," K XMZ D:'$D(XMY("S.EEO UPLINK SERVER@"_$P(^DIC(4.2,$P(^XMB(1,1,0),"^",1),0),"^",1))) ^XMD Q:'$D(XMZ)
17 ;W " " H 1 W "@"_SERV
18 K ^TMP($J)
19EXIT ;Kills variables/arrays
20 K ^TMP("EEOXMT",$J),XMDUZ,EEO,EEON0,EEON5,EEOS,EFLG,LABEL,NO,NOD,PFILE,PIECE,EEON1,EEON2,EEON3,EEON6,EEON12
21 Q
22SITE() ;Determination of site number is made here
23 Q $P(^DIC(4,$O(^DIC(4,"D",$P(^EEO(789.5,1,0),"^"),"")),99),"^")
24SERVNO() ;Determination of message destination
25 Q +^EEO(789.5,$O(^EEO(789.5,0)),0)
26LONG ;Breaks strings too long to encrypt into smaller strings, and encrpts
27 K EEOPT S EENOD=DECR,EEOL=$L(EENOD),EEOC="" F EEOC=0:50:250 S X=$E(EENOD,EEOC+1,EEOC+50) Q:X="" D EN^XUSHSHP D
28 .I $D(EEOPT) S EEOPT=EEOPT_X Q
29 .I '$D(EEOPT) S EEOPT=X Q
30 S ^TMP($J,FEE+1)=EEOPT K EEOPT,EEOL,EENOD,EEOC
31 Q
32ENCRY ;General encryption entry point
33 S X1=$$SITE^EEOEEXMT,X2=FEE
34 S X=DEE_"^"_BEE_"^"_CEE_"^"_EEE_"^"_GEE
35 D EN^XUSHSHP S ^TMP($J,FEE)=X
36 I $L(DECR)<50 S X=DECR,X2=FEE+1 D EN^XUSHSHP S ^TMP($J,FEE+1)=X,FEE=FEE+2 Q
37 I $L(DECR)'<50 S X2=FEE+1 D LONG S FEE=FEE+2
38 Q
Note: See TracBrowser for help on using the repository browser.