source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SDWLPE.m@ 1582

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

revised back to 6/30/08 version

File size: 3.4 KB
Line 
1SDWLPE ;IOFO BAY PINES/TEH - WAIT LIST - PARAMETER WAIT LIST ENTER/EDIT ;20 Aug 2002
2 ;;5.3;scheduling;**263,280,288,397**;AUG 13 1993
3 ;
4 ;
5EN ;
6 ;OPTION HEADER
7 ;
8 D HD
9 ;
10 ;SELECT FILE TO EDIT
11 ;
12EN1 D SEL G END:X["^",END:X=""
13 ;
14 ;EDIT PARAMETER FILE
15 ;
16 D EDIT G EN:'$D(Y)
17 G END
18 Q
19 ;
20SEL ;SELECT PARAMETER FILE
21 S DIR(0)="SO^1:Wait List Service/Specialty File;2:Wait List Clinic Location"
22 S DIR("L",1)="Select one of the following:"
23 S DIR("L",2)=""
24 S DIR("L",3)=" 1. Wait List Service/Specialty (409.31)"
25 S DIR("L")=" 2. Wait List Clinic Location (409.32)"
26 D ^DIR S SDWLF=X
27 K DIR,DILN,DINDEX
28 Q
29EDIT ;EDIT FILE PARAMETERS
30 I SDWLF=1 D SB1 Q:$D(DUOUT)
31 I SDWLF=2 D SB2 Q:$D(DUOUT)
32 Q
33SB1 S DIC(0)="AEQMZ",DIC("A")="Select DSS ID: ",DIC="^DIC(40.7,",DIC("S")="I '$P(^DIC(40.7,+Y,0),U,3)"
34 D ^DIC
35 I X["^" I $D(DA),'$D(^SDWL(409.31,DA,"I")) S DIK="^SDWL(409.31," D ^DIK S DUOUT=1 Q
36 Q:Y<0 Q:$D(DUOUT) S SDWLDSS=+Y
37 I '$D(^SDWL(409.31,"B",SDWLDSS)) D
38 .S DIC(0)="LX",X=SDWLDSS,DIC="^SDWL(409.31," K DO D FILE^DICN
39 S DA=$O(^SDWL(409.31,"B",SDWLDSS,""))
40SB1A S DIR(0)="PAO^4:EMZ" D ^DIR
41 I X="" W *7," Required" G SB1A
42 I X["^" D:'$D(^SDWL(409.31,DA,"I")) S DUOUT=1 Q
43 .S DIK="^SDWL(409.31," D ^DIK
44 S X=$$GET1^DIQ(4,+Y_",",11)
45 I X'["N"!'$$TF^XUAF4(+Y) W !,*7,"Invalid Entry. Must be 'National' Institution." G SB1A
46 I '$D(^SDWL(409.31,DA,"I","B",+Y)) D
47 .S DA(1)=DA,DIC="^SDWL(409.31,"_DA(1)_","_"""I"""_",",DIC("P")=409.311,X=+Y K D0 D FILE^DICN I +Y S DA=+Y
48 I $D(^SDWL(409.31,DA,"I","B",+Y)) S DA(1)=DA,DA=$O(^(+Y,0))
49 K DIC,DIE,DIR,DR
50 W ! S DR="1;3",DIE="^SDWL(409.31,"_DA(1)_","_"""I"""_"," D ^DIE
51 I $P(^SDWL(409.31,DA(1),"I",DA,0),U,2)="" D
52 .W *7," This ENTRY requires an ACTIVATION DATE. ENTRY deleted."
53 .S DIK="^SDWL(409.31,"_DA(1)_","_"""I"""_"," D ^DIK I '$P(^SDWL(409.31,DA(1),"I",0),U,3) D
54 ..S DIK="^SDWL(409.31,",DA=DA(1) D ^DIK
55 K DA,DA(1),SDWLDSS,DIC,DR,DIE,DI,DIEDA,DIG,DIH,DIIENS,DIR,DIU,DIV
56 Q
57SB2 S SDWLSTOP=0
58 W ! S DIC(0)="AEQMNZ",DIC("A")="Select Clinic: ",DIC=44
59 S DIC("S")="S SDWLX=$G(^SC(+Y,0)),SDWLY=$G(^(""I"")) I $P(SDWLX,U,3)=""C"",$P(SDWLY,U,1)'>$P(SDWLY,U,2) I $P(^SC(+Y,0),U,4)"
60 S DIC("W")="I $P(^SC(+Y,0),U,4) W ?50,""- "",$E($P(^DIC(4,$P(^SC(+Y,0),U,4),0),U,1),1,25)"
61 D ^DIC Q:Y<1 Q:$D(DUOUT) S SDWLSC=+Y
62 S INST=$$GET1^DIQ(44,+Y,3,"I")
63 S X=$$GET1^DIQ(4,+INST_",",11) I X'["N"!'$$TF^XUAF4(+INST) W !,*7,"Invalid Entry. Must be 'National' Institution." G SB2
64 I '$D(^SDWL(409.32,"B",SDWLSC)) D
65 .S DIC(0)="LX",X=SDWLSC,DIC="^SDWL(409.32," D FILE^DICN
66 S DA=$O(^SDWL(409.32,"B",SDWLSC,""))
67 K DIC,DIC(0)
68 S SDWLSCN=$P($G(^SDWL(409.32,DA,0)),U,1) D
69 .I $D(^SDWL(409.3,"C",SDWLSCN)) D
70 ..S SDWLN="",SDWLCNT=0 F S SDWLN=$O(^SDWL(409.3,"C",SDWLSCN,SDWLN)) Q:SDWLN="" D
71 ...S X=$G(^SDWL(409.3,SDWLN,0)) I '$D(^SDWL(409.3,SDWLN,"DIS")) S SDWLCNT=SDWLCNT+1,^TMP("SDWLPE",$J,"DIS",SDWLN,SDWLCNT)=X,SDWLSTOP=1
72 W ! I SDWLSTOP W "This Clinic has Patients on the Wait List and can not be inactivated." Q
73 S DR="1",DIE="^SDWL(409.32," D ^DIE I X S DR="2////^S X=DUZ" D ^DIE
74 S DR="3",DIE="^SDWL(409.32," D ^DIE I X S DR="4////^S X=DUZ" D ^DIE
75 K DR,DIE,DIC,Y,X,SDWLY,DIC(0),DO,DA,DI,DIW,SDWLX,SDWLSCN,SDWLF
76 Q
77SWT ;SWITCH FOR INACTIVIATION OF PARAMETER FILE
78 Q
79HD ;HEADER
80 W:$D(IOF) @IOF W !!,?80-$L("Wait List Parameter Enter/Edit")\2,"Wait List Parameter Enter/Edit",!
81 W !,?80-$L("------------------------------")\2,"------------------------------",!
82END K SDWLSTOP,DIR,DIC,DR,DIK,SDWLX,SDWLSCN,SDWLF,SDWLY,SDWLSC,SDWLN,SDWLCNT,SDWLDSS,DUOUT,X,Y
83 Q
Note: See TracBrowser for help on using the repository browser.