source: WorldVistAEHR/trunk/r/HEALTH_SUMMARY-GMTS/GMTSXPD5.m@ 1679

Last change on this file since 1679 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1GMTSXPD5 ; SLC/KER - Health Summary Dist (PDX) ; 08/27/2002
2 ;;2.7;Health Summary;**35,56**;Oct 20, 1995
3 ;
4 ; External References
5 ; DBIA 1023 $$FIRSTUP^VAQUTL50
6 ; DBIA 1023 $$ADDSEG^VAQUTL50
7 ; DBIA 10086 HOME^%ZIS
8 ; DBIA 10060 ^VA(200,
9 ; DBIA 2056 $$GET1^DIQ (file 200)
10 ; DBIA 10141 BMES^XPDUTL
11 ; DBIA 10141 MES^XPDUTL
12 ;
13 Q
14PDX(GMTSCOMP,GMTSTIM,GMTSOCC) ; Install PDX Data Segment
15 ;
16 ; PDX( )
17 ; GMTSCOMP Component Name (.01 of 142.1)
18 ; GMTSTIM Time Limits Applicable
19 ; GMTSOCC Occurrence Limits Applicable
20 ;
21 N GMTSENV S GMTSENV=$$ENV Q:'GMTSENV N GMTSNAME,GMTSERR,GMTS Q:'$L(GMTSCOMP)
22 S (GMTS,GMTSERR)="",GMTSTIM=$G(GMTSTIM),GMTSOCC=$G(GMTSOCC),GMTSNAME=$$FIRSTUP^VAQUTL50(GMTSCOMP)
23 D INSP S GMTS=+$O(^GMT(142.1,"B",GMTSCOMP,0)) I ('GMTS) D NOPDX Q
24 S GMTSERR=$$ADDSEG^VAQUTL50(GMTS,GMTSTIM,GMTSOCC)
25 I (GMTSERR<0) D PDXER Q
26 D PDXOK Q
27 ;
28 ; PDX Messages
29INSP ; Installing PDX Segment
30 N GMTST
31 S GMTST=" Adding """_$$UP(GMTSNAME)_""" component to the PDX package" D BM(GMTST) Q
32NOPDX ; No PDX Segment Installed
33 N GMTST
34 S GMTST=" Component not found in Health Summary" D M(GMTST)
35 S GMTST=" and not added to PDX package" D M(GMTST),M("") Q
36PDXER ; Error filing PDX Segment
37 N GMTST
38 S GMTST=$P($G(GMTSERR),"^",2) Q:'$L(GMTST)
39 S GMTST=" "_GMTST D M(GMTST),M("") Q
40PDXOK ; PDX Segment filled ok
41 N GMTST
42 S GMTST=" Component successfully added" D M(GMTST),M("") Q
43 ;
44 ; Misc
45ENV(X) ; Environment check
46 D HOME^%ZIS I +($G(DUZ))=0 D BM(" User (DUZ) not defined"),M(" ") Q 0
47 I '$L($$GET1^DIQ(200,(+($G(DUZ))_","),.01)) D BM(" Invalid User defined (DUZ)"),M(" ") Q 0
48 Q 1
49BM(X) ; Blank Line with Message
50 Q:$D(GMTSQT) D:$D(XPDNM) BMES^XPDUTL($G(X)) W:'$D(XPDNM) !!,$G(X) Q
51M(X) ; Message
52 Q:$D(GMTSQT) D:$D(XPDNM) MES^XPDUTL($G(X)) W:'$D(XPDNM) !,$G(X) Q
53UP(X) ; Uppercase
54 Q $TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
Note: See TracBrowser for help on using the repository browser.