Released LR*5.2*476 SEQ #406 Extracted from mail message **KIDS**:LR*5.2*476^ **INSTALL NAME** LR*5.2*476 "BLD",10013,0) LR*5.2*476^LAB SERVICE^0^3171129^y "BLD",10013,1,0) ^^7^7^3171117^ "BLD",10013,1,1,0) This build exports changes to the field #1 of the Execute Code "BLD",10013,1,2,0) file (#62.07) and affects the option RB Results Entry (Batch) "BLD",10013,1,3,0) for Microbiology. "BLD",10013,1,4,0) Also a new FileMan function is exported for reporting on lab "BLD",10013,1,5,0) results for patients with a given specimen type, a lab test, and looking "BLD",10013,1,6,0) back over a specified number of days. "BLD",10013,1,7,0) The Forum patch description offers more details and the NSRs involved. "BLD",10013,4,0) ^9.64PA^^ "BLD",10013,6.3) 11 "BLD",10013,"ABPKG") n "BLD",10013,"INID") ^y "BLD",10013,"INIT") POST^LR52P476 "BLD",10013,"KRN",0) ^9.67PA^779.2^20 "BLD",10013,"KRN",.4,0) .4 "BLD",10013,"KRN",.401,0) .401 "BLD",10013,"KRN",.402,0) .402 "BLD",10013,"KRN",.403,0) .403 "BLD",10013,"KRN",.5,0) .5 "BLD",10013,"KRN",.5,"NM",0) ^9.68A^1^1 "BLD",10013,"KRN",.5,"NM",1,0) LRRESULT^^0 "BLD",10013,"KRN",.5,"NM","B","LRRESULT",1) "BLD",10013,"KRN",.84,0) .84 "BLD",10013,"KRN",3.6,0) 3.6 "BLD",10013,"KRN",3.8,0) 3.8 "BLD",10013,"KRN",9.2,0) 9.2 "BLD",10013,"KRN",9.8,0) 9.8 "BLD",10013,"KRN",9.8,"NM",0) ^9.68A^4^2 "BLD",10013,"KRN",9.8,"NM",3,0) LRFRSLT^^0^B1675070 "BLD",10013,"KRN",9.8,"NM",4,0) LRMISTF^^0^B14531968 "BLD",10013,"KRN",9.8,"NM","B","LRFRSLT",3) "BLD",10013,"KRN",9.8,"NM","B","LRMISTF",4) "BLD",10013,"KRN",19,0) 19 "BLD",10013,"KRN",19.1,0) 19.1 "BLD",10013,"KRN",101,0) 101 "BLD",10013,"KRN",409.61,0) 409.61 "BLD",10013,"KRN",771,0) 771 "BLD",10013,"KRN",779.2,0) 779.2 "BLD",10013,"KRN",870,0) 870 "BLD",10013,"KRN",8989.51,0) 8989.51 "BLD",10013,"KRN",8989.52,0) 8989.52 "BLD",10013,"KRN",8994,0) 8994 "BLD",10013,"KRN","B",.4,.4) "BLD",10013,"KRN","B",.401,.401) "BLD",10013,"KRN","B",.402,.402) "BLD",10013,"KRN","B",.403,.403) "BLD",10013,"KRN","B",.5,.5) "BLD",10013,"KRN","B",.84,.84) "BLD",10013,"KRN","B",3.6,3.6) "BLD",10013,"KRN","B",3.8,3.8) "BLD",10013,"KRN","B",9.2,9.2) "BLD",10013,"KRN","B",9.8,9.8) "BLD",10013,"KRN","B",19,19) "BLD",10013,"KRN","B",19.1,19.1) "BLD",10013,"KRN","B",101,101) "BLD",10013,"KRN","B",409.61,409.61) "BLD",10013,"KRN","B",771,771) "BLD",10013,"KRN","B",779.2,779.2) "BLD",10013,"KRN","B",870,870) "BLD",10013,"KRN","B",8989.51,8989.51) "BLD",10013,"KRN","B",8989.52,8989.52) "BLD",10013,"KRN","B",8994,8994) "BLD",10013,"QDEF") ^^^^^^^^^^ "BLD",10013,"QUES",0) ^9.62^^ "BLD",10013,"REQB",0) ^9.611^2^1 "BLD",10013,"REQB",2,0) LR*5.2*153^1 "BLD",10013,"REQB","B","LR*5.2*153",2) "INIT") POST^LR52P476 "KRN",.5,247,-1) 0^1 "KRN",.5,247,0) LRRESULT "KRN",.5,247,1) S X=$$GETLAB^LRFRSLT(X,X1,X2,X3) "KRN",.5,247,3) 4 "KRN",.5,247,9) Lab result retriever -- used with the format of LRFRSLT(a,b,c,d) where a is referenced as INTERNAL(PATIENT), b is the specimen file 61 IEN, c is the lab file 60 test IEN, and d is the number of days to search back "MBREQ") 0 "ORD",4,.5) .5;4;;;EDEOUT^DIFROMSO(.5,DA,"",XPDA);FPRE^DIFROMSI(.5,"",XPDA);EPRE^DIFROMSI(.5,DA,"",XPDA,"",OLDA);;EPOST^DIFROMSI(.5,DA,"",XPDA) "ORD",4,.5,0) FUNCTION "PKG",26,-1) 1^1 "PKG",26,0) LAB SERVICE^LR^CORE LAB SYSTEM "PKG",26,20,0) ^9.402P^1^1 "PKG",26,20,1,0) 2^^LRXDRPT "PKG",26,20,1,1) "PKG",26,20,"B",2,1) "PKG",26,22,0) ^9.49I^1^1 "PKG",26,22,1,0) 5.2^2940927^2950611 "PKG",26,22,1,"PAH",1,0) 476^3171129 "PKG",26,22,1,"PAH",1,1,0) ^^7^7^3171129 "PKG",26,22,1,"PAH",1,1,1,0) This build exports changes to the field #1 of the Execute Code "PKG",26,22,1,"PAH",1,1,2,0) file (#62.07) and affects the option RB Results Entry (Batch) "PKG",26,22,1,"PAH",1,1,3,0) for Microbiology. "PKG",26,22,1,"PAH",1,1,4,0) Also a new FileMan function is exported for reporting on lab "PKG",26,22,1,"PAH",1,1,5,0) results for patients with a given specimen type, a lab test, and looking "PKG",26,22,1,"PAH",1,1,6,0) back over a specified number of days. "PKG",26,22,1,"PAH",1,1,7,0) The Forum patch description offers more details and the NSRs involved. "QUES","XPF1",0) Y "QUES","XPF1","??") ^D REP^XPDH "QUES","XPF1","A") Shall I write over your |FLAG| File "QUES","XPF1","B") YES "QUES","XPF1","M") D XPF1^XPDIQ "QUES","XPF2",0) Y "QUES","XPF2","??") ^D DTA^XPDH "QUES","XPF2","A") Want my data |FLAG| yours "QUES","XPF2","B") YES "QUES","XPF2","M") D XPF2^XPDIQ "QUES","XPI1",0) YO "QUES","XPI1","??") ^D INHIBIT^XPDH "QUES","XPI1","A") Want KIDS to INHIBIT LOGONs during the install "QUES","XPI1","B") NO "QUES","XPI1","M") D XPI1^XPDIQ "QUES","XPM1",0) PO^VA(200,:EM "QUES","XPM1","??") ^D MG^XPDH "QUES","XPM1","A") Enter the Coordinator for Mail Group '|FLAG|' "QUES","XPM1","B") "QUES","XPM1","M") D XPM1^XPDIQ "QUES","XPO1",0) Y "QUES","XPO1","??") ^D MENU^XPDH "QUES","XPO1","A") Want KIDS to Rebuild Menu Trees Upon Completion of Install "QUES","XPO1","B") NO "QUES","XPO1","M") D XPO1^XPDIQ "QUES","XPZ1",0) Y "QUES","XPZ1","??") ^D OPT^XPDH "QUES","XPZ1","A") Want to DISABLE Scheduled Options, Menu Options, and Protocols "QUES","XPZ1","B") NO "QUES","XPZ1","M") D XPZ1^XPDIQ "QUES","XPZ2",0) Y "QUES","XPZ2","??") ^D RTN^XPDH "QUES","XPZ2","A") Want to MOVE routines to other CPUs "QUES","XPZ2","B") NO "QUES","XPZ2","M") D XPZ2^XPDIQ "RTN") 3 "RTN","LR52P476") 0^^B16441615^n/a "RTN","LR52P476",1,0) LR52P476 ;AITC/CR - Post Installation for Patch 476 ; 11/28/17 12:36pm "RTN","LR52P476",2,0) ;;5.2;LAB SERVICE;**476**;Sep 27, 1994;Build 11 "RTN","LR52P476",3,0) ; Stuff codes #1, #20.5 and #26.5 in the Execute Code file, #62.07, field #1, "RTN","LR52P476",4,0) ; for the three records that follow below: "RTN","LR52P476",5,0) ; "RTN","LR52P476",6,0) Q "RTN","LR52P476",7,0) ERR ; keep a history of any error that happened during the installation "RTN","LR52P476",8,0) D BMES^XPDUTL("Post initialization of LR*5.2*476 did not complete.") "RTN","LR52P476",9,0) I $D(LRERR) D BMES^XPDUTL(.LRERR) "RTN","LR52P476",10,0) ;alert the user if any error occurred "RTN","LR52P476",11,0) I $D(LRERR) D "RTN","LR52P476",12,0) .N LRTEXT,XMDUZ,XMY,XMDUZ,XMSUB,XMTEXT "RTN","LR52P476",13,0) .S XMSUB="ERROR ENCOUNTERED WHILE INSTALLING LR*5.2*476" "RTN","LR52P476",14,0) .S XMDUZ=.5 "RTN","LR52P476",15,0) .S XMY(DUZ)="",XMY(XMDUZ)="" "RTN","LR52P476",16,0) .S LRTEXT(1)="During the post-installation operations of patch" "RTN","LR52P476",17,0) .S LRTEXT(2)="LR*5.2*476, an error occurred. Please look at the" "RTN","LR52P476",18,0) .S LRTEXT(3)="installation log of the patch for details." "RTN","LR52P476",19,0) .S XMTEXT="LRTEXT(" "RTN","LR52P476",20,0) .D ^XMD "RTN","LR52P476",21,0) Q "RTN","LR52P476",22,0) ; "RTN","LR52P476",23,0) POST ; edit field #1 for the Bacteriology record (#7) "RTN","LR52P476",24,0) I $G(DUZ)="" D BMES^XPDUTL("Your DUZ is not identified in VistA, quiting...") Q "RTN","LR52P476",25,0) ; "RTN","LR52P476",26,0) D BMES^XPDUTL("Starting Post-Initialization for LR*5.2*476 ...") "RTN","LR52P476",27,0) N DA,DIE,DR,LRFDA,LRCODE1,LRCODE2,LRCODE3,LRNECODE,LRERR,LRMICROEC,LRNEC "RTN","LR52P476",28,0) ; "RTN","LR52P476",29,0) S LRCODE1="BACTERIOLOGY",LRCODE2="TB BACTERIOLOGY",LRCODE3="MYCOLOGY" "RTN","LR52P476",30,0) S LRIEN1=$$FIND1^DIC(62.07,,"MX",LRCODE1) ;IEN for the execute code record "RTN","LR52P476",31,0) S LRIEN2=$$FIND1^DIC(62.07,,"MX",LRCODE2) "RTN","LR52P476",32,0) S LRIEN3=$$FIND1^DIC(62.07,,"MX",LRCODE3) "RTN","LR52P476",33,0) F DA=LRIEN1,LRIEN2,LRIEN3 L +^LAB(62.07,DA):5 I '$T D BMES^XPDUTL("Cannot lock file - try later.") G ERR "RTN","LR52P476",34,0) ; "RTN","LR52P476",35,0) S LRMICROEC=$$GET1^DIQ(62.07,LRIEN1_",",1) ; current execute code before changes "RTN","LR52P476",36,0) D BMES^XPDUTL("Execute Code for Bacteriology before changes:") "RTN","LR52P476",37,0) D BMES^XPDUTL(LRMICROEC) "RTN","LR52P476",38,0) S LRNECODE="S DR=""11.55////""_DUZ_"";.055;.05;.99;11.6;11.5;1;S LRSPEC=$P(LRBG0,U,5),Y=$S(LRSPEC=71:11.57,LRSPEC=68:11.58,1:0);11.57;S Y=0;11.58"",LREND=0 D ^DIE S:$D(Y) LREND=1 Q:$D(Y) D ^LRMIBUG Q:LREND S DR=""13;11"" D ^DIE Q" "RTN","LR52P476",39,0) ; prepare field for new data "RTN","LR52P476",40,0) S DIE="^LAB(62.07,",DR="1///@",DA=LRIEN1 D ^DIE "RTN","LR52P476",41,0) ; "RTN","LR52P476",42,0) S DA=LRIEN1 "RTN","LR52P476",43,0) D UPDATE "RTN","LR52P476",44,0) D BMES^XPDUTL("Execute Code for Bacteriology after changes:") "RTN","LR52P476",45,0) S LRNEC=$$GET1^DIQ(62.07,LRIEN1_",",1) ; updated execute code "RTN","LR52P476",46,0) D BMES^XPDUTL(LRNEC) "RTN","LR52P476",47,0) D BMES^XPDUTL("============================================================") "RTN","LR52P476",48,0) ; "RTN","LR52P476",49,0) ; edit field #1 for the TB Bacteriology record (#8) "RTN","LR52P476",50,0) S LRMICROEC=$$GET1^DIQ(62.07,LRIEN2_",",1) "RTN","LR52P476",51,0) D BMES^XPDUTL("Execute Code for TB Bacteriology before changes:") "RTN","LR52P476",52,0) D BMES^XPDUTL(LRMICROEC) "RTN","LR52P476",53,0) S LRNECODE="S DR=""25.5////""_DUZ_"";.05;.99;23;24;25;26;26.5;27;22"",DR(2,63.39)="".01;1:99"" D ^DIE Q" "RTN","LR52P476",54,0) S DIE="^LAB(62.07,",DR="1///@",DA=LRIEN2 D ^DIE "RTN","LR52P476",55,0) ; "RTN","LR52P476",56,0) S DA=LRIEN2 "RTN","LR52P476",57,0) D UPDATE "RTN","LR52P476",58,0) D BMES^XPDUTL("Execute Code for TB Bacteriology after changes:") "RTN","LR52P476",59,0) S LRNEC=$$GET1^DIQ(62.07,LRIEN2_",",1) "RTN","LR52P476",60,0) D BMES^XPDUTL(LRNEC) "RTN","LR52P476",61,0) D BMES^XPDUTL("============================================================") "RTN","LR52P476",62,0) ; edit field #1 for the Mycology record (#9) "RTN","LR52P476",63,0) S LRMICROEC=$$GET1^DIQ(62.07,LRIEN3_",",1) "RTN","LR52P476",64,0) D BMES^XPDUTL("Execute Code for Mycology before changes:") "RTN","LR52P476",65,0) D BMES^XPDUTL(LRMICROEC) "RTN","LR52P476",66,0) S LRNECODE="S DR=""19.5////""_DUZ_"";.05;.99;19;19.2;20;20.5;21;18"",DR(2,63.37)="".01:99"" D ^DIE Q" "RTN","LR52P476",67,0) S DIE="^LAB(62.07,",DR="1///@",DA=LRIEN3 D ^DIE "RTN","LR52P476",68,0) ; "RTN","LR52P476",69,0) S DA=LRIEN3 "RTN","LR52P476",70,0) D UPDATE "RTN","LR52P476",71,0) D BMES^XPDUTL("Execute Code for Mycology after changes:") "RTN","LR52P476",72,0) S LRNEC=$$GET1^DIQ(62.07,LRIEN3_",",1) "RTN","LR52P476",73,0) D BMES^XPDUTL(LRNEC) "RTN","LR52P476",74,0) D BMES^XPDUTL("Post-initialization of LR*5.2*476 completed!") "RTN","LR52P476",75,0) F DA=LRIEN1,LRIEN2,LRIEN3 L -^LAB(62.07,DA) "RTN","LR52P476",76,0) Q "RTN","LR52P476",77,0) ; "RTN","LR52P476",78,0) UPDATE ; common code for update of field #1, Execute Code File "RTN","LR52P476",79,0) S LRFDA(62.07,DA_",",1)=LRNECODE "RTN","LR52P476",80,0) D FILE^DIE("E","LRFDA","LRERR") "RTN","LR52P476",81,0) I $D(LRERR) D BMES^XPDUTL("Unable to edit the Execute Code field of Record #: "_DA) D ERR "RTN","LR52P476",82,0) Q "RTN","LRFRSLT") 0^3^B1675070^n/a "RTN","LRFRSLT",1,0) LRFRSLT ;AITC/CR - LAB DATA FUNCTION API WRAPPER ; 10/25/17 3:46pm "RTN","LRFRSLT",2,0) ;;5.2;LAB SERVICE;**476**;Sep 27, 1994;Build 11 "RTN","LRFRSLT",3,0) ; This routine is used by the FileMan function LRRESULT to generate a "RTN","LRFRSLT",4,0) ; report of verified lab tests for multiple patients over a given "RTN","LRFRSLT",5,0) ; date range "RTN","LRFRSLT",6,0) ; "RTN","LRFRSLT",7,0) GETLAB(MDAYS,TEST,SPEC,DFN) ; Custom lab lookup API for results "RTN","LRFRSLT",8,0) ; MDAYS = # of days to look back for verified lab test results "RTN","LRFRSLT",9,0) ; TEST = IEN for a given lab test, file #60 "RTN","LRFRSLT",10,0) ; SPEC = IEN for a given specimen, file #61 "RTN","LRFRSLT",11,0) ; DFN = IEN for patient, file #2 "RTN","LRFRSLT",12,0) ; "RTN","LRFRSLT",13,0) N LRBGDT,RESULT,LDATE,UNITS "RTN","LRFRSLT",14,0) N X,X1,X2 "RTN","LRFRSLT",15,0) Q:'+$G(TEST) "" "RTN","LRFRSLT",16,0) Q:'+$G(DFN) "" "RTN","LRFRSLT",17,0) S MDAYS=$G(MDAYS,365) "RTN","LRFRSLT",18,0) S X1=DT,X2=-$G(MDAYS) D C^%DTC "RTN","LRFRSLT",19,0) S LRBGDT=$S(X0)&(X?1N)) D INFO "RTN","LRMISTF",27,0) Q:X=""!(X[U) S LRMODE=X "RTN","LRMISTF",28,0) S:LRMODE<3 LRSCREEN=$S(H9=13:"KM",H9=11.6:"KG",H9=11.58:"KY",H9=17:"KP",H9=15.51:"KW",H9=21:"KF",H9=19.6:"KW",H9=27:"KT",H9=24:"KW",H9=37:"KV",1:"") "RTN","LRMISTF",29,0) D ^LRMISTF1 "RTN","LRMISTF",30,0) Q "RTN","LRMISTF",31,0) INFO W !,"Enter a number between 1 and 3.",!,"1. Automatically enters the result you specify. You cannot change the entries." "RTN","LRMISTF",32,0) W !,"2. Automatically enters the result you specify, you can see and change entries",!,"3. Prompts with the field name. Does not automatically enter data.",!! "RTN","LRMISTF",33,0) Q "VER") 8.0^22.2 "BLD",10013,6) ^406 **END** **END**