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

XPDIA0.m

Go to the documentation of this file.
  1. XPDIA0 ;SFISC/RSD - Cont. of XPDIA ;03/09/2000 06:50 [ 04/02/2003 8:29 AM ]
  1. ;;8.0;KERNEL;**1007**;APR 1, 2003
  1. ;;8.0;KERNEL;**131,144**;Jul 10, 1995
  1. Q
  1. PROE1 ;protocols entry pre
  1. N %,I
  1. S ^TMP($J,"XPD",DA)=XPDFL
  1. ;if Event Driver, subscriber multiple is on node 775
  1. I $P(^XTMP("XPDI",XPDA,"KRN",101,OLDA,0),U,4)="E" D
  1. . Q:$D(^XTMP("XPDI",XPDA,"KRN",101,OLDA,775))
  1. . ;pre patch HL*1.6*57, convert menu multiple to subscriber
  1. . M ^XTMP("XPDI",XPDA,"KRN",101,OLDA,775)=^XTMP("XPDI",XPDA,"KRN",101,OLDA,10)
  1. . K ^XTMP("XPDI",XPDA,"KRN",101,OLDA,10)
  1. ;if Menu linking or merge save menu and subscriber mult. and process in FPOS code
  1. I XPDFL>1 D
  1. . M ^TMP($J,"XPD",DA,775)=^XTMP("XPDI",XPDA,"KRN",101,OLDA,775),^TMP($J,"XPD",DA,10)=^XTMP("XPDI",XPDA,"KRN",101,OLDA,10)
  1. . K ^XTMP("XPDI",XPDA,"KRN",101,OLDA,775),^(10)
  1. ;if Menu link, XPDQUIT prevents data merge
  1. I XPDFL=2 S XPDQUIT=1 Q
  1. ;if this is new to the site then disable and quit
  1. I $G(XPDNEW) D:XPDSET Q
  1. .;quit if option already has out of order msg.
  1. .Q:$P(^XTMP("XPDI",XPDA,"KRN",101,OLDA,0),U,3)]""
  1. .S $P(^XTMP("XPDI",XPDA,"KRN",101,OLDA,0),U,3)=$P(XPDSET,U,3)
  1. .D ADD^XQOO1($P(XPDSET,U,2),101,DA)
  1. S I=^XTMP("XPDI",XPDA,"KRN",101,OLDA,0),%=^ORD(101,DA,0)
  1. ;$P(%,U,3)=disable message,
  1. S:$P(I,U,3)]"" $P(I,U,3)=$P(%,U,3)
  1. ;if there is no new Security Key, save the old Key
  1. S:$P(I,U,6)="" $P(I,U,6)=$P(%,U,6)
  1. S ^XTMP("XPDI",XPDA,"KRN",101,OLDA,0)=I
  1. ;if there is a new Description, kill the old Description
  1. K:$O(^XTMP("XPDI",XPDA,"KRN",101,OLDA,1,0)) ^ORD(101,DA,1)
  1. ;kill old ACCESS multiple
  1. K ^ORD(101,DA,3) S I=0
  1. ;XPDFL=3-merge menu items, Quit
  1. ;the new menu items have already been saved into ^TMP, will restore in
  1. ;the file post action as a relink
  1. Q:XPDFL=3
  1. ;we are replacing menu items, kill the old.
  1. ;loop thru and kill "AD" and "AB" x-ref., it will be reset with new options
  1. F S I=$O(^ORD(101,DA,10,I)) Q:'I S %=+$G(^(I,0)) K:% ^ORD(101,"AD",%,DA,I)
  1. F S I=$O(^ORD(101,DA,775,I)) Q:'I S %=+$G(^(I,0)) K:% ^ORD(101,"AB",%,DA,I)
  1. K ^ORD(101,DA,10),^ORD(101,DA,775)
  1. Q