Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMRAXPST

GMRAXPST.m

Go to the documentation of this file.
  1. GMRAXPST ;HIRMFO/WAA,RM-POST INIT FOR ALLERGY/ADVERSE REACTION ; 1/15/93
  1. ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
  1. EN1 ; POST INIT PROCEDURES FOR GMRA PACKAGE
  1. I $G(GMRAVER,3)<4 D EN1^GMRAXNKA ; Move NKA data out of file 120.8
  1. D MAILGRP ; update mail groups.
  1. ; Add mail groups to bulletins??
  1. D FILESEC ; Check File security for all the files
  1. D TITLE ; Change the title in file 121.2
  1. Q
  1. TITLE ; This code will update the title in the progress note package
  1. N GMRACW
  1. 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
  1. Q:GMRACW<1
  1. N DIE,DA,DR
  1. S DIE="^GMR(121.2,",DA=GMRACW,DR=".01///ADVERSE REACTION/ALLERGY"
  1. D ^DIE
  1. N GMRATXT
  1. S GMRATXT(1)="The Progress Note Title of ALLERGY/ADVERSE REACTION with a note type of"
  1. S GMRATXT(2)="GENERAL NOTE has been changed to ADVERSE REACTION/ALLERGY."
  1. D MES^XPDUTL(.GMRATXT)
  1. Q
  1. MAILGRP ; Procedure to update the mail groups for ART bulletins.
  1. N GMRAA,GMRAB,GMRAC,GMRAD,GMRAG,GMRACNT
  1. S GMRAB=0 ;Make groups public
  1. S GMRAC=0 ;Will make postmaster
  1. S GMRAD=1 ;No self enrollment
  1. S GMRAG=1 ;Silent call
  1. F GMRACNT=1:1:5 D
  1. .N GMRAA,GMRAX,GMRAF,GMRATXT
  1. .S GMRAA=$P($T(TEXT+GMRACNT),";",3) ; Mail group name
  1. .S GMRAF(0)=$P($T(DESC+GMRACNT),";",3) ;Mail group Description
  1. .S GMRAX=$$MG^XMBGRP(GMRAA,GMRAB,GMRAC,GMRAD,"",.GMRAF,GMRAG)
  1. .I GMRAX D ;Mail group has been added
  1. ..S GMRATXT(1)="The "_GMRAA_" mail group has been added."
  1. ..D MES^XPDUTL(.GMRATXT)
  1. ..Q
  1. .E D ;Error happened and mail group was not added
  1. ..S GMRATXT(1)="The "_GMRAA_" Mail Group was not added to the system"
  1. ..S GMRATXT(2)="Please read the ART 4.0 Installation Guide for the"
  1. ..S GMRATXT(3)="instruction on how to create this Mail Group."
  1. ..D BMES^XPDUTL(.GMRATXT)
  1. ..Q
  1. .Q
  1. Q
  1. FILESEC ; This routine is to check the file security and make the update if
  1. ; different
  1. N GMRACNT,GMRATX
  1. F GMRACNT=1:1:7 S GMRATX=$T(FLSEC+GMRACNT) Q:GMRATX="" D SEC($P(GMRATX,";",3))
  1. Q
  1. SEC(FILE) ;This Function will set the security for my file
  1. N FILENUM,PIECE,NODE,NODE2
  1. S NODE="^AUDIT^DD^DEL^LAYGO^RD^WR"
  1. S FILENUM=$P(FILE,U)
  1. 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)
  1. S GMRATXT(1)="Updating File security on file "_FILENUM_"."
  1. D BMES^XPDUTL(.GMRATXT)
  1. Q
  1. FLSEC ; FILE#^AUDIT^DD^DEL^LAYGO^RD^WR
  1. ;;120.8^@^@^@^@^^@
  1. ;;120.82^@^@^@^^^
  1. ;;120.83^@^@^@^^^
  1. ;;120.84^@^@^@^@^@^@
  1. ;;120.85^@^@^@^@^^@
  1. ;;120.86^@^@^@^@^@^@
  1. ;;120.87^@^@^@^@^^@
  1. TEXT ; This is the mail groups that are being added
  1. ;;GMRA MARK CHART
  1. ;;GMRA VERIFY DRUG ALLERGY
  1. ;;GMRA VERIFY FOOD ALLERGY
  1. ;;GMRA VERIFY OTHER ALLERGY
  1. ;;GMRA P&T COMMITTEE FDA
  1. DESC ; This is the Description for the mail groups
  1. ;;This is a list of users who will need to mark a patient's chart that an adverse reaction/allergy was recorded.
  1. ;;This is a complete list of all the verifiers who will need to be sent Drug reaction information.
  1. ;;This is a complete list of all the verifiers who will need to be sent Food reaction information.
  1. ;;This is a complete list of all the verifiers who will need to be sent Other reaction information.
  1. ;;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.