source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SDWLE4.m@ 767

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1SDWLE4 ;;IOFO BAY PINES/TEH - WAITING LIST-ENTER/EDIT;06/12/2002 ; 20 Aug 2002 2:10 PM ; Compiled May 1, 2007 15:18:53
2 ;;5.3;scheduling;**263,446**;AUG 13 1993;Build 77
3 ;
4 ;
5 ;******************************************************************
6 ; CHANGE LOG
7 ;
8 ; DATE PATCH DESCRIPTION
9 ; ---- ----- -----------
10 ;
11 ;CLINIC (409.32)
12 ;
13EN K DIR,DIC,DIE,DR
14 I $D(SDWLSC) S X=$$EXTERNAL^DILFD(409.3,8,,SDWLSC),DIC("B")=$S($D(SDWLSC):X,1:"") I DIC("B")="" K DIC("B")
15 I $D(^SDWL(409.3,SDWLDA,0)),$P(^(0),U,9) S DIC("B")=$$EXTERNAL^DILFD(409.3,8,,$P(^(0),U,9))
16 S SDWLERR=0
17 K X,Y
18 S DIC(0)="QEMNZA",DIC("A")="Select Clinic: ",DIC("S")="I $P(^SDWL(409.32,+Y,0),U,6)=SDWLINE,'$P(^(0),U,4),$P(^(0),U,2)'=""""",DIC=409.32 D ^DIC
19 I X="^" S DUOUT=1 G END
20 I X="" W *7," Required" G EN
21 I Y<0 S DUOUT=1 G END
22 I $D(DTOUT) S DUOUT=1
23 I $D(SDWLSC),Y<0 G END
24 I Y<0 W " Required or ""^"" to Quit" G EN
25EN1 S SDWLSC=+Y
26 ;disply already created appointments
27 N SDCL S SDCL=$$GET1^DIQ(409.32,SDWLSC,.01,"I") ; get pointer to 44
28 N SDD,SDSP,SDORG S SDSP="",SDORG=DT S SDD=$$CHKENC^SDWLQSC1(DFN,SDORG,SDCL,SDSP,1)
29 I SDD D APPTDIS N DIR,Y D I Y["^"!'Y S DUOUT=1 Q
30 .W !!,"This patient already has scheduled appointments which may match",!,"the Wait List Entry."
31 .S DIR(0)="Y^A0",DIR("B")="NO",DIR("A")="Are you sure you want to continue"
32 .D ^DIR
33 Q:$G(DUOUT) S DA=SDWLDA,DIE="^SDWL(409.3,",DR="8////^S X=SDWLSC" D ^DIE
34 K DIR,DIC,DIE,DR
35END Q
36APPTDIS ;display already created appt/encounters
37 ;from ^TMP($J,"APPT")
38 N STR,SCNT
39 Q:'$D(^TMP($J,"APPT"))
40 S SCNT="" F S SCNT=$O(^TMP($J,"APPT",SCNT)) Q:SCNT="" D
41 .S STR=^TMP($J,"APPT",SCNT)
42 .N ZZ F ZZ=2,3,4,15 S SDD(ZZ)=$P($P(STR,"^",ZZ),";",2)
43 .N SD S SD=$P(STR,U) D S Y=SD D D^DIQ S SDD(1)=Y ; date conv
44 ..I SDD(3)="SCHEDULED/KEPT" S SDD(3)=$S(SD<DT:"KEPT",1:"SCHEDULED")
45 .;DISPLAY
46 .I SCNT=1 D DPH(SCNT,.SDD)
47 .D DPHD(SCNT,.SDD)
48 Q
49DPH(SCNT,SDD) ;display appt header
50 W !!,"Appointment(s) for: "_SDD(4)
51 W !?3,"Appt Date/Time",?23,"Clinic",?48,"Status",?60,"Institution",! N SDL S $P(SDL,"-",79)="" W SDL,!
52 Q
53DPHD(SCNT,SDD) ;
54 W !,SCNT,?3,SDD(1),?23,$E(SDD(2),1,23),?48,$E(SDD(3),1,10),?60,SDD(15)
55 Q
Note: See TracBrowser for help on using the repository browser.