source: FOIAVistA/trunk/r/ASISTS-OOPS/OOPSPUT1.m@ 846

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1OOPSPUT1 ;HIRMFO/YH-ACCIDENT FORM UTILITIES ;4/24/98
2 ;;2.0;ASISTS;;Jun 03, 2002
3WDATE(OOPSDT,OOPSLC1,OOPSLC2,OOPSLC3) ;PRINT MONTH,DAY,YEAR
4 ;OOPSDT - FILEMAN DATE
5 ;OOPSLC1 - (X,Y) LOCATION OF MONTH
6 ;OOPSLC2 - (X,Y) LOCATION OF DAY
7 ;OOPSLC3 - (X,Y) LOCATION OF YEAR
8 Q:OOPSDT="" N DL S DL=$S(FORM="CA-1":"#",FORM="CA-2":"@",1:"") Q:DL=""
9 W !,"PU"_OOPSLC1_";LB"_$E(OOPSDT,4,5)_DL_";PU"_OOPSLC2_";LB"_$E(OOPSDT,6,7)_DL_";PU"_OOPSLC3_";LB"_$E(OOPSDT,2,3)_DL_";"
10 Q
11WTIME(OOPSTM,OOPSAM,OOPSPM,OOPSLC1,OOPSLC2) ;PRINT TIME
12 ;OOPSTM - TIME TO BE PRINTED
13 ;OOPSAM - (X,Y) LOCATION OF AM BOX
14 ;OOPSPM - (X,Y) LOCATION OF PM BOX
15 ;OOPSLC1 - (X,Y) LOCATION OF HOURS
16 ;OOPSLC2 - (X,Y) LOCATION OF MINUTES
17 Q:+OOPSTM'>0 N DL S DL=$S(FORM="CA-1":"#",FORM="CA-2":"@",1:"") Q:DL=""
18 N OOPSHR,AMPM S OOPSHR=+$E(OOPSTM,1,2)
19 S AMPM=$S(OOPSHR=24:"AM",OOPSHR<12:"AM",1:"PM")
20 S OOPSHR=$S(OOPSHR=24:12,OOPSHR<13:OOPSHR,1:OOPSHR-12)
21 I AMPM="PM" W !,"PU"_OOPSPM_";LBX"_DL_";"
22 I AMPM="AM" W !,"PU"_OOPSAM_";LBX"_DL_";"
23 W !,"PU"_OOPSLC1_";LB"_OOPSHR_DL_";PU"_OOPSLC2_";LB"_$E(OOPSTM,3,4)_DL_";"
24 Q
25WPHONE(OOPSPHON,OOPSLC1,OOPSLC2) ;PRINT HOME PHONE
26 ;OOPSPHON - PHONE TO BE PRINTED
27 ;OOPSLC1 - (X,Y) LOCATION FOR AREA CODE
28 ;OOPSLC1 - (X,Y) LOCATION FOR PHONE NUMBER
29 Q:OOPSPHON="" N DL S DL=$S(FORM="CA-1":"#",FORM="CA-2":"@",1:"") Q:DL=""
30 I $L(OOPSPHON,"-")>1 W !,"PU"_OOPSLC1_";LB"_$P(OOPSPHON,"-")_DL_";PU"_OOPSLC2_";LB"_$P(OOPSPHON,"-",2,9)_DL_";"
31 E W !,"PU"_OOPSLC1_";LB"_$E(OOPSPHON,1,3)_DL_";PU"_OOPSLC2_";LB"_$E(OOPSPHON,4,18)_DL_";"
32 Q
33WKSCHDUL(SCHEDL,SUN,MON,TUE,WED,THU,FRI,SAT) ;PRINT WORK SCHEDULE
34 ;SCHEDL: WORK SCHEDULE
35 ;SUN - SAT: BOX (X,Y) LOCATION
36 Q:SCHEDL="" N DL S DL=$S(FORM="CA-1":"#",FORM="CA-2":"@",1:"") Q:DL=""
37 N II,JJ,KK,WKDAY
38 Q:SCHEDL="" F II=1:1:7 S WKDAY(II)=0
39 F II=1:1:$L(SCHEDL,",") D
40 . S JJ=$P(SCHEDL,",",II) Q:+JJ'>0 D
41 . . I JJ["-" D
42 . . . F KK=+$P(JJ,"-"):1:+$P(JJ,"-",2) S WKDAY(KK)=1
43 . . E S WKDAY(+JJ)=1
44 F II=1:1:7 I WKDAY(II)=1 D
45 . W !,$S(II=1:"PU"_SUN_";LBX"_DL_";",II=2:"PU"_MON_";LBX"_DL_";",II=3:"PU"_TUE_";LBX"_DL_";",II=4:"PU"_WED_";LBX"_DL_";",II=5:"PU"_THU_";LBX"_DL_";",II=6:"PU"_FRI_";LBX"_DL_";",II=7:"PU"_SAT_";LBX"_DL_";",1:"")
46 Q
Note: See TracBrowser for help on using the repository browser.