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

GMV26PST.m

Go to the documentation of this file.
GMV26PST ;HIOFO/FT - FIX PARAMETER SETTINGS ; 7/12/10 10:49am
 ;;5.0;GEN. MED. REC. - VITALS;26;Oct 31, 2002;Build 4
 Q
 ;
 ; This routine is experimental and is not to be nationally released.
 ; This routine fixes the following GUI parameters for the Vitals package:
 ;   ABNORMALQUALIFIERS
 ;   NORMALQUALIFIERS
 ;   ABNORMALTEXTCOLOR
 ;   NORMALTEXCOLOR
 ;   CanvasAbnormal
 ;   CanvasNormal
 ;
 ; This routine uses the following IAs:
 ; 1519 - ^XUTMDEVQ calls        (supported)
 ; 2263 - ^XPAR                  (supported)
 ; 2685 - FILE 8989.51           (private) ,but Vitals is not a subscriber, yet.
 ; 2686 - FILE 8989.5            (controlled) ,but Vitals is not a subscriber, yet.
 ; 10089 - ^%ZISC call           (supported)
 ; 
EN ; main entry point 
 D XPAR,DLL,DEVICE
 Q
START ; Find and repair instance values
 N GMVATC,GMVAQ,GMVCA,GMVCN,GMVENT,GMVERR,GMVNEW,GMVNQ,GMVNTC,GMVPARM,GMVALUE
 S GMVPARM=$O(^XTV(8989.51,"B","GMV USER DEFAULTS",0))
 Q:'GMVPARM
 Q:'$D(^XTV(8989.5,"AC",GMVPARM))
 S GMVAQ="ABNORMALQUALIFIERS",GMVCA="CanvasAbnormal",GMVATC="ABNORMALTEXTCOLOR"
 S GMVNQ="NORMALQUALIFIERS",GMVCN="CanvasNormal",GMVNTC="NORMALTEXTCOLOR"
 S GMVENT=""
 F  S GMVENT=$O(^XTV(8989.5,"AC",GMVPARM,GMVENT)) Q:GMVENT=""  D
 .Q:'$D(^XTV(8989.5,"AC",GMVPARM,GMVENT))
 .;get qualifier settings
 .S GMVALUE("AQ")=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVAQ))
 .S GMVALUE("NQ")=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVNQ))
 .S GMVALUE("ATC")=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVATC))
 .S GMVALUE("NTC")=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVNTC))
 .S GMVALUE("CA")=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVCA))
 .S GMVALUE("CN")=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVCN))
 .;check/reset ABNORMAL/NORMALQUALIFIERs
 .I GMVALUE("AQ")'="ON" D
 ..I GMVALUE("AQ")="" D EN^XPAR(GMVENT,"GMV USER DEFAULTS",GMVAQ,"ON",.GMVERR) Q
 ..D CHG^XPAR(GMVENT,"GMV USER DEFAULTS",GMVAQ,"ON",.GMVERR)
 .I GMVALUE("NQ")'="ON" D
 ..I GMVALUE("NQ")="" D EN^XPAR(GMVENT,"GMV USER DEFAULTS",GMVNQ,"ON",.GMVERR) Q
 ..D CHG^XPAR(GMVENT,"GMV USER DEFAULTS",GMVNQ,"ON",.GMVERR)
 .;check/reset CanvasAbnormal/Normal values
 .I GMVALUE("CA")="" D
 ..S GMVNEW="15;9;0;1;15"
 ..D EN^XPAR(GMVENT,"GMV USER DEFAULTS",GMVCA,GMVNEW,.GMVERR)
 .I GMVALUE("CA")]"" D
 ..S GMVNEW=GMVALUE("CA"),$P(GMVNEW,";",4)=1
 ..D CHG^XPAR(GMVENT,"GMV USER DEFAULTS",GMVCA,GMVNEW,.GMVERR)
 .I GMVALUE("CN")="" D
 ..S GMVNEW="15;0;0;1;15;15388544;15388544;ORWPT PTINQ"
 ..D EN^XPAR(GMVENT,"GMV USER DEFAULTS",GMVCN,GMVNEW,.GMVERR)
 .I GMVALUE("CN")]"" D
 ..S GMVNEW=GMVALUE("CN"),$P(GMVNEW,";",4)=1
 ..D CHG^XPAR(GMVENT,"GMV USER DEFAULTS",GMVCN,GMVNEW,.GMVERR)
 .;get the updated canvas values
 .S GMVALUE("CA")=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVCA))
 .S GMVALUE("CN")=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVCN))
 .;check/reset Abnormal/NormalTextColor values
 .I GMVALUE("ATC")="" D
 ..S GMVNEW=$P(GMVALUE("CA"),";",2),GMVNEW=$S(GMVNEW]"":GMVNEW,1:9)
 ..D EN^XPAR(GMVENT,"GMV USER DEFAULTS",GMVATC,GMVNEW,.GMVERR)
 .I GMVALUE("ATC")]"" D
 ..S GMVNEW=$P(GMVALUE("CA"),";",2),GMVNEW=$S(GMVNEW]"":GMVNEW,1:9)
 ..D CHG^XPAR(GMVENT,"GMV USER DEFAULTS",GMVATC,GMVNEW,.GMVERR)
 .I GMVALUE("NTC")="" D
 ..S GMVNEW=$P(GMVALUE("CN"),";",2),GMVNEW=$S(GMVNEW]"":GMVNEW,1:0)
 ..D EN^XPAR(GMVENT,"GMV USER DEFAULTS",GMVNTC,GMVNEW,.GMVERR)
 .I GMVALUE("NTC")]"" D
 ..S GMVNEW=$P(GMVALUE("CN"),";",2),GMVNEW=$S(GMVNEW]"":GMVNEW,1:0)
 ..D CHG^XPAR(GMVENT,"GMV USER DEFAULTS",GMVNTC,GMVNEW,.GMVERR)
 Q
