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

GMTSP87I.m

Go to the documentation of this file.
  1. GMTSP87I ; SLC/AGP - Post Install GMTS*2.7*87 ; 07/10/2007
  1. ;;2.7;Health Summary;**87**;Oct 20, 1995;Build 23
  1. Q
  1. ;
  1. CONVTYPE() ;
  1. N IEN,NAME,NEWNAME,TYPEFD
  1. S NAME=1
  1. F NAME="BRADEN SCALE 30D","PRESSURE ULCER","PU INTERVENTIONS" D
  1. .I '$D(^GMT(142,"B",NAME)) S NAME=0
  1. I NAME=0 Q 0
  1. F NAME="BRADEN SCALE 30D","PRESSURE ULCER","PU INTERVENTIONS" D
  1. .S NEWNAME="VA-"_NAME
  1. .D RENAME(142,NAME,NEWNAME)
  1. Q 1
  1. ;
  1. CONVOBJ ;
  1. N IEN,NAME,NEWNAME,ONAME,TYPEFD
  1. F NAME="BRADEN SCALE 30D (TIU)","PRESSURE ULCER","OB PU INTERVENTIONS" D
  1. .I '$D(^GMT(142.5,"B",NAME)) Q
  1. .S ONAME=NAME
  1. .I NAME="OB PU INTERVENTIONS" S NAME="PU INTERVENTIONS"
  1. .I NAME'["(TIU)" S NAME=NAME_" (TIU)"
  1. .S NEWNAME="VA-"_NAME
  1. .D RENAME(142.5,ONAME,NEWNAME)
  1. Q
  1. ;
  1. EXARRAY(MODE,ARRAY) ;List of exchange entries used by delete and install
  1. N CNT
  1. S CNT=0
  1. S CNT=CNT+1,ARRAY(CNT,1)="GMTS SKIN RISK HS TYPES"
  1. I MODE["I" S ARRAY(CNT,2)="07/09/2007@13:20:09"
  1. I MODE["A" S ARRAY(CNT,3)="O"
  1. S CNT=CNT+1,ARRAY(CNT,1)="GMTS SKIN RISK HS OBJECTS"
  1. I MODE["I" S ARRAY(CNT,2)="07/09/2007@13:21:13"
  1. I MODE["A" S ARRAY(CNT,3)="O"
  1. Q
  1. ;
  1. INSSTUB ;
  1. N DA,DIE,DR,IEN,LIEN,NAME,INSBRAD,INSPU,INSPI
  1. ;S DIK="^GMT(142,",DA=5000016 D ^DIK
  1. ;S DIK="^GMT(142,",DA=5000017 D ^DIK
  1. ;
  1. S DIE="^GMT(142,"
  1. S INSBRAD=0,INSPU=0,INSPI=0
  1. S IEN="" F S IEN=$O(^GMT(142,IEN)) D Q:IEN'>0!(IEN=5000001)
  1. .I IEN<5000000 S LIEN=IEN
  1. I LIEN<5000000 D
  1. .S DA=LIEN
  1. .F D Q:DA=5000000!((INSBRAD=1)&(INSPU=1)&(INSPI=1))
  1. ..S DA=DA+1
  1. ..I '$D(^GMT(142,DA)) D
  1. ...I INSBRAD=0 D Q
  1. ....I $D(^GMT(142,"B","VA-BRADEN SCALE 30D"))>0 S INSBRAD=1 Q
  1. ....S NAME="VA-BRADEN SCALE 30D" S DR=".01////^S X=NAME" D ^DIE
  1. ....S INSBRAD=1
  1. ...I INSPU=0 D Q
  1. ....I $D(^GMT(142,"B","VA-PRESSURE ULCER"))>0 S INSPU=1 Q
  1. ....S NAME="VA-PRESSURE ULCER" S DR=".01////^S X=NAME" D ^DIE
  1. ....S INSPU=1
  1. ...I INSPI=0 D Q
  1. ....I $D(^GMT(142,"B","VA-PU INTERVENTIONS"))>0 S INSPI=1 Q
  1. ....S NAME="VA-PU INTERVENTIONS" S DR=".01////^S X=NAME" D ^DIE
  1. ....S INSPI=1
  1. Q
  1. ;
  1. PRE ;
  1. I $D(^GMT(142,"V","VA-BRADEN SCALE 30D"))>0,$D(^GMT(142,"B","VA-PRESSURE ULCER"))>0,$D(^GMT(142,"B","VA-PUINTERVEMTIONS"))>0 Q
  1. N EXIST
  1. S EXIST=$$CONVTYPE
  1. D CONVOBJ
  1. I EXIST=0 D INSSTUB
  1. Q
  1. ;
  1. POST ;
  1. D SMEXINS
  1. Q
  1. ;
  1. RENAME(FILENUM,OLDNAME,NEWNAME) ;Rename entry OLDNAME to NEWNAME in
  1. ;file number FILENUM
  1. N DA,DIE,DR,NIEN
  1. S NIEN=$$FIND1^DIC(FILENUM,"","BX",NEWNAME) I NIEN>0 Q
  1. S DA=$$FIND1^DIC(FILENUM,"","BX",OLDNAME)
  1. I DA=0 Q
  1. S DIE=FILENUM
  1. S DR=".01///^S X=NEWNAME"
  1. D ^DIE
  1. Q
  1. ;
  1. SMEXINS ;Silent mode install
  1. N EXARRAY,IC,IEN,LUVALUE,PXRMINST,TEXT
  1. S PXRMINST=1
  1. D EXARRAY("IA",.EXARRAY)
  1. S IC=0
  1. F S IC=$O(EXARRAY(IC)) Q:'IC D
  1. .S LUVALUE(1)=EXARRAY(IC,1),LUVALUE(2)=EXARRAY(IC,2)
  1. .S IEN=+$$FIND1^DIC(811.8,"","KU",.LUVALUE)
  1. .I IEN'=0 D
  1. .. N TEXT
  1. .. I LUVALUE(1)["PARAMETER" S TEXT="Installing entry "_LUVALUE(1)
  1. .. E S TEXT="Installing reminder "_LUVALUE(1)
  1. .. D BMES^XPDUTL(TEXT)
  1. .. I $$PATCH^XPDUTL("PXRM*2.0*6") D
  1. ... S ACTION=EXARRAY(IC,3)
  1. ... D INSTALL^PXRMEXSI(IEN,ACTION,1)
  1. .. I '$$PATCH^XPDUTL("PXRM*2.0*6") D INSTALL^PXRMEXSI(IEN,1)
  1. Q
  1. ;