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

SC53272P.m

Go to the documentation of this file.
  1. SC53272P ;JDS/ALB -PREINIT ; 16 Dec 2002 11:14 AM ; Compiled January 6, 2003 15:50:04
  1. ;;5.3;Scheduling;**272,1015**;AUG 13, 1993;Build 21
  1. HL7EVNT ;Create HL7 event B02 - HL7 EVENT TYPE CODE file (#779.001)
  1. ;
  1. ;Input : None
  1. ;Output : None
  1. ;Note : This is a KIDS complient check point
  1. ;
  1. ;Declare variables
  1. ;
  1. Q:$D(^HL(779.001,"B","B02"))
  1. N DIC,X,Y,DLAYGO,DTOUT,DUOUT,NEWENTRY,MSGTXT,PTREVNT,DIE,DA,DR
  1. ;Create/find entry
  1. D BMES^XPDUTL(">>> Creating entry for B02 in HL7 EVENT TYPE CODE file (#779.001)")
  1. S DIC="^HL(779.001,"
  1. S DIC(0)="L"
  1. S DIC("DR")="2///PCMM Workload Transmission"
  1. S DLAYGO=779.001
  1. S X="B02"
  1. D ^DIC
  1. S PTREVNT=+Y
  1. S NEWENTRY=+$P(Y,"^",3)
  1. S MSGTXT(1)=" Existing entry found - support of HL7 v2.4 will be added/verified"
  1. S:(NEWENTRY) MSGTXT(1)=" Entry created - support of HL7 v2.4 will be added"
  1. I (PTREVNT<0) D
  1. .S MSGTXT(1)=" ** Unable to create entry for B02"
  1. .S MSGTXT(2)=" ** Entry must be created manually"
  1. D MES^XPDUTL(.MSGTXT)
  1. K MSGTXT
  1. ;Don't continue if entry wasn't created
  1. Q:(PTREVNT<0)
  1. ;Add support for HL7 version 2.4
  1. S DIC="^HL(779.001,"_PTREVNT_",1,"
  1. S DIC(0)="LX"
  1. S DIC("P")=$P(^DD(779.001,100,0),"^",2)
  1. S DA(1)=PTREVNT
  1. S DLAYGO=779.001
  1. S X="2.4"
  1. D ^DIC
  1. S MSGTXT(1)=" Support for HL7 v2.4 "_$S($P(Y,"^",3):"added",1:"verified")
  1. I (Y<0) D
  1. .S MSGTXT(1)=" ** Unable to add support for HL7 v2.4"
  1. .S MSGTXT(2)=" ** Support for HL7 v2.4 must be added manually"
  1. D MES^XPDUTL(.MSGTXT)
  1. Q:$D(^HL(771.2,"B","PMU"))
  1. D BMES^XPDUTL(">>> Creating entry for PMU in HL7 MESSAGE TYPE file (#771.2)")
  1. S DIC="^HL(771.2,"
  1. S DIC(0)="L"
  1. S DIC("DR")="2///Workload Message;3///2.4"
  1. S DLAYGO=771.2
  1. S X="PMU"
  1. D ^DIC
  1. S MSGTXT(1)=" Support for HL7 Message Type PMU added"
  1. I (Y<0) D
  1. .S MSGTXT(1)=" ** Unable to add support forHL7 Message Type PMU"
  1. .S MSGTXT(2)=" ** Support for HL7 Message Type PMU must be added manually"
  1. D MES^XPDUTL(.MSGTXT)
  1. ;Done
  1. Q
  1. POST ;look for active FTEE assignments and update data
  1. D MES^XPDUTL("Placing current FTEE workload designations in PCMM HL7 EVENT file")
  1. F DA=0:0 S DA=$O(^SCTM(404.52,DA)) Q:'DA D
  1. .S X=$G(^SCTM(404.52,DA,0)) Q:'$P(X,U,9)
  1. .I $O(^SCTM(404.52,"AIDT",+X,0,-$P(X,U,2)),-1) Q
  1. .S X=$P(X,U,9)
  1. .D POSBXREF^SCMCHLX(DA,404.52)