source: FOIAVistA/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAXPST.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 3.3 KB
Line 
1GMRAXPST ;HIRMFO/WAA,RM-POST INIT FOR ALLERGY/ADVERSE REACTION ; 1/15/93
2 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
3EN1 ; POST INIT PROCEDURES FOR GMRA PACKAGE
4 I $G(GMRAVER,3)<4 D EN1^GMRAXNKA ; Move NKA data out of file 120.8
5 D MAILGRP ; update mail groups.
6 ; Add mail groups to bulletins??
7 D FILESEC ; Check File security for all the files
8 D TITLE ; Change the title in file 121.2
9 Q
10TITLE ; This code will update the title in the progress note package
11 N GMRACW
12 S GMRACW=0 F S GMRACW=$O(^GMR(121.2,"B","ALLERGY/ADVERSE REACTION",GMRACW)) Q:GMRACW<1 I $P($G(^GMR(121.1,$P($G(^GMR(121.2,GMRACW,0)),U,2),0)),U)="GENERAL NOTE" Q
13 Q:GMRACW<1
14 N DIE,DA,DR
15 S DIE="^GMR(121.2,",DA=GMRACW,DR=".01///ADVERSE REACTION/ALLERGY"
16 D ^DIE
17 N GMRATXT
18 S GMRATXT(1)="The Progress Note Title of ALLERGY/ADVERSE REACTION with a note type of"
19 S GMRATXT(2)="GENERAL NOTE has been changed to ADVERSE REACTION/ALLERGY."
20 D MES^XPDUTL(.GMRATXT)
21 Q
22MAILGRP ; Procedure to update the mail groups for ART bulletins.
23 N GMRAA,GMRAB,GMRAC,GMRAD,GMRAG,GMRACNT
24 S GMRAB=0 ;Make groups public
25 S GMRAC=0 ;Will make postmaster
26 S GMRAD=1 ;No self enrollment
27 S GMRAG=1 ;Silent call
28 F GMRACNT=1:1:5 D
29 .N GMRAA,GMRAX,GMRAF,GMRATXT
30 .S GMRAA=$P($T(TEXT+GMRACNT),";",3) ; Mail group name
31 .S GMRAF(0)=$P($T(DESC+GMRACNT),";",3) ;Mail group Description
32 .S GMRAX=$$MG^XMBGRP(GMRAA,GMRAB,GMRAC,GMRAD,"",.GMRAF,GMRAG)
33 .I GMRAX D ;Mail group has been added
34 ..S GMRATXT(1)="The "_GMRAA_" mail group has been added."
35 ..D MES^XPDUTL(.GMRATXT)
36 ..Q
37 .E D ;Error happened and mail group was not added
38 ..S GMRATXT(1)="The "_GMRAA_" Mail Group was not added to the system"
39 ..S GMRATXT(2)="Please read the ART 4.0 Installation Guide for the"
40 ..S GMRATXT(3)="instruction on how to create this Mail Group."
41 ..D BMES^XPDUTL(.GMRATXT)
42 ..Q
43 .Q
44 Q
45FILESEC ; This routine is to check the file security and make the update if
46 ; different
47 N GMRACNT,GMRATX
48 F GMRACNT=1:1:7 S GMRATX=$T(FLSEC+GMRACNT) Q:GMRATX="" D SEC($P(GMRATX,";",3))
49 Q
50SEC(FILE) ;This Function will set the security for my file
51 N FILENUM,PIECE,NODE,NODE2
52 S NODE="^AUDIT^DD^DEL^LAYGO^RD^WR"
53 S FILENUM=$P(FILE,U)
54 F PIECE=2:1:7 I $P(FILE,U,PIECE)'="" S NODE2=$P(NODE,U,PIECE) S:$G(^DIC(FILENUM,0,NODE2))'=$P(FILE,U,PIECE) ^DIC(FILENUM,0,NODE2)=$P(FILE,U,PIECE)
55 S GMRATXT(1)="Updating File security on file "_FILENUM_"."
56 D BMES^XPDUTL(.GMRATXT)
57 Q
58FLSEC ; FILE#^AUDIT^DD^DEL^LAYGO^RD^WR
59 ;;120.8^@^@^@^@^^@
60 ;;120.82^@^@^@^^^
61 ;;120.83^@^@^@^^^
62 ;;120.84^@^@^@^@^@^@
63 ;;120.85^@^@^@^@^^@
64 ;;120.86^@^@^@^@^@^@
65 ;;120.87^@^@^@^@^^@
66TEXT ; This is the mail groups that are being added
67 ;;GMRA MARK CHART
68 ;;GMRA VERIFY DRUG ALLERGY
69 ;;GMRA VERIFY FOOD ALLERGY
70 ;;GMRA VERIFY OTHER ALLERGY
71 ;;GMRA P&T COMMITTEE FDA
72DESC ; This is the Description for the mail groups
73 ;;This is a list of users who will need to mark a patient's chart that an adverse reaction/allergy was recorded.
74 ;;This is a complete list of all the verifiers who will need to be sent Drug reaction information.
75 ;;This is a complete list of all the verifiers who will need to be sent Food reaction information.
76 ;;This is a complete list of all the verifiers who will need to be sent Other reaction information.
77 ;;This mail group contains the members of the Pharmacy and Therapeutic (P&T) committee. Whenever an agent is signed off the committee will get a message.
Note: See TracBrowser for help on using the repository browser.