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

ORCHANG1.m

Go to the documentation of this file.
  1. ORCHANG1 ; SLC/KCM,MKB - Navigate Display Groups ;9/19/95 15:27
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
  1. DG(ORDG,ORSEL,ORGRP) ;Setup/Display groups
  1. N ORSTK,ORMEM,ORCNT
  1. Q:'ORDG Q:'$D(ORSEL)
  1. S ORSTK=0,ORCNT=0 D @ORSEL
  1. S ORSTK=1,ORSTK(ORSTK)=ORDG_"^0",ORSTK(0)=0,ORMEM=0
  1. F S ORMEM=$O(^ORD(100.98,+ORSTK(ORSTK),1,ORMEM)) D @$S(+ORMEM'>0:"POP",1:"PROC") Q:ORSTK<1
  1. K ORMEM,ORSTK
  1. Q
  1. ;
  1. POP ; -- pop the stack
  1. S ORSTK=ORSTK-1,ORMEM=$P(ORSTK(ORSTK),U,2)
  1. Q
  1. PROC ; -- process member
  1. S $P(ORSTK(ORSTK),U,2)=ORMEM
  1. S ORDG=$P(^ORD(100.98,+ORSTK(ORSTK),1,ORMEM,0),U)
  1. D @ORSEL
  1. S ORSTK=ORSTK+1,ORSTK(ORSTK)=ORDG_"^0",ORMEM=0
  1. Q
  1. ;
  1. DISP ; -- display item
  1. S ORCNT=ORCNT+1 I ORCNT>(IOSL-4) D READ S ORCNT=1
  1. W !,?((ORSTK*2)),$P(^ORD(100.98,ORDG,0),U)
  1. Q
  1. ;
  1. BILD ; -- build ORGRP()
  1. S ORGRP(ORDG)=""
  1. Q
  1. ;
  1. READ ; -- continue?
  1. N X
  1. W !!,"Press <return> to continue ..." R X:DTIME
  1. Q