Index: Scheduling/trunk/m/BSDX01.m
===================================================================
--- Scheduling/trunk/m/BSDX01.m	(revision 965)
+++ Scheduling/trunk/m/BSDX01.m	(revision 968)
@@ -1,4 +1,4 @@
 BSDX01	; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 9/29/10 10:20am
-	;;1.4;BSDX;;Sep 07, 2010
+	;;1.41;BSDX;;Sep 29, 2010
 	;
 SUINFOD(BSDXY,BSDXDUZ)	;EP Debugging entry point
@@ -38,5 +38,5 @@
 	;based on entries in BSDX RESOURCE USER file (Say this again for myself: Groups ONLY!!)
 	;If BSDXDUZ=0 then returns all department names for current DUZ
-    ;if not linked, always returned.
+	   ;if not linked, always returned.
 	;If user BSDXDUZ possesses the key BSDXZMGR or XUPROGMODE
 	;then ALL resource group names are returned regardless of whether any active resources
@@ -61,5 +61,5 @@
 	. S BSDXRES=$P(^BSDXRSU(BSDXIEN,0),U)
 	. Q:'$D(^BSDXDEPT("AB",BSDXRES))  ; If not part of a group, quit ("AB" is the whole file index for the resource multiple in Group file)
-    . ; Q:'$$INDIV2(BSDXRES)  ; If not in the same division as user, quit
+	   . ; Q:'$$INDIV2(BSDXRES)  ; If not in the same division as user, quit
 	. S BSDXRNOD=^BSDXRES(BSDXRES,0)
 	. ;QUIT if the resource is inactive
@@ -120,8 +120,8 @@
 	. S BSDXRNOD=^BSDXRES(BSDXRES,0)
 	. N BSDXSC S BSDXSC=$P(BSDXRNOD,U,4)  ; Hospital Location
-    . ;Q:$P(BSDXRNOD,U,2)=1  ;Inactive resources not filtered
+	   . ;Q:$P(BSDXRNOD,U,2)=1  ;Inactive resources not filtered
 	. ;S BSDXRDAT=$P(BSDXRNOD,U,1,4)
 	. ;I '$$INDIV(BSDXSC) QUIT  ; If not in division, quit
-    . K BSDXRDAT
+	   . K BSDXRDAT
 	. F BSDX=1:1:4 S $P(BSDXRDAT,U,BSDX)=$P(BSDXRNOD,U,BSDX)
 	. S BSDXRDAT=BSDXRES_U_BSDXRDAT
@@ -198,5 +198,5 @@
 	. S BSDXRES=$P(^BSDXRSU(BSDXIEN,0),U)
 	. Q:'$D(^BSDXDEPT("AB",BSDXRES))  ; Quit if Resource isn't part of any Group
-    . ;Q:'$$INDIV2(BSDXRES)  ; Quit if Resource isn't in same division as user.
+	   . ;Q:'$$INDIV2(BSDXRES)  ; Quit if Resource isn't in same division as user.
 	. S BSDXRNOD=$G(^BSDXRES(BSDXRES,0))
 	. Q:BSDXRNOD=""
@@ -223,5 +223,5 @@
 	. . S BSDXRESD=$P(^BSDXDEPT(BSDXIEN,1,BSDXRES,0),"^")
 	. . Q:'$D(^BSDXRES(BSDXRESD,0))  ; Quit if zero node of resouce file is invalid
-    . . ;Q:'$$INDIV2(BSDXRESD)  ; Quit if resource is not in the same division
+	   . . ;Q:'$$INDIV2(BSDXRESD)  ; Quit if resource is not in the same division
 	. . S BSDXRNOD=$G(^BSDXRES(BSDXRESD,0))
 	. . Q:BSDXRNOD=""
@@ -257,40 +257,40 @@
 	I '$D(^VA(200,BSDXDUZ,51,BSDXIEN,0)) Q 0
 	Q 1
