source: WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAY25.m@ 1581

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

initial load of WorldVistAEHR

File size: 2.2 KB
RevLine 
[613]1GMRAY25 ;SLC/DAN Post-install routine ;6/8/05 14:33
2 ;;4.0;Adverse Reaction Tracking;**25**;Mar 29, 1996
3 ;
4POST ;Post-install entry point
5 D IDENTSS
6 D MAIL
7 Q
8 ;
9IDENTSS ;Identify entries that may not have had their signs/symptoms correctly stored, which may also have caused other important datt to not be stored
10 N GMRAIEN,GMRA0
11 S GMRAIEN=0 F S GMRAIEN=$O(^GMR(120.8,GMRAIEN)) Q:'+GMRAIEN D
12 .S GMRA0=$G(^GMR(120.8,GMRAIEN,0))
13 .Q:$P(GMRA0,U,12)'="" ;Stop if signed off field has a value
14 .Q:$$TESTPAT^VADPT($P(GMRA0,U)) ;Stop if test patient
15 .Q:$P($G(^GMR(120.8,GMRAIEN,"ER")),U) ;Stop if entered in error
16 .Q:$P(GMRA0,U,4)<3040101 ;Stop if entry of allergy predates v25 installation
17 .S ARRAY($$GET1^DIQ(2,$P(GMRA0,U)_",",.01)_" ("_$E($$GET1^DIQ(2,$P(GMRA0,U)_",",.09),6,9)_")",$P(GMRA0,U,2))="" ;Store pt name and reactant
18 Q
19 ;
20MAIL ;Send message indicating post install is finished
21 N XMSUB,XMTEXT,XMDUZ,XMY,XMZ,GMRATXT,CNT,REACTANT,DIFROM,PNAME
22 S XMDUZ="PATCH GMRA*4*25 POST-INSTALL",XMY(.5)="" S:$G(DUZ) XMY(DUZ)=""
23 S GMRATXT(1)="The post-install routine for patch GMRA*4*25"
24 S GMRATXT(2)="finished on "_$$FMTE^XLFDT($$NOW^XLFDT)_"."
25 S GMRATXT(3)=""
26 S CNT=3
27 I $D(ARRAY) D
28 .S CNT=CNT+1,GMRATXT(CNT)="The following patients have allergies on file that may be missing"
29 .S CNT=CNT+1,GMRATXT(CNT)="important data required for order checking due to an error when the allergy"
30 .S CNT=CNT+1,GMRATXT(CNT)="was saved. If the user selected the space or dashed line from the"
31 .S CNT=CNT+1,GMRATXT(CNT)="signs/symptoms box then the allergy would not have been saved correctly and"
32 .S CNT=CNT+1,GMRATXT(CNT)="needs to be reviewed for accuracy. The recommended course of action is to"
33 .S CNT=CNT+1,GMRATXT(CNT)="mark the existing allergy as entered in error and then re-enter the allergy"
34 .S CNT=CNT+1,GMRATXT(CNT)="information for the patient."
35 .S CNT=CNT+1,GMRATXT(CNT)=""
36 .S PNAME="" F S PNAME=$O(ARRAY(PNAME)) Q:PNAME="" D
37 ..S CNT=CNT+1,GMRATXT(CNT)=PNAME
38 ..S REACTANT="" F S REACTANT=$O(ARRAY(PNAME,REACTANT)) Q:REACTANT="" D
39 ...S CNT=CNT+1,GMRATXT(CNT)=" "_REACTANT
40 ..S CNT=CNT+1,GMRATXT(CNT)=""
41 S XMTEXT="GMRATXT(",XMSUB="PATCH GMRA*4*25 Post Install COMPLETED"
42 D ^XMD
43 Q
Note: See TracBrowser for help on using the repository browser.