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

ORY95.m

Go to the documentation of this file.
  1. ORY95 ;SLC/DAN Post-Init for patch OR*3*95 ;9/18/01 13:38
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**95**;Dec 17, 1997
  1. ;Post-init will check for display text and mnemonics that can potentially cause problems with fileman and the fileman reader (DIR)
  1. POST ; -- postinit
  1. N ORMSG
  1. S ORMSG(1)=""
  1. S ORMSG(2)="This patch imports the STATUS OF ORDER entry"
  1. S ORMSG(3)="from the OE/RR PRINT FIELDS file. As a result, the entries"
  1. S ORMSG(4)="in the OE/RR PRINT FORMAT file need to be recompiled."
  1. S ORMSG(5)=""
  1. S ORMSG(6)="**NOTE: If you have made local modifications to the compiled"
  1. S ORMSG(7)="code in the OE/RR PRINT FORMAT file they will be OVERWRITTEN."
  1. S ORMSG(8)=""
  1. S ORMSG(9)="Recompiling..."
  1. D MES^XPDUTL(.ORMSG) H 3
  1. D RECMPL^ORPR00 K ORMSG
  1. S ORMSG(1)="",ORMSG(2)="Starting ORDER DIALOG and ORDERABLE ITEMS file checking in the background.",ORMSG(3)="You'll receive an email when it finishes." D MES^XPDUTL(.ORMSG) H 3 K ORMSG
  1. S ZTRTN="CHECK^ORY95",ZTDTH=$H,ZTDESC="Patch OR*3*95 Post-Init",ZTSAVE("DUZ")="",ZTIO="" D ^%ZTLOAD Q
  1. CHECK ;Enter here to check files for invalid entries
  1. N IEN,SUBIEN
  1. K ^TMP($J)
  1. S IEN=0 F S IEN=$O(^ORD(101.41,IEN)) Q:'+IEN D
  1. .;Check DISPLAY TEXT field first
  1. .I $$CHKNAM^ORUTL($P($G(^ORD(101.41,IEN,0)),"^",2)) D REPORT(1,"ODFIX")
  1. .;Check DISPLAY TEXT subfield of ITEMS multiple next
  1. .S SUBIEN=0 F S SUBIEN=$O(^ORD(101.41,IEN,10,SUBIEN)) Q:'+SUBIEN D
  1. ..I $$CHKNAM^ORUTL($P($G(^ORD(101.41,IEN,10,SUBIEN,0)),"^",4)) D REPORT(2,"ODFIX")
  1. ..;Check MNEMONIC field next
  1. ..I $$CHKMNE^ORUTL($P($G(^ORD(101.41,IEN,10,SUBIEN,0)),"^",3)) D REPORT(3,"ODMFIX")
  1. ..Q
  1. .Q
  1. ;Check NAME field of ORDERABLE ITEMS file for ;
  1. S IEN=0 F S IEN=$O(^ORD(101.43,IEN)) Q:'+IEN I $$CHKNAM^ORUTL($P($G(^ORD(101.43,IEN,0)),"^"),";") D REPORT(4,"OIFIX")
  1. ;Send mail message with results
  1. D MAIL
  1. Q
  1. REPORT(E,FIX) ;Store entries that need to be reported
  1. N FIEN
  1. S FIEN=0 I $D(^TMP($J,FIX,IEN,FIEN)) S FIEN=$O(^(999),-1)+1 ;get last subscript
  1. I E=1 S ^TMP($J,FIX,IEN,FIEN)="DISPLAY TEXT <"_$P(^ORD(101.41,IEN,0),"^",2)_"> for ORDER DIALOG <"_$P(^(0),"^")_">" Q
  1. I E=2 S ^TMP($J,FIX,IEN,FIEN)="DISPLAY TEXT <"_$P(^ORD(101.41,IEN,10,SUBIEN,0),"^",4)_"> for SEQUENCE # "_$P(^(0),"^")_" of ORDER DIALOG < "_$P(^ORD(101.41,IEN,0),"^")_">" Q
  1. I E=3 S ^TMP($J,FIX,IEN,FIEN)="MNEMONIC <"_$P(^ORD(101.41,IEN,10,SUBIEN,0),"^",3)_"> for SEQUENCE # "_$P(^(0),"^")_" of ORDER DIALOG <"_$P(^ORD(101.41,IEN,0),"^")_">" Q
  1. I E=4 S ^TMP($J,FIX,IEN,FIEN)=$P(^ORD(101.43,IEN,0),"^")_" entry in ORDERABLE ITEMS file" Q
  1. Q
  1. MAIL ;prepare results for sending
  1. N XMSUB,XMTEXT,XMDUZ,XMY,XMZ,XMMG,ORTXT,I,J,K
  1. S XMDUZ="PATCH OR*3*95 POST-INIT",XMY(.5)="" S:$G(DUZ) XMY(DUZ)=""
  1. ;Check mnemonics in this section
  1. S I=0 I '$D(^TMP($J,"ODMFIX")) S I=I+1,^TMP($J,"ORTXT",I)="No problems with MNEMONIC names were found."
  1. I $D(^TMP($J,"ODMFIX")) D ;Add entries that have problems with mnemonics
  1. .S I=I+1,^TMP($J,"ORTXT",I)="The following entries in the ORDER DIALOG file have MNEMONICS that are the same"
  1. .S I=I+1,^TMP($J,"ORTXT",I)="as a standard List Manager mnemonic and need to be changed."
  1. .S I=I+1,^TMP($J,"ORTXT",I)="List Manager mnemonics take precedence over the MNEMONIC field and"
  1. .S I=I+1,^TMP($J,"ORTXT",I)="will cause the entry to be unselectable by MNEMONIC from within List Manager.",I=I+1,^TMP($J,"ORTXT",I)=""
  1. .S J=0 F S J=$O(^TMP($J,"ODMFIX",J)) Q:'+J S K="" F S K=$O(^TMP($J,"ODMFIX",J,K)) Q:K="" S I=I+1 S ^TMP($J,"ORTXT",I)=^(K)
  1. S I=I+1 S ^TMP($J,"ORTXT",I)=""
  1. ;Check orderable items name section
  1. I '$D(^TMP($J,"OIFIX")) S I=I+1 S ^TMP($J,"ORTXT",I)="No problems with ORDERABLE ITEM names were found."
  1. I $D(^TMP($J,"OIFIX")) D ;add ORDERABLE ITEMS that have problems
  1. .S I=I+1,^TMP($J,"ORTXT",I)="The following entries in the ORDERABLE ITEMS file contain"
  1. .S I=I+1,^TMP($J,"ORTXT",I)="a semi colon (;) and may cause problems during editing. You need to remove"
  1. .S I=I+1,^TMP($J,"ORTXT",I)="these characters from these entries to avoid potential problems."
  1. .S I=I+1,^TMP($J,"ORTXT",I)=""
  1. .S I=I+1,^TMP($J,"ORTXT",I)="Please use PACKAGE SPECIFIC options to change the names. The changes"
  1. .S I=I+1,^TMP($J,"ORTXT",I)="will then update the ORDERABLE ITEMS file and will remain synchronized."
  1. .S I=I+1,^TMP($J,"ORTXT",I)=""
  1. .S J=0 F S J=$O(^TMP($J,"OIFIX",J)) Q:'+J S I=I+1 S ^TMP($J,"ORTXT",I)=^TMP($J,"OIFIX",J,0)
  1. S I=I+1,^TMP($J,"ORTXT",I)=""
  1. ;Check display text section
  1. I '$D(^TMP($J,"ODFIX")) S I=I+1,^TMP($J,"ORTXT",I)="No problems with DISPLAY TEXT in the ORDER DIALOG file were found."
  1. I $D(^TMP($J,"ODFIX")) D ;add ORDER DIALOG problems to mail message
  1. .S I=I+1,^TMP($J,"ORTXT",I)="The following entries in the ORDER DIALOG file contain special"
  1. .S I=I+1,^TMP($J,"ORTXT",I)="characters in the DISPLAY TEXT field or the DISPLAY TEXT subfield of"
  1. .S I=I+1,^TMP($J,"ORTXT",I)="the ITEMS multiple that will not display in the List Manager display."
  1. .S I=I+1,^TMP($J,"ORTXT",I)="",I=I+1,^TMP($J,"ORTXT",I)="In order to be consistent you may wish to remove the special characters"
  1. .S I=I+1,^TMP($J,"ORTXT",I)="from the following entries. The special characters are ;,-^="
  1. .S I=I+1,^TMP($J,"ORTXT",I)="This is recommended but it is NOT REQUIRED. They are being"
  1. .S I=I+1,^TMP($J,"ORTXT",I)="reported for information only.",I=I+1,^TMP($J,"ORTXT",I)=""
  1. .S J=0 F S J=$O(^TMP($J,"ODFIX",J)) Q:'+J S K="" F S K=$O(^TMP($J,"ODFIX",J,K)) Q:K="" S I=I+1 S ^TMP($J,"ORTXT",I)=^(K)
  1. S I=I+1,^TMP($J,"ORTXT",I)="",I=I+1,^TMP($J,"ORTXT",I)="Patch OR*3*95 post-init complete."
  1. S XMTEXT="^TMP($J,""ORTXT"",",XMSUB="PATCH OR*3*95 Post-init completed"
  1. D ^XMD