Ignore:
Timestamp:
Jun 22, 2012, 7:11:05 PM (12 years ago)
Author:
Sam Habiel
Message:

Refactored BSDX08 and BSDX29 routines; plus new UT routine BSDXUT1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/m/BSDXUT.m

    r1454 r1455  
    1 BSDXUT ; VEN/SMH - Unit Tests for Scheduling GUI ; 6/21/12 4:42pm
     1BSDXUT ; VEN/SMH - Unit Tests for Scheduling GUI ; 6/22/12 4:27pm
    22        ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
    33        ; Licensed under LGPL
     
    262262        S APPID=+$P(^BSDXTMP($J,1),U)
    263263        D APPDEL^BSDX08(.ZZZ,APPID,"PC",1,"Sam's Cancel Note")
    264         I $P(^BSDXAPPT(APPID,0),U,12)'>0 W "Error in Cancellation-1"
    265         I $O(^SC(HLIEN,"S",APPTTIME,1,0))]"" W "Error in Cancellation-2"
    266         I $P(^DPT(DFN,"S",APPTTIME,0),U,2)'="PC" W "Error in Cancellation-3"
    267         I ^DPT(DFN,"S",APPTTIME,"R")'="Sam's Cancel Note" W "Error in Cancellation-4"
     264        I $P(^BSDXAPPT(APPID,0),U,12)'>0 W "Error in Cancellation-1",!
     265        I $O(^SC(HLIEN,"S",APPTTIME,1,0))]"" W "Error in Cancellation-2",!
     266        I $P(^DPT(DFN,"S",APPTTIME,0),U,2)'="PC" W "Error in Cancellation-3",!
     267        I ^DPT(DFN,"S",APPTTIME,"R")'="Sam's Cancel Note" W "Error in Cancellation-4",!
    268268        ;
    269269        ; Test 2: Check for -1 -- TODO: Fix later... Can't do right now automatically
     
    312312        I APPID=0 W "Error in test 6",!
    313313        D CHECKIN^BSDX25(.ZZZ,APPID,$$NOW^XLFDT) ; Checkin
    314         S BSDXRESULT=$$RMCI^BSDXAPI(DFN,HLIEN,BSDXSTART) ; remove checkin
     314        S BSDXRESULT=$$RMCI^BSDXAPI(DFN,HLIEN,APPTTIME) ; remove checkin
    315315        D APPDEL^BSDX08(.ZZZ,APPID,"PC",10,"Cancel Note") ; delete appt
    316316        I $P(^BSDXTMP($J,1),$C(30))'="" W "Error in test 6",!
     
    358358        I APPID=0 W "Error in test 6",!
    359359        D CHECKIN^BSDX25(.ZZZ,APPID,$$NOW^XLFDT) ; Checkin
    360         S BSDXRESULT=$$RMCI^BSDXAPI(DFN,HLIEN,BSDXSTART) ; remove checkin
     360        S BSDXRESULT=$$RMCI^BSDXAPI(DFN,HLIEN,APPTTIME) ; remove checkin
    361361        D APPDEL^BSDX08(.ZZZ,APPID,"PC",10,"Cancel Note") ; delete appt
    362362        I $P(^BSDXTMP($J,1),$C(30))'="" W "Error in test 6",!
     
    415415 ;
    416416TIMES() ; $$ - Create a next available appointment time^ending time; Private
     417 ; Output: appttime^endtime
    417418 N NOW S NOW=$$NOW^XLFDT() ; Now time
    418419 N LAST S LAST=$O(^BSDXAPPT("B"," "),-1) ; highest time in file
     
    422423 N ENDTIME S ENDTIME=$$FMADD^XLFDT(APPTIME,0,0,15,0) ; Add 15 more min
    423424 Q APPTIME_U_ENDTIME ; quit with apptime^endtime
     425 ;
     426TIMEHL(HLIEN) ; $$ - Create a next available appointment time^ending time by HL; Private
     427 ; Input: HLIEN
     428 ; Output: Next available appointment time for the HLIEN
     429 N LAST S LAST=$O(^SC(HLIEN,"S",""),-1)
     430 Q $$FMADD^XLFDT(LAST,1,0,15,0) ; Add 1 day and 15 minutes
Note: See TracChangeset for help on using the changeset viewer.