Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RA45PST

RA45PST.m

Go to the documentation of this file.
  1. RA45PST ;Hines OI/GJC - Post-init Driver, patch 45 ;10/10/03 06:32
  1. VERSION ;;5.0;Radiology/Nuclear Medicine;**45**;Mar 16, 1998
  1. ;
  1. EN ;Need to convert the data in the old 'BARIUM USED?' (#5) field in
  1. ;the 70.03 data dictionary to the CONTRAST MEDIA (#225) multiple
  1. ;70.3225. If 'Yes' to 'BARIUM USED?' then 'Barium' will be added
  1. ;as a record to the new CONTRAST MEDIA field. The 'BARIUM USED?'
  1. ;field will be deleted. This will be a background process queued
  1. ;to run by the RA*5*45 post-init.
  1. I '$D(^DD(70.03,5,0))#2 D
  1. .S RATXT(1)="'BARIUM USED?' (sub-dd: 70.03, fld: 5) field has been deleted in the"
  1. .S RATXT(2)="past; no further action taken regarding this data dictionary."
  1. .D MES^XPDUTL(.RATXT) K RATXT
  1. .Q
  1. E D
  1. .N RATXT,ZTDESC,ZTDTH,ZTIO,ZTRTN
  1. .S ZTIO="",ZTRTN="ENQ1^RA45PST1"
  1. .S ZTDESC="RA*5.0*45: 'BARIUM USED?' (dd: 70.03;fld: 5) field cleanup"
  1. .S ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT(),0,0,2,0) ;add 2 minutes to 'now'
  1. .D ^%ZTLOAD S RATXT(1)=" "
  1. .S RATXT(2)="RA*5.0*45: delete 'BARIUM USED?' field, convert data to CONTRAST MEDIA (70.3225) multiple"
  1. .S:$G(ZTSK)>0 RATXT(3)="Task: "_ZTSK_"."
  1. .S RATXT(4)=" " D MES^XPDUTL(.RATXT)
  1. .Q
  1. ;
  1. SEED71 ;The second process must be tasked off that will identify all the
  1. ;Rad/Nuc Med orderable items (OI) in file 101.43 checking them to
  1. ;see if barium, oral cholecystogram or unspecified contrast media
  1. ;happen to be associated contrasts.
  1. ;
  1. ;If no associations move onto the next OI and check for CMs
  1. ;
  1. ;If yes, update the procedure in file 71; add barium, oral
  1. ;cholecystografic or unspecified contrast media to the CONTRAST MEDIA
  1. ;(#125) multiple in file 71. All successful and unsuccessful updates
  1. ;will be presented to the user in the form of an email message.
  1. ;(Failure to update occurs when a record cannot be locked)
  1. ;
  1. ;Finally, the Rad/Nuc Med Procedure (71) file will be synchronized with
  1. ;the Orderable Items (101.43) file.
  1. ;
  1. N RATXT,ZTDESC,ZTDTH,ZTIO,ZTRTN
  1. S ZTIO="",ZTRTN="ENQ2^RA45PST2"
  1. S ZTDESC="RA*5.0*45: seed new CONTRAST MEDIA (#125) field in file 71"
  1. S ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT(),0,0,2,0) ;add 2 minutes to 'now'
  1. D ^%ZTLOAD S RATXT(1)=" "
  1. S RATXT(2)="RA*5.0*45: seed new CONTRAST MEDIA (#125) field in file 71"
  1. S:$G(ZTSK)>0 RATXT(3)="Task: "_ZTSK_"."
  1. S RATXT(4)=" " D MES^XPDUTL(.RATXT)
  1. Q
  1. ;
  1. MAILQ2(FORMAT,SUBJECT) ;Update users via email; let the user(s) know which
  1. ;Rad/NM Procedures have been updated according to their Orderable Item
  1. ;equivalents.
  1. ;input: FORMAT='1' for Orderable Item CM definitions applied to Rad/Nuc
  1. ; Med procedure, '2' for sychronization between Rad/Nuc Med
  1. ; Procedure and the Orderable Items file (Rad/Nuc Med
  1. ; function)
  1. ; SUBJECT=subject of the email
  1. ;
  1. Q:FORMAT'=1&(FORMAT'=2) Q:$G(SUBJECT)="" NEW RAX
  1. 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"
  1. 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"
  1. S ^TMP("RA PROC UPDATE 45",$J,.3)=RAX
  1. S $P(^TMP("RA PROC UPDATE 45",$J,.6),"-",81)="" ;80 dashes
  1. N XMDUZ,XMSUB,XMTEXT,XMY S XMDUZ=.5
  1. S XMTEXT="^TMP(""RA PROC UPDATE 45"",$J,",XMSUB=SUBJECT
  1. I '$$GOTLOCAL^XMXAPIG("G.RAD PERFORMANCE INDICATOR") D
  1. .S XMY(DUZ)=""
  1. E S XMY("G.RAD PERFORMANCE INDICATOR")=""
  1. D ^XMD
  1. Q
  1. ;