source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SCCVEDI.m@ 1328

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1SCCVEDI ;ALB/RMO,TMP - Disposition Conversion; [ 03/28/95 9:18 AM ]
2 ;;5.3;Scheduling;**211**;Aug 13, 1993
3 ;
4EN(SCCVEVT,SCSTDT,SCENDT,SCLOG,SCREQ,SCSTOP) ;Entry point to loop through all dispositions for a specified date range
5 ; Input -- SCCVEVT Conversion event
6 ; SCSTST Start date
7 ; SCENDT End date
8 ; SCLOG Scheduling conversion log IEN
9 ; SCREQ Scheduling conversion request IEN
10 ; Output -- SCSTOPF Conversion stop flag
11 N SCDTM
12 S SCDTM=0
13 F SCDTM=SCSTDT:0 S SCDTM=$O(^DPT("ADIS",SCDTM)) Q:'SCDTM!($P(SCDTM,".")>SCENDT)!($G(SCSTOPF)) D PAT(SCCVEVT,SCDTM,SCLOG,SCREQ,.SCSTOPF)
14ENQ Q
15 ;
16PAT(SCCVEVT,SCDTM,SCLOG,SCREQ,SCSTOPF) ;Loop through patient dispositions for a specified date range
17 ; Input -- SCCVEVT Conversion event
18 ; SCDTM Disposition date/time
19 ; SCLOG Scheduling conversion log IEN
20 ; SCREQ Scheduling conversion request IEN
21 ; Output -- SCSTOPF Conversion stop flag
22 N DFN
23 F DFN=0:0 S DFN=$O(^DPT("ADIS",SCDTM,DFN)) Q:'DFN!($G(SCSTOPF)) I $D(^DPT(DFN,"DIS",+$O(^(DFN,0)),0)),$P(^(0),U,2)'=2 D
24 . IF SCCVEVT D ZERO(DFN)
25 . D EN^SCCVEDI1(SCCVEVT,DFN,SCDTM,SCLOG)
26 . D STOP^SCCVLOG(SCLOG,SCREQ,.SCSTOPF)
27PATQ Q
28 ;
29ZERO(DFN) ; -- fix zeroth if missing
30 IF '$D(^DPT(DFN,"DIS",0)),$O(^DPT(DFN,"DIS",0)) S ^DPT(DFN,"DIS",0)="^2.101D^^"
31 Q
Note: See TracBrowser for help on using the repository browser.