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.2;VA FileMan;;Jan 05, 2016;Build 42
 ;;Per VA Directive 6402, this routine should not be modified.
 ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
 ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
 ;;Licensed under the terms of the Apache License, Version 2.0.
 ;
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