Ignore:
Timestamp:
Oct 8, 2012, 6:59:10 AM (12 years ago)
Author:
Tariq Hamkari
Message:

updated the BSDX version to 1.7

  • fix "BSDX01.m" routine , it was take too long time to retrieve patient radiology exams.
File:
1 edited

Legend:

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

    r1481 r1563  
    1 BSDX01  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/12 10:52am
    2         ;;1.7T2;BSDX;;Jul 11, 2012;Build 18
     1BSDX01  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 5/16/11 2:46pm
     2        ;;1.6;BSDX;;Aug 31, 2011;Build 25
    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
     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
    294295INDIV2(BSDXRES) ; PEP - Is Resource in the same DUZ(2) as user?
    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         ;
     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
     299UnitTestINDIV   
     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
     313UnitTestINDIV2 
     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           ;
    321322GETRADEX(BSDXY,DFN,SCIEN)       ; Get All Pending and On Hold Radiology Exams for Patient; RPC EP; UJO/SMH new in v 1.6
    322323        ; RPC: BSDX GET RAD EXAM FOR PT; Return: Global Array
     
    345346        ; Fields 5 = Request Status; 2 = Procedure; 16 = Requested Entered Date Time
    346347        ; Filter Field: First piece is DFN, 5th piece is 3 or 5 (Status of Pending Or Hold); 20th piece is Radiology Location requested
    347         D LIST^DIC(75.1,"","@;5;2;16","P","","","","B","I $P(^(0),U)=DFN&(35[$P(^(0),U,5))&($P(^(0),U,20)=BSDXRLIEN)","","BSDXOUT","BSDXERR")
     348        ;
     349               ;;EHS/MKH,BAH;;UJO*1.0*143;;30/09/2012;; Update [Fix the performance issue in SchedGUI]
     350               ; START OF CODE CHANGES FOR [UJO*1.0*143]
     351               ; Commented old Line
     352               ;D LIST^DIC(75.1,"","@;5;2;16","P","","","","B","I $P(^(0),U)=DFN&(35[$P(^(0),U,5))&($P(^(0),U,20)=BSDXRLIEN)","","BSDXOUT","BSDXERR")
     353               DO FIND^DIC(75.1,"","@;5;2;16","QP",DFN,"","B","IF 35[$PIECE(^(0),U,5)&($PIECE(^(0),U,20)=BSDXRLIEN)","","BSDXOUT","BSDXERR")
     354               ; END OF CODE CHANGES FOR [UJO*1.0*143]
    348355        ;
    349356        IF $DATA(BSDXERR) GOTO END
Note: See TracChangeset for help on using the changeset viewer.