1 | RA84POS ;Hines OI/GJC - Post-init Driver, patch 84 ;01/07/06 06:32
|
---|
2 | VERSION ;;5.0;Radiology/Nuclear Medicine;**84**;Mar 16, 1998;Build 13
|
---|
3 | ;
|
---|
4 | ;Integration Agreements
|
---|
5 | ;----------------------
|
---|
6 | ;$$FIND1^DIC(2051); FILE^DIE(2053); UPDATE^DIE(2053); BMES^XPDUTL(10141)
|
---|
7 | ;
|
---|
8 | EN ;Entry point
|
---|
9 | N DIERR,RAERR,RAF,RAFDA,RAHLAPP,RAIEN,RATXT,RAY
|
---|
10 | S:'$D(U) U="^"
|
---|
11 | ;Find the IEN of 'RA-SCIMAGE-TCP' in the RAD/NUC MED HL7 APPLICATION EXCEPTION (#79.7) file.
|
---|
12 | ;Is 'RA-SCIMAGE-TCP' already in 79.7? If not find the IEN in file 771 & add it to file 79.7.
|
---|
13 | S RAHLAPP=$$FIND1^DIC(79.7,"","X","RA-SCIMAGE-TCP")
|
---|
14 | I 'RAHLAPP D
|
---|
15 | .S RAHLAPP=$$FIND1^DIC(771,"","X","RA-SCIMAGE-TCP")
|
---|
16 | .S RAFDA(79.7,"+1,",.01)=RAHLAPP,RAFDA(79.7,"+1,",1)=1
|
---|
17 | .S RAIEN(1)=RAHLAPP D UPDATE^DIE("","RAFDA","RAIEN","RAERR")
|
---|
18 | .S:$G(RAIEN(1))'>0 RAERR("DIERR")=""
|
---|
19 | .Q
|
---|
20 | ;
|
---|
21 | I ($D(RAERR("DIERR"))#2) D Q
|
---|
22 | .S RATXT(1)="'RA-SCIMAGE-TCP' is not a record in the RAD/NUC MED HL7 APPLICATION EXCEPTION"
|
---|
23 | .S RATXT(2)="(#79.7) file. Please contact the national Radiology development team about this"
|
---|
24 | .S RATXT(3)="issue." D BMES^XPDUTL(.RATXT)
|
---|
25 | .Q
|
---|
26 | ;
|
---|
27 | ;The 'TELERADIOLOGY APPLICATION' (fld: 1) for 'RA-SCIMAGE-TCP' should be defined as '1' or Yes
|
---|
28 | I $P(^RA(79.7,RAHLAPP,0),U,2)'=1 D
|
---|
29 | .S RAFDA(79.7,RAHLAPP_",",1)=1 ;internal value
|
---|
30 | .D FILE^DIE("","RAFDA","RAERR") S RATXT(1)=""
|
---|
31 | .S:($D(RAERR("DIERR")))#2 RATXT(2)="Error setting 'RA-SCIMAGE-TCP' as a 'TELERADIOLOGY' application type."
|
---|
32 | .S:$G(RATXT(2))="" RATXT(2)="'RA-SCIMAGE-TCP' is now defined as a 'TELERADIOLOGY' application type."
|
---|
33 | .D BMES^XPDUTL(.RATXT)
|
---|
34 | .Q
|
---|
35 | ;
|
---|
36 | ;The 'APPLICATION TYPE' (fld: 1.3) for 'RA-SCIMAGE-TCP' should be defined as 'S' for
|
---|
37 | ;'Speech Recognition'.
|
---|
38 | I $P(^RA(79.7,RAHLAPP,0),U,5)'="S" D
|
---|
39 | .S RAFDA(79.7,RAHLAPP_",",1.3)="S" ;internal value
|
---|
40 | .D FILE^DIE("","RAFDA","RAERR") S RATXT(1)=""
|
---|
41 | .S:($D(RAERR("DIERR")))#2 RATXT(2)="Error setting 'RA-SCIMAGE-TCP' as a 'Speech Recognition' APPLICATION TYPE."
|
---|
42 | .S:$G(RATXT(2))="" RATXT(2)="'RA-SCIMAGE-TCP' is now defined as a 'Speech Recognition' APPLICATION TYPE."
|
---|
43 | .D BMES^XPDUTL(.RATXT)
|
---|
44 | .Q
|
---|
45 | ;
|
---|
46 | K DIERR,RAERR,RAFDA,RATXT
|
---|
47 | ;update the following fields in the RAD/NUC MED HL7 APPLICATION EXCEPTION
|
---|
48 | ;(#79.7) file with the most recent Dx Codes (999-1003 series implemeted with V9)
|
---|
49 | ; DEFAULT DX FOR 'R' REPORT (#2.1)
|
---|
50 | ; DEFAULT DX FOR 'F' REPORT (#2.2)
|
---|
51 | I $G(^RA(78.3,999,0))="TELERADIOLOGY, NOT YET DICTATED^^N^n" D
|
---|
52 | .S RAFDA(79.7,RAHLAPP_",",2.1)=999
|
---|
53 | .I $G(^RA(78.3,1000,0))="NO ALERT REQUIRED^^N^n" S RAF=1,RAFDA(79.7,RAHLAPP_",",2.2)=1000
|
---|
54 | .D FILE^DIE("","RAFDA","RAERR")
|
---|
55 | .I ($D(RAERR("DIERR")))#2 D
|
---|
56 | ..S RAY=0 F S RAY=$O(RAERR("DIERR",RAY)) Q:'RAY S RATXT(RAY)=$G(RAERR("DIERR",RAY,"TEXT",1))
|
---|
57 | ..Q
|
---|
58 | .E D
|
---|
59 | ..S RATXT(1)="'TELERADIOLOGY, NOT YET DICTATED' added as the 'DEFAULT DX FOR 'R' REPORT' value."
|
---|
60 | ..S:$G(RAF)=1 RATXT(2)="'NO ALERT REQUIRED' added as the 'DEFAULT DX FOR 'F' REPORT' value."
|
---|
61 | ..Q
|
---|
62 | .D BMES^XPDUTL(.RATXT)
|
---|
63 | .Q
|
---|
64 | ;
|
---|
65 | ILOC ; assign active imaging locations to RADIOLOGY,OUTSIDE SERVICE
|
---|
66 | ;
|
---|
67 | N DIERR,RAERR,RAFDA,RAIEN,RATODAY
|
---|
68 | S (RAIEN,RAIEN(0))=$$FIND1^DIC(200,"","X","RADIOLOGY,OUTSIDE SERVICE"),RATODAY=$$DT^XLFDT()
|
---|
69 | I RAIEN=0!($D(DIERR)#2) D Q
|
---|
70 | .D BMES^XPDUTL("Failed NEW PERSON file lookup on: RADIOLOGY,OUTSIDE SERVICE") Q
|
---|
71 | ;
|
---|
72 | ;if this i-loc have been assigned to RADIOLOGY,OUTSIDE SERVICE quit (do not create duplicates)
|
---|
73 | Q:$O(^VA(200,RAIEN,"RAL",0))
|
---|
74 | ;
|
---|
75 | ;find only active radiology imaging locations...
|
---|
76 | N RAX,RAY S RAY=0,RAIEN=","_RAIEN_","
|
---|
77 | F S RAY=$O(^RA(79.1,RAY)) Q:'RAY S RAX=$G(^(RAY,0)) D
|
---|
78 | .I $P(RAX,U,19),($P(RAX,U,19)'>RATODAY) Q ;inactive location
|
---|
79 | .S RAFDA(200.074,"+"_RAY_RAIEN,.01)=RAY Q
|
---|
80 | ;
|
---|
81 | Q:'($D(RAFDA(200.074))\10) ;quit there is no data to file
|
---|
82 | ;
|
---|
83 | ;lock the RADIOLOGY,OUTSIDE SERVICE record in file 200, exit gracefully if locked by another
|
---|
84 | L +^VA(200,RAIEN(0)):$G(DILOCKTM,3)
|
---|
85 | I '$T D BMES^XPDUTL("RADIOLOGY,OUTSIDE SERVICE is locked by another user!") Q
|
---|
86 | ;
|
---|
87 | D UPDATE^DIE("","RAFDA","","RAERR")
|
---|
88 | I $D(RAERR("DIERR"))#2 D
|
---|
89 | .N RATXT S RATXT(1)="Error assigning imaging locations to RADIOLOGY,OUTSIDE SERVICE."
|
---|
90 | .S RATXT(2)=$G(RAERR("DIERR","1","TEXT",1)) D BMES^XPDUTL(.RATXT) Q
|
---|
91 | E D BMES^XPDUTL("Imaging locations have been assigned to RADIOLOGY,OUTSIDE SERVICE.")
|
---|
92 | ;
|
---|
93 | ;unlock the RADIOLOGY,OUTSIDE SERVICE record in the NEW PERSON file
|
---|
94 | L -^VA(200,RAIEN(0))
|
---|
95 | Q
|
---|
96 | ;
|
---|