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

MDPOST.m

Go to the documentation of this file.
  1. MDPOST ; HOIFO/DP - Post Init ;2/18/04 11:39
  1. ;;1.0;CLINICAL PROCEDURES;;Apr 01, 2004
  1. ; Integration Agreements:
  1. ; IA# 2263 [Supported] XPAR Utilities
  1. ; IA# 3006 [Supported] Calls to XMXAPIG
  1. ; IA# 10141 [Supported] Calls to XPDUTL
  1. ;
  1. EN ; [Procedure] Setup preliminary parameters
  1. ; This submodule is called during the KIDS installation
  1. ; process.
  1. ;
  1. ; Variables:
  1. ; DIK: [Private] Fileman delete variable
  1. ; MDCLIENT: [Private] Current client version (#.#.#.#)
  1. ; MDFILE: [Private] Scratch
  1. ; MDRET: [Private] Scratch
  1. ; MDX: [Private] Scratch
  1. ;
  1. ; New private variables
  1. NEW DIK,MDCLIENT,MDFILE,MDRET,MDX
  1. W $$MSG("Setting compatible client versions")
  1. D XPARDEL("MD VERSION CHK",1)
  1. D XPARDEL("MD CRC VALUES",1)
  1. S MDCLIENT="1.0.0.0" D
  1. .D SETPAR("MD VERSION CHK","CPUSER.EXE:"_MDCLIENT,1)
  1. .D SETPAR("MD VERSION CHK","CPMANAGER.EXE:"_MDCLIENT,1)
  1. .D SETPAR("MD VERSION CHK","CPGATEWAY.EXE:"_MDCLIENT,1)
  1. .D SETPAR("MD CRC VALUES","CPUSER.EXE:"_MDCLIENT,"9FCFC891")
  1. .D SETPAR("MD CRC VALUES","CPMANAGER.EXE:"_MDCLIENT,"85F451A6")
  1. .D SETPAR("MD CRC VALUES","CPGATEWAY.EXE:"_MDCLIENT,"411D7A05")
  1. ;
  1. W $$MSG("Applying latest set of valid file types")
  1. D GETLST^XPAR(.MDRET,"SYS","MD FILE EXTENSIONS")
  1. F MDX=0:0 S MDX=$O(MDRET(MDX)) Q:'MDX D
  1. .D DEL^XPAR("SYS","MD FILE EXTENSIONS",$P(MDRET(MDX),"^",1))
  1. F MDX=1:1 S MDFILE=$P($T(FILEDAT+MDX),";;",2) Q:MDFILE="**END**" D
  1. .D SETPAR("MD FILE EXTENSIONS",$P(MDFILE,U,1),$P(MDFILE,U,2))
  1. ;
  1. W $$MSG("Setting CP web link")
  1. D SETPAR("MD WEBLINK",1,$$URL())
  1. ;
  1. W $$MSG("Validating Mail Group 'MD DEVICE ERRORS' membership")
  1. D:'$$GOTLOCAL^XMXAPIG("MD DEVICE ERRORS")
  1. .D MES^XPDUTL("There are no local users in the mail group.")
  1. .D MES^XPDUTL("Adding '"_$$GET1^DIQ(200,DUZ_",",.01)_"'...")
  1. .D ADDMBRS^XMXAPIG(DUZ,"MD DEVICE ERRORS",DUZ)
  1. Q
  1. ;
  1. INIT ; [Procedure] Build Procedure File
  1. D INITPF^MDPOST1
  1. Q
  1. ;
  1. MSG(TEXT) ; [Procedure] Display message to user
  1. ; Input parameters
  1. ; 1. TEXT [Literal/Required] Text to display to the user
  1. ;
  1. D MES^XPDUTL(" MDPOST-"_TEXT_"...")
  1. D MES^XPDUTL("")
  1. Q ""
  1. ;
  1. SETPAR(PAR,INS,VAL) ; [Procedure] Set value into XPAR parameter
  1. ; Input parameters
  1. ; 1. PAR [Literal/Required] Parameter
  1. ; 2. INS [Literal/Required] Instance
  1. ; 3. VAL [Literal/Required] New value
  1. ;
  1. D EN^XPAR("SYS",PAR,INS,VAL)
  1. Q
  1. ;
  1. XPARDEL(MDPAR,VALUES) ; [Procedure] Remove a parameter for XPAR
  1. ; VALUES determines the mode of deletion.
  1. ; 0: Will delete *BOTH* the values and the parameter definition (DEFAULT)
  1. ; 1: Will only delete the values of the parameter
  1. ;
  1. ; Input parameters
  1. ; 1. MDPAR [Literal/Required] Name of the parameter definition
  1. ; 2. VALUES [Literal/] Values Only 0/1
  1. ;
  1. ; Variables:
  1. ; DA: [Private] Fileman variable
  1. ; DIK: [Private] Fileman variable
  1. ; MDENT: [Private] Parameter entity
  1. ;
  1. ; New private variables
  1. NEW DA,DIK,MDENT
  1. S VALUES=$G(VALUES,0)
  1. K ^TMP("MDPOST",$J)
  1. D ENVAL^XPAR($NA(^TMP("MDPOST",$J)),MDPAR,"","",1)
  1. S MDENT="" F S MDENT=$O(^TMP("MDPOST",$J,MDENT)) Q:MDENT="" D
  1. .D NDEL^XPAR(MDENT,MDPAR)
  1. K ^TMP("MDPOST",$J)
  1. Q:VALUES
  1. S DA=$$FIND1^DIC(8989.51,"","",MDPAR,"B") D:DA>0
  1. .S DIK="^XTV(8989.51," D ^DIK
  1. Q
  1. ;
  1. URL() ; [Function] Return Clinical Procedures Homepage URL
  1. Q "vista.domain.ext/ClinicalSpecialties/clinproc/"
  1. ;
  1. FILEDAT ; [Data Module] Allowable file types
  1. ;;.txt^Text files
  1. ;;.rtf^Rich text files
  1. ;;.jpg^JPEG Images
  1. ;;.jpeg^JPEG Images
  1. ;;.bmp^Bitmap Images
  1. ;;.tiff^TIFF Graphics
  1. ;;.pdf^Portable Document Format
  1. ;;.html^Hypertext Markup Language files
  1. ;;**END**