Changeset 1472 for Scheduling/trunk/m/BSDX01.m
- Timestamp:
- Jul 6, 2012, 2:28:15 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/m/BSDX01.m
r1187 r1472 1 BSDX01 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 5/16/11 2:46pm2 ;;1. 6T2;BSDX;;May 16, 20111 BSDX01 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/12 10:52am 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; … … 282 282 ; 283 283 INDIV(BSDXSC) ; PEP - Is ^SC clinic in the same DUZ(2) as user? 284 ; Input: BSDXSC - Hospital Location IEN 285 ; Output: True or False 286 I '+BSDXSC QUIT 1 ;If not tied to clinic, yes 287 I '$D(^SC(BSDXSC,0)) QUIT 1 ; If Clinic does not exist, yes 288 ; Jump to Division:Medical Center Division:Inst File Pointer for 289 ; Institution IEN (and get its internal value) 290 N DIV S DIV=$$GET1^DIQ(44,BSDXSC_",","3.5:.07","I") 291 I DIV="" Q 1 ; If clinic has no division, consider it avial to user. 292 I DIV=DUZ(2) Q 1 ; If same, then User is in same Div as Clinic 293 E Q 0 ; Otherwise, no 294 QUIT 284 ; Input: BSDXSC - Hospital Location IEN 285 ; Output: True or False 286 I '+BSDXSC QUIT 1 ;If not tied to clinic, yes 287 I '$D(^SC(BSDXSC,0)) QUIT 1 ; If Clinic does not exist, yes 288 ; Jump to Division:Medical Center Division:Inst File Pointer for 289 ; Institution IEN (and get its internal value) 290 N DIV S DIV=$$GET1^DIQ(44,BSDXSC_",","3.5:.07","I") 291 I DIV="" Q 1 ; If clinic has no division, consider it avial to user. 292 I DIV=DUZ(2) Q 1 ; If same, then User is in same Div as Clinic 293 E Q 0 ; Otherwise, no 295 294 INDIV2(BSDXRES) ; PEP - Is Resource in the same DUZ(2) as user? 296 297 298 299 U nitTestINDIV300 301 302 303 304 305 306 307 308 309 310 311 312 313 U nitTestINDIV2314 315 316 317 318 319 320 321 295 ; Input BSDXRES - BSDX RESOURCE IEN 296 ; Output: True of False 297 Q $$INDIV($P($G(^BSDXRES(BSDXRES,0)),U,4)) ; Extract Hospital Location and send to $$INDIV 298 UTINDIV ; Unit Test $$INDIV 299 W "Testing if they are the same",! 300 S DUZ(2)=67 301 I '$$INDIV(1) W "ERROR",! 302 I '$$INDIV(2) W "ERROR",! 303 W "Testing if Div not defined in 44, should be true",! 304 I '$$INDIV(3) W "ERROR",! 305 W "Testing empty string. Should be true",! 306 I '$$INDIV("") W "ERROR",! 307 W "Testing if they are different",! 308 S DUZ(2)=899 309 I $$INDIV(1) W "ERROR",! 310 I $$INDIV(2) W "ERROR",! 311 QUIT 312 UTINDIV2 ; Unit Test $$INDIV2 313 W "Testing if they are the same",! 314 S DUZ(2)=69 315 I $$INDIV2(22)'=0 W "ERROR",! 316 I $$INDIV2(25)'=1 W "ERROR",! 317 I $$INDIV2(26)'=1 W "ERROR",! 318 I $$INDIV2(27)'=1 W "ERROR",! 319 QUIT 320 ; 322 321 GETRADEX(BSDXY,DFN,SCIEN) ; Get All Pending and On Hold Radiology Exams for Patient; RPC EP; UJO/SMH new in v 1.6 323 322 ; RPC: BSDX GET RAD EXAM FOR PT; Return: Global Array
Note:
See TracChangeset
for help on using the changeset viewer.