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

DDSBOX.m

Go to the documentation of this file.
  1. DDSBOX ;SFISC/MKO-DRAW A BOX ;2015-01-02 6:19 PM
  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. EN(DDSUL,DDSLR) ;move entry point from topoof routine.
  1. ;
  1. D BOUNDS Q:'Y
  1. ;
  1. S DDS3L=""
  1. S $P(DDS3L,$P(DDGLGRA,DDGLDEL,3),$P(DDSLR,",",2)-$P(DDSUL,",",2))=""
  1. S DDS3M=$P(DDGLGRA,DDGLDEL,4)_$J("",$P(DDSLR,",",2)-$P(DDSUL,",",2)-1)_$P(DDGLGRA,DDGLDEL,4)
  1. ;
  1. S DY=$P(DDSUL,",")-1,DX=$P(DDSUL,",",2)-1 X IOXY
  1. W $P(DDGLGRA,DDGLDEL)_$P(DDGLGRA,DDGLDEL,5)_DDS3L_$P(DDGLGRA,DDGLDEL,6)
  1. ;
  1. F DY=$P(DDSUL,","):1:$P(DDSLR,",")-2 D
  1. . S DX=$P(DDSUL,",",2)-1 X IOXY
  1. . W DDS3M
  1. ;
  1. S DY=$P(DDSLR,",")-1,DX=$P(DDSUL,",",2)-1 X IOXY
  1. W $P(DDGLGRA,DDGLDEL,7)_DDS3L_$P(DDGLGRA,DDGLDEL,8)_$P(DDGLGRA,DDGLDEL,2)
  1. ;
  1. K DDS3L,DDS3M
  1. Q
  1. ;
  1. CLEAR(DDSUL,DDSLR) ;Clear area within upper left and lower right coords
  1. N S
  1. D BOUNDS Q:'Y
  1. ;
  1. S S=$J("",$P(DDSLR,",",2)-$P(DDSUL,",",2)+1)
  1. S DX=$P(DDSUL,",",2)-1
  1. F DY=$P(DDSUL,",")-1:1:$P(DDSLR,",")-1 X IOXY W S
  1. Q
  1. ;
  1. BOUNDS ;Make sure area is within acceptable boundaries
  1. N DDSV,DDSP
  1. S Y=1
  1. I $G(DDSUL)=""!($G(DDSLR))="" S Y=0 Q
  1. ;
  1. F DDSV="DDSUL","DDSLR" D
  1. . S:$P(@DDSV,",")>DDSHBX $P(@DDSV,",")=DDSHBX
  1. . S:$P(@DDSV,",",2)>(IOM-1) $P(@DDSV,",",2)=IOM-1
  1. . F DDSP=1,2 S:$P(@DDSV,",",DDSP)<1 $P(@DDSV,",",DDSP)=1
  1. ;
  1. I $P(DDSLR,",")-$P(DDSUL,",")<2 S Y=0 Q
  1. I $P(DDSLR,",",2)-$P(DDSUL,",",2)<2 S Y=0 Q
  1. ;
  1. Q