source: FOIAVistA/tag/r/SCHEDULING-SD-SC/SDAMEP3.m@ 1625

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

initial load of FOIAVistA 6/30/08 version

File size: 3.8 KB
Line 
1SDAMEP3 ;ALB/CAW - Extended Display (Appt. Event Log) ; 16 May 2001 6:31 PM
2 ;;5.3;Scheduling;**20,241**;Aug 13, 1993
3 ;
4APLOG ;
5 D SET^SDAMEP1(" *** Appointment Event Log ***")
6 D CNTRL^VALM10(SDLN,24,29,IOINHI,IOINORM)
7 D SET^SDAMEP1($$EVENT("Event","Date","User"))
8 D SET^SDAMEP1($$EVENT("-----","----","----"))
9 D SET^SDAMEP1($$EVENT("Appt Made",$S($G(SDSC(44.003,SDDA,8))]"":SDSC(44.003,SDDA,8),1:$G(SDPT(2.98,SDT,20))),$S($G(SDSC(44.003,SDDA,7))]"":SDSC(44.003,SDDA,7),1:$G(SDPT(2.98,SDT,19)))))
10 D SET^SDAMEP1($$EVENT("Check In",$G(SDSC(44.003,SDDA,309)),$G(SDSC(44.003,SDDA,302))))
11 D SET^SDAMEP1($$EVENT("Check Out",$G(SDSC(44.003,SDDA,303)),$G(SDSC(44.003,SDDA,304))))
12 D SET^SDAMEP1($$EVENT("Check Out Entered",$G(SDSC(44.003,SDDA,306)),""))
13 D SET^SDAMEP1($$EVENT("No-Show/Cancel",$G(SDPT(2.98,SDT,15)),$G(SDPT(2.98,SDT,14)))),SET^SDAMEP1("")
14 ;
15 S X=""
16 S X=$$SETSTR^VALM1(" Checked Out:",X,7,SDWIDTH)
17 S X=$$SETSTR^VALM1($S($G(SDOE(409.68,+SDOE,.07))]"":"YES",1:""),X,SDFSTCOL+5,30)
18 D SET^SDAMEP1(X)
19 ;
20 S X=""
21 S X=$$SETSTR^VALM1(" Cancel Reason:",X,5,SDWIDTH)
22 S X=$$SETSTR^VALM1(SDPT(2.98,SDT,16),X,SDFSTCOL+5,30)
23 D SET^SDAMEP1(X)
24 ;
25 S X=""
26 S X=$$SETSTR^VALM1(" Cancel Remark:",X,5,SDWIDTH)
27 S X=$$SETSTR^VALM1(SDPT(2.98,SDT,17),X,SDFSTCOL+5,50)
28 D SET^SDAMEP1(X)
29 ;
30 S X=""
31 S X=$$SETSTR^VALM1(" Rebooked Date:",X,5,SDWIDTH)
32 S X=$$SETSTR^VALM1(SDPT(2.98,SDT,12),X,SDFSTCOL+5,20)
33 D SET^SDAMEP1(X)
34CWT ;Clinic Wait Time Information
35 N SDCWT,SDCWT1,SDCWT2
36 ;Get internal data values
37 F SDCWT=3,20,25:1:28 S SDCWT(SDCWT)=SDPTI(2.98,SDT,SDCWT,"I")
38 ;Wait time data applicable?
39 S SDCWT=1 S:$E(SDCWT(3))="C" SDCWT=0
40 S SDCWT1=SDCWT(20),SDCWT2=SDCWT(27)
41 ;Calculate Wait Time1
42 S SDCWT1=$S(SDCWT1<1:"",SDT<SDCWT1:0,1:$$FMDIFF^XLFDT(SDT,SDCWT1,1))
43 ;Calculate Wait Time2
44 S:'$$CWT3^SCRPW75(SDT,SDCWT(26),SDCWT(27),SDCWT(28),.SDCWT2) SDCWT2=""
45 S:+SDCWT1=SDCWT1 SDCWT1=SDCWT1_" day"_$S(SDCWT1=1:"",1:"s")
46 S:+SDCWT2=SDCWT2 SDCWT2=SDCWT2_" day"_$S(SDCWT2=1:"",1:"s")
47 D SET^SDAMEP1(" *** Clinic Wait Time Information ***")
48 D CNTRL^VALM10(SDLN,20,40,IOINHI,IOINORM)
49 D SET^SDAMEP1("")
50 ;
51 S X=""
52 S X=$$SETSTR^VALM1(" Request type:",X,7,SDWIDTH+6)
53 S X=$$SETSTR^VALM1($S('SDCWT:"N/A",$G(SDPT(2.98,SDT,25))]"":SDPT(2.98,SDT,25),1:"Unknown"),X,SDFSTCOL+10,50)
54 D SET^SDAMEP1(X)
55 ;
56 S X=""
57 S X=$$SETSTR^VALM1("'Next Available' Type:",X,5,SDWIDTH+6)
58 S X=$$SETSTR^VALM1($S('SDCWT:"N/A",1:SDPT(2.98,SDT,26)),X,SDFSTCOL+10,50)
59 D SET^SDAMEP1(X)
60 ;
61 S X=""
62 S X=$$SETSTR^VALM1(" Desired date:",X,5,SDWIDTH+6)
63 S X=$$SETSTR^VALM1($S('SDCWT:"N/A",1:SDPT(2.98,SDT,27)),X,SDFSTCOL+10,50)
64 D SET^SDAMEP1(X)
65 ;
66 S X=""
67 S X=$$SETSTR^VALM1(" Follow-up visit:",X,5,SDWIDTH+6)
68 S X=$$SETSTR^VALM1($S('SDCWT:"N/A",1:SDPT(2.98,SDT,28)_$S($L(SDPT(2.98,SDT,28)):" (computed)",1:"")),X,SDFSTCOL+10,50)
69 D SET^SDAMEP1(X)
70 ;
71 S X=""
72 S X=$$SETSTR^VALM1(" Clinic Wait Time1:",X,5,SDWIDTH+6)
73 S X=$$SETSTR^VALM1($S('SDCWT:"N/A",1:SDCWT1),X,SDFSTCOL+10,50)
74 D SET^SDAMEP1(X)
75 ;
76 S X=""
77 S X=$$SETSTR^VALM1(" Clinic Wait Time2:",X,5,SDWIDTH+6)
78 S X=$$SETSTR^VALM1($S('SDCWT:"N/A",1:SDCWT2),X,SDFSTCOL+10,50)
79 D SET^SDAMEP1(X)
80 D SET^SDAMEP1("")
81 I SDCWT D Q
82 .D SET^SDAMEP1("NOTE: Clinic Wait Time1 represents the difference between the date the")
83 .D SET^SDAMEP1(" appointment was entered and the date it was performed. Clinic Wait")
84 .D SET^SDAMEP1(" Time2 represents the difference between the 'desired date' and the")
85 .D SET^SDAMEP1(" date the appointment was performed.")
86 .Q
87 D SET^SDAMEP1("")
88 D SET^SDAMEP1("NOTE: Clinic Wait Time data is not applicable for appointments that have a")
89 D SET^SDAMEP1(" status of 'cancelled by clinic'.")
90 D SET^SDAMEP1("")
91 Q
92 ;
93EVENT(TYPE,TIME,USER) ;
94 Q $$SETSTR^VALM1(TYPE,$$SETSTR^VALM1(TIME,$$SETSTR^VALM1(USER,"",50,30),25,21),2,20)
95 ;
Note: See TracBrowser for help on using the repository browser.