DEVICE ; Select a device
 N ZTDESC,ZTRTN
 S ZTRTN="START^GMV26PST",ZTDESC="FIX XPAR PARAMETERS FOR VITALS GUI"
 D EN^XUTMDEVQ(ZTRTN,ZTDESC)
 D HOME^%ZIS
 Q
TEST(GMVX) ; TESTING PURPOSES ONLY
 N GMVENT,GMVPARM,GMVAQ,GMVCA,GMVATC,GMVNQ,GMVCN,GMVNTC
 K ^TRAX(GMVX)
 S GMVAQ="ABNORMALQUALIFIERS",GMVCA="CanvasAbnormal",GMVATC="ABNORMALTEXTCOLOR"
 S GMVNQ="NORMALQUALIFIERS",GMVCN="CanvasNormal",GMVNTC="NORMALTEXTCOLOR"
 S GMVENT="",GMVPARM=$O(^XTV(8989.51,"B","GMV USER DEFAULTS",0))
 F  S GMVENT=$O(^XTV(8989.5,"AC",GMVPARM,GMVENT)) Q:GMVENT=""  D
 .Q:'$D(^XTV(8989.5,"AC",GMVPARM,GMVENT))
 .;get values
 .S ^TRAX(GMVX,GMVENT,GMVAQ)=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVAQ))
 .S ^TRAX(GMVX,GMVENT,GMVNQ)=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVNQ))
 .S ^TRAX(GMVX,GMVENT,GMVATC)=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVATC))
 .S ^TRAX(GMVX,GMVENT,GMVNTC)=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVNTC))
 .S ^TRAX(GMVX,GMVENT,GMVCA)=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVCA))
 .S ^TRAX(GMVX,GMVENT,GMVCN)=$G(^XTV(8989.5,"AC",GMVPARM,GMVENT,GMVCN))
 Q
