source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SDPPSEL.m@ 1710

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

initial load of WorldVistAEHR

File size: 1.4 KB
RevLine 
[613]1SDPPSEL ;ALB/CAW - Specific selection and Date Range; 5/4/92
2 ;;5.3;Scheduling;**6,20,28,32,79**;Aug 13, 1993
3 ;
4ASK ; Ask either stop code or clinic depending on DIC
5 ;
6 W !,"Do you want a specific "_$S(DIC=40.7:"stop code",DIC=44:"clinic",DIC=408.31:"means test")
7 S %=2 D YN^DICN S:%=-1 SDERR=1 I %=0 D HELP G ASK
8 Q:%'=1
9ASK1 S DIC(0)="AEMQ",DIC("S")=$S(DIC=40.7:"I '$P(^(0),U,3)",DIC=44:"I $P(^(0),U,3)=""C"",'$G(^(""OOS""))",1:"")
10 I DIC=408.31 D ASK2 S DIC(0)="EMQ",DIC("S")="I $P(^(0),U,2)=DFN"
11 D ^DIC K DIC S:Y=-1 SDERR=1 S SDY=+Y
12 Q
13HELP ;
14 W !,"Answer 'Y' for Yes or 'N' for No"
15 Q
16DATE ; Ask date range
17 N SDBDPRE,SDEDPRE
18 I $D(SDBD),$D(SDED) S SDBDPRE=SDBD,SDEDPRE=SDED
19 K SDBD,SDED S SDT00="AEX" D DATE^SDUTL I '$D(SDED) K SDBD,BEGDATE,SDT00 S SDBEG=0,SDEND=9999999
20 I $D(SDED) K SDBEG,SDEND
21 I '$D(SDED) S SDBD=SDBDPRE,SDED=SDEDPRE D
22 . W !,"Date Range has not been changed" H 1
23 Q
24ALL ;Ask whether user wants 'all'
25 S SDACT=0,SDERR=0,%=2
26 I SDFLG=4 W !,"Active enrollments only" S %=2 D YN^DICN S SDACT=$S(%=1:1,1:0) I %=0 D HELP G ALL
27 S SDFLG=0
28 I %=1 S SDBEG=0,SDEND=9999999,SDHDR=1 K VALMHDR
29 K % Q
30 Q
31 ;
32ASK2 ;Entry point to look-up a means test for a patient
33 N X1
34 W !,"Select ANNUAL MEANS TEST DATE OF TEST: "
35 R X:DTIME I '$T S DTOUT=1,Y=-1 G Q
36 S:X["^" DUOUT=1 I X["^"!(X="") S Y=-1 G Q
37 I X'["?" Q
38 S X1=X
39 D FULL^VALM1
40 S X=X1,D="ADFN"_DFN,DIC(0)="Q" D IX^DIC K D
41 G ASK2
42Q Q
Note: See TracBrowser for help on using the repository browser.