source: WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAY38.m@ 1150

Last change on this file since 1150 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1GMRAY38 ;SLC/DAN Post-install for patch 38 ;5/3/07 14:53
2 ;;4.0;Adverse Reaction Tracking;**38**;Mar 29, 1996;Build 2
3 ;
4POST ;Find varible pointers associated with IEN zero
5 N TMP,IEN,FREE,REACTANT,FDA,COM
6 S FREE=$O(^GMRD(120.82,"B","OTHER ALLERGY/ADVERSE REACTION",0)) Q:'FREE S:FREE FREE=FREE_";GMRD(120.82,"
7 S IEN=0 F S IEN=$O(^GMR(120.8,IEN)) Q:'+IEN D
8 .I $E($P($G(^GMR(120.8,IEN,0)),U,3),1,2)="0;" D
9 ..S $P(^GMR(120.8,IEN,0),U,3)=FREE ;Update pointer to free text entry
10 ..S REACTANT=$P(^GMR(120.8,IEN,0),U,2)_" ( FREE TEXT )"
11 ..S FDA(120.8,(IEN_","),.02)=REACTANT
12 ..D FILE^DIE(,"FDA")
13 ..S COM="Updated by patch GMRA*4*38 to free text due to bad pointer value." D ADCOM^GMRAFX(IEN,"O",COM) ;Add comment to record
14 ..S TMP($P(^GMR(120.8,IEN,0),U),$P(^GMR(120.8,IEN,0),U,2))=""
15 ;
16MAIL ;Send message indicating post install is finished
17 N XMSUB,XMTEXT,XMDUZ,XMY,XMZ,GMRATXT,CNT,VADM,DFN,REACTANT,LOOP,DIFROM,NAME,REACT
18 S XMDUZ="PATCH GMRA*4*38 POST-INSTALL",XMY(.5)="" S:$G(DUZ) XMY(DUZ)=""
19 S GMRATXT(1)="The post-install routine for patch GMRA*4*38"
20 S GMRATXT(2)="finished on "_$$FMTE^XLFDT($$NOW^XLFDT)_"."
21 S GMRATXT(3)=""
22 S CNT=4
23 I $D(TMP) D
24 .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
25 .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
26 .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
27 ..S GMRATXT(CNT)=NAME_$$REPEAT^XLFSTR(" ",(38-$L(NAME)))_REACT,CNT=CNT+1
28 S XMTEXT="GMRATXT(",XMSUB="PATCH GMRA*4*38 Post Install COMPLETED"
29 D ^XMD
30 Q
Note: See TracBrowser for help on using the repository browser.