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

LR411PST.m

Go to the documentation of this file.
  1. LR411PST ;VA/SLC/STAFF Post-init Routine for LR*5.2*411 ; 13-Aug-2013 09:16 ; MKK
  1. ;;5.2;LAB SERVICE;**411,1033**;NOV 01, 1997
  1. ;
  1. PRE ; initiate pre-init process
  1. Q
  1. ;
  1. POST ; initiate post-init process
  1. D 389262
  1. D MAIL
  1. ;
  1. K ^TMP($J)
  1. Q
  1. ;
  1. 389262 ; check file 69.2 for missing global level containing last update date
  1. ;
  1. K ^TMP($J)
  1. ;
  1. D EN^DDIOL("Checking file # 69.2 (User defined patient/test lists...",,"!!!!")
  1. D EN^DDIOL("",,"!")
  1. ;
  1. N AA,DZ,DT
  1. S AA=$O(^LRO(68,"B","CHEMISTRY",0))
  1. I 'AA D EN^DDIOL("No entries to correct in file # 69.2.",,"!!!") Q
  1. ;
  1. S DT=$$HTFM^XLFDT(+$H)
  1. S DZ=0
  1. F S DZ=$O(^LRO(69.2,AA,7,DZ)) Q:DZ="" D
  1. . I '$D(^LRO(69.2,AA,7,DZ,1,0)) S ^LRO(69.2,AA,7,DZ,1,0)="^69.3PA^0^0"
  1. . I '$D(^LRO(69.2,AA,7,DZ,0)) S ^LRO(69.2,AA,7,DZ,0)=DZ_"^"_DT,^TMP($J,"DUZ",DZ)=""
  1. ;
  1. D EN^DDIOL("Review/Repair of file 69.2 complete.",,"!!!!")
  1. ;
  1. Q
  1. ;
  1. MAIL ;
  1. ; setup, create, and send MAILMAN message listing DFNs from the NEW PERSON file
  1. ; that were set with today's date as the last date used for the patient/test lists
  1. ; in file 69.2
  1. ;
  1. I $O(^TMP($J,"DUZ",0))="" D Q
  1. . D BMES^XPDUTL("")
  1. . D BMES^XPDUTL(" PATCH LR*5.2*411 POST-INIT RESULTS")
  1. . D MES^XPDUTL($J("",10)_"NO USERS WERE IN NEED OF UPDATES.")
  1. ;
  1. N DIFROM,XMSUB,XMTEXT,XMDUZ,XMY,XMZ,XMMG,I,DZ
  1. ;
  1. S XMDUZ="PATCH LR*5.2*411 POST-INIT"
  1. S XMTEXT="^TMP($J,""TXT"","
  1. S XMSUB="PATCH LR*5.2*411 POST-INIT RESULTS"
  1. S:$G(DUZ) XMY(DUZ)=""
  1. S I=1,^TMP($J,"TXT",I)=""
  1. S I=I+1,^TMP($J,"TXT",I)=""
  1. S I=I+1,^TMP($J,"TXT",I)="User-defined test lists and patient lists are stored in file 69.2."
  1. S I=I+1,^TMP($J,"TXT",I)=""
  1. S I=I+1,^TMP($J,"TXT",I)="The last date used is a data item in this file that allows for"
  1. S I=I+1,^TMP($J,"TXT",I)="the deletion of lists that have not been used in a prescribed amount"
  1. S I=I+1,^TMP($J,"TXT",I)="of time."
  1. S I=I+1,^TMP($J,"TXT",I)=""
  1. S I=I+1,^TMP($J,"TXT",I)="In some cases the global level holding this date is missing for a user."
  1. S I=I+1,^TMP($J,"TXT",I)=""
  1. S I=I+1,^TMP($J,"TXT",I)="This post-init routine will insert this global level into file 69.2 for"
  1. S I=I+1,^TMP($J,"TXT",I)="those users where this level is missing. Today's date will be inserted"
  1. S I=I+1,^TMP($J,"TXT",I)="as the last used date so that these lists may ultimately be deleted."
  1. S I=I+1,^TMP($J,"TXT",I)=""
  1. S I=I+1,^TMP($J,"TXT",I)="The following users had today's date added as the last used date:"
  1. S I=I+1,^TMP($J,"TXT",I)="(These are DFNs - IENs for the NEW PERSON file.)"
  1. S I=I+1,^TMP($J,"TXT",I)=""
  1. S I=I+1,^TMP($J,"TXT",I)=""
  1. S DZ=0 F S DZ=$O(^TMP($J,"DUZ",DZ)) Q:DZ="" S I=I+1,^TMP($J,"TXT",I)=" "_DZ
  1. D ^XMD
  1. ;
  1. Q