source: WorldVistAEHR/trunk/r/HEALTH_SUMMARY-GMTS/GMTSP77B.m@ 862

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

initial load of WorldVistAEHR

File size: 3.3 KB
RevLine 
[613]1GMTSP77B ; CIO/SLC - Post Install GMTS*2.7*77 ; 09/11/2007
2 ;;2.7;Health Summary;**77**;Oct 20, 1995;Build 47
3 ;
4 Q
5POST ; Post-Install
6 D CI
7 Q
8CI ; Component Install
9 N GMTSIN,GMTSLIM,GMTSINST,GMTSTL,GMTSINST,GMTSTOT,GMTSBLD,GMTSCPS,GMTSCP,GMTSCI,GMTSINX
10 S GMTSCPS="MHAL;MHAS"
11 F GMTSCI=1:1 Q:'$L($P(GMTSCPS,";",GMTSCI)) D
12 . S GMTSCP=$P(GMTSCPS,";",GMTSCI) K GMTSIN
13 . D ARRAY Q:'$D(GMTSIN)
14 . I $L($G(GMTSIN("TIM"))),+($G(GMTSIN(0)))>0 S GMTSLIM(+($G(GMTSIN(0))),"TIM")=$G(GMTSIN("TIM"))
15 . I $L($G(GMTSIN("OCC"))),+($G(GMTSIN(0)))>0 S GMTSLIM(+($G(GMTSIN(0))),"OCC")=$G(GMTSIN("OCC"))
16 . I GMTSIN(0)=249 M GMTSINX=GMTSIN
17 . S GMTSINST=$$ADD^GMTSXPD1(.GMTSIN),GMTSTOT=+($G(GMTSTOT))+($G(GMTSINST))
18 ; Rebuild Ad Hoc Health Summary Type
19 D:+($G(GMTSTOT))>0 BUILD^GMTSXPD3
20 I $G(GMTSTOT)<1 D
21 .W !!," Adding missing data for previously installed components."
22 .D FIX
23 .D BUILD^GMTSXPD3
24 D LIM
25 I +$$ROK("GMTSXPS1")>0 D
26 . N GMTSHORT S GMTSHORT=1,GMTSINST="",GMTSBLD="GMTS*2.7*77" D SEND^GMTSXPS1
27 Q
28ARRAY ; Build Array
29 K GMTSIN N GMTSI,GMTSTXT,GMTSEX,GMTSFLD,GMTSUB,GMTSVAL,GMTSPDX S GMTSPDX=1,GMTSCP=$G(GMTSCP) Q:'$L(GMTSCP)
30 F GMTSI=1:1 D Q:'$L(GMTSTXT)
31 . S GMTSTXT="",GMTSEX="S GMTSTXT=$T("_GMTSCP_"+"_GMTSI_")" X GMTSEX S:$L(GMTSTXT,";")'>3 GMTSTXT="" Q:'$L(GMTSTXT)
32 . S GMTSFLD=$P(GMTSTXT,";",2),GMTSUB=$P(GMTSTXT,";",3),GMTSVAL=$P(GMTSTXT,";",4)
33 . S:$E(GMTSFLD,1)=1&(+GMTSFLD<2) GMTSVAL=$P(GMTSTXT,";",4,5)
34 . S:$E(GMTSFLD,1)=" "!('$L(GMTSFLD)) GMTSTXT="" Q:GMTSTXT=""
35 . S:$L(GMTSFLD)&('$L(GMTSUB)) GMTSIN(GMTSFLD)=GMTSVAL Q:$L(GMTSFLD)&('$L(GMTSUB)) S:$L(GMTSFLD)&($L(GMTSUB)) GMTSIN(GMTSFLD,GMTSUB)=GMTSVAL
36 . S:$G(GMTSFLD)=7&(+($G(GMTSUB))>0) GMTSPDX=0
37 K:+($G(GMTSPDX))=0 GMTSIN("PDX")
38 Q
39LIM ; Limits
40 N GMTSI,GMTST,GMTSO,GMTSA S GMTSI=0 F S GMTSI=$O(GMTSLIM(GMTSI)) Q:+GMTSI=0 D
41 . S GMTSA=$P($G(^GMT(142.1,+($G(GMTSI)),0)),"^",3),GMTST=$G(GMTSLIM(+GMTSI,"TIM")) S:'$L(GMTST) GMTST=$S(GMTSA="Y ":"1Y ",1:"")
42 . S GMTSA=$P($G(^GMT(142.1,+($G(GMTSI)),0)),"^",5),GMTSO=$G(GMTSLIM(+GMTSI,"OCC")) S:'$L(GMTSO) GMTSO=$S(GMTSA="Y ":"10 ",1:"")
43 . D TO^GMTSXPD3(GMTSI,GMTST,GMTSO)
44 Q
45ROK(X) ; Routine OK
46 S X=$G(X) Q:'$L(X) 0 N GMTSEX,GMTSTXT S GMTSEX="S GMTSTXT=$T(+1^"_X_")" X GMTSEX
47 Q:'$L(GMTSTXT) 0 Q 1
48 ;
49FIX ;
50 ;FIX OCCURANCE AND TIME LIMITS
51 S $P(^GMT(142.1,248,0),U,3)=1
52 S $P(^GMT(142.1,248,0),U,5)=1
53 S $P(^GMT(142.1,249,0),U,3)=1
54 S $P(^GMT(142.1,248,0),U,5)=1
55 ;FIX SELECTION ITEMS
56 I $D(GMTSINX) D SEL^GMTSXPD1(.GMTSINX)
57 Q
58 ;
59MHAL ;
60 ;0;;248
61 ;.01;;MHA Administration List
62 ;1;;EN;GMTSYTQL
63 ;2;;YES
64 ;3;;MHAL
65 ;4;;YES
66 ;13;;YS
67 ;9;;MHA Admin List
68 ;3.5;;2
69 ;3.5;1;This component displays all administrations of intruments in
70 ;3.5;2;the mental health package for the specified patient. All administrations from
71 ;3.5;3;MH Administrations (file #601.84) are shown.
72 ;3.5;4;
73 ;3.5;5;Date ranges and maximum occurances apply.
74 ;PDX;;1
75 ;TIM;;1Y
76 ;OCC;;10
77 ;
78 Q
79 ;
80MHAS ;
81 ;0;;249
82 ;.01;;MHA Score
83 ;1;;EN;GMTSYTQS
84 ;2;;YES
85 ;3;;MHAS
86 ;4;;YES
87 ;13;;YS
88 ;9;;MHA Score
89 ;7;;1
90 ;7;1;601.71^99
91 ;3.5;;2
92 ;3.5;1;This component displays the administration and scoring of
93 ;3.5;2;intruments in the mental health package. Tests, interviews and surveys from MH
94 ;3.5;3;TESTS and SURVEYS (file # 601.71) must be selected.
95 ;3.5;4;
96 ;3.5;5;Date ranges and maximum occurances apply.
97 ;PDX;;1
98 ;TIM;;1Y
99 ;OCC;;10
100 ;
101 Q
Note: See TracBrowser for help on using the repository browser.