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

GMTSPOS1.m

Go to the documentation of this file.
  1. GMTSPOS1 ;SLC/SBW - Smart routine installer and Comp. Disabler ;22/MAR/95
  1. ;;2.7;Health Summary;;Oct 20, 1995
  1. ;IHS/ITSC/LJF 08/08/2003 changed code to handle patches released since postinit was written
  1. ; 08/14/2003 bypassed subroutines that no longer work
  1. ;
  1. PSO ; Controls Outpatient Pharmacy install
  1. N GMPSOVER
  1. ;If Health Summary is absent, then quit
  1. I '$L($T(^PSOHCSUM)) Q
  1. S GMPSOVER=$$VERSION^XPDUTL("PSO")
  1. D PSOINST(GMPSOVER)
  1. Q
  1. PSOINST(VERSION) ; Install routine corresponding to HS version in
  1. ; target account
  1. ; If the patch is already installed, then quit w/o overwriting
  1. N DIE,DIF,GMMSG,X,XCN,XCNP
  1. I VERSION'<6.0 Q
  1. W !,"** Installing GMTSPSO routine for Outpatient Pharmacy component. **"
  1. W !," Outpatient Pharmacy version ",VERSION," is installed in this account.",!
  1. S X="GMTSPSZO",XCNP=0,DIF="^UTILITY(""GMTSPSZO""," X ^%ZOSF("LOAD") W !,"Renaming GMTSPSZO as GMTSPSO."
  1. S X="GMTSPSO",XCN=2,DIE="^UTILITY(""GMTSPSZO""," X ^%ZOSF("SAVE") K ^UTILITY("GMTSPSZO") W " Done.",!
  1. Q
  1. ;******************************************************
  1. SOWK ; Controls Social Work install
  1. N X,GMMSG
  1. ; Checks conditions for auto-disable of Social Work component
  1. I $$VERSION^XPDUTL("SOWK")<3 D
  1. . S GMMSG="Social Work Service version 3.0 not yet installed"
  1. . S X="SOCIAL WORK" D DISABLE^GMTSPOST
  1. I $$VERSION^XPDUTL("SOWK")>2.99 D
  1. . ;If Social Work extract routine for Health Summary is present, quit
  1. . I $L($T(^SOWKHSUM)) Q
  1. . W !,"** Installing SOWKHSUM routine for Social Work Component. **"
  1. . D SOWKINST
  1. Q
  1. SOWKINST ; Install SOWKHSUM routine
  1. N DIE,DIF,GMMSG,X,XCN,XCNP
  1. S X="GMTSSOWZ",XCNP=0,DIF="^UTILITY(""GMTSSOWZ""," X ^%ZOSF("LOAD") W !,"Renaming GMTSSOWZ as SOWKHSUM."
  1. S X="SOWKHSUM",XCN=2,DIE="^UTILITY(""GMTSSOWZ""," X ^%ZOSF("SAVE") K ^UTILITY("GMTSSOWZ") W " Done.",!
  1. Q
  1. ;******************************************************
  1. MED ; Controls Medicine 2.0 install and disable 2.2 components
  1. N X,GMMSG
  1. ;Checks conditions for auto-disable of Medicine 2.2 components
  1. I $$VERSION^XPDUTL("MC")<2.2 D
  1. . S GMMSG="Medicine 2.2 Package not yet installed or available"
  1. . ;
  1. . ;IHS/ITSC/LJF 8/8/2003 new components have been released in patches since postinit was written
  1. . ;F X="MEDICINE ABNORMAL BRIEF","MEDICINE BRIEF REPORT","MEDICINE FULL CAPTIONED","MEDICINE FULL REPORT" D DISABLE^GMTSPOST
  1. . F X="MEDICINE ABNORMAL BRIEF","MEDICINE BRIEF REPORT","MEDICINE FULL CAPTIONED","MEDICINE FULL REPORT","MEDICINE SUMMARY" D DISABLE^GMTSPOST
  1. . ;IHS/ITSC/LJF 8/8/2003 end of mods
  1. . ;
  1. . ;If Medicine 2.2 not installed, restore 2.0 medicine routines
  1. . W !,"** Installing GMTSMCPS routine for Medicine 2.0 component. **"
  1. . D MED2INST
  1. I $$VERSION^XPDUTL("MC")>2.19 D M22INST
  1. Q
  1. MED2INST ; Install GMTSMCPS routine for med 2.0
  1. Q ;IHS/ITSC/LJF 8/14/2003 no longer works
  1. N DIE,DIF,GMMSG,X,XCN,XCNP
  1. S X="GMTSMCPZ",XCNP=0,DIF="^UTILITY(""GMTSMCPZ""," X ^%ZOSF("LOAD") W !,"Renaming GMTSMCPZ as GMTSMCPS."
  1. S X="GMTSMCPS",XCN=2,DIE="^UTILITY(""GMTSMCPZ""," X ^%ZOSF("SAVE") K ^UTILITY("GMTSMCPZ") W " Done.",!
  1. Q
  1. M22INST ; Install GMTSMCPS routine for med 2.2
  1. Q ;IHS/ITSC/LJF 8/14/2003 no longer works
  1. W !,"** Installing GMTSMCPS routine for Medicine 2.2 components. **"
  1. N DIE,DIF,GMMSG,X,XCN,XCNP
  1. S X="GMTSMCZZ",XCNP=0,DIF="^UTILITY(""GMTSMCZZ""," X ^%ZOSF("LOAD") W !,"Renaming GMTSMCZZ as GMTSMCPS."
  1. S X="GMTSMCPS",XCN=2,DIE="^UTILITY(""GMTSMCZZ""," X ^%ZOSF("SAVE") K ^UTILITY("GMTSMCZZ") W " Done.",!
  1. Q
  1. ;******************************************************
  1. PL ; Controls Problem List 2.0 install
  1. ; Checks conditions for auto-disable of Problem List components
  1. N X,GMMSG
  1. I $$VERSION^XPDUTL("GMPL")<2 D
  1. . S GMMSG="Problem List 2.0 Package not yet installed or available"
  1. . F X="PROBLEM LIST ACTIVE","PROBLEM LIST INACTIVE","PROBLEM LIST ALL" D DISABLE^GMTSPOST
  1. I $$VERSION^XPDUTL("GMPL")>1.99 D
  1. . W !,"** Installing GMPLHS routine for Problem List components. **"
  1. . D PLINST
  1. Q
  1. PLINST ; Install GMPLHS routine
  1. N DIE,DIF,GMMSG,X,XCN,XCNP
  1. W !,"Renaming GMTSPLSZ as GMPLHS."
  1. S X="GMTSPLSZ",XCNP=0,DIF="^UTILITY(""GMTSPLSZ""," X ^%ZOSF("LOAD") W "."
  1. S X="GMPLHS",XCN=2,DIE="^UTILITY(""GMTSPLSZ""," X ^%ZOSF("SAVE") K ^UTILITY("GMTSPLSZ") W " Done."
  1. Q
  1. CRIHS ;EP; Checks conditions auto-disable of Clinical Reminders
  1. ;IHS/ITSC/LJF 8/8/2003 added subroutine as clinical reminder components were released in patch #23
  1. N GMMSG,X
  1. S X="PXRM" X ^%ZOSF("TEST") Q:$T
  1. F X="CLINICAL REMINDERS BRIEF","CLINICAL REMINDERS DUE","CLINICAL REMINDERS MAINTENANCE","CLINICAL REMINDERS SUMMARY" S GMMSG="Clinical Reminders not yet available" D DISABLE^GMTSPOST
  1. Q
  1. ;
  1. GAFIHS ;EP; Checks conditions for auto-dsable of GAF components
  1. ;IHS/ITSC/LJF 8/8/2003 added subroutine as clinical reminder components were released in patch #23
  1. N GMMSG,X
  1. S X="YSGAFAPI" X ^%ZOSF("TEST") Q:$T
  1. F X="GLOBAL ASSESSMENT FUNCTIONING" S GMMSG="GAF not yet available" D DISABLE^GMTSPOST
  1. Q
  1. SCDIHS ;EP; Checks conditions for auto-dsable of Spinal Cord Dysfunction components
  1. ;IHS/ITSC/LJF 8/8/2003 added subroutine as clinical reminder components were released in patch #23
  1. N GMMSG,X
  1. S X="SPNHSO" X ^%ZOSF("TEST") Q:$T
  1. F X="SPINAL CORD DYSFUNCTION" S GMMSG="Spinal Cord Dysfunction not yet available" D DISABLE^GMTSPOST
  1. Q
  1. ;
  1. MAS ;EP; checks if site has PIMS installed so MAS components can stay active
  1. ;IHS/ITSC/LJF 3/24/2004 added subroutine to disable MAS components
  1. N GMMSG,X,GMN
  1. S X="SDAM" X ^%ZOSF("TEST") Q:$T
  1. S GMN="MAS" F S GMN=$O(^GMT(142.1,"B",GMN)) Q:GMN'["MAS" Q:GMN="" D
  1. . S X=GMN S GMMSG="PIMS V5.3 not yet installed" D DISABLE^GMTSPOST
  1. Q