source: WorldVistAEHR/trunk/r/AUTOMATED_INFO_COLLECTION_SYS-IBD/IBDFDE61.m@ 1006

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

initial load of WorldVistAEHR

File size: 1.8 KB
RevLine 
[613]1IBDFDE61 ;ALB/AAS - AICS Manual Data Entry, process selection lists ; 24-FEB-96
2 ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
3 ;
4% G ^IBDFDE6
5 ;
6PARTLST(NEXT,ANS) ; -- user gave inexact match, find which one
7 ;
8 N I,J,K,IBD,ANS2,SEL
9 S J=1,I=^TMP("IBD-PLN",$J,IBDF("CLINIC"),NEXT),IBD(J)=I,SEL=""
10 D ONE^IBDFDE6(I,J)
11 ;
12 S K=NEXT F S K=$O(^TMP("IBD-PLN",$J,IBDF("CLINIC"),K)) Q:$E(K,1,$L(ANS))'=ANS D
13 .S J=J+1,IBD(J)=^TMP("IBD-PLN",$J,IBDF("CLINIC"),K)
14 .D ONE^IBDFDE6(IBD(J),J)
15 ;
16ASKNUM G:J<1 PARTLQ
17 W !," Choose 1-",J,": " R ANS2:DTIME
18 I '$T!($E(ANS2,1)="^")!(ANS2="") S SEL="" G PARTLQ
19 I $E(ANS2,1)="?" W !,"Enter a number from 1 - ",J G ASKNUM
20 S ANS2=+ANS2
21 I ANS2<1!(ANS2>J) G ASKNUM
22 I $G(IBD(ANS2))="" G ASKNUM
23 W !
24 S SEL=$G(IBD(ANS2))
25PARTLQ I ANS2="^" S IBQUIT=1
26 Q SEL
27 ;
28MULT(CNT,IBD) ; -- multiple appointment
29 N IBDI,ANS2,RESULT
30 I 'CNT!'$D(IBD) Q ""
31 S RESULT=""
32 ; -- Loop through appointments, same date, same clinic
33 F IBDI=1:1:CNT S NODE=$G(^TMP(ARRAY,$J,IBDF("CLINIC"),$P(IBD(IBDI),"^",2),+IBD(IBDI))) Q:NODE']"" D ONE^IBDFDE6(NODE,IBDI)
34 ;
35ASKN G:CNT<1 MULTQ
36 W !," Choose 1-",CNT,": " R ANS2:DTIME
37 I '$T!($E(ANS2,1)="^")!(ANS2="") G MULTQ
38 I $E(ANS2,1)="?" W !,"Enter a number from 1 - ",CNT G ASKN
39 S ANS2=+ANS2
40 I ANS2<1!(ANS2>CNT) G ASKN
41 I $G(IBD(ANS2))="" G ASKN
42 W !
43 S RESULT=$G(^TMP(ARRAY,$J,IBDF("CLINIC"),$P(IBD(ANS2),"^",2),+IBD(ANS2)))
44MULTQ I ANS2="^" S IBQUIT=1
45 Q RESULT
46 ;
47ASKPT(CNT) ; -- select patient from list
48 Q:$G(IBQUIT)
49 N I,DIR,DIRUT,DUOUT,DTOUT ;F I=1:1 Q:($Y>(IOSL-3)) W !
50 I $E(IOST,1,2)["C-" S DIR(0)="E" D ^DIR S IBQUIT='Y
51 Q
52 ;
53 W !," Choose 1-",CNT,": " R ANS2:DTIME
54 I '$T!($E(ANS2,1)="^")!(ANS2="") S SEL="" G MULTQ
55 I $E(ANS2,1)="?" W !,"Enter a number from 1 - ",CNT G ASKN
56 S ANS2=+ANS2
57 I ANS2<1!(ANS2>CNT) G ASKN
58 I $G(IBD(ANS2))="" G ASKN
59 W !
60 S RESULT=$G(IBD(ANS2))
61 Q RESULT
Note: See TracBrowser for help on using the repository browser.