source: FOIAVistA/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAIPST6.m@ 1590

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

initial load of FOIAVistA 6/30/08 version

File size: 4.6 KB
Line 
1RAIPST6 ;HIRMFO/GJC - Post-init number six ;11/23/97 13:25
2VERSION ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
3 ;
4EN1 ; Add the following protocols to file 101 iff they are new
5 ; to the Protocol (101) file: RA SEND ORM, RA SEND ORU, RA CANCEL
6 ; & RA EVSEND OR. DBIA: 872
7 ; Note: The third subscript of RAFDA is the field number in file 101.
8 ; Consult a data dictionary for further information.
9SNDORM ; RA SEND ORM protocol
10 I '$D(^ORD(101,"B","RA SEND ORM")) D
11 . N RA101,RAFDA
12 . S RAFDA(101,"+1,",.01)="RA SEND ORM"
13 . S RAFDA(101,"+1,",1)="Client for Imaging (ORM)"
14 . S RAFDA(101,"+1,",12)=$$PKG^RAIPST5()
15 . S RAFDA(101,"+1,",4)="subscriber"
16 . S RAFDA(101,"+1,",15)="Q"
17 . S RAFDA(101,"+1,",99)=$$TSTMP^RAIPST5()
18 . S RAFDA(101,"+1,",770.4)="O01"
19 . S RAFDA(101,"+1,",773.1)="NO"
20 . S RAFDA(101,"+1,",773.3)="NO"
21 . S RAFDA(101,"+1,",20)="Q"
22 . S RAFDA(101,"+1,",770.2)="RA-CLIENT-IMG"
23 . S RAFDA(101,"+1,",770.6)=$$PROID^RAIPST5()
24 . S RAFDA(101,"+1,",771)="Q"
25 . S RAFDA(101,"+1,",773.2)="NO"
26 . S RAFDA(101,"+1,",773.4)="YES"
27 . D MSG^RAIPST5("RA SEND ORM")
28 . D UPDATE^DIE("E","RAFDA")
29 . I $D(^ORD(101,"B","RA SEND ORM")) D Q
30 .. S RA101=$O(^ORD(101,"B","RA SEND ORM",0))
31 .. K RAFDA S RAFDA(101,RA101_",",770.95)=2.1 D FILE^DIE("E","RAFDA")
32 .. S ^ORD(101,RA101,1,1,0)="This protocol receives the HL7 message."
33 .. S ^ORD(101,RA101,1,0)="^^1^1^"_$$DT^XLFDT()_"^^"
34 .. Q
35 . D ERR^RAIPST5("RA SEND ORM")
36 . Q
37SNDORU ; RA SEND ORU protocol
38 I '$D(^ORD(101,"B","RA SEND ORU")) D
39 . N RA101,RAFDA
40 . S RAFDA(101,"+1,",.01)="RA SEND ORU"
41 . S RAFDA(101,"+1,",1)="Client for Imaging (ORU)"
42 . S RAFDA(101,"+1,",12)=$$PKG^RAIPST5()
43 . S RAFDA(101,"+1,",4)="subscriber"
44 . S RAFDA(101,"+1,",15)="Q"
45 . S RAFDA(101,"+1,",99)=$$TSTMP^RAIPST5()
46 . S RAFDA(101,"+1,",770.4)="R01"
47 . S RAFDA(101,"+1,",773.1)="NO"
48 . S RAFDA(101,"+1,",773.3)="NO"
49 . S RAFDA(101,"+1,",20)="Q"
50 . S RAFDA(101,"+1,",770.2)="RA-CLIENT-IMG"
51 . S RAFDA(101,"+1,",770.6)=$$PROID^RAIPST5()
52 . S RAFDA(101,"+1,",771)="Q"
53 . S RAFDA(101,"+1,",773.2)="NO"
54 . S RAFDA(101,"+1,",773.4)="YES"
55 . D MSG^RAIPST5("RA SEND ORU")
56 . D UPDATE^DIE("E","RAFDA")
57 . I $D(^ORD(101,"B","RA SEND ORU")) D Q
58 .. S RA101=$O(^ORD(101,"B","RA SEND ORU",0))
59 .. K RAFDA S RAFDA(101,RA101_",",770.95)=2.1 D FILE^DIE("E","RAFDA")
60 .. S ^ORD(101,RA101,1,1,0)="This protocol receives the HL7 message."
61 .. S ^ORD(101,RA101,1,0)="^^1^1^"_$$DT^XLFDT()_"^^"
62 .. Q
63 . D ERR^RAIPST5("RA SEND ORU")
64 . Q
65CANCEL ; RA CANCEL protocol
66 I '$D(^ORD(101,"B","RA CANCEL")) D
67 . N RA101,RAFDA
68 . S RAFDA(101,"+1,",.01)="RA CANCEL"
69 . S RAFDA(101,"+1,",1)="Rad/Nuc Med exam cancellation"
70 . S RAFDA(101,"+1,",12)=$$PKG^RAIPST5()
71 . S RAFDA(101,"+1,",4)="event driver"
72 . S RAFDA(101.01,"+2,+1,",.01)="RA SEND ORM"
73 . S RAFDA(101,"+1,",20)="Q"
74 . S RAFDA(101,"+1,",770.3)="ORM"
75 . S RAFDA(101,"+1,",770.6)=$$PROID^RAIPST5()
76 . S RAFDA(101,"+1,",772)="Q"
77 . S RAFDA(101,"+1,",99)=$$TSTMP^RAIPST5()
78 . S RAFDA(101,"+1,",770.4)="O01"
79 . D MSG^RAIPST5("RA CANCEL")
80 . D UPDATE^DIE("E","RAFDA")
81 . I $D(^ORD(101,"B","RA CANCEL")) D Q
82 .. S RA101=$O(^ORD(101,"B","RA CANCEL",0))
83 .. K RAFDA S RAFDA(101,RA101_",",770.95)=2.1 D FILE^DIE("E","RAFDA")
84 .. S ^ORD(101,RA101,1,1,0)="This protocol is triggered whenever a Radiology/Nuclear Medicine exam is"
85 .. S ^ORD(101,RA101,1,2,0)="cancelled. It executes code that creates an HL7 ORM message consisting of"
86 .. S ^ORD(101,RA101,1,3,0)="PID, ORC, OBR and OBX segments. The message contains all relevant"
87 .. S ^ORD(101,RA101,1,4,0)="information about the exam, including procedure, time of cancellation,"
88 .. S ^ORD(101,RA101,1,5,0)="procedure modifiers, patient allergies and clinical history."
89 .. S ^ORD(101,RA101,1,0)="^^5^5^"_$$DT^XLFDT()_"^^"
90 .. Q
91 . D ERR^RAIPST5("RA CANCEL")
92 . Q
93EVSEND ; RA EVSEND OR protocol
94 I '$D(^ORD(101,"B","RA EVSEND OR")) D
95 . N RA101,RAFDA
96 . S RAFDA(101,"+1,",.01)="RA EVSEND OR"
97 . S RAFDA(101,"+1,",1)="Rad/Nuc Med event sent to OE/RR"
98 . S RAFDA(101,"+1,",12)=$$PKG^RAIPST5()
99 . S RAFDA(101,"+1,",4)="extended action"
100 . S RAFDA(101,"+1,",44)="RA EVSEND"
101 . S RAFDA(101,"+1,",15)="K:$L($G(RAVARBLE)) @RAVARBLE,RAVARBLE"
102 . S RAFDA(101,"+1,",99)=$$TSTMP^RAIPST5()
103 . D MSG^RAIPST5("RA EVSEND OR")
104 . D UPDATE^DIE("E","RAFDA")
105 . I $D(^ORD(101,"B","RA EVSEND OR")) D Q
106 .. S RA101=$O(^ORD(101,"B","RA EVSEND OR",0))
107 .. S ^ORD(101,RA101,1,1,0)="Invoked when a request is created or changed by the Radiology/Nuclear"
108 .. S ^ORD(101,RA101,1,2,0)="Medicine package (the ""backdoor"") and the data is passed to the Order"
109 .. S ^ORD(101,RA101,1,3,0)="Entry package, Version 3.0 or greater."
110 .. S ^ORD(101,RA101,1,0)="^^3^3^"_$$DT^XLFDT()_"^^"
111 .. Q
112 . D ERR^RAIPST5("RA EVSEND OR")
113 . Q
114 Q
Note: See TracBrowser for help on using the repository browser.