COMPARE ;
 N GMVENT,GMVPARM,GMVAQ,GMVCA,GMVATC,GMVNQ,GMVCN,GMVNTC
 S GMVAQ="ABNORMALQUALIFIERS",GMVCA="CanvasAbnormal",GMVATC="ABNORMALTEXTCOLOR"
 S GMVNQ="NORMALQUALIFIERS",GMVCN="CanvasNormal",GMVNTC="NORMALTEXTCOLOR"
 K ^TRAX("C")
 S GMVENT=""
 F  S GMVENT=$O(^TRAX("B",GMVENT)) Q:GMVENT=""  D
 .I $G(^TRAX("B",GMVENT,GMVAQ))'=$G(^TRAX("A",GMVENT,GMVAQ)) D
 ..S ^TRAX("C",GMVENT,GMVAQ)=""
 .I $G(^TRAX("B",GMVENT,GMVNQ))'=$G(^TRAX("A",GMVENT,GMVNQ)) D
 ..S ^TRAX("C",GMVENT,GMVNQ)=""
 .I $G(^TRAX("B",GMVENT,GMVATC))'=$G(^TRAX("A",GMVENT,GMVATC)) D
 ..S ^TRAX("C",GMVENT,GMVATC)=""
 .I $G(^TRAX("B",GMVENT,GMVNTC))'=$G(^TRAX("A",GMVENT,GMVNTC)) D
 ..S ^TRAX("C",GMVENT,GMVNTC)=""
 .I $G(^TRAX("B",GMVENT,GMVCA))'=$G(^TRAX("A",GMVENT,GMVCA)) D
 ..S ^TRAX("C",GMVENT,GMVCA)=""
 .I $G(^TRAX("B",GMVENT,GMVCN))'=$G(^TRAX("A",GMVENT,GMVCN)) D
 ..S ^TRAX("C",GMVENT,GMVCN)=""
 S GMVENT=""
 F  S GMVENT=$O(^TRAX("A",GMVENT)) Q:GMVENT=""  D
 .I $G(^TRAX("A",GMVENT,GMVAQ))'=$G(^TRAX("B",GMVENT,GMVAQ)) D
 ..S ^TRAX("C",GMVENT,GMVAQ)=""
 .I $G(^TRAX("A",GMVENT,GMVNQ))'=$G(^TRAX("B",GMVENT,GMVNQ)) D
 ..S ^TRAX("C",GMVENT,GMVNQ)=""
 .I $G(^TRAX("A",GMVENT,GMVATC))'=$G(^TRAX("B",GMVENT,GMVATC)) D
 ..S ^TRAX("C",GMVENT,GMVATC)=""
 .I $G(^TRAX("A",GMVENT,GMVNTC))'=$G(^TRAX("B",GMVENT,GMVNTC)) D
 ..S ^TRAX("C",GMVENT,GMVNTC)=""
 .I $G(^TRAX("A",GMVENT,GMVCA))'=$G(^TRAX("B",GMVENT,GMVCA)) D
 ..S ^TRAX("C",GMVENT,GMVCA)=""
 .I $G(^TRAX("A",GMVENT,GMVCN))'=$G(^TRAX("B",GMVENT,GMVCN)) D
 ..S ^TRAX("C",GMVENT,GMVCN)=""
 S GMVENT=""
 F  S GMVENT=$O(^TRAX("C",GMVENT)) Q:GMVENT=""  D
 .S GMVPARM=""
 .F  S GMVPARM=$O(^TRAX("C",GMVENT,GMVPARM)) Q:GMVPARM=""  D
 ..W !,GMVENT_"  "_GMVPARM,!,"  B: "_$G(^TRAX("B",GMVENT,GMVPARM)),!,"  A: ",$G(^TRAX("A",GMVENT,GMVPARM)),!
 Q
KILL ;
 K ^TRAX("A"),^TRAX("B"),^TRAX("C")
 Q
XPAR ; Setup preliminary parameters. This subroutine is called during the
 ; KIDS installation process.
 ;
 ; Variables:
 ;  GMV:    [Private] Scratch
 ;  GMVGUI: [Private] Current version of GUI being installed
 ;  GMVLST: [Private] Scratch List
 ;
 ; NEW private variables
 N GMV,GMVGUI,GMVLST
 ; Announce my intentions
 D BMES^XPDUTL("Updating system parameters.")
 ; Set current client version
 S GMVGUI="5.0.26.1"
 ; Deactivate all previous versions from XPAR
 D GETLST^XPAR(.GMVLST,"SYS","GMV GUI VERSION")
 F GMV=0:0 S GMV=$O(GMVLST(GMV)) Q:'GMV  D
 . D EN^XPAR("SYS","GMV GUI VERSION",$P(GMVLST(GMV),"^",1),0)
 .Q
 ; Add and/or activate current client versions
 D EN^XPAR("SYS","GMV GUI VERSION","VITALS.EXE:"_GMVGUI,1)
 D EN^XPAR("SYS","GMV GUI VERSION","VITALSMANAGER.EXE:"_GMVGUI,1)
 Q
DLL ;
 ; Variables:
 ;  GMV:    [Private] Scratch
 ;  GMVDLL: [Private] Current version of DLL being installed
 ;  GMVLST: [Private] Scratch List
 ;
 ; New private variables
 N GMV,GMVDLL,GMVLST
 ; Announce my intentions
 D BMES^XPDUTL("Updating DLL parameter.")
 ; Deactivate all previous versions from XPAR
 D GETLST^XPAR(.GMVLST,"SYS","GMV DLL VERSION")
 F GMV=0:0 S GMV=$O(GMVLST(GMV)) Q:'GMV  D
 . D EN^XPAR("SYS","GMV DLL VERSION",$P(GMVLST(GMV),"^",1),0)
 ; Add and/or activate current client versions
 S GMVDLL="GMV_VITALSVIEWENTER.DLL:v. 08/11/09 15:00" ;patch 23
 D EN^XPAR("SYS","GMV DLL VERSION",GMVDLL,1)
 S GMVDLL="GMV_VITALSVIEWENTER.DLL:v. 01/21/11 12:52" ;patch 26
 D EN^XPAR("SYS","GMV DLL VERSION",GMVDLL,1)
 Q