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