SC53272P ;JDS/ALB -PREINIT ; 16 Dec 2002 11:14 AM ; Compiled January 6, 2003 15:50:04
;;5.3;Scheduling;**272,1015**;AUG 13, 1993;Build 21
HL7EVNT ;Create HL7 event B02 - HL7 EVENT TYPE CODE file (#779.001)
;
;Input : None
;Output : None
;Note : This is a KIDS complient check point
;
;Declare variables
;
Q:$D(^HL(779.001,"B","B02"))
N DIC,X,Y,DLAYGO,DTOUT,DUOUT,NEWENTRY,MSGTXT,PTREVNT,DIE,DA,DR
;Create/find entry
D BMES^XPDUTL(">>> Creating entry for B02 in HL7 EVENT TYPE CODE file (#779.001)")
S DIC="^HL(779.001,"
S DIC(0)="L"
S DIC("DR")="2///PCMM Workload Transmission"
S DLAYGO=779.001
S X="B02"
D ^DIC
S PTREVNT=+Y
S NEWENTRY=+$P(Y,"^",3)
S MSGTXT(1)=" Existing entry found - support of HL7 v2.4 will be added/verified"
S:(NEWENTRY) MSGTXT(1)=" Entry created - support of HL7 v2.4 will be added"
I (PTREVNT<0) D
.S MSGTXT(1)=" ** Unable to create entry for B02"
.S MSGTXT(2)=" ** Entry must be created manually"
D MES^XPDUTL(.MSGTXT)
K MSGTXT
;Don't continue if entry wasn't created
Q:(PTREVNT<0)
;Add support for HL7 version 2.4
S DIC="^HL(779.001,"_PTREVNT_",1,"
S DIC(0)="LX"
S DIC("P")=$P(^DD(779.001,100,0),"^",2)
S DA(1)=PTREVNT
S DLAYGO=779.001
S X="2.4"
D ^DIC
S MSGTXT(1)=" Support for HL7 v2.4 "_$S($P(Y,"^",3):"added",1:"verified")
I (Y<0) D
.S MSGTXT(1)=" ** Unable to add support for HL7 v2.4"
.S MSGTXT(2)=" ** Support for HL7 v2.4 must be added manually"
D MES^XPDUTL(.MSGTXT)
Q:$D(^HL(771.2,"B","PMU"))
D BMES^XPDUTL(">>> Creating entry for PMU in HL7 MESSAGE TYPE file (#771.2)")
S DIC="^HL(771.2,"
S DIC(0)="L"
S DIC("DR")="2///Workload Message;3///2.4"
S DLAYGO=771.2
S X="PMU"
D ^DIC
S MSGTXT(1)=" Support for HL7 Message Type PMU added"
I (Y<0) D
.S MSGTXT(1)=" ** Unable to add support forHL7 Message Type PMU"
.S MSGTXT(2)=" ** Support for HL7 Message Type PMU must be added manually"
D MES^XPDUTL(.MSGTXT)
;Done
Q
POST ;look for active FTEE assignments and update data
D MES^XPDUTL("Placing current FTEE workload designations in PCMM HL7 EVENT file")
F DA=0:0 S DA=$O(^SCTM(404.52,DA)) Q:'DA D
.S X=$G(^SCTM(404.52,DA,0)) Q:'$P(X,U,9)
.I $O(^SCTM(404.52,"AIDT",+X,0,-$P(X,U,2)),-1) Q
.S X=$P(X,U,9)
.D POSBXREF^SCMCHLX(DA,404.52)
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
HL7EVNT ;Create HL7 event B02 - HL7 EVENT TYPE CODE file (#779.001)
+1 ;
+2 ;Input : None
+3 ;Output : None
+4 ;Note : This is a KIDS complient check point
+5 ;
+6 ;Declare variables
+7 ;
+8 IF $DATA(^HL(779.001,"B","B02"))
QUIT
+9 NEW DIC,X,Y,DLAYGO,DTOUT,DUOUT,NEWENTRY,MSGTXT,PTREVNT,DIE,DA,DR
+10 ;Create/find entry
+11 DO BMES^XPDUTL(">>> Creating entry for B02 in HL7 EVENT TYPE CODE file (#779.001)")
+12 SET DIC="^HL(779.001,"
+13 SET DIC(0)="L"
+14 SET DIC("DR")="2///PCMM Workload Transmission"
+15 SET DLAYGO=779.001
+16 SET X="B02"
+17 DO ^DIC
+18 SET PTREVNT=+Y
+19 SET NEWENTRY=+$PIECE(Y,"^",3)
+20 SET MSGTXT(1)=" Existing entry found - support of HL7 v2.4 will be added/verified"
+21 IF (NEWENTRY)
SET MSGTXT(1)=" Entry created - support of HL7 v2.4 will be added"
+22 IF (PTREVNT<0)
Begin DoDot:1
+23 SET MSGTXT(1)=" ** Unable to create entry for B02"
+24 SET MSGTXT(2)=" ** Entry must be created manually"
End DoDot:1
+25 DO MES^XPDUTL(.MSGTXT)
+26 KILL MSGTXT
+27 ;Don't continue if entry wasn't created
+28 IF (PTREVNT<0)
QUIT
+29 ;Add support for HL7 version 2.4
+30 SET DIC="^HL(779.001,"_PTREVNT_",1,"
+31 SET DIC(0)="LX"
+32 SET DIC("P")=$PIECE(^DD(779.001,100,0),"^",2)
+33 SET DA(1)=PTREVNT
+34 SET DLAYGO=779.001
+35 SET X="2.4"
+36 DO ^DIC
+37 SET MSGTXT(1)=" Support for HL7 v2.4 "_$SELECT($PIECE(Y,"^",3):"added",1:"verified")
+38 IF (Y<0)
Begin DoDot:1
+39 SET MSGTXT(1)=" ** Unable to add support for HL7 v2.4"
+40 SET MSGTXT(2)=" ** Support for HL7 v2.4 must be added manually"
End DoDot:1
+41 DO MES^XPDUTL(.MSGTXT)
+42 IF $DATA(^HL(771.2,"B","PMU"))
QUIT
+43 DO BMES^XPDUTL(">>> Creating entry for PMU in HL7 MESSAGE TYPE file (#771.2)")
+44 SET DIC="^HL(771.2,"
+45 SET DIC(0)="L"
+46 SET DIC("DR")="2///Workload Message;3///2.4"
+47 SET DLAYGO=771.2
+48 SET X="PMU"
+49 DO ^DIC
+50 SET MSGTXT(1)=" Support for HL7 Message Type PMU added"
+51 IF (Y<0)
Begin DoDot:1
+52 SET MSGTXT(1)=" ** Unable to add support forHL7 Message Type PMU"
+53 SET MSGTXT(2)=" ** Support for HL7 Message Type PMU must be added manually"
End DoDot:1
+54 DO MES^XPDUTL(.MSGTXT)
+55 ;Done
+56 QUIT
POST ;look for active FTEE assignments and update data
+1 DO MES^XPDUTL("Placing current FTEE workload designations in PCMM HL7 EVENT file")
+2 FOR DA=0:0
SET DA=$ORDER(^SCTM(404.52,DA))
IF 'DA
QUIT
Begin DoDot:1
+3 SET X=$GET(^SCTM(404.52,DA,0))
IF '$PIECE(X,U,9)
QUIT
+4 IF $ORDER(^SCTM(404.52,"AIDT",+X,0,-$PIECE(X,U,2)),-1)
QUIT
+5 SET X=$PIECE(X,U,9)
+6 DO POSBXREF^SCMCHLX(DA,404.52)
End DoDot:1