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

DIFROMSC.m

Go to the documentation of this file.
DIFROMSC ;SCISC/DCL-EDE IN CONTINUE FPRE & FPOST ;08:38 AM  22 Nov 1994
 ;;22.0;VA FileMan;;Mar 30, 1999
 ;Per VHA Directive 10-93-142, this routine should not be modified.
FPRE ;
 I '$D(DIQUIET) N DIQUIET S DIQUIET=1
 I '$D(DIFM) N DIFM S DIFM=1
 I $G(U)'="^"!($G(DT)'>0)!($G(DTIME)'>0)!('$D(DUZ)) D DT^DICRW
 N DIOVRD S DIOVRD=1
 S DIFRFILE=$G(DIFRFILE) S:DIFRFILE'>0 DIFRFILE=$G(XPDFIL)
 I DIFRFILE'>0 D BLD^DIALOG(9519) Q
 Q:DIFRFILE'=.403
 I $G(DIFRNAME)="" D BLD^DIALOG(9520) Q
 I $G(DIFRSA)="" S DIFRSA=$NA(^XTMP("XPDI",DIFRNAME,"KRN"))
 I DIFRFILE=.403 D  Q
 .N DIC,DIK,DIFRR,DIFRFILE,DIFRL,DIFRX,X,Y
 .S DIC="^DIST(.404,",DIC(0)="LX",DLAYGO=.404,DIFRFILE=.404
 .S DIFRR=0
 .F  S DIFRR=$O(@DIFRSA@(DIFRFILE,DIFRR)) Q:DIFRR'>0  S DIFRX=^(DIFRR,0) D
 ..S DIFRL=$P(DIFRX,"^",2)
 ..S X=$P(DIFRX,"^")
 ..K DA
 ..D ^DIC
 ..I Y'>0 D  Q
 ...N DIFRERR S DIFRERR(1)=$P(DIFRX,"^")
 ...D BLD^DIALOG(9517,.DIFRERR)
 ...Q
 ..K ^DIST(.404,+Y)
 ..I '$D(^DD(+DIFRL)) D
 ...N DIFRERR S DIFRERR(1)=$P(DIFRX,"^"),DIFRERR(2)=DIFRL
 ...D BLD^DIALOG(9518,.DIFRERR)
 ...Q
 ..M ^DIST(.404,+Y)=@DIFRSA@(DIFRFILE,DIFRR)
 ..S DIK=DIC,DA=+Y
 ..D IX1^DIK
 ..Q
 .Q
 Q
FPOST ;
 I '$D(DIQUIET) N DIQUIET S DIQUIET=1
 I '$D(DIFM) N DIFM S DIFM=1
 I $G(U)'="^"!($G(DT)'>0)!($G(DTIME)'>0)!('$D(DUZ)) D DT^DICRW
 N DIOVRD S DIOVRD=1
 Q
EXIT I $G(DIFRMSGR)]"" D CALLOUT^DIEFU(DIFRMSGR)
 Q