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

GMTSP36.m

Go to the documentation of this file.
  1. GMTSP36 ; SLC/KER - Oncology HS Comp Post-Install ; 11/19/1999
  1. ;;2.7;Health Summary;**36**;Oct 20, 1995
  1. ;
  1. Q
  1. POST ; Post Install
  1. ;
  1. ; GMTSPKR Minimum Version required for "Active" Component
  1. ; GMTSPKV Package Version in UCI
  1. ; GMTSDAF Disable Flag ""=Active/"T"=Temporary/"P"=Permanent
  1. ; GMTSOOM Out of Order Message
  1. ;
  1. I +$$VERSION^XPDUTL("GMTS")<2.7 D HSVNF Q
  1. N GMTSPKR,GMTSPKV,GMTSIOK,GMTSDAF,GMTSOOM,GMTSV1,GMTSV2,GMI,GMTJ,GMTNM,GMTSEG,GMTSI,GMTSIFN
  1. S GMTSIOK=1,GMTSV1=$$VERSION^XPDUTL("ONC"),GMTSV2=$$VERSION^XPDUTL("ONCO")
  1. S GMTSPKV=$S(GMTSV1>GMTSV2:GMTSV1,GMTSV2>GMTSV1:GMTSV2,1:GMTSV1)
  1. S GMTSPKR="2.11",GMTSOOM="",GMTSDAF=""
  1. S:+GMTSPKV<GMTSPKR GMTSDAF="T",GMTSOOM="Oncology Component requires v "_GMTSPKR
  1. D ADD(236,"ONCOLOGY","ONC","EXTRACT","GMTSONE",,,,"Oncology",,,GMTSDAF,GMTSOOM,1)
  1. D:GMTSIOK PDX("ONCOLOGY")
  1. Q
  1. ADD(GMTSIEN,GMTSNAME,GMTSABBR,GMTSTAG,GMTSRTN,GMTSTIML,GMTSOCCL,GMTSSKEY,GMTSDHDN,GMTSICDT,GMTSPROV,GMTSDAF,GMTSDOOM,GMTSINCL) ; Add Component
  1. ;
  1. ; ADD( )
  1. ; GMTSIEN Internal Entry Number File 142.1
  1. ; GMTSNAME Component Name
  1. ; GMTSABBR Abbreviation
  1. ; GMTSTAG Display Routine Tag
  1. ; GMTSRTN Display Routine
  1. ; GMTSTIML Time Limits Applicable
  1. ; GMTSOCCL Occurrence Limits Applicable
  1. ; GMTSSKEY Security Key (Component Locking)
  1. ; GMTSDHDN Default Header Name
  1. ; GMTSICDT ICD Text Applicable
  1. ; GMTSPROV Provider Narrative Text Applicable
  1. ; GMTSDAF Disable Flag (null, T or P)
  1. ; GMTSOOM Out of Order Message
  1. ; GMTSINCL Include Disabled in Ad Hoc (1/0)
  1. ;
  1. S GMTSNAME=$G(GMTSNAME),GMTSIEN=+($G(GMTSIEN)),GMTSRTN=$G(GMTSRTN)
  1. D:'$L($G(GMTSNAME))!(+($G(GMTSIEN))'>0)!('$L($G(GMTSRTN))) NOTOK
  1. Q:'$L($G(GMTSNAME)) Q:+($G(GMTSIEN))'>0 Q:'$L($G(GMTSRTN))
  1. N DIE,DIK,DA,DR,DIC,DLAYGO,DINUM,X,Y,INCLUDE,GMTS,GMTSROUT,GMTSTAT
  1. S GMTSROUT="",GMTSTAT=$D(^GMT(142.1,+GMTSIEN,0))
  1. S GMTS=+$O(^GMT(142.1,"B",GMTSNAME,0)) D:GMTS=GMTSIEN ALRDY,NOTOK Q:GMTS=GMTSIEN
  1. D INST S GMTSNAME=$$NAME($G(GMTSNAME)) D:'$L($G(GMTSNAME)) NNAME,NOTOK Q:'$L(GMTSNAME)
  1. S GMTSTAG=$G(GMTSTAG),GMTSRTN=$G(GMTSRTN) S GMTSROUT=$$ROUT((GMTSTAG_";"_GMTSRTN))
  1. D:'$L($G(GMTSROUT)) NRTN,NOTOK Q:'$L(GMTSROUT) S GMTSTIML=$$TIML($G(GMTSTIML))
  1. S GMTSOCCL=$$OCCL($G(GMTSOCCL)) S GMTSABBR=$$ABBR($G(GMTSABBR)) S GMTSSKEY=$$LOCK($G(GMTSSKEY))
  1. S GMTSDHDN=$$DHDN($G(GMTSDHDN)) S GMTSICDT=$$ICDT($G(GMTSICDT))
  1. S GMTSPROV=$$PROV($G(GMTSPROV)) S GMTSDAF=$$DAF($G(GMTSDAF)) S GMTSOOM=$$OOM($G(GMTSOOM))
  1. S:$L(GMTSDAF)&('$L(GMTSOOM)) GMTSOOM="Component "_GMTSNAME_$S(GMTSDAF="T":" Temporarily",GMTSDAF="P":" Permanently",1:"")_" Disabled"
  1. S DINUM=0,(DIC,DLAYGO)=142.1,DIC(0)="NXL",X=GMTSNAME S:'$D(^GMT(142.1,+($G(GMTSIEN)),0)) DINUM=+($G(GMTSIEN)) I +DINUM'>1 D EXIST,NOTOK Q
  1. D ^DIC D:+($G(Y))'>0 FAILED,NOTOK Q:+($G(Y))'>0 S GMTSNAME=$$NAME($G(GMTSNAME)) D:'$L($G(GMTSNAME)) NNAME,NOTOK Q:'$L(GMTSNAME)
  1. S DIE=DIC,DA=+($G(Y)),DR="1///^S X="""_$G(GMTSTAG)_"""_$C(59)_"""_$G(GMTSRTN)_""""
  1. S:$L($G(GMTSTIML)) DR=DR_";2///"_GMTSTIML S:$L($G(GMTSABBR)) DR=DR_";3///"_GMTSABBR S:$L($G(GMTSOCCL)) DR=DR_";4///"_GMTSOCCL
  1. S:$L($G(GMTSDAF)) DR=DR_";5///"_GMTSDAF S:$L($G(GMTSSKEY)) DR=DR_";6///"_GMTSSKEY S:$L($G(GMTSOOM)) DR=DR_";8///"_GMTSOOM
  1. S:$L($G(GMTSDHDN)) DR=DR_";9///"_GMTSDHDN S:$L($G(GMTSICDT)) DR=DR_";11///"_GMTSICDT S:$L($G(GMTSPROV)) DR=DR_";12///"_GMTSPROV
  1. D ^DIE,DES S DIK=DIE D IX^DIK D:GMTSTAT&($D(^GMT(142.1,+($G(DA)),0))) SCESE D:'GMTSTAT&($D(^GMT(142.1,+($G(DA)),0))) SCESS
  1. I +($G(GMTSINCL)) S INCLUDE=0 D ENPOST^GMTSLOAD
  1. Q
  1. PDX(GMTSCOMP,GMTSTIM,GMTSOCC) ; Install PDX Data Segment
  1. ;
  1. ; PDX( )
  1. ; GMTSCOMP Component Name (.01 of 142.1)
  1. ; GMTSTIM Time Limits Applicable
  1. ; GMTSOCC Occurrence Limits Applicable
  1. ;
  1. N GMTSNAME,GMTSERR,GMTS Q:'$L(GMTSCOMP)
  1. S (GMTS,GMTSERR)="",GMTSTIM=$G(GMTSTIM),GMTSOCC=$G(GMTSOCC),GMTSNAME=$$FIRSTUP^VAQUTL50(GMTSCOMP)
  1. D INSP S GMTS=+$O(^GMT(142.1,"B",GMTSCOMP,0)) I ('GMTS) D NOPDX Q
  1. S GMTSERR=$$ADDSEG^VAQUTL50(GMTS,GMTSTIM,GMTSOCC) I (GMTSERR<0) D PDXER Q
  1. D PDXOK
  1. Q
  1. ; Check Input
  1. NAME(X) ; Check Name (required)
  1. S X=$G(X) K:X[""""!($A(X)=45) X Q:'$D(X) ""
  1. I $D(X) K:$L(X)>30!($L(X)<3)!'(X'?1P.E) X
  1. I $L($G(X)),'$D(^GMT(142.1,+($G(Y)),0)) D
  1. . K:$D(^GMT(142.1,"B",X)) X Q:'$D(X) Q:+($G(Y))'>0 I $P($G(^GMT(142.1,+($G(Y)),0)),"^",1)'=$G(X) K X
  1. S X=$G(X) Q X
  1. ROUT(X) ; Check Routine (required)
  1. S X=$G(X) K:X[""""!($A(X)=45) X Q:'$D(X) ""
  1. K:$L(X)>17!($L(X)<3)!'(X?1U1.7UN1";"1U1.7UN) X Q:'$D(X) ""
  1. I @("$L($T("_$P(X,";")_"^"_$P(X,";",2)_"))'>0") K X
  1. S X=$G(X) Q X
  1. TIML(X) ; Check Time Limits
  1. S X=$G(X) Q:X="1"!(X="Y") "Y" Q ""
  1. ABBR(X) ; Check Abbreviation
  1. S X=$G(X) S:X[""""!($A(X)=45) X="" S:$L(X)>4!($L(X)<2)!'(X?2.4UN) X="" Q X
  1. OCCL(X) ; Check Occurrence Limits
  1. S X=$G(X) Q:X="1"!(X="Y") "Y" Q ""
  1. LOCK(X) ; Check Lock
  1. S X=$G(X) S:X[""""!($A(X)=45) X="" S:$L(X)>30!($L(X)<1) X="" Q:'$L(X) "" S:'$D(^DIC(19.1,"B",X)) X="" Q X
  1. DHDN(X) ; Check Default Header Name
  1. S X=$G(X) S:X[""""!($A(X)=45) X="" S:$L(X)>20!($L(X)<2) X="" Q X
  1. ICDT(X) ; Check ICD Text Flag
  1. S X=$G(X) Q:X="1"!(X="Y") "Y" Q ""
  1. PROV(X) ; Check Provider Narrative Flag
  1. S X=$G(X) Q:X="1"!(X="Y") "Y" Q ""
  1. DAF(X) ; Check Disable Flag
  1. S X=$G(X) Q:X="T" "T" Q:X="T" "P" Q ""
  1. OOM(X) ; Check Out of Order Message
  1. S X=$G(X) Q:$L(X)<3 "" Q:$L(X)>78 "" Q X
  1. Q
  1. ;
  1. ; Messages
  1. ; Health Summary Type messages
  1. HSVNF ; Health Summary Version not found
  1. N GMTST S GMTST=" Health Summary Version 2.7 not found" D BM(GMTST) Q
  1. NNAME ; No Name
  1. N GMTST S GMTST=" No or invalid Health Summary Component name" D BM(GMTST) D NOTI Q
  1. NRTN ; No Routine
  1. N GMTST S GMTST=" No or invalid Health Summary display routine" D BM(GMTST) D NOTI Q
  1. INST ; Installing Component
  1. N GMTST S GMTST=" Filing "_GMTSNAME_" component in HEALTH SUMMARY COMPONENT FILE (#142.1)" D BM(GMTST) Q
  1. NOTI ; Not Installed
  1. N GMTST S GMTST=" Could not install new component" D M(GMTST) Q
  1. EXIST ; DINUMed entry Exist
  1. N GMTST S GMTST=" Can not add component, DINUM'ed entry already exist" D BM(GMTST) Q
  1. ALRDY ; Component Already Installed
  1. N GMTST S GMTST=" "_GMTSNAME_" component has already been installed" D BM(GMTST) S GMTST=" in the HEALTH SUMMARY COMPONENT FILE (#142.1)" D M(GMTST) Q
  1. FAILED ; Failed Installation
  1. N GMTST S GMTST=" Failed to install "_GMTSNAME_" component" D BM(GMTST) Q
  1. SCESS ; Successfully Installed
  1. N GMTSD S GMTSD=0 D DISAB Q:+($G(GMTSD))
  1. N GMTST S GMTST=" Successfully installed the "_GMTSNAME_" component" D BM(GMTST) Q
  1. SCESE ; Successfully Edited
  1. N GMTSD S GMTSD=0 D DISAB Q:+($G(GMTSD))
  1. N GMTST S GMTST=" Successfully edited/updated the "_GMTSNAME_" component" D BM(GMTST) Q
  1. DISAB ;
  1. Q:+($G(GMTSIEN))=0 Q:$P($G(^GMT(142.1,+($G(GMTSIEN)),0)),"^",6)=""
  1. N GMTSF,GMTSM,GMTST S GMTSF=$P($G(^GMT(142.1,+($G(GMTSIEN)),0)),"^",6)
  1. S GMTSF=$S(GMTSF="T":"Temporarily",GMTSF="P":"Permanently",1:"") Q:'$L(GMTSF)
  1. S GMTSD=1,GMTST="",GMTSM=$P($G(^GMT(142.1,+($G(GMTSIEN)),0)),"^",8)
  1. S GMTST=" Componet "_GMTSNAME_" is installed, but "_GMTSF_" disabled" D BM(GMTST)
  1. S GMTST="" S:$L(GMTSM) GMTST=" Out of order message: """_GMTSM_"""" D:$L(GMTST) M(GMTST)
  1. Q
  1. ; PDX Messages
  1. INSP ; Installing PDX Segment
  1. N GMTST S GMTST=" Filing "_GMTSCOMP_" component in PDX Data Segments" D BM(GMTST) Q
  1. NOPDX ; No PDX Segment Installed
  1. N GMTST S GMTST=" "_GMTSCOMP_" not found in HEALTH SUMMARY COMPONENT file." D BM(GMTST) S GMTST=" "_GMTSNAME_" not added to VAQ - DATA SEGMENT file." D M(GMTST),M("") Q
  1. PDXER ; Error filing PDX Segment
  1. N GMTST S GMTST=$P($G(GMTSERR),"^",2) Q:'$L(GMTST) S GMTST=" "_GMTST D BM(GMTST),M("") Q
  1. PDXOK ; PDX Segment filled ok
  1. N GMTST S GMTST=" "_GMTSNAME_" added to VAQ - DATA SEGMENT file (#394.71)." D BM(GMTST),M("") Q
  1. ; Message Lines
  1. NOTOK ; Install is not OK
  1. S:+($G(GMTSIOK))>0 GMTSIOK=0 Q
  1. BM(X) ; Blank Line with Message
  1. D:$D(XPDNM) BMES^XPDUTL($G(X)) W:'$D(XPDNM) !!,$G(X) Q
  1. M(X) ; Message
  1. D:$D(XPDNM) MES^XPDUTL($G(X)) W:'$D(XPDNM) !,$G(X) Q
  1. ;
  1. DES ; Description
  1. Q:+($G(GMTSIEN))=0 Q:+($G(DT))=0 Q:'$D(^GMT(142.1,+GMTSIEN,0))
  1. SDES ; Save Description
  1. N GMTSX,GMTSI,GMTST,GMTSC,GMTSHN,GMTSNN,GMTSHD,GMTSH
  1. S GMTSH="^GMT(142.1,"_GMTSIEN_",3.5)",GMTST="",GMTSC=0
  1. F GMTSI=1:1 D Q:'$L(GMTST)
  1. . S GMTST="" S GMTSX="S GMTST=$T(DEST+"_GMTSI_"^GMTSP36)" X GMTSX S GMTST=$P(GMTST,";",2) Q:'$L(GMTST)
  1. . S GMTSC=GMTSC+1 K:GMTSC=1 @GMTSH S GMTSHN="^GMT(142.1,"_GMTSIEN_",3.5,0)",GMTSHD="^^"_GMTSC_"^"_GMTSC_"^"_DT_"^",GMTSNN="^GMT(142.1,"_GMTSIEN_",3.5,"_GMTSC_",0)"
  1. . S @GMTSHN=GMTSHD,@GMTSNN=GMTST
  1. Q
  1. DEST ; Description Text
  1. ;This component will extract selected data items from the
  1. ;ONCOLOGY PRIMARY file.
  1. ;;