GMTSP067 ;ISP/RFR - HEALTH SUMMARY PATCH 67 INSTALLATION TASKS ;Oct 16, 2019@11:38
;;2.7;Health Summary;**67**;Oct 20, 1995;Build 538
Q
POST ;POST-INSTALL
N GMTSIN,GMTSLIM,GMTSINST,GMTSTL,GMTSINST,GMTSTOT,GMTSBLD,GMTSCPS,GMTSCP,GMTSQT
N GMTSCI,INCLUDE,XPDIDTOT
S GMTSCPS="PREG;LAC;PANDL",XPDIDTOT=$L(GMTSCPS,";")+2
D UPDATE^XPDID(0)
F GMTSCI=1:1 Q:'$L($P(GMTSCPS,";",GMTSCI)) D
. S GMTSCP=$P(GMTSCPS,";",GMTSCI)
. D ARRAY Q:'$D(GMTSIN)
. I $L($G(GMTSIN("TIM"))),+($G(GMTSIN(0)))>0 S GMTSLIM(+($G(GMTSIN(0))),"TIM")=$G(GMTSIN("TIM"))
. I $L($G(GMTSIN("OCC"))),+($G(GMTSIN(0)))>0 S GMTSLIM(+($G(GMTSIN(0))),"OCC")=$G(GMTSIN("OCC"))
. S GMTSINST=$$ADD^GMTSXPD1(.GMTSIN),GMTSTOT=+($G(GMTSTOT))+($G(GMTSINST))
. D UPDATE^XPDID(GMTSCI)
; Rebuild Ad Hoc Health Summary Type
I $G(GMTSTOT)>0 S INCLUDE=+$G(XPDQUES("POS1")) D ENPOST^GMTSLOAD
D LIM
I $L($T(SEND^GMTSXPS1)) D
. N GMTSHORT,XPDIDVT S GMTSHORT=1,GMTSINST="",GMTSBLD=XPDNM D SEND^GMTSXPS1,INIT^XPDID
D UPDATE^XPDID(GMTSCI)
D TITLE,UPDATE^XPDID(XPDIDTOT)
Q
ARRAY ; Build Array
K GMTSIN N GMTSI,GMTSTXT,GMTSEX,GMTSFLD,GMTSUB,GMTSVAL,GMTSPDX S GMTSPDX=1,GMTSCP=$G(GMTSCP) Q:'$L(GMTSCP)
F GMTSI=1:1 D Q:'$L(GMTSTXT)
. S GMTSTXT="",GMTSEX="S GMTSTXT=$T("_GMTSCP_"+"_GMTSI_")" X GMTSEX S:$L(GMTSTXT,";")'>3 GMTSTXT="" Q:'$L(GMTSTXT)
. S GMTSFLD=$P(GMTSTXT,";",2),GMTSUB=$P(GMTSTXT,";",3),GMTSVAL=$P(GMTSTXT,";",4)
. S:$E(GMTSFLD,1)=1&(+GMTSFLD<2) GMTSVAL=$P(GMTSTXT,";",4,5)
. S:$E(GMTSFLD,1)=" "!('$L(GMTSFLD)) GMTSTXT="" Q:GMTSTXT=""
. S:$L(GMTSFLD)&('$L(GMTSUB)) GMTSIN(GMTSFLD)=GMTSVAL Q:$L(GMTSFLD)&('$L(GMTSUB))
. S:$L(GMTSFLD)&($L(GMTSUB)) GMTSIN(GMTSFLD,GMTSUB)=GMTSVAL
. S:$G(GMTSFLD)=7&(+($G(GMTSUB))>0) GMTSPDX=0
K:+($G(GMTSPDX))=0 GMTSIN("PDX")
Q
LIM ; Limits
N GMTSI,GMTST,GMTSO,GMTSA S GMTSI=0 F S GMTSI=$O(GMTSLIM(GMTSI)) Q:+GMTSI=0 D
. 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:"")
. 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:"")
. D TO^GMTSXPD3(GMTSI,GMTST,GMTSO)
Q
TITLE ;set title for HST
D BMES^XPDUTL(" Setting TITLE for VA-PT RECORD FLAG STATUS")
N GMTSTTL,GMTSIEN S GMTSTTL="PT RECORD FLAG STATUS"
S GMTSIEN=$O(^GMT(142,"B","VA-PT RECORD FLAG STATUS",""))
I +$G(GMTSIEN)'>0 D Q
.D BMES^XPDUTL(" Health Summary Type VA-PT RECORD FLAG STATUS not found.")
.D MES^XPDUTL(" Contact VA National Service Desk for assistance.")
N DIE,DA,DR
S DIE=142,DA=GMTSIEN,DR=".02////PT RECORD FLAG STATUS"
L +^GMT(142,DA):DILOCKTM
D ^DIE
L -^GMT(142,DA):DILOCKTM
D MES^XPDUTL(" TITLE successfully set")
Q
PREG ;Component Data
;0;;259
;.01;;WH PREGNANCY DOCUMENTATION
;1;;PDOC;GMTSWVC1
;1.1;;1
;1.1;1;GETDATA;WVRPCPT(SUB,DFN,TYP,BEG,END,NUM)
;2;;1
;3;;WHP
;3.5;;3
;3.5;1;This component displays the pregnancy data stored in the Women's Health
;3.5;2;package for a particular patient. The user can specify time and
;3.5;3;occurrence limits.
;4;;1
;5;;
;6;;
;7;;0
;8;;
;9;;Pregnancy Status
;10;;
;11;;
;12;;
;13;;
;14;;
;PDX;;1
Q
;
LAC ;Component Data
;0;;260
;.01;;WH LACTATION DOCUMENTATION
;1;;LDOC;GMTSWVC1
;1.1;;1
;1.1;1;GETDATA;WVRPCPT(SUB,DFN,TYP,BEG,END,NUM)
;2;;1
;3;;WHL
;3.5;;3
;3.5;1;This component displays the lactation data stored in the Women's Health
;3.5;2;package for a particular patient. The user can specify time and
;3.5;3;occurrence limits.
;4;;1
;5;;
;6;;
;7;;0
;8;;
;9;;Lactation Status
;10;;
;11;;
;12;;
;13;;
;14;;
;PDX;;1
Q
;
PANDL ;Component Data
;0;;266
;.01;;WH PREGNANCY & LACTATION DOC
;1;;ALL;GMTSWVC1
;1.1;;1
;1.1;1;GETDATA;WVRPCPT(SUB,DFN,TYP,BEG,END,NUM)
;2;;1
;3;;WHPL
;3.5;;3
;3.5;1;This component displays the pregnancy and lactation data stored in the
;3.5;2;Women's Health package for a particular patient. The user can specify
;3.5;3;time and occurrence limits.
;4;;1
;5;;
;6;;
;7;;0
;8;;
;9;;Preg. & Lac. Status
;10;;
;11;;
;12;;
;13;;
;14;;
;PDX;;1
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMTSP067 4177 printed Dec 13, 2024@01:58:36 Page 2
GMTSP067 ;ISP/RFR - HEALTH SUMMARY PATCH 67 INSTALLATION TASKS ;Oct 16, 2019@11:38
+1 ;;2.7;Health Summary;**67**;Oct 20, 1995;Build 538
+2 QUIT
POST ;POST-INSTALL
+1 NEW GMTSIN,GMTSLIM,GMTSINST,GMTSTL,GMTSINST,GMTSTOT,GMTSBLD,GMTSCPS,GMTSCP,GMTSQT
+2 NEW GMTSCI,INCLUDE,XPDIDTOT
+3 SET GMTSCPS="PREG;LAC;PANDL"
SET XPDIDTOT=$LENGTH(GMTSCPS,";")+2
+4 DO UPDATE^XPDID(0)
+5 FOR GMTSCI=1:1
if '$LENGTH($PIECE(GMTSCPS,";",GMTSCI))
QUIT
Begin DoDot:1
+6 SET GMTSCP=$PIECE(GMTSCPS,";",GMTSCI)
+7 DO ARRAY
if '$DATA(GMTSIN)
QUIT
+8 IF $LENGTH($GET(GMTSIN("TIM")))
IF +($GET(GMTSIN(0)))>0
SET GMTSLIM(+($GET(GMTSIN(0))),"TIM")=$GET(GMTSIN("TIM"))
+9 IF $LENGTH($GET(GMTSIN("OCC")))
IF +($GET(GMTSIN(0)))>0
SET GMTSLIM(+($GET(GMTSIN(0))),"OCC")=$GET(GMTSIN("OCC"))
+10 SET GMTSINST=$$ADD^GMTSXPD1(.GMTSIN)
SET GMTSTOT=+($GET(GMTSTOT))+($GET(GMTSINST))
+11 DO UPDATE^XPDID(GMTSCI)
End DoDot:1
+12 ; Rebuild Ad Hoc Health Summary Type
+13 IF $GET(GMTSTOT)>0
SET INCLUDE=+$GET(XPDQUES("POS1"))
DO ENPOST^GMTSLOAD
+14 DO LIM
+15 IF $LENGTH($TEXT(SEND^GMTSXPS1))
Begin DoDot:1
+16 NEW GMTSHORT,XPDIDVT
SET GMTSHORT=1
SET GMTSINST=""
SET GMTSBLD=XPDNM
DO SEND^GMTSXPS1
DO INIT^XPDID
End DoDot:1
+17 DO UPDATE^XPDID(GMTSCI)
+18 DO TITLE
DO UPDATE^XPDID(XPDIDTOT)
+19 QUIT
ARRAY ; Build Array
+1 KILL GMTSIN
NEW GMTSI,GMTSTXT,GMTSEX,GMTSFLD,GMTSUB,GMTSVAL,GMTSPDX
SET GMTSPDX=1
SET GMTSCP=$GET(GMTSCP)
if '$LENGTH(GMTSCP)
QUIT
+2 FOR GMTSI=1:1
Begin DoDot:1
+3 SET GMTSTXT=""
SET GMTSEX="S GMTSTXT=$T("_GMTSCP_"+"_GMTSI_")"
XECUTE GMTSEX
if $LENGTH(GMTSTXT,";")'>3
SET GMTSTXT=""
if '$LENGTH(GMTSTXT)
QUIT
+4 SET GMTSFLD=$PIECE(GMTSTXT,";",2)
SET GMTSUB=$PIECE(GMTSTXT,";",3)
SET GMTSVAL=$PIECE(GMTSTXT,";",4)
+5 if $EXTRACT(GMTSFLD,1)=1&(+GMTSFLD<2)
SET GMTSVAL=$PIECE(GMTSTXT,";",4,5)
+6 if $EXTRACT(GMTSFLD,1)=" "!('$LENGTH(GMTSFLD))
SET GMTSTXT=""
if GMTSTXT=""
QUIT
+7 if $LENGTH(GMTSFLD)&('$LENGTH(GMTSUB))
SET GMTSIN(GMTSFLD)=GMTSVAL
if $LENGTH(GMTSFLD)&('$LENGTH(GMTSUB))
QUIT
+8 if $LENGTH(GMTSFLD)&($LENGTH(GMTSUB))
SET GMTSIN(GMTSFLD,GMTSUB)=GMTSVAL
+9 if $GET(GMTSFLD)=7&(+($GET(GMTSUB))>0)
SET GMTSPDX=0
End DoDot:1
if '$LENGTH(GMTSTXT)
QUIT
+10 if +($GET(GMTSPDX))=0
KILL GMTSIN("PDX")
+11 QUIT
LIM ; Limits
+1 NEW GMTSI,GMTST,GMTSO,GMTSA
SET GMTSI=0
FOR
SET GMTSI=$ORDER(GMTSLIM(GMTSI))
if +GMTSI=0
QUIT
Begin DoDot:1
+2 SET GMTSA=$PIECE($GET(^GMT(142.1,+($GET(GMTSI)),0)),"^",3)
SET GMTST=$GET(GMTSLIM(+GMTSI,"TIM"))
if '$LENGTH(GMTST)
SET GMTST=$SELECT(GMTSA="Y ":"1Y ",1:"")
+3 SET GMTSA=$PIECE($GET(^GMT(142.1,+($GET(GMTSI)),0)),"^",5)
SET GMTSO=$GET(GMTSLIM(+GMTSI,"OCC"))
if '$LENGTH(GMTSO)
SET GMTSO=$SELECT(GMTSA="Y ":"10 ",1:"")
+4 DO TO^GMTSXPD3(GMTSI,GMTST,GMTSO)
End DoDot:1
+5 QUIT
TITLE ;set title for HST
+1 DO BMES^XPDUTL(" Setting TITLE for VA-PT RECORD FLAG STATUS")
+2 NEW GMTSTTL,GMTSIEN
SET GMTSTTL="PT RECORD FLAG STATUS"
+3 SET GMTSIEN=$ORDER(^GMT(142,"B","VA-PT RECORD FLAG STATUS",""))
+4 IF +$GET(GMTSIEN)'>0
Begin DoDot:1
+5 DO BMES^XPDUTL(" Health Summary Type VA-PT RECORD FLAG STATUS not found.")
+6 DO MES^XPDUTL(" Contact VA National Service Desk for assistance.")
End DoDot:1
QUIT
+7 NEW DIE,DA,DR
+8 SET DIE=142
SET DA=GMTSIEN
SET DR=".02////PT RECORD FLAG STATUS"
+9 LOCK +^GMT(142,DA):DILOCKTM
+10 DO ^DIE
+11 LOCK -^GMT(142,DA):DILOCKTM
+12 DO MES^XPDUTL(" TITLE successfully set")
+13 QUIT
PREG ;Component Data
+1 ;0;;259
+2 ;.01;;WH PREGNANCY DOCUMENTATION
+3 ;1;;PDOC;GMTSWVC1
+4 ;1.1;;1
+5 ;1.1;1;GETDATA;WVRPCPT(SUB,DFN,TYP,BEG,END,NUM)
+6 ;2;;1
+7 ;3;;WHP
+8 ;3.5;;3
+9 ;3.5;1;This component displays the pregnancy data stored in the Women's Health
+10 ;3.5;2;package for a particular patient. The user can specify time and
+11 ;3.5;3;occurrence limits.
+12 ;4;;1
+13 ;5;;
+14 ;6;;
+15 ;7;;0
+16 ;8;;
+17 ;9;;Pregnancy Status
+18 ;10;;
+19 ;11;;
+20 ;12;;
+21 ;13;;
+22 ;14;;
+23 ;PDX;;1
+24 QUIT
+25 ;
LAC ;Component Data
+1 ;0;;260
+2 ;.01;;WH LACTATION DOCUMENTATION
+3 ;1;;LDOC;GMTSWVC1
+4 ;1.1;;1
+5 ;1.1;1;GETDATA;WVRPCPT(SUB,DFN,TYP,BEG,END,NUM)
+6 ;2;;1
+7 ;3;;WHL
+8 ;3.5;;3
+9 ;3.5;1;This component displays the lactation data stored in the Women's Health
+10 ;3.5;2;package for a particular patient. The user can specify time and
+11 ;3.5;3;occurrence limits.
+12 ;4;;1
+13 ;5;;
+14 ;6;;
+15 ;7;;0
+16 ;8;;
+17 ;9;;Lactation Status
+18 ;10;;
+19 ;11;;
+20 ;12;;
+21 ;13;;
+22 ;14;;
+23 ;PDX;;1
+24 QUIT
+25 ;
PANDL ;Component Data
+1 ;0;;266
+2 ;.01;;WH PREGNANCY & LACTATION DOC
+3 ;1;;ALL;GMTSWVC1
+4 ;1.1;;1
+5 ;1.1;1;GETDATA;WVRPCPT(SUB,DFN,TYP,BEG,END,NUM)
+6 ;2;;1
+7 ;3;;WHPL
+8 ;3.5;;3
+9 ;3.5;1;This component displays the pregnancy and lactation data stored in the
+10 ;3.5;2;Women's Health package for a particular patient. The user can specify
+11 ;3.5;3;time and occurrence limits.
+12 ;4;;1
+13 ;5;;
+14 ;6;;
+15 ;7;;0
+16 ;8;;
+17 ;9;;Preg. & Lac. Status
+18 ;10;;
+19 ;11;;
+20 ;12;;
+21 ;13;;
+22 ;14;;
+23 ;PDX;;1
+24 QUIT
+25 ;