source: WorldVistAEHR/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAO7CH.m@ 1093

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1RAO7CH ;HISC/FPT,GJC-Cancel/Hold request from Rad to OE/RR! ;9/5/97 09:05
2 ;;5.0;Radiology/Nuclear Medicine;**18**;Mar 16, 1998
3 ;;last modification by SS JUN 19,2000 for P18
4EN1(RAOIFN) ; 'RAOIFN' is the IEN in 75.1
5 ; New vars & define the following variables: RAECH, RAECH array & RAHLFS
6 N RA,RA0,RACTION,RAECH,RAHLFS,RANATURE,RAR,RAREASON,RATAB,RAVAR,RAVARBLE
7 S RATAB=1 D EN1^RAO7UTL S RA0=$G(^RAO(75.1,RAOIFN,0)) Q:RA0']""
8 S RACTION=$S(+$P(RA0,U,5)=1:"OD",1:"OH")
9 S RAVAR="RATMP(",RAVARBLE="RATMP"
10 ; msh
11 S @(RAVAR_RATAB_")")=$$MSH^RAO7UTL("ORM^O01") ;P18 Event type
12 ; pid
13 S RATAB=RATAB+1
14 S @(RAVAR_RATAB_")")=$$PID^RAO7UTL(RA0)
15 ; orc
16 S RAREASON=$P($G(^RA(75.2,+$P(RA0,U,10),0)),U)
17 S RANATURE=$P($G(^RA(75.2,+$P(RA0,U,10),0)),U,4) I '$L(RANATURE) S RANATURE=$S(RACTION="OH":"s",1:"x")
18 S RA("ORC",16)=$$UP^XLFSTR(RANATURE)_RAECH(1)_$$EXTERNAL^DILFD(75.2,4,"",RANATURE)_RAECH(1)_"99ORN"_RAECH(1)_+$P(RA0,U,10)_RAECH(1)_RAREASON_RAECH(1)_"99RAR"
19 S RATAB=RATAB+1,@(RAVAR_RATAB_")")="ORC"_RAHLFS_RACTION_RAHLFS_$P(RA0,U,7)_RAECH(1)_"OR"_RAHLFS_RAOIFN_RAECH(1)_"RA"_$$STR^RAO7UTL(9)_$P(RA0,U,14)_$$STR^RAO7UTL(4)_RA("ORC",16)
20 D SNDOERR
21 Q
22 ;
23EN2(RAOIFN) ; Inform OE/RR that the Request Status has changed from
24 ; complete to some other value.
25 ; New vars & define the following variables: RAECH, RAECH
26 ; array & RAHLFS
27 N RA0,RAECH,RAHLFS,RATAB,RAVAR
28 S RATAB=1 D EN1^RAO7UTL S RA0=$G(^RAO(75.1,RAOIFN,0)) Q:RA0']""
29 S RAVAR="RATMP(",RAVARBLE="RATMP"
30 ; msh
31 S @(RAVAR_RATAB_")")=$$MSH^RAO7UTL("ORM^O01") ;P18 Event type
32 ; pid
33 S RATAB=RATAB+1,@(RAVAR_RATAB_")")=$$PID^RAO7UTL(RA0)
34 ; orc
35 S RATAB=RATAB+1,@(RAVAR_RATAB_")")="ORC"_RAHLFS_"SC"_RAHLFS_$P(RA0,U,7)_RAECH(1)_"OR"_RAHLFS_RAOIFN_RAECH(1)_"RA"_$$STR^RAO7UTL(2)_"ZU"_$$STR^RAO7UTL(7)_$P(RA0,U,14)
36 D SNDOERR
37 Q
38SNDOERR ; ship message to MSG^RAO7UTL which fires of the HL7 message to CPRS
39 D MSG^RAO7UTL("RA EVSEND OR",.@RAVARBLE)
40 Q
Note: See TracBrowser for help on using the repository browser.