source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCQD.m@ 1154

Last change on this file since 1154 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.6 KB
RevLine 
[613]1FSCQD ;SLC/STAFF-NOIS Query Description ;4/22/94 11:56
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4DESC(DESCNT,CRITERIA) ; from FSCLMPMQ, FSCQB
5 N STEP,FCOND,NDESC
6 I 'DEFINE,DESC(0)'[" (MODIFIED)" S DESC(0)=DESC(0)_" (MODIFIED)"
7 S DESCNT=DESCNT+1,DESC=" "_$P(CRITERIA(0),U)_" where:"
8 S STEP=0 F S STEP=$O(CRITERIA(STEP)) Q:STEP="" D
9 .S FCOND=0 F S FCOND=$O(CRITERIA(STEP,FCOND)) Q:FCOND="" D
10 ..S NDESC=CRITERIA(STEP,FCOND,1)_$S($L(CRITERIA(STEP,FCOND,1)):" ",1:"")_CRITERIA(STEP,FCOND,0)
11 ..I $L(NDESC)+$L(DESC)+2<$G(IOM,80) S DESC=DESC_" "_NDESC Q
12 ..S DESC(DESCNT)=DESC,DESC=NDESC,DESCNT=DESCNT+1
13 S DESC(DESCNT)=DESC
14 I DEFINE S LDCNT=LDCNT+1 M @LISTDEF@(LDCNT)=CRITERIA
15 Q
16CRITERIA(CRITERIA) ; from FSCQB
17 N STEP,FCOND,NEWLINE,LINE,NEWDESC,CNT
18 S CNT=0,LINE="The last complete criteria was:"
19 S STEP=0 F S STEP=$O(CRITERIA(STEP)) Q:STEP="" D
20 .S FCOND=0 F S FCOND=$O(CRITERIA(STEP,FCOND)) Q:FCOND="" D
21 ..S NEWLINE=CRITERIA(STEP,FCOND,1)_$S($L(CRITERIA(STEP,FCOND,1)):" ",1:"")_CRITERIA(STEP,FCOND,0)
22 ..I $L(NEWLINE)+$L(LINE)+2<$G(IOM,80) S LINE=LINE_" "_NEWLINE Q
23 ..S NEWDESC(CNT)=LINE,LINE=NEWLINE,CNT=CNT+1
24 S NEWDESC(CNT)=LINE
25 S CNT="" F S CNT=$O(NEWDESC(CNT)) Q:CNT="" D
26 .W !,NEWDESC(CNT)
27 Q
28HELP ; executed from FSCQU and DIR
29 N CNT
30 I $O(CRITERIA(0)) D CRITERIA(.CRITERIA)
31 I $L($G(ANDOR))!$L($G(FIELD)) D
32 .W !,"You are now entering:",!,$S($L($G(ANDOR)):ANDOR_" ",1:""),$S($L(FIELD):$P(FIELD,U,3)_" ",1:""),$S($L(COND):$P(COND,U,5)_" ",1:""),$S($L(VALUE):$P(VALUE,U,2)_" ",1:"")
33 S CNT=0 F S CNT=$O(DIR("?",CNT)) Q:CNT<1 W !,DIR("?",CNT)
34 W !,"Enter '^' to exit, '??' for additional help."
35 Q
Note: See TracBrowser for help on using the repository browser.