source: FOIAVistA/tag/r/SCHEDULING-SD-SC/SDAM10.m@ 1416

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1SDAM10 ;MJK/ALB - Appt Mgt (Patient cont.); 3/18/05 3:51pm
2 ;;5.3;Scheduling;**189,258,403,478**;Aug 13, 1993
3 ;
4HDR ; -- list screen header
5 ; input: SDFN := ifn of pat
6 ; output: VALMHDR() := hdr array
7 ;
8 N VAERR,VA,X
9 S DFN=SDFN D PID^VADPT
10 S VALMHDR(1)=$E($P("Patient: "_$G(^DPT(SDFN,0)),U),1,46)_" ("_VA("BID")_")" ;for proper display of patient name for SD*5.3*189
11 S X=$P($$FMT^SDUTL2(SDFN),U,2),X=$S(X["GMT":X,X]"":"MT: "_X,1:"")
12 S VALMHDR(1)=$$SETSTR^VALM1(X,VALMHDR(1),47,15) ;repositioned header to display clinic or patient name properly for SD*5.3*189
13 S X=$S($D(^DPT(SDFN,.1)):"Ward: "_^(.1),1:"Outpatient")
14 S VALMHDR(1)=$$SETSTR^VALM1(X,VALMHDR(1),81-$L(X),$L(X))
15 Q
16 ;
17PAT ; -- change pat
18 K TMP ;SD/478
19 D FULL^VALM1 S VALMBCK="R"
20 K X I $D(XQORNOD(0)) S X=$P($P(XQORNOD(0),U,4),"=",2)
21 I $D(X),X="" R !!,"Select Patient: ",X:DTIME
22 D RT^SDAMEX S DIC="^DPT(",DIC(0)="EMQ" D ^DIC K DIC G PAT:X["?"
23PAT1 S %=1 W !," ...OK" D YN^DICN I %=0 W " Answer with 'Yes' or 'No'" G PAT1
24 I %'=1 S Y=-1
25 I Y<0 D G PATQ
26 .I SDAMTYP="P" S VALMSG=$C(7)_"Patient has not been changed."
27 .I SDAMTYP="C" S VALMSG=$C(7)_"View of clinic remains in affect."
28 I SDAMTYP'="P" D CHGCAP^VALM("NAME","Clinic") S SDAMTYP="P"
29 S SDFN=+Y K SDCLN D BLD^SDAM1
30PATQ Q
31 ;
32INIT ; -- init bld vars
33 K VALMHDR,SDDA,^TMP("SDAMIDX",$J)
34 D CLEAN^VALM10
35 S VALMBG=1,(VALMCNT,SDACNT)=0,BL="",$P(BL," ",30)="",SDMAX=100
36 S SDAMDD=$P(^DD(2.98,3,0),U,3)
37 ; -- format vars |- column -| |- width -|
38 S X=VALMDDF("APPT#"),AC=$P(X,U,2),AW=$P(X,U,3) ; A for appt
39 S X=VALMDDF("DATE"),XC=$P(X,U,2),XW=$P(X,U,3) ; X for date
40 S X=VALMDDF("NAME"),NC=$P(X,U,2),NW=$P(X,U,3) ; N for name
41 S X=VALMDDF("STAT"),SC=$P(X,U,2),SW=$P(X,U,3) ; S for status
42 S X=VALMDDF("TIME"),TC=$P(X,U,2),TW=$P(X,U,3) ; T for time
43 S (CC,CW)="",X=$G(VALMDDF("CONSULT")) I X'="" S CC=$P(X,U,2),CW=$P(X,U,3) ; C for Consult ;SD/478
44 Q
45 ;
46LARGE ; -- too large note
47 W !!?5,*7,"Note: Ending Date was changed to '",$$FDATE^VALM1(SDEND),"' because"
48 W !?11,"too many appointments met date range criteria." D PAUSE^VALM1
49 Q
50 ;
51NUL ; -- set nul message
52 I '$O(^TMP("SDAM",$J,0)) D SET^SDAM1(" "),SET^SDAM1(" No appointments meet criteria.")
53 Q
54 ;
Note: See TracBrowser for help on using the repository browser.