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

RMPFQT1.m

Go to the documentation of this file.
  1. RMPFQT1 ;DDC/KAW-QUEUE A BATCH FOR TRANSMISSION [ 05/21/99 11:38 AM ]
  1. ;;2.0;REMOTE ORDER/ENTRY SYSTEM;**15,16**;JUN 16, 1995
  1. ;;Reference to ^VA(200) supported by DBIA #10060
  1. ;;Reference to ^XMB(3.9) supported by DBIA #10113
  1. ;;Reference to ^DIC(5) supported by DBIA #10056
  1. ; input: RMPFBT,XMZ
  1. ;output: None
  1. S RMPFMU="S.RMPFLOADMESSAGE"_$S(RMPFMENU=0:"(ASPS)",1:"(PSAS)")
  1. DOMAIN S DM=^XMB("NETNAME")
  1. I DM="" W:'$D(ZTSK) $C(7),!!,"*** NO DOMAIN ESTABLISHED IN THE KERNEL PARAMETER FILE ***" G END
  1. BUILD S RMPFDOM=RMPFMU_"@"_DM,(CZ,RMPFBJ)=0,^XMB(3.9,XMZ,2,0)="^3.92A"
  1. S X="NOW",%DT="T" D ^%DT S RMPFD=Y
  1. F II=1:1 S RMPFBJ=$O(^RMPF(791812,RMPFBT,101,RMPFBJ)) Q:'RMPFBJ I $D(^(RMPFBJ,0)),$P(^(0),U,3)="" S RMPFX=$P(^(0),U,1) D SET Q:'$D(^RMPF(791812,RMPFBT,0))
  1. F II=3,4 S $P(^XMB(3.9,XMZ,2,0),U,II)=CZ
  1. END K RMPFD,RMPFBJ,II,RMPFB,CZ,RMPFX,%DT,RMPFDOM,RMPFMU,DM,A Q
  1. SET ; input: RMPFX,RMPFBT,CZ
  1. ;output: None
  1. Q:'$D(^RMPF(791810,RMPFX,0)) S SX=^(0)
  1. S RMPFSTAP=$S($D(^RMPF(791810,RMPFX,"STA")):$P(^("STA"),U,1),1:RMPFSTAP)
  1. S X=$P(SX,U,1),RMPFTNM="VADDC "_RMPFSTAP_"-"_X
  1. S RMPFTYP=$P(SX,U,2) I 'RMPFTYP D SETE Q
  1. I '$D(^RMPF(791810.1,RMPFTYP,0)) D SETE Q
  1. S RMPFHAT=$P(^RMPF(791810.1,RMPFTYP,0),U,2)
  1. S CZ=CZ+1,^XMB(3.9,XMZ,2,CZ,0)=RMPFTNM_U_RMPFX_U_RMPFDOM_U_$P(RMPFSYS,U,10)
  1. F I=0,1,2,10,11 S ST=$G(^RMPF(791810,RMPFX,I)),XX="" D D DEL S CZ=CZ+1,^XMB(3.9,XMZ,2,CZ,0)=I_U_XX
  1. .Q:'$L(ST)
  1. .F J=1:1:$S(I=0:15,I=1:8,I=2:13,I=10:8,1:4) S X=$P(ST,U,J) D S $P(XX,U,J)=X
  1. ..S Z="S"_I_J,Y=$P($T(@Z),";;",2) Q:Y="" X Y Q
  1. MOD S (RMPFY,M)=0,RMPFST1=4
  1. F I=1:1 S RMPFY=$O(^RMPF(791810,RMPFX,101,RMPFY)) Q:'RMPFY I $D(^(RMPFY,0)) D
  1. .Q:'$D(^RMPF(791810,RMPFX,101,RMPFY,0)) S SY=^(0),S=$P(SY,U,18)
  1. .Q:'S Q:'$D(^RMPF(791810.2,S,0)) S X=$P(^(0),U,2) Q:X'="A"
  1. .F J=0,2,3,90 S ST=$S($D(^RMPF(791810,RMPFX,101,RMPFY,J)):^(J),1:""),XX="" I $L(ST) D D DEL S CZ=CZ+1,^XMB(3.9,XMZ,2,CZ,0)="M"_RMPFY_U_J_"^^"_XX
  1. ..F K=1:1:$S(J=0:20,J=90:15,J=3:5,1:7) S X=$P(ST,U,K) D S $P(XX,U,K)=X
  1. ...S Z="M"_J_K,Y=$P($T(@Z),";;",2) Q:Y="" X Y
  1. .S RMPFZ=0 F KX=0:0 S RMPFZ=$O(^RMPF(791810,RMPFX,101,RMPFY,101,RMPFZ)) Q:'RMPFZ S S0=^(RMPFZ,0),CZ=CZ+1,^XMB(3.9,XMZ,2,CZ,0)="M"_RMPFY_"^101^"_"S"_RMPFZ_U_S0
  1. .S RMPFZ=0 F KX=0:0 S RMPFZ=$O(^RMPF(791810,RMPFX,101,RMPFY,102,RMPFZ)) Q:'RMPFZ S ST=^(RMPFZ,0) D D DEL S CZ=CZ+1,^XMB(3.9,XMZ,2,CZ,0)="M"_RMPFY_"^102^C"_RMPFZ_U_XX
  1. ..F K=1:1:7 S X=$P(ST,U,K) D S $P(XX,U,K)=X
  1. ...S Z="C0"_K,Y=$P($T(@Z),";;",2) Q:Y="" X Y
  1. .I '$D(TD) S %DT="T",X="NOW" D ^%DT S TD=Y
  1. .S AC=$P(SY,U,19) S:AC="" AC="O" Q:AC="C"&("CI"[RMPFHAT)
  1. .S RMPFST=$O(^RMPF(791810.2,"AB",AC,0)) I RMPFST="" S RMPFST=4
  1. .S DIE="^RMPF(791810,"_RMPFX_",101,",DA(1)=RMPFX,DA=RMPFY
  1. .S DR=".18///"_RMPFST_";.17////"_TD D ^DIE S RMPFST1=RMPFST
  1. I '$D(TD) S %DT="T",X="NOW" D ^%DT S TD=Y
  1. S DIE="^RMPF(791810,",DA=RMPFX,DR=".03////"_RMPFST1_";.06////"_TD
  1. D ^DIE
  1. S CZ=CZ+1,SZ="" D ^RMPFQT2 S ^XMB(3.9,XMZ,2,CZ,0)="21^"_SZ
  1. S CZ=CZ+1,^XMB(3.9,XMZ,2,CZ,0)="22^"_XX
  1. SETE K RMPFY,RMPFE,RMPFTNM,RMPFTYP,RMPFZ,RMPFHAT,RMPFST,RMPFST1,SZ,I,J,JJ,K
  1. K AC,D0,DA,DI,DIC,DIE,DQ,DR,L,M,ST,KX,S,%,%Y
  1. K X,XX,Y,YY,Z,TP,TD,TL,S1,SX,SY,X Q
  1. DEL F JJ=$L(XX):-1:0 Q:$E(XX,JJ)'=U S XX=$E(XX,1,JJ-1)
  1. K JJ Q
  1. S04 ;;Q:'X N I,J S DFN=X D DEM^VADPT S X=$P(VADM(1),U,1) K VADM,DFN
  1. S05 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)
  1. S08 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)
  1. S010 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)
  1. S012 ;;I X,$D(^RMPF(791812,X,0)) S X=$P(^(0),U,1)
  1. S106 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)
  1. S15 ;;I X,$D(^DIC(5,X,0)) S X=$P(^(0),U,2)
  1. S21 ;;I X,$D(^RMPR(662,X,0)) S X=$P(^(0),U,1)
  1. S22 ;;I X,$D(^RMPF(791810.4,X,0)) S X=$P(^(0),U,1)
  1. S23 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)
  1. S26 ;;I X,$D(^RMPF(791810.4,X,0)) S X=$P(^(0),U,1)
  1. S27 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)
  1. M01 ;;I X,$D(^RMPF(791811,X,0)) S Y=X,X=$P(^(0),U,1),YY=$P(^(0),U,2) I X'="NON-CONTRACT" S $P(^RMPF(791810,RMPFX,101,RMPFY,2),U,1)=YY
  1. M02 ;;I X,$D(^RMPF(791811.3,X,0)) S X=$P(^(0),U,1)
  1. M018 ;;I X,$D(^RMPF(791810.2,X,0)) S X=$P(^(0),U,1)
  1. M23 ;;I X,$D(^RMPF(791811.3,X,0)) S X=$P(^(0),U,1)
  1. M24 ;;I X,$D(^RMPF(791811.1,X,0)) S X=$P(^(0),U,1)
  1. M26 ;;I X S X=$P($G(^RMPF(791811.4,X,0)),U,2)
  1. M32 ;;I X S X=$P($G(^RMPR(662,X,0)),U,1)
  1. M901 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)
  1. M908 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)
  1. M9010 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)
  1. M9012 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)
  1. M9013 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)
  1. M9014 ;;I X,$D(^RMPF(791810.6,X,0)) S X=$P(^(0),U,1)
  1. C01 ;;I X,$D(^RMPF(791811.2,X,0)) S X=$P(^(0),U,3)
  1. C05 ;;I X,$D(^VA(200,X,0)) S X=$P(^(0),U,1)