GMTSP105 ; MWA/VMP - Pre install GMTS*2.7*105 ; 6/26/12 10:09am
;;2.7;Health Summary;**105**;;Build 5
;
;
Q
EN ; main entry point
D BMES^XPDUTL("Starting Pre-install Routine...")
D CHANGE
D BMES^XPDUTL("Pre-install Routine Finished")
Q
CHANGE ; changes descriptions
N CPNM,CPIEN
K ^TMP("GMTSP105",$J)
F CPNM="MHA Administration List","MHA Score" I $D(^GMT(142.1,"B",CPNM)) S CPIEN=$O(^GMT(142.1,"B",CPNM,0)) D
.I CPNM="MHA Administration List" D Q
..I $G(^GMT(142.1,CPIEN,3.5,1,0))="This component displays all administrations of intruments in"!($G(^GMT(142.1,CPIEN,3.5,5,0))="Date ranges and maximum occurances apply. ") D
...M ^TMP("GMTSP105",$J,"WP")=^GMT(142.1,CPIEN,3.5)
...S:$G(^TMP("GMTSP105",$J,"WP",1,0))="This component displays all administrations of intruments in" ^TMP("GMTSP105",$J,"WP",1,0)="This component displays all administrations of instruments in"
...S:$G(^TMP("GMTSP105",$J,"WP",5,0))="Date ranges and maximum occurances apply. " ^TMP("GMTSP105",$J,"WP",5,0)="Date ranges and maximum occurrences apply."
...D DIECALL(142.1,CPIEN_",",3.5,"","^TMP(""GMTSP105"",$J,""WP"")")
.I CPNM="MHA Score" D
..I $G(^GMT(142.1,CPIEN,3.5,2,0))="intruments in the mental health package. Tests, interviews and surveys from MH"!($G(^GMT(142.1,CPIEN,3.5,5,0))="Date ranges and maximum occurances apply.") D
...M ^TMP("GMTSP105",$J,"WP")=^GMT(142.1,CPIEN,3.5)
...S:$G(^TMP("GMTSP105",$J,"WP",2,0))="intruments in the mental health package. Tests, interviews and surveys from MH" ^TMP("GMTSP105",$J,"WP",2,0)="instruments in the mental health package. Tests, interviews and surveys from MH"
...S:$G(^TMP("GMTSP105",$J,"WP",5,0))="Date ranges and maximum occurances apply." ^TMP("GMTSP105",$J,"WP",5,0)="Date ranges and maximum occurrences apply."
...D DIECALL(142.1,CPIEN_",",3.5,"","^TMP(""GMTSP105"",$J,""WP"")")
Q
DIECALL(FILE,IENS,FIELD,FLAGS,ROOT) ; FILEMAN CALL
D WP^DIE(FILE,IENS,FIELD,FLAGS,ROOT)
K ^TMP("GMTSP105",$J)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMTSP105 1989 printed Dec 13, 2024@01:58:38 Page 2
GMTSP105 ; MWA/VMP - Pre install GMTS*2.7*105 ; 6/26/12 10:09am
+1 ;;2.7;Health Summary;**105**;;Build 5
+2 ;
+3 ;
+4 QUIT
EN ; main entry point
+1 DO BMES^XPDUTL("Starting Pre-install Routine...")
+2 DO CHANGE
+3 DO BMES^XPDUTL("Pre-install Routine Finished")
+4 QUIT
CHANGE ; changes descriptions
+1 NEW CPNM,CPIEN
+2 KILL ^TMP("GMTSP105",$JOB)
+3 FOR CPNM="MHA Administration List","MHA Score"
IF $DATA(^GMT(142.1,"B",CPNM))
SET CPIEN=$ORDER(^GMT(142.1,"B",CPNM,0))
Begin DoDot:1
+4 IF CPNM="MHA Administration List"
Begin DoDot:2
+5 IF $GET(^GMT(142.1,CPIEN,3.5,1,0))="This component displays all administrations of intruments in"!($GET(^GMT(142.1,CPIEN,3.5,5,0))="Date ranges and maximum occurances apply. ")
Begin DoDot:3
+6 MERGE ^TMP("GMTSP105",$JOB,"WP")=^GMT(142.1,CPIEN,3.5)
+7 if $GET(^TMP("GMTSP105",$JOB,"WP",1,0))="This component displays all administrations of intruments in"
SET ^TMP("GMTSP105",$JOB,"WP",1,0)="This component displays all administrations of instruments in"
+8 if $GET(^TMP("GMTSP105",$JOB,"WP",5,0))="Date ranges and maximum occurances apply. "
SET ^TMP("GMTSP105",$JOB,"WP",5,0)="Date ranges and maximum occurrences apply."
+9 DO DIECALL(142.1,CPIEN_",",3.5,"","^TMP(""GMTSP105"",$J,""WP"")")
End DoDot:3
End DoDot:2
QUIT
+10 IF CPNM="MHA Score"
Begin DoDot:2
+11 IF $GET(^GMT(142.1,CPIEN,3.5,2,0))="intruments in the mental health package. Tests, interviews and surveys from MH"!($GET(^GMT(142.1,CPIEN,3.5,5,0))="Date ranges and maximum occurances apply.")
Begin DoDot:3
+12 MERGE ^TMP("GMTSP105",$JOB,"WP")=^GMT(142.1,CPIEN,3.5)
+13 if $GET(^TMP("GMTSP105",$JOB,"WP",2,0))="intruments in the mental health package. Tests, interviews and surveys from MH"
SET ^TMP("GMTSP105",$JOB,"WP",2,0)="instruments in the mental health package. Tests, interviews and surveys from MH"
+14 if $GET(^TMP("GMTSP105",$JOB,"WP",5,0))="Date ranges and maximum occurances apply."
SET ^TMP("GMTSP105",$JOB,"WP",5,0)="Date ranges and maximum occurrences apply."
+15 DO DIECALL(142.1,CPIEN_",",3.5,"","^TMP(""GMTSP105"",$J,""WP"")")
End DoDot:3
End DoDot:2
End DoDot:1
+16 QUIT
DIECALL(FILE,IENS,FIELD,FLAGS,ROOT) ; FILEMAN CALL
+1 DO WP^DIE(FILE,IENS,FIELD,FLAGS,ROOT)
+2 KILL ^TMP("GMTSP105",$JOB)
+3 QUIT