HLEMSE ;ALB/CJM -ListManager Screen for dsiplaying an Event;12 JUN 1997 10:00 am
;;1.6;HEALTH LEVEL SEVEN;**109**;Oct 13,1995
;
EN(EVENT) ;Entry point to viewing a single HL7 Monitor Event
;Input: EVENT is the ien of an event
;Output: none
;
N IDX
Q:'$G(EVENT)
;
S IDX="^TMP(""HLEM"",$J,""EVENT"")"
D WAIT^DICD
D EN^VALM("HLEM DISPLAY ONE EVENT")
Q
;
;
HDR ;Header code
Q
;
INIT ;Init variables and list array
Q:'$$GET^HLEME(EVENT,.EVENT)
D DISPLAY
D HDR
S VALMBCK="R"
Q
;
DISPLAY ;Build event screen
D CLEAN^VALM10
N ETYPE,I,STATION
K @IDX,VALMHDR
S VALMBG=1,(COUNT,VALMCNT)=0
;
;Build header
;D HDR
S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Event ID:",1,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("ID"),19)
S ETYPE=$$GET^HLEMT(EVENT("TYPE"),.ETYPE)
S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Event Type:",1,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,ETYPE("CODE"),19)
S VALMCNT=$$SET^HLEMSU(VALMCNT,"Count:",40,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("COUNT"),52)
S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Descr:",1,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,ETYPE("BRIEF"),8)
S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Site of Event:",1,"H")
S STATION=$$STATION^HLEMSU(EVENT("SITE"))
S:EVENT("SITE") VALMCNT=$$SET^HLEMSU(VALMCNT,$P(STATION,"^",1)_" #"_$P(STATION,"^",2),19)
S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"DT/TM of Event:",1,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,$E($$X(.01,EVENT("DT/TM")),1,18),19)
S VALMCNT=$$SET^HLEMSU(VALMCNT,"DT/TM Reported:",40,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,$E($$X(.17,EVENT("DT/TM CREATED")),1,18),57)
S VALMCNT=$$INC^HLEMU(.VALMCNT)
S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Status Information:",1,"RH")
S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Urgent:",1,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.12,EVENT("URGENT")),19,$S(EVENT("URGENT"):"BH",1:""))
S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Automated Action:",1,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.05,EVENT("ACTION STATUS")),19)
S VALMCNT=$$SET^HLEMSU(VALMCNT,"DT/TM:",45,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,$E($$X(.09,EVENT("DT/TM ACTION")),1,18),52)
S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Review Status:",1,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.06,EVENT("REVIEW STATUS")),19)
S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Reviewer:",1,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.08,EVENT("REVIEWER")),19)
S VALMCNT=$$SET^HLEMSU(VALMCNT,"Date:",45,"H")
S VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.07,EVENT("DT/TM REVIEWED")),52)
I $L(EVENT("MSG ID")) D
.S VALMCNT=$$INC^HLEMU(.VALMCNT)
.S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"HL7 Message Information:",1,"RH")
.S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Mssg ID:",1,"H")
.S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("MSG ID"),19)
.S VALMCNT=$$SET^HLEMSU(VALMCNT,"Type:",40,"H")
.S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("MSG TYPE")_"~"_EVENT("MSG EVENT"),54)
.S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Sending App:",1,"H")
.S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("APPLICATION"),19)
.S VALMCNT=$$SET^HLEMSU(VALMCNT,"Logical Link:",40,"H")
.S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("MSG LINK"),54)
S VALMCNT=$$INC^HLEMU(.VALMCNT)
S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Notes: ",1,"RH")
S I=0 F S I=$O(^HLEV(776.4,EVENT("IEN"),1,I)) Q:'I S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),$G(^HLEV(776.4,EVENT("IEN"),1,I,0)),1)
Q
;
HELP ;Help code
S X="?" D DISP^XQORM1 W !!
Q
;
EXIT ;Exit code
D CLEAN^VALM10
D CLEAR^VALM1
K @IDX
Q
;
EXPND ;Expand code
Q
;
X(FIELD,VALUE) ;
;changes a field value in file 774.4 to external form
Q $$EXTERNAL^DILFD(776.4,FIELD,"F",VALUE)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHLEMSE 3727 printed Dec 13, 2024@01:57:30 Page 2
HLEMSE ;ALB/CJM -ListManager Screen for dsiplaying an Event;12 JUN 1997 10:00 am
+1 ;;1.6;HEALTH LEVEL SEVEN;**109**;Oct 13,1995
+2 ;
EN(EVENT) ;Entry point to viewing a single HL7 Monitor Event
+1 ;Input: EVENT is the ien of an event
+2 ;Output: none
+3 ;
+4 NEW IDX
+5 if '$GET(EVENT)
QUIT
+6 ;
+7 SET IDX="^TMP(""HLEM"",$J,""EVENT"")"
+8 DO WAIT^DICD
+9 DO EN^VALM("HLEM DISPLAY ONE EVENT")
+10 QUIT
+11 ;
+12 ;
HDR ;Header code
+1 QUIT
+2 ;
INIT ;Init variables and list array
+1 if '$$GET^HLEME(EVENT,.EVENT)
QUIT
+2 DO DISPLAY
+3 DO HDR
+4 SET VALMBCK="R"
+5 QUIT
+6 ;
DISPLAY ;Build event screen
+1 DO CLEAN^VALM10
+2 NEW ETYPE,I,STATION
+3 KILL @IDX,VALMHDR
+4 SET VALMBG=1
SET (COUNT,VALMCNT)=0
+5 ;
+6 ;Build header
+7 ;D HDR
+8 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Event ID:",1,"H")
+9 SET VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("ID"),19)
+10 SET ETYPE=$$GET^HLEMT(EVENT("TYPE"),.ETYPE)
+11 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Event Type:",1,"H")
+12 SET VALMCNT=$$SET^HLEMSU(VALMCNT,ETYPE("CODE"),19)
+13 SET VALMCNT=$$SET^HLEMSU(VALMCNT,"Count:",40,"H")
+14 SET VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("COUNT"),52)
+15 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Descr:",1,"H")
+16 SET VALMCNT=$$SET^HLEMSU(VALMCNT,ETYPE("BRIEF"),8)
+17 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Site of Event:",1,"H")
+18 SET STATION=$$STATION^HLEMSU(EVENT("SITE"))
+19 if EVENT("SITE")
SET VALMCNT=$$SET^HLEMSU(VALMCNT,$PIECE(STATION,"^",1)_" #"_$PIECE(STATION,"^",2),19)
+20 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"DT/TM of Event:",1,"H")
+21 SET VALMCNT=$$SET^HLEMSU(VALMCNT,$EXTRACT($$X(.01,EVENT("DT/TM")),1,18),19)
+22 SET VALMCNT=$$SET^HLEMSU(VALMCNT,"DT/TM Reported:",40,"H")
+23 SET VALMCNT=$$SET^HLEMSU(VALMCNT,$EXTRACT($$X(.17,EVENT("DT/TM CREATED")),1,18),57)
+24 SET VALMCNT=$$INC^HLEMU(.VALMCNT)
+25 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Status Information:",1,"RH")
+26 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Urgent:",1,"H")
+27 SET VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.12,EVENT("URGENT")),19,$SELECT(EVENT("URGENT"):"BH",1:""))
+28 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Automated Action:",1,"H")
+29 SET VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.05,EVENT("ACTION STATUS")),19)
+30 SET VALMCNT=$$SET^HLEMSU(VALMCNT,"DT/TM:",45,"H")
+31 SET VALMCNT=$$SET^HLEMSU(VALMCNT,$EXTRACT($$X(.09,EVENT("DT/TM ACTION")),1,18),52)
+32 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Review Status:",1,"H")
+33 SET VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.06,EVENT("REVIEW STATUS")),19)
+34 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Reviewer:",1,"H")
+35 SET VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.08,EVENT("REVIEWER")),19)
+36 SET VALMCNT=$$SET^HLEMSU(VALMCNT,"Date:",45,"H")
+37 SET VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.07,EVENT("DT/TM REVIEWED")),52)
+38 IF $LENGTH(EVENT("MSG ID"))
Begin DoDot:1
+39 SET VALMCNT=$$INC^HLEMU(.VALMCNT)
+40 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"HL7 Message Information:",1,"RH")
+41 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Mssg ID:",1,"H")
+42 SET VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("MSG ID"),19)
+43 SET VALMCNT=$$SET^HLEMSU(VALMCNT,"Type:",40,"H")
+44 SET VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("MSG TYPE")_"~"_EVENT("MSG EVENT"),54)
+45 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Sending App:",1,"H")
+46 SET VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("APPLICATION"),19)
+47 SET VALMCNT=$$SET^HLEMSU(VALMCNT,"Logical Link:",40,"H")
+48 SET VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("MSG LINK"),54)
End DoDot:1
+49 SET VALMCNT=$$INC^HLEMU(.VALMCNT)
+50 SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Notes: ",1,"RH")
+51 SET I=0
FOR
SET I=$ORDER(^HLEV(776.4,EVENT("IEN"),1,I))
if 'I
QUIT
SET VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),$GET(^HLEV(776.4,EVENT("IEN"),1,I,0)),1)
+52 QUIT
+53 ;
HELP ;Help code
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
+3 ;
EXIT ;Exit code
+1 DO CLEAN^VALM10
+2 DO CLEAR^VALM1
+3 KILL @IDX
+4 QUIT
+5 ;
EXPND ;Expand code
+1 QUIT
+2 ;
X(FIELD,VALUE) ;
+1 ;changes a field value in file 774.4 to external form
+2 QUIT $$EXTERNAL^DILFD(776.4,FIELD,"F",VALUE)