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

GMRAIVDK.m

Go to the documentation of this file.
  1. GMRAIVDK ;BPOIFO/JG - KIDS POST INSTALL FOR VDEF PATCH ;10/5/04 08:57
  1. ;;4.0;ADVERSE REACTION TRACKING;**22,23**;Mar 29, 1996
  1. ;
  1. ; This routine uses the following IAs:
  1. ; #4447 - POSTKID^VDEF (controlled)
  1. ; #10141 - XPDUTL calls (controlled)
  1. ;
  1. ; This program is used as the KIDS Post-Install routine
  1. ; for the second VDEF patch that installs GMRA application
  1. ; specific components that are required by VDEF to construct
  1. ; a message.
  1. ;
  1. POSTKID ; Entry point
  1. ; Inputs that are required by POSTKID^VDEFVU:
  1. ; MSGTYP - HL7 message type (ADT, ORU, etc)
  1. ; EVNTYP - HL7 event type (A60, R01, etc)
  1. ; SUBTYP - VDEF Event Subtype (ALGY, PPAR, etc)
  1. ; PROTO - VistA HL7 Event Driver Protocol Name
  1. ; CUSTPKG - Custodial Package Name
  1. ; EXTROUT - VDEF Message Extraction Program
  1. ; EVDESC - Event description
  1. ; SUBDESC - Subtype description
  1. ;
  1. ; If needed, POSTKID^VDEFVU will generate error message (BMES^XPDUTL)
  1. ; and set GMRABORT=1
  1. ;
  1. K XPDABORT
  1. I $G(XPDNM)="" D BMES^XPDUTL("Must be run as a KIDS Post-Install process.") S XPDABORT=1 Q
  1. N MSGTYP,EVNTYP,SUBTYP,PROTO,CUSTPKG,EXTROUT,EVDESC,SUBDESC,ERRMSG,GMRABORT
  1. ;
  1. ; Create Allergy Update/Insert Event
  1. S MSGTYP="ORU"
  1. S EVNTYP="R01"
  1. S SUBTYP="ALGY"
  1. S PROTO="GMRA VDEF ORU R01 ALLERGY VS"
  1. S CUSTPKG="ADVERSE REACTION TRACKING"
  1. S EXTROUT="GMRAIAL1"
  1. S EVDESC="ALLERGY UPDATE/INSERT"
  1. S SUBDESC="ALLERGY UPDATE/INSERT"
  1. D POSTKID^VDEFVU(MSGTYP,EVNTYP,SUBTYP,PROTO,CUSTPKG,EXTROUT,EVDESC,SUBDESC,.GMRABORT)
  1. Q:$G(GMRABORT)
  1. ;
  1. ; Create Allergy Assessment Event
  1. S SUBTYP="ADAS"
  1. S PROTO="GMRA VDEF ORU R01 ADV ASSESS VS"
  1. S EVDESC="ALLERGY ASSESSMENT"
  1. S SUBDESC="ALLERGY ASSESSMENT"
  1. D POSTKID^VDEFVU(MSGTYP,EVNTYP,SUBTYP,PROTO,CUSTPKG,EXTROUT,EVDESC,SUBDESC,.GMRABORT)
  1. Q:$G(GMRABORT)
  1. ;
  1. ; Create Adverse Reaction Report Event
  1. S SUBTYP="ADRA"
  1. S PROTO="GMRA VDEF ORU R01 ADV REACT VS"
  1. S EXTROUT="GMRAIAD1"
  1. S EVDESC="ADVERSE REACTION REPORT"
  1. S SUBDESC="ADVERSE REACTION"
  1. D POSTKID^VDEFVU(MSGTYP,EVNTYP,SUBTYP,PROTO,CUSTPKG,EXTROUT,EVDESC,SUBDESC,.GMRABORT)
  1. Q:$G(GMRABORT)
  1. ;
  1. ; Success!!
  1. D BMES^XPDUTL("VDEF Event(s) successfully installed in VDEF globals.")
  1. Q