Index: Scheduling/trunk/m/BSDXUT.m
===================================================================
--- Scheduling/trunk/m/BSDXUT.m	(revision 1462)
+++ Scheduling/trunk/m/BSDXUT.m	(revision 1463)
@@ -1,3 +1,3 @@
-BSDXUT ; VEN/SMH - Unit Tests for Scheduling GUI ; 6/27/12 4:18pm
+BSDXUT ; VEN/SMH - Unit Tests for Scheduling GUI ; 6/28/12 10:14am
 	;;1.7T1;BSDX;;Aug 31, 2011;Build 18
 	; Licensed under LGPL
@@ -239,142 +239,4 @@
 	QUIT
 	; 
-UT08	; Unit Tests for BSDX08; Must have patients 1,2,3,4,5 defined in system
-	N RESNAM S RESNAM="UTCLINIC"
-	N HLRESIENS ; holds output of UTCR^BSDXUT - HL IEN^Resource IEN
-	D
-	. N $ET S $ET="D ^%ZTER B"
-	. S HLRESIENS=$$UTCR^BSDXUT(RESNAM)
-	. I HLRESIENS<0 S $EC=",U1," ; not supposed to happen - hard crash if so
-	;
-	N HLIEN,RESIEN
-	S HLIEN=$P(HLRESIENS,U)
-	S RESIEN=$P(HLRESIENS,U,2)
-	;
-	; Get start and end times
-	N TIMES S TIMES=$$TIMES^BSDXUT ; appt time^end time
-	N APPTTIME S APPTTIME=$P(TIMES,U)
-	N ENDTIME S ENDTIME=$P(TIMES,U,2)
-	;
-	; Test 1: Make normal appointment and cancel it. See if every thing works
-	N ZZZ,DFN
-	S DFN=3
-	D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,30,"Sam's Note",1)
-	S APPID=+$P(^BSDXTMP($J,1),U)
-	D APPDEL^BSDX08(.ZZZ,APPID,"PC",1,"Sam's Cancel Note")
-	I $P(^BSDXAPPT(APPID,0),U,12)'>0 W "Error in Cancellation-1",!
-	I $O(^SC(HLIEN,"S",APPTTIME,1,0))]"" W "Error in Cancellation-2",!
-	I $P(^DPT(DFN,"S",APPTTIME,0),U,2)'="PC" W "Error in Cancellation-3",!
-	I ^DPT(DFN,"S",APPTTIME,"R")'="Sam's Cancel Note" W "Error in Cancellation-4",!
-	;
-	; Test 2: Check for -1 -- TODO: Fix later... Can't do right now automatically
-	; Make appt
-	D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,30,"Sam's Note",1)
-	; Lock the node in another job
-	S APPID=+$P(^BSDXTMP($J,1),U)
-	; W "Lock ^BSDXAPPT("_APPID_") in another session. You have 10 seconds." H 10
-	D APPDEL^BSDX08(.ZZZ,APPID,"PC",1,"Sam's Cancel Note")
-	;
-	; Test 3: Check for -100
-	N TIMES S TIMES=$$TIMES^BSDXUT ; appt time^end time
-	N APPTTIME S APPTTIME=$P(TIMES,U)
-	N ENDTIME S ENDTIME=$P(TIMES,U,2)
-	D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,30,"Sam's Note",1)
-	S APPID=+$P(^BSDXTMP($J,1),U)
-	N BSDXDIE1 S BSDXDIE1=1
-	D APPDEL^BSDX08(.ZZZ,APPID,"PC",1,"Reasons")
-	I $P(^BSDXTMP($J,1),"~")'=-100 W "Error in -100",!
-	K BSDXDIE1
-	; 
-	; Test 3.5: Check for -100 with an appointment to rollback.
-	N TIMES S TIMES=$$TIMES^BSDXUT ; appt time^end time
-	N APPTTIME S APPTTIME=$P(TIMES,U)
-	N ENDTIME S ENDTIME=$P(TIMES,U,2)
-	D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,30,"Sam's Note",1)
-	S APPID=+$P(^BSDXTMP($J,1),U)
-	N BSDXDIE2 S BSDXDIE2=1
-	D APPDEL^BSDX08(.ZZZ,APPID,"PC",1,"Reasons")
-	I $P(^BSDXTMP($J,1),"~")'=-100 W "Error in -100-1",! 
-	I $P(^BSDXAPPT(APPID,0),U,12)'="" W "Error in -100-2",!
-	K BSDXDIE2
-	; Test 4: Restartable transaction -- retired in V 1.7
-	; Test 5: for invalid Appointment ID (-2 and -3)
-	D APPDEL^BSDX08(.ZZZ,0,"PC",1,"Reasons")
-	I $P(^BSDXTMP($J,1),"~")'=-2 W "Error in -2",!
-	D APPDEL^BSDX08(.ZZZ,999999,"PC",1,"Reasons")
-	I $P(^BSDXTMP($J,1),"~")'=-3 W "Error in -3",!
-	; More unit Tests
-	;
-	; Test 6: for Cancelling walkin and checked-in appointments 
-	N TIMES S TIMES=$$TIMES^BSDXUT ; appt time^end time
-	N APPTTIME S APPTTIME=$P(TIMES,U)
-	N ENDTIME S ENDTIME=$P(TIMES,U,2)
-	S DFN=4
-	D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,10,"Sam's Note",1) ; Add appt
-	S APPID=+$P(^BSDXTMP($J,1),U)
-	I APPID=0 W "Error in test 6",!
-	D CHECKIN^BSDX25(.ZZZ,APPID,$$NOW^XLFDT) ; check-in
-	D APPDEL^BSDX08(.ZZZ,APPID,"PC",10,"Cancel Note") ; Delete appt
-	I $P(^BSDXTMP($J,1),$C(30))'="" W "Error in test 6",!
-	;
-	; Test 7: for cancelling walkin and checked-in appointments
-	N TIMES S TIMES=$$TIMES^BSDXUT ; appt time^end time
-	N APPTTIME S APPTTIME=$P(TIMES,U)
-	N ENDTIME S ENDTIME=$P(TIMES,U,2)
-	S DFN=4
-	D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,10,"Sam's Note",1) ; Add appt
-	S APPID=+$P(^BSDXTMP($J,1),U)
-	I APPID=0 W "Error in test 6",!
-	D CHECKIN^BSDX25(.ZZZ,APPID,$$NOW^XLFDT) ; Checkin
-	S BSDXRESULT=$$RMCI^BSDXAPI(DFN,HLIEN,APPTTIME) ; remove checkin
-	D APPDEL^BSDX08(.ZZZ,APPID,"PC",10,"Cancel Note") ; delete appt
-	I $P(^BSDXTMP($J,1),$C(30))'="" W "Error in test 6",!
-	;
-	; Unlinked Clinic Tests
-	N RESNAM S RESNAM="UTCLINICUL" ; Unlinked Clinic
-	N RESIEN
-	D
-	. N $ET S $ET="D ^%ZTER B"
-	. S RESIEN=$$UTCRRES^BSDXUT(RESNAM)
-	. I RESIEN<0 S $EC=",U1," ; not supposed to happen - hard crash if so
-	;
-	; Get start and end times
-	N TIMES S TIMES=$$TIMES^BSDXUT ; appt time^end time
-	N APPTTIME S APPTTIME=$P(TIMES,U)
-	N ENDTIME S ENDTIME=$P(TIMES,U,2)
-	;
-	; Test 1: Make normal appointment and cancel it. See if every thing works
-	N ZZZ,DFN
-	S DFN=3
-	D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,30,"Sam's Note",1)
-	S APPID=+$P(^BSDXTMP($J,1),U)
-	D APPDEL^BSDX08(.ZZZ,APPID,"PC",1,"Sam's Cancel Note")
-	I $P(^BSDXAPPT(APPID,0),U,12)'>0 W "Error in Cancellation-1"
-	;
-	; Test 6: for Cancelling walkin and checked-in appointments 
-	N TIMES S TIMES=$$TIMES^BSDXUT ; appt time^end time
-	N APPTTIME S APPTTIME=$P(TIMES,U)
-	N ENDTIME S ENDTIME=$P(TIMES,U,2)
-	S DFN=4
-	D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,10,"Sam's Note",1) ; Add appt
-	S APPID=+$P(^BSDXTMP($J,1),U)
-	I APPID=0 W "Error in test 6",!
-	D CHECKIN^BSDX25(.ZZZ,APPID,$$NOW^XLFDT) ; check-in
-	D APPDEL^BSDX08(.ZZZ,APPID,"PC",10,"Cancel Note") ; Delete appt
-	I $P(^BSDXTMP($J,1),$C(30))'="" W "Error in test 6",!
-	;
-	; Test 7: for cancelling walkin and checked-in appointments
-	N TIMES S TIMES=$$TIMES^BSDXUT ; appt time^end time
-	N APPTTIME S APPTTIME=$P(TIMES,U)
-	N ENDTIME S ENDTIME=$P(TIMES,U,2)
-	S DFN=5
-	D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,10,"Sam's Note",1) ; Add appt
-	S APPID=+$P(^BSDXTMP($J,1),U)
-	I APPID=0 W "Error in test 6",!
-	D CHECKIN^BSDX25(.ZZZ,APPID,$$NOW^XLFDT) ; Checkin
-	S BSDXRESULT=$$RMCI^BSDXAPI(DFN,HLIEN,APPTTIME) ; remove checkin
-	D APPDEL^BSDX08(.ZZZ,APPID,"PC",10,"Cancel Note") ; delete appt
-	I $P(^BSDXTMP($J,1),$C(30))'="" W "Error in test 6",!
-	QUIT
-	;
 UTCR(RESNAM) ; $$ - Create Unit Test Clinic and Resource Pair ; Private
  ; Input: Resource Name By Value
