source: FOIAVistA/tag/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAY20.m@ 636

Last change on this file since 636 was 628, checked in by George Lilly, 14 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1GMRAY20 ;SLC/DAN Post-install for patch 20 ;6/22/06 10:09
2 ;;4.0;Adverse Reaction Tracking;**20**;Mar 29, 1996;Build 1
3 ;
4POST ;Executed following installation of patch 20
5 N SUB,TOP,DIK,DA
6 K ^XTMP("GMRAFX") ;Remove existing free text allergy list - switching location and don't need old list
7 S SUB=0 F S SUB=$O(^GMRD(120.84,SUB)) Q:'+SUB D
8 .Q:'$D(^GMRD(120.84,SUB,1)) ;Stop if no top 10 list associated with this entry
9 .S TOP=10 F S TOP=$O(^GMRD(120.84,SUB,1,TOP)) Q:'+TOP D
10 ..S DA(1)=SUB,DA=TOP,DIK="^GMRD(120.84,"_DA(1)_",1," D ^DIK ;Delete any entries in multiple numbered above 10
11 ;
12FIXZERO ;Find varible pointers associated with IEN zero
13 N TMP,IEN,FREE
14 S FREE=$O(^GMRD(120.82,"B","OTHER ALLERGY/ADVERSE REACTION",0)) Q:'FREE S:FREE FREE=FREE_";GMRD(120.82,"
15 S IEN=0 F S IEN=$O(^GMR(120.8,IEN)) Q:'+IEN D
16 .I $E($P($G(^GMR(120.8,IEN,0)),U,3),1,2)="0;" D
17 ..S $P(^GMR(120.8,IEN,0),U,3)=FREE ;Update pointer to free text entry
18 ..S TMP($P(^GMR(120.8,IEN,0),U),$P(^GMR(120.8,IEN,0),U,2))=""
19 ;
20MAIL ;Send message indicating post install is finished
21 N XMSUB,XMTEXT,XMDUZ,XMY,XMZ,GMRATXT,CNT,VADM,DFN,REACTANT,LOOP,DIFROM
22 S XMDUZ="PATCH GMRA*4*20 POST-INSTALL",XMY(.5)="" S:$G(DUZ) XMY(DUZ)=""
23 S GMRATXT(1)="The post-install routine for patch GMRA*4*20"
24 S GMRATXT(2)="finished on "_$$FMTE^XLFDT($$NOW^XLFDT)_"."
25 S GMRATXT(3)=""
26 S CNT=4
27 I $D(TMP) D
28 .S GMRATXT(CNT)="The following patients had reactants updated to free text entries",CNT=CNT+1,GMRATXT(CNT)="because of a problem with the pointer data.",CNT=CNT+1
29 .S GMRATXT(CNT)="",CNT=CNT+1,GMRATXT(CNT)="Please use the Allergy Update Utility to fix these entries.",CNT=CNT+1,GMRATXT(CNT)="",CNT=CNT+1
30 .S IEN=0 F S IEN=$O(TMP(IEN)) Q:'+IEN S NAME=$$GET1^DIQ(2,IEN,.01)_" ("_$E($$GET1^DIQ(2,IEN,.09),6,9)_")" S REACT="" F S REACT=$O(TMP(IEN,REACT)) Q:REACT="" D
31 ..S GMRATXT(CNT)=NAME_$$REPEAT^XLFSTR(" ",(38-$L(NAME)))_REACT,CNT=CNT+1
32 S XMTEXT="GMRATXT(",XMSUB="PATCH GMRA*4*20 Post Install COMPLETED"
33 D ^XMD
34 Q
Note: See TracBrowser for help on using the repository browser.