Ignore:
Timestamp:
Jul 6, 2012, 2:28:15 PM (12 years ago)
Author:
Sam Habiel
Message:

Updated version number on all routines to be 1.7T1.
Minor fixes here and there for XINDEX errors.

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:46pm
    2         ;;1.6T2;BSDX;;May 16, 2011
     1BSDX01  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/12 10:52am
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
     
    282282        ;
    283283INDIV(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
    295294INDIV2(BSDXRES) ; PEP - Is Resource in the same DUZ(2) as user?
    296            ; Input BSDXRES - BSDX RESOURCE IEN
    297            ; Output: True of False
    298            Q $$INDIV($P($G(^BSDXRES(BSDXRES,0)),U,4)) ; Extract Hospital Location and send to $$INDIV
    299 UnitTestINDIV   
    300            W "Testing if they are the same",!
    301            S DUZ(2)=67
    302            I '$$INDIV(1) W "ERROR",!
    303            I '$$INDIV(2) W "ERROR",!
    304            W "Testing if Div not defined in 44, should be true",!
    305            I '$$INDIV(3) W "ERROR",!
    306            W "Testing empty string. Should be true",!
    307            I '$$INDIV("") W "ERROR",!
    308            W "Testing if they are different",!
    309            S DUZ(2)=899
    310            I $$INDIV(1) W "ERROR",!
    311            I $$INDIV(2) W "ERROR",!
    312            QUIT
    313 UnitTestINDIV2 
    314            W "Testing if they are the same",!
    315            S DUZ(2)=69
    316            I $$INDIV2(22)'=0 W "ERROR",!
    317            I $$INDIV2(25)'=1 W "ERROR",!
    318            I $$INDIV2(26)'=1 W "ERROR",!
    319            I $$INDIV2(27)'=1 W "ERROR",!
    320            QUIT
    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
     298UTINDIV ; 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
     312UTINDIV2 ; 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        ;
    322321GETRADEX(BSDXY,DFN,SCIEN)       ; Get All Pending and On Hold Radiology Exams for Patient; RPC EP; UJO/SMH new in v 1.6
    323322        ; RPC: BSDX GET RAD EXAM FOR PT; Return: Global Array
Note: See TracChangeset for help on using the changeset viewer.