Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ICD1857P

ICD1857P.m

Go to the documentation of this file.
  1. ICD1857P ;ISL/KER - ICD*18.0*57 Pre/Post-Install ;04/21/2014
  1. ;;18.0;DRG Grouper;**57**;Oct 20, 2000;Build 7
  1. ;
  1. ;
  1. ; Global Variables
  1. ; ^%ZOSF("UCI") ICR 10096
  1. ; ^%ZOSF("UCICHECK") ICR 10096
  1. ; ^TMP("LEX*2.0*80" SACC 2.3.2.5.1
  1. ;
  1. ; External References
  1. ; $$VERSION^%ZOSV ICR 10097
  1. ; FIELD^DID ICR 2052
  1. ; EN^DIU2 ICR 10014
  1. ; $$UP^XLFSTR ICR 10104
  1. ; $$NETNAME^XMXUTIL ICR 2734
  1. ; BMES^XPDUTL ICR 10141
  1. ; MES^XPDUTL ICR 10141
  1. ;
  1. ; Local Variables NEWed or KILLed by KIDS
  1. ; XPDNOQUE
  1. ;
  1. ; SACC Exemption
  1. ;
  1. ; $ZU(68,28,n) May 9, 2013
  1. ;
  1. ; Clinical Lexicon requests an exemption to use $ZU in
  1. ; the pre and post install routines for future LEX
  1. ; patches. This exemption will expire with the release
  1. ; of LEX 3.0. Calling $ZU(68,28,0) to enable an
  1. ; unsubscripted global kill prior to installing the
  1. ; latest ICD files leaves the possibility that a global
  1. ; will be killed by another process during a lengthy
  1. ; installation. Placing the call in the pre (or post)
  1. ; install, instead of making the call manually before
  1. ; and after the install, cuts this window down to a
  1. ; few seconds.
  1. ;
  1. Q
  1. PRE ; ICD*18.0*57 Pre-Install
  1. S XPDNOQUE=1 I $D(ZTQUEUED) S XPDABORT=1,XPDQUIT=1,XPDQUIT("ICD*18.0*57")=1,XPDQUIT("LEX*2.0*80")=1 Q
  1. Q:+($$UOK)'>0 D DEL
  1. Q
  1. POST ; ICD*18.0*57 Post-Install
  1. S XPDNOQUE=1 I $D(ZTQUEUED) S XPDABORT=1,XPDQUIT=1,XPDQUIT("ICD*18.0*57")=1,XPDQUIT("LEX*2.0*80")=1 Q
  1. D N0
  1. Q
  1. ;
  1. ; Miscellaneous
  1. N0 ; Node 0
  1. D BM(" Updating ICD files")
  1. N ICD0,ICD9,ICDI,ICDL,ICDM,ICDT
  1. K ICD9,ICDM D FIELD^DID(80,.01,,"LABEL","ICD9","ICDM")
  1. K ICD0,ICDM D FIELD^DID(80.1,.01,,"LABEL","ICD0","ICDM")
  1. D M(" ICD DIAGNOSIS file #80")
  1. I $L($G(ICD9("LABEL"))),('$D(^ICD9(0))) D
  1. . N ICDL,ICDT,ICDI S ICDL="",ICDT=0,ICDI=0
  1. . F S ICDI=$O(^ICD9(ICDI)) Q:+ICDI'>0 S ICDL=ICDI,ICDT=ICDT+1
  1. . S ^ICD9(0)="ICD DIAGNOSIS^80OI^"_ICDL_"^"_ICDT
  1. D M(" ICD OPERATION/PROCEDURE file #80.1")
  1. I $L($G(ICD0("LABEL"))),('$D(^ICD0(0))) D
  1. . N ICDL,ICDT,ICDI S ICDL="",ICDT=0,ICDI=0
  1. . F S ICDI=$O(^ICD0(ICDI)) Q:+ICDI'>0 S ICDL=ICDI,ICDT=ICDT+1
  1. . S ^ICD0(0)="ICD OPERATION/PROCEDURE^80.1OI^"_ICDL_"^"_ICDT
  1. Q
  1. UOK(X) ; UCI Ok for Install
  1. N X,Y S X=$$NETNAME^XMXUTIL(.5) Q:X["LEXDEV1.FO-BAYPINES" 0
  1. X ^%ZOSF("UCI") Q:$G(Y)["LEXDEV1" 0 S X="LEXDEV1" X ^%ZOSF("UCICHECK") Q:$G(X)=$G(Y) 0
  1. Q 1
  1. DEL ; Delete ICD Data Dictionaries and Globals
  1. Q:+($$UOK)'>0 N DIU,ICDMUM S ICDMUM=$$UP^XLFSTR($$VERSION^%ZOSV(1))
  1. D BM(" Deleting the Data Dictionary and Data for:")
  1. D M(" ICD DIAGNOSIS file #80") H 1
  1. S DIU="^ICD9(",DIU(0)=$S($D(^TMP("LEX*2.0*80",$J,"NODATA")):"T",1:"DT")
  1. S:ICDMUM["CACHE" X=$ZU(68,28,0) D EN^DIU2 S:ICDMUM["CACHE" X=$ZU(68,28,1) W " done"
  1. D M(" ICD OPERATION/PROCEDURE file #80.1") H 1
  1. S DIU="^ICD0(",DIU(0)=$S($D(^TMP("LEX*2.0*80",$J,"NODATA")):"T",1:"DT")
  1. S:ICDMUM["CACHE" X=$ZU(68,28,0) D EN^DIU2 S:ICDMUM["CACHE" X=$ZU(68,28,1) W " done"
  1. Q
  1. M(X) ; Blank/Text
  1. D MES^XPDUTL($G(X)) Q
  1. BM(X) ; Blank/Text
  1. D BMES^XPDUTL($G(X)) Q
  1. TRIM(X) ; Trim Spaces
  1. S X=$G(X) F Q:$E(X,1)'=" " S X=$E(X,2,$L(X))
  1. F Q:$E(X,$L(X))'=" " S X=$E(X,1,($L(X)-1))
  1. Q X
  1. CLR ; Clear Variables not NEWed
  1. N ZTQUEUED,XPDABORT,XPDQUIT,XPDQUIT
  1. Q