PSSHRPST ;WOIFO/STEVE GORDON - PRE - Post-Init to load pharmacy classes ;08/26/08
 ;;1.0;PHARMACY DATA MANAGEMENT;**136**;9/30/97;Build 89
 ;
 QUIT
 ;
EN ;  -- main entry point for pharmacy post-init
 ;XML (PSSPRE_1_0.XML) must be in Kernel default directory
 ;
 ; -- delete all classes gov package
 DO DELETE()
 ;
 ; --
 ; 
 NEW PSSTAT
 SET PSSTAT=$$IMPORT^XOBWLIB1($$GETDIR(),$$SUPPORT())
 IF 'PSSTAT DO
 . DO BMES^XPDUTL("Error occurred during the importing of pharmacy classes file:")
 . DO MES^XPDUTL("  Directory: "_$$GETDIR())
 . DO MES^XPDUTL("  File Name: "_$$SUPPORT())
 . DO MES^XPDUTL("      Error: "_$PIECE(PSSTAT,"^",2))
 . DO MES^XPDUTL(" o  Pharmacy class not imported.")
 ELSE  DO
 . DO MES^XPDUTL(" o  Pharmacy classes imported successfully.")
 . DO MES^XPDUTL(" ")
 . DO MAILMSG
 ;
 QUIT
 ;
DELETE() ; -- delete classes for clean slate and remove previous releases
 NEW PSSTAT
 ; -- delete all classes in pharmacy package
 DO BMES^XPDUTL(" o  Deleting gov classes:")
 ;
 SET PSSTAT=$SYSTEM.OBJ.DeletePackage("gov")
 DO BMES^XPDUTL("       ...[gov] deletion "_$SELECT(PSSTAT:"finished successfully.",1:"failed."))
 DO MES^XPDUTL("")
 QUIT
 ;
 ;
SUPPORT() ;Returns the standard name of the XML file
 ;
 Q "PSSPRE_1_0.XML"
 ;
GETDIR() ; -- get directory where install files are located--default is in Kernel parameters.
 QUIT $$DEFDIR^%ZISH()
 ;
MAILMSG ;
 N XMDUZ,XMY,XMSUB,XMTEXT,XMZ,XMMG,DIFROM
 S XMDUZ="PACKAGE PSS*1.0*136 INSTALL"
 S XMTEXT="^TMP($J,""PSSHRPST"","
 S XMY(+DUZ)=""
 S XMY("G.PSS ORDER CHECKS")=""
 S XMSUB="PSS*1.0*136 Installation Complete"
 S ^TMP($J,"PSSHRPST",1)="Installation of Patch PSS*1.0*136 has been successfully completed!"
 D ^XMD
 Q
 ;
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSSHRPST   1745     printed  Sep 23, 2025@20:07:34                                                                                                                                                                                                    Page 2
PSSHRPST  ;WOIFO/STEVE GORDON - PRE - Post-Init to load pharmacy classes ;08/26/08
 +1       ;;1.0;PHARMACY DATA MANAGEMENT;**136**;9/30/97;Build 89
 +2       ;
 +3        QUIT 
 +4       ;
EN        ;  -- main entry point for pharmacy post-init
 +1       ;XML (PSSPRE_1_0.XML) must be in Kernel default directory
 +2       ;
 +3       ; -- delete all classes gov package
 +4        DO DELETE()
 +5       ;
 +6       ; --
 +7       ; 
 +8        NEW PSSTAT
 +9        SET PSSTAT=$$IMPORT^XOBWLIB1($$GETDIR(),$$SUPPORT())
 +10       IF 'PSSTAT
               Begin DoDot:1
 +11               DO BMES^XPDUTL("Error occurred during the importing of pharmacy classes file:")
 +12               DO MES^XPDUTL("  Directory: "_$$GETDIR())
 +13               DO MES^XPDUTL("  File Name: "_$$SUPPORT())
 +14               DO MES^XPDUTL("      Error: "_$PIECE(PSSTAT,"^",2))
 +15               DO MES^XPDUTL(" o  Pharmacy class not imported.")
               End DoDot:1
 +16      IF '$TEST
               Begin DoDot:1
 +17               DO MES^XPDUTL(" o  Pharmacy classes imported successfully.")
 +18               DO MES^XPDUTL(" ")
 +19               DO MAILMSG
               End DoDot:1
 +20      ;
 +21       QUIT 
 +22      ;
DELETE()  ; -- delete classes for clean slate and remove previous releases
 +1        NEW PSSTAT
 +2       ; -- delete all classes in pharmacy package
 +3        DO BMES^XPDUTL(" o  Deleting gov classes:")
 +4       ;
 +5        SET PSSTAT=$SYSTEM.OBJ.DeletePackage("gov")
 +6        DO BMES^XPDUTL("       ...[gov] deletion "_$SELECT(PSSTAT:"finished successfully.",1:"failed."))
 +7        DO MES^XPDUTL("")
 +8        QUIT 
 +9       ;
 +10      ;
SUPPORT() ;Returns the standard name of the XML file
 +1       ;
 +2        QUIT "PSSPRE_1_0.XML"
 +3       ;
GETDIR()  ; -- get directory where install files are located--default is in Kernel parameters.
 +1        QUIT $$DEFDIR^%ZISH()
 +2       ;
MAILMSG   ;
 +1        NEW XMDUZ,XMY,XMSUB,XMTEXT,XMZ,XMMG,DIFROM
 +2        SET XMDUZ="PACKAGE PSS*1.0*136 INSTALL"
 +3        SET XMTEXT="^TMP($J,""PSSHRPST"","
 +4        SET XMY(+DUZ)=""
 +5        SET XMY("G.PSS ORDER CHECKS")=""
 +6        SET XMSUB="PSS*1.0*136 Installation Complete"
 +7        SET ^TMP($JOB,"PSSHRPST",1)="Installation of Patch PSS*1.0*136 has been successfully completed!"
 +8        DO ^XMD
 +9        QUIT 
 +10      ;