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

PSO616PI.m

Go to the documentation of this file.
  1. PSO616PI ;PER/ME-Post-install routine for Patch PSO*7.0*616 ; 04 Jul 2020 2:00 PM
  1. ;;7.0;OUTPATIENT PHARMACY;**616**;DEC 1997;Build 3
  1. ;
  1. Q
  1. POST ; Entry point
  1. D BMES^XPDUTL(" Starting post-install for PSO*7*616")
  1. N FOUND,PSOLINE,X1,X2,FOUND
  1. S PSOLINE=0 K ^TMP("PSO616PI",$J),^XTMP("PSO616PI",$J)
  1. D SETTXT("This report documents missing file #52 [PRESCRIPTION] Label multiple header")
  1. D SETTXT("records. Any instance of a Label multiple that has been created without the")
  1. D SETTXT("appropriate Label multiple header record will automatically be corrected to")
  1. D SETTXT("have the appropriate Label multiple header record.")
  1. D SETTXT("===============================================================================")
  1. D SETTXT("")
  1. D SETTXT("Prescription# File #52 IEN")
  1. D SETTXT("------------- ------------")
  1. ;
  1. S (X1,FOUND)=0
  1. F S X1=$O(^PSRX(X1)) Q:'X1 D
  1. .I $D(^PSRX(X1,"L",1)),'$D(^PSRX(X1,"L",0)) D
  1. ..S FOUND=FOUND+1
  1. ..S X2=$O(^PSRX(X1,"L","Z"),-1)
  1. ..S ^PSRX(X1,"L",0)="^52.032DA^"_X2_"^"_X2
  1. ..D SETTXT($P(^PSRX(X1,0),U,1)_$J(X1,26+$L(X1)-$L($P(^PSRX(X1,0),U,1))))
  1. ;
  1. D SETTXT("")
  1. I 'FOUND D SETTXT("No Prescriptions were found with a missing Label multiple header.")
  1. ;
  1. D MAIL
  1. ;
  1. D BMES^XPDUTL(" Mailman message sent.")
  1. D BMES^XPDUTL(" Finished post-install for PSO*7*616.")
  1. ;
  1. END ; Exit point
  1. K ^TMP("PSO616PI",$J),^XTMP("PSO616PI",$J)
  1. Q
  1. ;
  1. SETTXT(TXT) ; Setting Plain Text
  1. S PSOLINE=$G(PSOLINE)+1,^XTMP("PSO616PI",$J,PSOLINE)=TXT
  1. Q
  1. ;
  1. MAIL ; Sends Mailman message
  1. N II,XMX,XMSUB,XMDUZ,XMTEXT,XMY
  1. S II=0 F S II=$O(^XUSEC("PSNMGR",II)) Q:'II S XMY(II)=""
  1. S XMY(DUZ)="",XMSUB="PSO*7*616 - Autocorrection Utility"
  1. S XMDUZ=.5,XMTEXT="^XTMP(""PSO616PI"",$J," N DIFROM D ^XMD
  1. Q