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

DITMU1.m

Go to the documentation of this file.
  1. DITMU1 ;SFISC/EDE(OHPRD)-SETS DA ARRAY FROM D0,D1 ;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. ; This routine sets the DA array from D0,D1 etc. or D0,D1
  1. ; etc. from the DA array. If the variable DITMU1=2 it sets
  1. ; the DA array, otherwise it sets D0,D1 etc.
  1. ;
  1. ; The variable DITMU1 will be killed upon exiting this routine.
  1. ;
  1. ; The entry point KILL kills D0, D1, etc.
  1. ;
  1. START ;
  1. NEW I,J
  1. I $G(DITMU1)=2 D D0DA
  1. E D DAD0
  1. K DITMU1
  1. Q
  1. ;
  1. DAD0 ;
  1. F I=1:1 Q:'$D(DA(I)) S I(99-I)=DA(I)
  1. S J=0 F I=0:1 S J=$O(I(J)) Q:J'=+J S @("D"_I)=I(J)
  1. S @("D"_I)=DA
  1. Q
  1. ;
  1. D0DA ;
  1. F I=0:1 Q:'$D(@("D"_I)) S J=I
  1. F I=0:1 S DA(J)=@("D"_I) S J=J-1 Q:J<1
  1. S DA=@("D"_(I+1))
  1. Q
  1. ;
  1. KILL ; EXTERNAL ENTRY POINT - KILL D0, D1, ETC.
  1. NEW I
  1. F I=0:1 Q:'$D(@("D"_I)) K @("D"_I)
  1. Q