source: FOIAVistA/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RA45PST.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 3.3 KB
Line 
1RA45PST ;Hines OI/GJC - Post-init Driver, patch 45 ;10/10/03 06:32
2VERSION ;;5.0;Radiology/Nuclear Medicine;**45**;Mar 16, 1998
3 ;
4EN ;Need to convert the data in the old 'BARIUM USED?' (#5) field in
5 ;the 70.03 data dictionary to the CONTRAST MEDIA (#225) multiple
6 ;70.3225. If 'Yes' to 'BARIUM USED?' then 'Barium' will be added
7 ;as a record to the new CONTRAST MEDIA field. The 'BARIUM USED?'
8 ;field will be deleted. This will be a background process queued
9 ;to run by the RA*5*45 post-init.
10 I '$D(^DD(70.03,5,0))#2 D
11 .S RATXT(1)="'BARIUM USED?' (sub-dd: 70.03, fld: 5) field has been deleted in the"
12 .S RATXT(2)="past; no further action taken regarding this data dictionary."
13 .D MES^XPDUTL(.RATXT) K RATXT
14 .Q
15 E D
16 .N RATXT,ZTDESC,ZTDTH,ZTIO,ZTRTN
17 .S ZTIO="",ZTRTN="ENQ1^RA45PST1"
18 .S ZTDESC="RA*5.0*45: 'BARIUM USED?' (dd: 70.03;fld: 5) field cleanup"
19 .S ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT(),0,0,2,0) ;add 2 minutes to 'now'
20 .D ^%ZTLOAD S RATXT(1)=" "
21 .S RATXT(2)="RA*5.0*45: delete 'BARIUM USED?' field, convert data to CONTRAST MEDIA (70.3225) multiple"
22 .S:$G(ZTSK)>0 RATXT(3)="Task: "_ZTSK_"."
23 .S RATXT(4)=" " D MES^XPDUTL(.RATXT)
24 .Q
25 ;
26SEED71 ;The second process must be tasked off that will identify all the
27 ;Rad/Nuc Med orderable items (OI) in file 101.43 checking them to
28 ;see if barium, oral cholecystogram or unspecified contrast media
29 ;happen to be associated contrasts.
30 ;
31 ;If no associations move onto the next OI and check for CMs
32 ;
33 ;If yes, update the procedure in file 71; add barium, oral
34 ;cholecystografic or unspecified contrast media to the CONTRAST MEDIA
35 ;(#125) multiple in file 71. All successful and unsuccessful updates
36 ;will be presented to the user in the form of an email message.
37 ;(Failure to update occurs when a record cannot be locked)
38 ;
39 ;Finally, the Rad/Nuc Med Procedure (71) file will be synchronized with
40 ;the Orderable Items (101.43) file.
41 ;
42 N RATXT,ZTDESC,ZTDTH,ZTIO,ZTRTN
43 S ZTIO="",ZTRTN="ENQ2^RA45PST2"
44 S ZTDESC="RA*5.0*45: seed new CONTRAST MEDIA (#125) field in file 71"
45 S ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT(),0,0,2,0) ;add 2 minutes to 'now'
46 D ^%ZTLOAD S RATXT(1)=" "
47 S RATXT(2)="RA*5.0*45: seed new CONTRAST MEDIA (#125) field in file 71"
48 S:$G(ZTSK)>0 RATXT(3)="Task: "_ZTSK_"."
49 S RATXT(4)=" " D MES^XPDUTL(.RATXT)
50 Q
51 ;
52MAILQ2(FORMAT,SUBJECT) ;Update users via email; let the user(s) know which
53 ;Rad/NM Procedures have been updated according to their Orderable Item
54 ;equivalents.
55 ;input: FORMAT='1' for Orderable Item CM definitions applied to Rad/Nuc
56 ; Med procedure, '2' for sychronization between Rad/Nuc Med
57 ; Procedure and the Orderable Items file (Rad/Nuc Med
58 ; function)
59 ; SUBJECT=subject of the email
60 ;
61 Q:FORMAT'=1&(FORMAT'=2) Q:$G(SUBJECT)="" NEW RAX
62 S:FORMAT=1 $P(RAX," ",81)="",$E(RAX,1,6)="Status",$E(RAX,10,18)="Procedure",$E(RAX,52,55)="CPT",$E(RAX,60,67)="Contrast"
63 S:FORMAT=2 $P(RAX," ",81)="",$E(RAX,1,6)="Status",$E(RAX,10,18)="Procedure",$E(RAX,55,58)="CPT",$E(RAX,65,72)="Contrast"
64 S ^TMP("RA PROC UPDATE 45",$J,.3)=RAX
65 S $P(^TMP("RA PROC UPDATE 45",$J,.6),"-",81)="" ;80 dashes
66 N XMDUZ,XMSUB,XMTEXT,XMY S XMDUZ=.5
67 S XMTEXT="^TMP(""RA PROC UPDATE 45"",$J,",XMSUB=SUBJECT
68 I '$$GOTLOCAL^XMXAPIG("G.RAD PERFORMANCE INDICATOR") D
69 .S XMY(DUZ)=""
70 E S XMY("G.RAD PERFORMANCE INDICATOR")=""
71 D ^XMD
72 Q
73 ;
Note: See TracBrowser for help on using the repository browser.