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