Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ACDVSRV0

ACDVSRV0.m

Go to the documentation of this file.
  1. ACDVSRV0 ;IHS/ADC/EDE/KML - UPLOAD EXTRACTION GLOBAL TO MAIL MESSAGE VIA ^XMD;
  1. ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
  1. ;***********************************************************
  1. ;This routine will move the CDMIS extraction global into
  1. ;a mail message. The mail message will be sent to a server
  1. ;at the area or headquarters.
  1. ;***********************************************************
  1. EN ;EP ENTRY
  1. ;//^ACDVSAVE
  1. W !!,"Creating mail message now. Mail server."
  1. ;
  1. ;Ck for new data found...or not
  1. I '$D(^ACDVTMP) W !!,"No new data found." Q
  1. ;
  1. ;Set message count.
  1. ;Set global to $Q on.
  1. S ACDCNT=1,ACDGLO="^ACDVTMP"
  1. ;
  1. ;Set header record.
  1. ;Set encryption key
  1. S ^ACDVMESS(ACDCNT,0)=ACDFR_U_ACDTO_U_$P(^AUTTLOC($P(^AUTTSITE(1,0),U),0),U,2)_U_$P(^(0),U,10)_U_"$P($G(ACDZIP),U)"
  1. ;
  1. ;Load ^ACDVMESS in form: data node data node data node
  1. ;%RCR will move ^ACDVMESS into ^XMB (obsolete in K7)
  1. F S ACDGLO=$Q(@ACDGLO) Q:ACDGLO="" D
  1. .S ACDCNT=ACDCNT+1 S ^ACDVMESS(ACDCNT,0)=ACDGLO
  1. .S ACDCNT=ACDCNT+1 S ^ACDVMESS(ACDCNT,0)=@ACDGLO
  1. ;
  1. SEND ;
  1. ;Send the new mail message just created to the remote server(s)
  1. ;Variable ACDOMAIN is a site parameter pre-set
  1. S XMTEXT="^ACDVMESS("
  1. S XMDUZ=.5
  1. S XMSUB="EXTRACTION GLOBAL"
  1. D ^XMD
  1. K ;
  1. K ACDCNT,ACDGLO,XMTEXT,XMSUB,XMY
  1. K ^ACDVMESS ; kill of scratch global SAC EXEMPTION (2.3.2.3 killing of unsubscripted globals is prohibited)
  1. ;
  1. ;Future enhancement listed below:
  1. ;K7 will allow the developer to create a new message directly
  1. ;into ^XMB so cpu time of %RCR is avoided.
  1. ;
  1. ;D XMZ^XMA2 ;Get new message number in variable XMZ
  1. ;=> ;S ^XMB(3.9,XMZ,2,0)="^3.92A^"_ACDCNT_"^"_ACDCNT
  1. ;D ENT1^XMD ;Call here after loading ^XMB directly
  1. ;See page 54 of the 1992 Paragon Training Manual 'INSIDE KERNAL 7'