source: FOIAVistA/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLEMSE.m@ 1751

Last change on this file since 1751 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.5 KB
Line 
1HLEMSE ;ALB/CJM -ListManager Screen for dsiplaying an Event;12 JUN 1997 10:00 am
2 ;;1.6;HEALTH LEVEL SEVEN;**109**;Oct 13,1995
3 ;
4EN(EVENT) ;Entry point to viewing a single HL7 Monitor Event
5 ;Input: EVENT is the ien of an event
6 ;Output: none
7 ;
8 N IDX
9 Q:'$G(EVENT)
10 ;
11 S IDX="^TMP(""HLEM"",$J,""EVENT"")"
12 D WAIT^DICD
13 D EN^VALM("HLEM DISPLAY ONE EVENT")
14 Q
15 ;
16 ;
17HDR ;Header code
18 Q
19 ;
20INIT ;Init variables and list array
21 Q:'$$GET^HLEME(EVENT,.EVENT)
22 D DISPLAY
23 D HDR
24 S VALMBCK="R"
25 Q
26 ;
27DISPLAY ;Build event screen
28 D CLEAN^VALM10
29 N ETYPE,I,STATION
30 K @IDX,VALMHDR
31 S VALMBG=1,(COUNT,VALMCNT)=0
32 ;
33 ;Build header
34 ;D HDR
35 S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Event ID:",1,"H")
36 S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("ID"),19)
37 S ETYPE=$$GET^HLEMT(EVENT("TYPE"),.ETYPE)
38 S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Event Type:",1,"H")
39 S VALMCNT=$$SET^HLEMSU(VALMCNT,ETYPE("CODE"),19)
40 S VALMCNT=$$SET^HLEMSU(VALMCNT,"Count:",40,"H")
41 S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("COUNT"),52)
42 S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Descr:",1,"H")
43 S VALMCNT=$$SET^HLEMSU(VALMCNT,ETYPE("BRIEF"),8)
44 S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Site of Event:",1,"H")
45 S STATION=$$STATION^HLEMSU(EVENT("SITE"))
46 S:EVENT("SITE") VALMCNT=$$SET^HLEMSU(VALMCNT,$P(STATION,"^",1)_" #"_$P(STATION,"^",2),19)
47 S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"DT/TM of Event:",1,"H")
48 S VALMCNT=$$SET^HLEMSU(VALMCNT,$E($$X(.01,EVENT("DT/TM")),1,18),19)
49 S VALMCNT=$$SET^HLEMSU(VALMCNT,"DT/TM Reported:",40,"H")
50 S VALMCNT=$$SET^HLEMSU(VALMCNT,$E($$X(.17,EVENT("DT/TM CREATED")),1,18),57)
51 S VALMCNT=$$INC^HLEMU(.VALMCNT)
52 S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Status Information:",1,"RH")
53 S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Urgent:",1,"H")
54 S VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.12,EVENT("URGENT")),19,$S(EVENT("URGENT"):"BH",1:""))
55 S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Automated Action:",1,"H")
56 S VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.05,EVENT("ACTION STATUS")),19)
57 S VALMCNT=$$SET^HLEMSU(VALMCNT,"DT/TM:",45,"H")
58 S VALMCNT=$$SET^HLEMSU(VALMCNT,$E($$X(.09,EVENT("DT/TM ACTION")),1,18),52)
59 S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Review Status:",1,"H")
60 S VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.06,EVENT("REVIEW STATUS")),19)
61 S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Reviewer:",1,"H")
62 S VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.08,EVENT("REVIEWER")),19)
63 S VALMCNT=$$SET^HLEMSU(VALMCNT,"Date:",45,"H")
64 S VALMCNT=$$SET^HLEMSU(VALMCNT,$$X(.07,EVENT("DT/TM REVIEWED")),52)
65 I $L(EVENT("MSG ID")) D
66 .S VALMCNT=$$INC^HLEMU(.VALMCNT)
67 .S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"HL7 Message Information:",1,"RH")
68 .S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Mssg ID:",1,"H")
69 .S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("MSG ID"),19)
70 .S VALMCNT=$$SET^HLEMSU(VALMCNT,"Type:",40,"H")
71 .S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("MSG TYPE")_"~"_EVENT("MSG EVENT"),54)
72 .S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Sending App:",1,"H")
73 .S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("APPLICATION"),19)
74 .S VALMCNT=$$SET^HLEMSU(VALMCNT,"Logical Link:",40,"H")
75 .S VALMCNT=$$SET^HLEMSU(VALMCNT,EVENT("MSG LINK"),54)
76 S VALMCNT=$$INC^HLEMU(.VALMCNT)
77 S VALMCNT=$$SET^HLEMSU($$INC^HLEMU(.VALMCNT),"Notes: ",1,"RH")
78 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)
79 Q
80 ;
81HELP ;Help code
82 S X="?" D DISP^XQORM1 W !!
83 Q
84 ;
85EXIT ;Exit code
86 D CLEAN^VALM10
87 D CLEAR^VALM1
88 K @IDX
89 Q
90 ;
91EXPND ;Expand code
92 Q
93 ;
94X(FIELD,VALUE) ;
95 ;changes a field value in file 774.4 to external form
96 Q $$EXTERNAL^DILFD(776.4,FIELD,"F",VALUE)
Note: See TracBrowser for help on using the repository browser.