-INDIV(BSDXSC) ; PEP - Is ^SC clinic in the same DUZ(2) as user?
-    ; Input: BSDXSC - Hospital Location IEN
-    ; Output: True or False
-    I '+BSDXSC QUIT 1  ;If not tied to clinic, yes
-    I '$D(^SC(BSDXSC,0)) QUIT 1 ; If Clinic does not exist, yes
-    ; Jump to Division:Medical Center Division:Inst File Pointer for
-    ; Institution IEN (and get its internal value)
-    N DIV S DIV=$$GET1^DIQ(44,BSDXSC_",","3.5:.07","I")
-    I DIV="" Q 1 ; If clinic has no division, consider it avial to user.
-    I DIV=DUZ(2) Q 1 ; If same, then User is in same Div as Clinic
-    E  Q 0 ; Otherwise, no
-    QUIT
-INDIV2(BSDXRES) ; PEP - Is Resource in the same DUZ(2) as user?
-    ; Input BSDXRES - BSDX RESOURCE IEN
-    ; Output: True of False
-    Q $$INDIV($P($G(^BSDXRES(BSDXRES,0)),U,4)) ; Extract Hospital Location and send to $$INDIV
-UnitTestINDIV
-    W "Testing if they are the same",!
-    S DUZ(2)=67
-    I '$$INDIV(1) W "ERROR",!
-    I '$$INDIV(2) W "ERROR",!
-    W "Testing if Div not defined in 44, should be true",!
-    I '$$INDIV(3) W "ERROR",!
-    W "Testing empty string. Should be true",!
-    I '$$INDIV("") W "ERROR",!
-    W "Testing if they are different",!
-    S DUZ(2)=899
-    I $$INDIV(1) W "ERROR",!
-    I $$INDIV(2) W "ERROR",!
-    QUIT
-UnitTestINDIV2
-    W "Testing if they are the same",!
-    S DUZ(2)=69
-    I $$INDIV2(22)'=0 W "ERROR",!
-    I $$INDIV2(25)'=1 W "ERROR",!
-    I $$INDIV2(26)'=1 W "ERROR",!
-    I $$INDIV2(27)'=1 W "ERROR",!
-    QUIT
+INDIV(BSDXSC)	; PEP - Is ^SC clinic in the same DUZ(2) as user?
+	   ; Input: BSDXSC - Hospital Location IEN
+	   ; Output: True or False
+	   I '+BSDXSC QUIT 1  ;If not tied to clinic, yes
+	   I '$D(^SC(BSDXSC,0)) QUIT 1 ; If Clinic does not exist, yes
+	   ; Jump to Division:Medical Center Division:Inst File Pointer for
+	   ; Institution IEN (and get its internal value)
+	   N DIV S DIV=$$GET1^DIQ(44,BSDXSC_",","3.5:.07","I")
+	   I DIV="" Q 1 ; If clinic has no division, consider it avial to user.
+	   I DIV=DUZ(2) Q 1 ; If same, then User is in same Div as Clinic
+	   E  Q 0 ; Otherwise, no
+	   QUIT
+INDIV2(BSDXRES)	; PEP - Is Resource in the same DUZ(2) as user?
+	   ; Input BSDXRES - BSDX RESOURCE IEN
+	   ; Output: True of False
+	   Q $$INDIV($P($G(^BSDXRES(BSDXRES,0)),U,4)) ; Extract Hospital Location and send to $$INDIV
+UnitTestINDIV	
+	   W "Testing if they are the same",!
+	   S DUZ(2)=67
+	   I '$$INDIV(1) W "ERROR",!
+	   I '$$INDIV(2) W "ERROR",!
+	   W "Testing if Div not defined in 44, should be true",!
+	   I '$$INDIV(3) W "ERROR",!
+	   W "Testing empty string. Should be true",!
+	   I '$$INDIV("") W "ERROR",!
+	   W "Testing if they are different",!
+	   S DUZ(2)=899
+	   I $$INDIV(1) W "ERROR",!
+	   I $$INDIV(2) W "ERROR",!
+	   QUIT
+UnitTestINDIV2	
+	   W "Testing if they are the same",!
+	   S DUZ(2)=69
+	   I $$INDIV2(22)'=0 W "ERROR",!
+	   I $$INDIV2(25)'=1 W "ERROR",!
+	   I $$INDIV2(26)'=1 W "ERROR",!
+	   I $$INDIV2(27)'=1 W "ERROR",!
+	   QUIT
