1 | ORCHANG1 ; SLC/KCM,MKB - Navigate Display Groups ;9/19/95 15:27
|
---|
2 | ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
|
---|
3 | DG(ORDG,ORSEL,ORGRP) ;Setup/Display groups
|
---|
4 | N ORSTK,ORMEM,ORCNT
|
---|
5 | Q:'ORDG Q:'$D(ORSEL)
|
---|
6 | S ORSTK=0,ORCNT=0 D @ORSEL
|
---|
7 | S ORSTK=1,ORSTK(ORSTK)=ORDG_"^0",ORSTK(0)=0,ORMEM=0
|
---|
8 | F S ORMEM=$O(^ORD(100.98,+ORSTK(ORSTK),1,ORMEM)) D @$S(+ORMEM'>0:"POP",1:"PROC") Q:ORSTK<1
|
---|
9 | K ORMEM,ORSTK
|
---|
10 | Q
|
---|
11 | ;
|
---|
12 | POP ; -- pop the stack
|
---|
13 | S ORSTK=ORSTK-1,ORMEM=$P(ORSTK(ORSTK),U,2)
|
---|
14 | Q
|
---|
15 | PROC ; -- process member
|
---|
16 | S $P(ORSTK(ORSTK),U,2)=ORMEM
|
---|
17 | S ORDG=$P(^ORD(100.98,+ORSTK(ORSTK),1,ORMEM,0),U)
|
---|
18 | D @ORSEL
|
---|
19 | S ORSTK=ORSTK+1,ORSTK(ORSTK)=ORDG_"^0",ORMEM=0
|
---|
20 | Q
|
---|
21 | ;
|
---|
22 | DISP ; -- display item
|
---|
23 | S ORCNT=ORCNT+1 I ORCNT>(IOSL-4) D READ S ORCNT=1
|
---|
24 | W !,?((ORSTK*2)),$P(^ORD(100.98,ORDG,0),U)
|
---|
25 | Q
|
---|
26 | ;
|
---|
27 | BILD ; -- build ORGRP()
|
---|
28 | S ORGRP(ORDG)=""
|
---|
29 | Q
|
---|
30 | ;
|
---|
31 | READ ; -- continue?
|
---|
32 | N X
|
---|
33 | W !!,"Press <return> to continue ..." R X:DTIME
|
---|
34 | Q
|
---|