- MDPOST ; HOIFO/DP - Post Init ;2/18/04 11:39
- ;;1.0;CLINICAL PROCEDURES;;Apr 01, 2004
- ; Integration Agreements:
- ; IA# 2263 [Supported] XPAR Utilities
- ; IA# 3006 [Supported] Calls to XMXAPIG
- ; IA# 10141 [Supported] Calls to XPDUTL
- ;
- EN ; [Procedure] Setup preliminary parameters
- ; This submodule is called during the KIDS installation
- ; process.
- ;
- ; Variables:
- ; DIK: [Private] Fileman delete variable
- ; MDCLIENT: [Private] Current client version (#.#.#.#)
- ; MDFILE: [Private] Scratch
- ; MDRET: [Private] Scratch
- ; MDX: [Private] Scratch
- ;
- ; New private variables
- NEW DIK,MDCLIENT,MDFILE,MDRET,MDX
- W $$MSG("Setting compatible client versions")
- D XPARDEL("MD VERSION CHK",1)
- D XPARDEL("MD CRC VALUES",1)
- S MDCLIENT="1.0.0.0" D
- .D SETPAR("MD VERSION CHK","CPUSER.EXE:"_MDCLIENT,1)
- .D SETPAR("MD VERSION CHK","CPMANAGER.EXE:"_MDCLIENT,1)
- .D SETPAR("MD VERSION CHK","CPGATEWAY.EXE:"_MDCLIENT,1)
- .D SETPAR("MD CRC VALUES","CPUSER.EXE:"_MDCLIENT,"9FCFC891")
- .D SETPAR("MD CRC VALUES","CPMANAGER.EXE:"_MDCLIENT,"85F451A6")
- .D SETPAR("MD CRC VALUES","CPGATEWAY.EXE:"_MDCLIENT,"411D7A05")
- ;
- W $$MSG("Applying latest set of valid file types")
- D GETLST^XPAR(.MDRET,"SYS","MD FILE EXTENSIONS")
- F MDX=0:0 S MDX=$O(MDRET(MDX)) Q:'MDX D
- .D DEL^XPAR("SYS","MD FILE EXTENSIONS",$P(MDRET(MDX),"^",1))
- F MDX=1:1 S MDFILE=$P($T(FILEDAT+MDX),";;",2) Q:MDFILE="**END**" D
- .D SETPAR("MD FILE EXTENSIONS",$P(MDFILE,U,1),$P(MDFILE,U,2))
- ;
- W $$MSG("Setting CP web link")
- D SETPAR("MD WEBLINK",1,$$URL())
- ;
- W $$MSG("Validating Mail Group 'MD DEVICE ERRORS' membership")
- D:'$$GOTLOCAL^XMXAPIG("MD DEVICE ERRORS")
- .D MES^XPDUTL("There are no local users in the mail group.")
- .D MES^XPDUTL("Adding '"_$$GET1^DIQ(200,DUZ_",",.01)_"'...")
- .D ADDMBRS^XMXAPIG(DUZ,"MD DEVICE ERRORS",DUZ)
- Q
- ;
- INIT ; [Procedure] Build Procedure File
- D INITPF^MDPOST1
- Q
- ;
- MSG(TEXT) ; [Procedure] Display message to user
- ; Input parameters
- ; 1. TEXT [Literal/Required] Text to display to the user
- ;
- D MES^XPDUTL(" MDPOST-"_TEXT_"...")
- D MES^XPDUTL("")
- Q ""
- ;
- SETPAR(PAR,INS,VAL) ; [Procedure] Set value into XPAR parameter
- ; Input parameters
- ; 1. PAR [Literal/Required] Parameter
- ; 2. INS [Literal/Required] Instance
- ; 3. VAL [Literal/Required] New value
- ;
- D EN^XPAR("SYS",PAR,INS,VAL)
- Q
- ;
- XPARDEL(MDPAR,VALUES) ; [Procedure] Remove a parameter for XPAR
- ; VALUES determines the mode of deletion.
- ; 0: Will delete *BOTH* the values and the parameter definition (DEFAULT)
- ; 1: Will only delete the values of the parameter
- ;
- ; Input parameters
- ; 1. MDPAR [Literal/Required] Name of the parameter definition
- ; 2. VALUES [Literal/] Values Only 0/1
- ;
- ; Variables:
- ; DA: [Private] Fileman variable
- ; DIK: [Private] Fileman variable
- ; MDENT: [Private] Parameter entity
- ;
- ; New private variables
- NEW DA,DIK,MDENT
- S VALUES=$G(VALUES,0)
- K ^TMP("MDPOST",$J)
- D ENVAL^XPAR($NA(^TMP("MDPOST",$J)),MDPAR,"","",1)
- S MDENT="" F S MDENT=$O(^TMP("MDPOST",$J,MDENT)) Q:MDENT="" D
- .D NDEL^XPAR(MDENT,MDPAR)
- K ^TMP("MDPOST",$J)
- Q:VALUES
- S DA=$$FIND1^DIC(8989.51,"","",MDPAR,"B") D:DA>0
- .S DIK="^XTV(8989.51," D ^DIK
- Q
- ;
- URL() ; [Function] Return Clinical Procedures Homepage URL
- Q "vista.domain.ext/ClinicalSpecialties/clinproc/"
- ;
- FILEDAT ; [Data Module] Allowable file types
- ;;.txt^Text files
- ;;.rtf^Rich text files
- ;;.jpg^JPEG Images
- ;;.jpeg^JPEG Images
- ;;.bmp^Bitmap Images
- ;;.tiff^TIFF Graphics
- ;;.pdf^Portable Document Format
- ;;.html^Hypertext Markup Language files
- ;;**END**
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMDPOST 3632 printed Feb 18, 2025@23:09:36 Page 2
- MDPOST ; HOIFO/DP - Post Init ;2/18/04 11:39
- +1 ;;1.0;CLINICAL PROCEDURES;;Apr 01, 2004
- +2 ; Integration Agreements:
- +3 ; IA# 2263 [Supported] XPAR Utilities
- +4 ; IA# 3006 [Supported] Calls to XMXAPIG
- +5 ; IA# 10141 [Supported] Calls to XPDUTL
- +6 ;
- EN ; [Procedure] Setup preliminary parameters
- +1 ; This submodule is called during the KIDS installation
- +2 ; process.
- +3 ;
- +4 ; Variables:
- +5 ; DIK: [Private] Fileman delete variable
- +6 ; MDCLIENT: [Private] Current client version (#.#.#.#)
- +7 ; MDFILE: [Private] Scratch
- +8 ; MDRET: [Private] Scratch
- +9 ; MDX: [Private] Scratch
- +10 ;
- +11 ; New private variables
- +12 NEW DIK,MDCLIENT,MDFILE,MDRET,MDX
- +13 WRITE $$MSG("Setting compatible client versions")
- +14 DO XPARDEL("MD VERSION CHK",1)
- +15 DO XPARDEL("MD CRC VALUES",1)
- +16 SET MDCLIENT="1.0.0.0"
- Begin DoDot:1
- +17 DO SETPAR("MD VERSION CHK","CPUSER.EXE:"_MDCLIENT,1)
- +18 DO SETPAR("MD VERSION CHK","CPMANAGER.EXE:"_MDCLIENT,1)
- +19 DO SETPAR("MD VERSION CHK","CPGATEWAY.EXE:"_MDCLIENT,1)
- +20 DO SETPAR("MD CRC VALUES","CPUSER.EXE:"_MDCLIENT,"9FCFC891")
- +21 DO SETPAR("MD CRC VALUES","CPMANAGER.EXE:"_MDCLIENT,"85F451A6")
- +22 DO SETPAR("MD CRC VALUES","CPGATEWAY.EXE:"_MDCLIENT,"411D7A05")
- End DoDot:1
- +23 ;
- +24 WRITE $$MSG("Applying latest set of valid file types")
- +25 DO GETLST^XPAR(.MDRET,"SYS","MD FILE EXTENSIONS")
- +26 FOR MDX=0:0
- SET MDX=$ORDER(MDRET(MDX))
- if 'MDX
- QUIT
- Begin DoDot:1
- +27 DO DEL^XPAR("SYS","MD FILE EXTENSIONS",$PIECE(MDRET(MDX),"^",1))
- End DoDot:1
- +28 FOR MDX=1:1
- SET MDFILE=$PIECE($TEXT(FILEDAT+MDX),";;",2)
- if MDFILE="**END**"
- QUIT
- Begin DoDot:1
- +29 DO SETPAR("MD FILE EXTENSIONS",$PIECE(MDFILE,U,1),$PIECE(MDFILE,U,2))
- End DoDot:1
- +30 ;
- +31 WRITE $$MSG("Setting CP web link")
- +32 DO SETPAR("MD WEBLINK",1,$$URL())
- +33 ;
- +34 WRITE $$MSG("Validating Mail Group 'MD DEVICE ERRORS' membership")
- +35 if '$$GOTLOCAL^XMXAPIG("MD DEVICE ERRORS")
- Begin DoDot:1
- +36 DO MES^XPDUTL("There are no local users in the mail group.")
- +37 DO MES^XPDUTL("Adding '"_$$GET1^DIQ(200,DUZ_",",.01)_"'...")
- +38 DO ADDMBRS^XMXAPIG(DUZ,"MD DEVICE ERRORS",DUZ)
- End DoDot:1
- +39 QUIT
- +40 ;
- INIT ; [Procedure] Build Procedure File
- +1 DO INITPF^MDPOST1
- +2 QUIT
- +3 ;
- MSG(TEXT) ; [Procedure] Display message to user
- +1 ; Input parameters
- +2 ; 1. TEXT [Literal/Required] Text to display to the user
- +3 ;
- +4 DO MES^XPDUTL(" MDPOST-"_TEXT_"...")
- +5 DO MES^XPDUTL("")
- +6 QUIT ""
- +7 ;
- SETPAR(PAR,INS,VAL) ; [Procedure] Set value into XPAR parameter
- +1 ; Input parameters
- +2 ; 1. PAR [Literal/Required] Parameter
- +3 ; 2. INS [Literal/Required] Instance
- +4 ; 3. VAL [Literal/Required] New value
- +5 ;
- +6 DO EN^XPAR("SYS",PAR,INS,VAL)
- +7 QUIT
- +8 ;
- XPARDEL(MDPAR,VALUES) ; [Procedure] Remove a parameter for XPAR
- +1 ; VALUES determines the mode of deletion.
- +2 ; 0: Will delete *BOTH* the values and the parameter definition (DEFAULT)
- +3 ; 1: Will only delete the values of the parameter
- +4 ;
- +5 ; Input parameters
- +6 ; 1. MDPAR [Literal/Required] Name of the parameter definition
- +7 ; 2. VALUES [Literal/] Values Only 0/1
- +8 ;
- +9 ; Variables:
- +10 ; DA: [Private] Fileman variable
- +11 ; DIK: [Private] Fileman variable
- +12 ; MDENT: [Private] Parameter entity
- +13 ;
- +14 ; New private variables
- +15 NEW DA,DIK,MDENT
- +16 SET VALUES=$GET(VALUES,0)
- +17 KILL ^TMP("MDPOST",$JOB)
- +18 DO ENVAL^XPAR($NAME(^TMP("MDPOST",$JOB)),MDPAR,"","",1)
- +19 SET MDENT=""
- FOR
- SET MDENT=$ORDER(^TMP("MDPOST",$JOB,MDENT))
- if MDENT=""
- QUIT
- Begin DoDot:1
- +20 DO NDEL^XPAR(MDENT,MDPAR)
- End DoDot:1
- +21 KILL ^TMP("MDPOST",$JOB)
- +22 if VALUES
- QUIT
- +23 SET DA=$$FIND1^DIC(8989.51,"","",MDPAR,"B")
- if DA>0
- Begin DoDot:1
- +24 SET DIK="^XTV(8989.51,"
- DO ^DIK
- End DoDot:1
- +25 QUIT
- +26 ;
- URL() ; [Function] Return Clinical Procedures Homepage URL
- +1 QUIT "vista.domain.ext/ClinicalSpecialties/clinproc/"
- +2 ;
- FILEDAT ; [Data Module] Allowable file types
- +1 ;;.txt^Text files
- +2 ;;.rtf^Rich text files
- +3 ;;.jpg^JPEG Images
- +4 ;;.jpeg^JPEG Images
- +5 ;;.bmp^Bitmap Images
- +6 ;;.tiff^TIFF Graphics
- +7 ;;.pdf^Portable Document Format
- +8 ;;.html^Hypertext Markup Language files
- +9 ;;**END**