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

DITMGM1.m

Go to the documentation of this file.
  1. DITMGM1 ;SFISC/EDE(OHPRD)-INTERACTIVE MERGE ;Jan 05, 2015
  1. ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
  1. ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
  1. ;;Licensed under the terms of the Apache License, Version 2.0.
  1. ;
  1. START ;
  1. K DITMGMRG
  1. S DITMGMRG("GO")=0
  1. S DIC=1,DIC(0)="AEMQ" D ^DIC K DIC
  1. Q:Y<0
  1. S DITMGMRG("FILE")=+Y
  1. S DIC=DITMGMRG("FILE"),DIC(0)="AEMQ",DIC("A")="From entry: " D ^DIC K DIC
  1. Q:Y<0
  1. S DITMGMRG("FR")=+Y
  1. S DIC=DITMGMRG("FILE"),DIC(0)="AEMQ",DIC("A")="To entry: " D ^DIC K DIC
  1. Q:Y<0
  1. S DITMGMRG("TO")=+Y
  1. I DITMGMRG("FR")=DITMGMRG("TO") W !!,"From entry same as to entry!",!,$C(7) Q
  1. S DIC=1,DIC(0)="AEMQ",DIC("A")="Enter file to exclude from merge: " F D ^DIC Q:Y<1 S DITMGMRG("EXCLUDE",+Y)=""
  1. K DIC
  1. S DIR(0)="Y",DIR("A")="Exclude files in affected packages",DIR("B")="NO"
  1. S DIR("?",1)="This routine normally relinks/merges all files. Do you want to exclude"
  1. S DIR("?")="files that are part of a package that has its own merge routine?"
  1. D ^DIR K DIR
  1. Q:$D(DIRUT)
  1. I Y S DITMGMRG("PACKAGE")="",DITMGMRG("GO")=1 Q
  1. S DIR(0)="Y",DIR("A")="Merge only files in a specific package?",DIR("B")="NO"
  1. S DIR("?",1)="If you say NO you will merge all files pointing to the primary file."
  1. S DIR("?",2)="If you say YES you will be asked for a package file entry and only"
  1. S DIR("?")="merge the files in that package that point to the primary file."
  1. D ^DIR K DIR
  1. Q:$D(DIRUT)
  1. I 'Y S DITMGMRG("GO")=1 Q
  1. S DIC=9.4,DIC(0)="AEMQ" D ^DIC K DIC
  1. Q:Y<0
  1. S DITMGMRG("PACKAGE")=+Y
  1. S DITMGMRG("GO")=1
  1. Q