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

BPXRM203.m

Go to the documentation of this file.
  1. BPXRM203 ; IHS/MSC/MGH - Version 2.0 Patch 3. ;20-Nov-2014 15:19;du
  1. ;;2.0;CLINICAL REMINDERS;**1003**;Feb 04, 2005;Build 21
  1. ;
  1. ENV ;EP environment check
  1. N IN,INSTDA,STAT
  1. ;Check for the installation of Reminders 2.0
  1. S IN="CLINICAL REMINDERS 2.0",INSTDA=""
  1. I '$D(^XPD(9.7,"B",IN)) D Q
  1. .W !,"You must first install CLINICAL REMINDERS 2.0 before this patch" S XPDQUIT=2
  1. S INSTDA=$O(^XPD(9.7,"B",IN,INSTDA),-1)
  1. S STAT=+$P($G(^XPD(9.7,INSTDA,0)),U,9)
  1. I STAT'=3 D Q
  1. .W !,"CLINICAL REMINDERS 2.0 must be completely installed before installing this patch." S XPDQUIT=2
  1. S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
  1. ;Check for the installation of other patches
  1. S PATCH="PXRM*2.0*1002"
  1. I '$$PATCH(PATCH) D Q
  1. . W !,"You must first install "_PATCH_"." S XPDQUIT=2
  1. S IN="IHS STANDARD TERMINOLOGY 1.0",INSTDA=""
  1. I '$D(^XPD(9.7,"B",IN)) D Q
  1. .W !,"You must first install IHS STANDARD TERMINOLOGY 1.0 before this patch" S XPDQUIT=2
  1. S INSTDA=$O(^XPD(9.7,"B",IN,INSTDA),-1)
  1. S STAT=+$P($G(^XPD(9.7,INSTDA,0)),U,9)
  1. I STAT'=3 D Q
  1. .W !,"IHS STANDARD TERMINOLOGY 1.0 must be completely installed before installing this patch." S XPDQUIT=2
  1. S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
  1. S IN="IHS CLINICAL REPORTING 14.0",INSTDA=""
  1. I '$D(^XPD(9.7,"B",IN)) D Q
  1. .W !,"You must first install IHS CLINICAL REPORTING 14.0 before this patch" S XPDQUIT=2
  1. S INSTDA=$O(^XPD(9.7,"B",IN,INSTDA),-1)
  1. S STAT=+$P($G(^XPD(9.7,INSTDA,0)),U,9)
  1. I STAT'=3 D Q
  1. .W !,"IHS CLINICAL REPORTING 14.0 must be completely installed before installing this patch." S XPDQUIT=2
  1. S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
  1. Q
  1. PATCH(X) ;return 1 if patch X was installed, X=aaaa*nn.nn*nnnn
  1. ;copy of code from XPDUTL but modified to handle 4 digit IHS patch numb
  1. Q:X'?1.4UN1"*"1.2N1"."1.2N.1(1"V",1"T").2N1"*"1.4N 0
  1. NEW NUM,I,J
  1. S I=$O(^DIC(9.4,"C",$P(X,"*"),0)) Q:'I 0
  1. S J=$O(^DIC(9.4,I,22,"B",$P(X,"*",2),0)),X=$P(X,"*",3) Q:'J 0
  1. ;check if patch is just a number
  1. Q:$O(^DIC(9.4,I,22,J,"PAH","B",X,0)) 1
  1. S NUM=$O(^DIC(9.4,I,22,J,"PAH","B",X_" SEQ"))
  1. Q (X=+NUM)
  1. ;===============================================================
  1. PRE ;EP pre-init
  1. Q
  1. ;===============================================================
  1. POST ;Post-install
  1. D CNAK
  1. D RTAXEXP
  1. Q
  1. ;================================================================
  1. CNAK ;Make sure all "NAK" characters are converted back to "^" in
  1. ;the Exchange File.
  1. N IEN,TEXT
  1. D BMES^XPDUTL("Clean up Exchange File entries")
  1. S IEN=0
  1. F S IEN=+$O(^PXD(811.8,IEN)) Q:IEN=0 D
  1. . D POSTKIDS^PXRMEXU5(IEN)
  1. Q
  1. ;
  1. ;===============================================================
  1. DELEI ;If the Exchange File entry already exists delete it.
  1. N ARRAY,IC,IND,LIST,LUVALUE,NUM
  1. S IC=0
  1. F S IC=$O(ARRAY(IC)) Q:'IC D
  1. .S LUVALUE(1)=ARRAY(IC,1)
  1. .D FIND^DIC(811.8,"","","U",.LUVALUE,"","","","","LIST")
  1. .I '$D(LIST) Q
  1. .S NUM=$P(LIST("DILIST",0),U,1)
  1. .I NUM'=0 D
  1. ..F IND=1:1:NUM D
  1. ... N DA,DIK
  1. ... S DIK="^PXD(811.8,"
  1. ... S DA=LIST("DILIST",2,IND)
  1. ... D ^DIK
  1. Q
  1. ;
  1. RTAXEXP ;Rebuild taxonomy expansions.
  1. N IEN,IND,TEXT,TNAME
  1. S TNAME(1)="IHS-BARIUM ENEMA"
  1. S TNAME(2)="IHS-COLONOSCOPY 2007"
  1. S TNAME(3)="IHS-DEPO PROVERA ADMIN-2013"
  1. S TNAME(4)="IHS DEPOPROVERA CODES"
  1. S TNAME(5)="IHS-FECAL OCCULT LAB TEST"
  1. S TNAME(6)="IHS-FUNDOSCOPIC EYE CODES 2007"
  1. S TNAME(7)="IHS-HIGH RISK HPV TEST"
  1. S TNAME(8)="IHS-HYSTERECTOMY 2009"
  1. S TNAME(9)="IHS-MAMMOGRAM 2009"
  1. S TNAME(10)="IHS-PAP CODES 2008"
  1. S TNAME(11)="IHS-SIGMOIDOSCOPY"
  1. S TNAME(12)="IHS-BILATERAL MASTECTOMY 2008"
  1. D BMES^XPDUTL("Rebuilding taxonomy expansions.")
  1. F IND=1:1:12 D
  1. . S IEN=$O(^PXD(811.2,"B",TNAME(IND),""))
  1. . I IEN="" Q
  1. . S TEXT=" Working on taxonomy "_IEN
  1. . D BMES^XPDUTL(TEXT)
  1. . D DELEXTL^PXRMBXTL(IEN)
  1. . D EXPAND^PXRMBXTL(IEN,"")
  1. Q