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

XMA2B.m

Go to the documentation of this file.
  1. XMA2B ;(WASH ISC)/CAP/THM-Send BLOB ;06/22/99 14:44
  1. ;;8.0;MailMan;;Jun 28, 2002
  1. ; Entry points used by MailMan options (not covered by DBIA):
  1. ; BLOB XMBLOBSEND - Send Imaging Package message
  1. BLOB ;Send BLOBs [Other Body Parts] in a message.
  1. ;Do not allow option to be used if Imaging is not set up.
  1. I '$O(^MAG(2005,0)) W !!,"Imaging is not installed here. You can not send multimedia messages.",$C(7) Q
  1. ;
  1. ;First message is created with text.
  1. K XMA2BT
  1. D BLOB^XMJMS
  1. Q
  1. ADD ;Then this entry point is called
  1. ;Called from ^XMJMS for adding BLOBS to message as other body parts
  1. ;
  1. W !,"Do you want to attach "_$S('$D(XMA2BT):"a",1:"another")_" patient's image to this message? N// " R X:DTIME
  1. I X="Y"!(X="y") S MAGBLOB=1 G SEL
  1. I $D(MAGBLOB) I X="N"!(X="n")!(X="^")!(X="") S X="" G ADDCHK
  1. SEL D SELIM^MAGAPI G ADDBLOB
  1. ADDCHK G CHK:X=""
  1. I X["?" D HLP G ADD
  1. ;
  1. ;Remove a BLOB
  1. S XMN=$E(X)="-"
  1. I XMN S X=$E(X,2,99) D LK G ER:+Y<1 S %=$O(^XMB(3.9,XMZ,2005,"B",+Y,0)) I % K ^(%) S I=^XMB(3.9,XMZ,2005,0),%0=$P(I,U,4)-1,$P(I,U,3,4)=%0_U_%0,^(0)=I K ^(%) G ADD
  1. ;
  1. ;Add a BLOB
  1. K S Y=-1 D LK
  1. ADDBLOB G:$S(X["^":1,X="":1,+Y<1:1,1:0) CHK
  1. S %=$S($D(^XMB(3.9,XMZ,2005,0)):^(0),1:"^3.92005P"),I=$P(%,U,3)+1,$P(%,U,3)=I,$P(%,U,4)=$P(%,U,4)+1,^(0)=%,^(I,0)=+Y
  1. S ^XMB(3.9,XMZ,2005,"B",+Y,I)="",XMA2BT=1
  1. G ADD
  1. CHK K XMA2BT Q:$S($O(^XMB(3.9,XMZ,2005,0)):1,'$O(^XMB(3.9,XMZ,2,0)):1,1:0)
  1. W !!,"You did not add any 'Other Body Parts' (files) to this message."
  1. R !!,"Do you wish to deliver just the text ? N// ",Y:DTIME
  1. K XMOUT
  1. S Y=$TR(Y,"yesno","YESNO")
  1. I $L(Y) Q:$E("YES",1,$L(Y))=Y
  1. I $E("NO",1,$L(Y))=Y G ADD
  1. W $C(7)," <<< Please answer 'YES' or 'NO'"
  1. G CHK
  1. ;
  1. LK S DIC=2005,DIC(0)="NOQFEM",DIC("S")="N % S %=^(0) I $P(%,U,6)'=9,$P(%,U,3)" D ^DIC K DIC Q
  1. ER W " ??",$C(7) G ADD
  1. ;
  1. HLP ;Help for adding/removing BLOBS
  1. W !!,"You may add or remove a BLOB from the message. To add a BLOB"
  1. W !,"enter the name of the BLOB you wish to add to the message. This"
  1. W !,"BLOB must already be in the * file. To remove on, preceed the"
  1. W !,"name of the BLOB with a '-'. Example: To add the BLOB named"
  1. W !,"ZZTEMP, enter 'ZZTEMP'. To remove it enter '-ZZTEMP'."
  1. Q:'$O(^XMB(3.9,XMZ,2005,0))
  1. W !!,"The following BLOBs have already been added to this message:",!!
  1. ;
  1. ;List BLOBS in a message
  1. L S I=0 F S I=$O(^XMB(3.9,XMZ,2005,I)) Q:+I'=I S %=+^(I,0),X=$P(^MAG(2005,%,0),U) W:$L(X)+$X>79 ! W X,?$X\10*10+10
  1. Q
  1. ;
  1. ;Entry point to list non-textual body parts for Query.
  1. LIST N I,X W !,"This message has non-textual body-parts: "
  1. G L