YS143PIR ;HPS-CS/JSG - YS*5.01*143 POST INSTALL ROUTINE;JAN 2, 2019@10:30
;;5.01;MENTAL HEALTH;**143**;Jan 2, 2019;Build 3
;Examines the SEQUENCE and CHOICE ID fields in the CHOICETYPES file (#601.751) to
;determine if they are set incorrectly and need to be updated for CHOICETYPE ID 336.
;
D MES^XPDUTL("Checking the MH CHOICETYPES file for suitability to apply changes")
S YSPIRCT=$P($G(^YTT(601.751,1272,0)),U) I YSPIRCT'=336 D Q
.D MES^XPDUTL("CHOICETYPE value is not as expected - no update.")
S YSPIRSEQ=$P($G(^YTT(601.751,1272,0)),U,2) I YSPIRSEQ=1 D Q
.D MES^XPDUTL("SEQUENCE value is not as expected - no update.")
S YSPIRCID=$P($G(^YTT(601.751,1272,0)),U,3) I YSPIRCID=1054 D Q
.D MES^XPDUTL("CHOICE ID value is not as expected - no update.")
SET ;Correct the values (CHOICETYPE ID 336 IEN = 1272)
S DIE=601.751,DA=1272
S DR="1////1;2////1054"
D ^DIE
D MES^XPDUTL("The SEQUENCE and CHOICE ID values are updated.")
;
LED ;Update the LAST DATE MODIFIED for SCL9R
D MES^XPDUTL("Update modification date for SCL9R")
S YSPIRIEN=$O(^YTT(601.71,"B","SCL9R",0))
S DIE=601.71,DA=YSPIRIEN
S YSPIRLED=$$NOW^XLFDT,YSPIRLEB="YS*5.01*143"
S DR="17////"_YSPIRLEB_";18////"_YSPIRLED
D ^DIE
D MES^XPDUTL("Update modification date for SCL9R")
END ;
K YSPIRCT,YSPIRSEQ,YSPIRCID,YSPIRLEB,YSPIRLED
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HYS143PIR 1347 printed Dec 13, 2024@02:12:23 Page 2
YS143PIR ;HPS-CS/JSG - YS*5.01*143 POST INSTALL ROUTINE;JAN 2, 2019@10:30
+1 ;;5.01;MENTAL HEALTH;**143**;Jan 2, 2019;Build 3
+2 ;Examines the SEQUENCE and CHOICE ID fields in the CHOICETYPES file (#601.751) to
+3 ;determine if they are set incorrectly and need to be updated for CHOICETYPE ID 336.
+4 ;
+5 DO MES^XPDUTL("Checking the MH CHOICETYPES file for suitability to apply changes")
+6 SET YSPIRCT=$PIECE($GET(^YTT(601.751,1272,0)),U)
IF YSPIRCT'=336
Begin DoDot:1
+7 DO MES^XPDUTL("CHOICETYPE value is not as expected - no update.")
End DoDot:1
QUIT
+8 SET YSPIRSEQ=$PIECE($GET(^YTT(601.751,1272,0)),U,2)
IF YSPIRSEQ=1
Begin DoDot:1
+9 DO MES^XPDUTL("SEQUENCE value is not as expected - no update.")
End DoDot:1
QUIT
+10 SET YSPIRCID=$PIECE($GET(^YTT(601.751,1272,0)),U,3)
IF YSPIRCID=1054
Begin DoDot:1
+11 DO MES^XPDUTL("CHOICE ID value is not as expected - no update.")
End DoDot:1
QUIT
SET ;Correct the values (CHOICETYPE ID 336 IEN = 1272)
+1 SET DIE=601.751
SET DA=1272
+2 SET DR="1////1;2////1054"
+3 DO ^DIE
+4 DO MES^XPDUTL("The SEQUENCE and CHOICE ID values are updated.")
+5 ;
LED ;Update the LAST DATE MODIFIED for SCL9R
+1 DO MES^XPDUTL("Update modification date for SCL9R")
+2 SET YSPIRIEN=$ORDER(^YTT(601.71,"B","SCL9R",0))
+3 SET DIE=601.71
SET DA=YSPIRIEN
+4 SET YSPIRLED=$$NOW^XLFDT
SET YSPIRLEB="YS*5.01*143"
+5 SET DR="17////"_YSPIRLEB_";18////"_YSPIRLED
+6 DO ^DIE
+7 DO MES^XPDUTL("Update modification date for SCL9R")
END ;
+1 KILL YSPIRCT,YSPIRSEQ,YSPIRCID,YSPIRLEB,YSPIRLED
+2 QUIT