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

ENJINJ3.m

Go to the documentation of this file.
  1. ENJINJ3 ;(WASH ISC)/JA/TJK-Screen Input ;2.26.97
  1. ;;7.0;ENGINEERING**35**;;Aug 17, 1993
  1. ; Modified with **35** to handle escape sequences (ex: arrow keys)
  1. Z ;
  1. S DJSM=0,DJLG=+DJJ(V)+1
  1. D INITKB^XGF($C(9,13)) S X=$$READ^XGF("") S DJZ='$D(DTOUT) S:'DJZ X="^"
  1. I X="",$G(XGRT)]"" D
  1. . ; can only use jump navigation when data not entered in field
  1. . I "UP^LEFT"[XGRT D Q
  1. . . ; jump to previous field that is not read-only
  1. . . N I,J,K
  1. . . S I=V,K=0 F S I=$O(^ENG(6910.9,DJN,1,"A",I),-1) Q:I<1 D Q:K
  1. . . . S J=$O(^ENG(6910.9,DJN,1,"A",I,0))
  1. . . . I '$P($G(^ENG(6910.9,DJN,1,J,0)),U,7) S K=I
  1. . . S X="^"_$S(K:K,1:V)
  1. . I XGRT="PREV" S X="^U" Q
  1. . I XGRT="NEXT" S X="^D" Q
  1. S:X="" DJSM=1
  1. D RESETKB^XGF
  1. ;
  1. Z1 I $L(X)>(DJLG-1) W @IOBS," ",*7 X XY S:'$D(V(V)) V(V)="" D B:V(V)'="",D:V(V)="" W V(V) W:$D(DJDB) DJDB K DJDB X XY G Z
  1. I X?1"^".E!(X?1"?".E) S:'$D(V(V)) V(V)="" D B:V(V)'="",D:V(V)="" X XY W @DJHIN X XY W V(V) W:$D(DJDB) DJDB W @DJLIN K DJDB X XY Q
  1. Q
  1. N R !,"Repaint screen(Y/N): N//",DJX:DTIME I DJX["?" W !,*7,"Please enter 'Y'es or 'N'o." G N
  1. Q:"Yy"'[$E(DJX)!(DJX="") S DJSV=V D N^ENJDPL S V=DJSV Q
  1. B S $P(DJDB," ",DJJ(V)-$L(V(V)))="" Q
  1. D S $P(DJDB,".",DJJ(V))="." Q