TIUE290 ;SLC/WAT - Environment check for TIU*1.0*290 ;Oct 22, 2019@11:16
;;1.0;TEXT INTEGRATION UTILITIES;**290**;Jun 20, 1997;Build 548
;check for items with same name
N TIU290IN
N TIUI,TITLESTR,TITLES,TIUTLDA
S TIU290IN=$$PATCH^XPDUTL("TIU*1.0*290") Q:+$G(TIU290IN)
W !,"This patch installs new document classes and titles."
W !,"I am checking to see if you already have document classes"
W !,"or titles of the same name.",!
N TIUDCDA,TIUDCNAM
F TIUDCNAM="SMART NOTES","WOMEN'S HEALTH NOTES" D
. S TIUDCDA=$$FIND(TIUDCNAM,"DC")
. I +TIUDCDA>0 S XPDABORT=2 W !,"Doc Class match found for """_TIUDCNAM_"""",!
F TIUI=1:1 S TITLESTR=$P($T(TITLES+TIUI),";",3) Q:TITLESTR="EOL" D
. S TITLESTR=$P(TITLESTR,U) Q:$L(TITLESTR)'>0
. S TIUTLDA=$$FIND(TITLESTR,"DOC")
. I +TIUTLDA>0 S XPDABORT=2 W !,"Title match found for """_TITLESTR_"""",!
I $G(XPDABORT)=2 D
. W !!,"Installation cannot continue until these issues are resolved.",!
. W !,"Please review the ""How to Resolve Duplicate Document Classes or Titles""",!,"section of the CPRS v31b Set up and Configuration Guide.",!!
. N X,Y,DIR
. S DIR(0)="EA",DIR("A")=" Press return to continue "
. D ^DIR
Q
;
FIND(TIUNM,TYPE) ; Find IEN of Document Definition
N TIUY,TIUPOP S (TIUPOP,TIUY)=0
F S TIUY=$O(^TIU(8925.1,"B",TIUNM,TIUY)) Q:+TIUY'>0 D Q:TIUPOP
. I $P($G(^TIU(8925.1,+TIUY,0)),U,4)=TYPE S TIUPOP=1
Q TIUY
;
TITLES ; list of titles NAME
;;HEALTHELIVING ASSESSMENT SUMMARY
;;LACTATION STATUS UPDATE REVIEW
;;PREGNANCY STATUS UPDATE REVIEW
;;SMART BREAST IMAGING FOLLOW-UP
;;SMART PATIENT NOTIFICATION
;;SMART OUTSIDE BREAST IMAGE RESULTS
;;EOL
INCOBJ(TIUNAME) ;Include TIU DOCUMENT DEFINITION in build?
I TIUNAME="VA-WH POTENTIAL TERATOGENIC ORDERS" Q 1
I TIUNAME="VA-WH POTENTIAL UNSAFE ORDERS" Q 1
I TIUNAME="VA-WH RECENT PREGNANT STATUS" Q 1
I TIUNAME="VA-WH RECENT LACTATION STATUS" Q 1
I TIUNAME="VA-WH SRN TEXT LACTATION" Q 1
I TIUNAME="VA-WH SRN TEXT PREGNANCY" Q 1
I TIUNAME="VA-WH RECENT LABORATORY PREGNANCY TEST" Q 1
I TIUNAME="VA-REMINDER TEXT FOR REMINDER ORDER CHECK" Q 1
I TIUNAME="VA-SMART TEXT FOR ALERT" Q 1
Q 0
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HTIUE290 2184 printed Oct 16, 2024@18:40:31 Page 2
TIUE290 ;SLC/WAT - Environment check for TIU*1.0*290 ;Oct 22, 2019@11:16
+1 ;;1.0;TEXT INTEGRATION UTILITIES;**290**;Jun 20, 1997;Build 548
+2 ;check for items with same name
+3 NEW TIU290IN
+4 NEW TIUI,TITLESTR,TITLES,TIUTLDA
+5 SET TIU290IN=$$PATCH^XPDUTL("TIU*1.0*290")
if +$GET(TIU290IN)
QUIT
+6 WRITE !,"This patch installs new document classes and titles."
+7 WRITE !,"I am checking to see if you already have document classes"
+8 WRITE !,"or titles of the same name.",!
+9 NEW TIUDCDA,TIUDCNAM
+10 FOR TIUDCNAM="SMART NOTES","WOMEN'S HEALTH NOTES"
Begin DoDot:1
+11 SET TIUDCDA=$$FIND(TIUDCNAM,"DC")
+12 IF +TIUDCDA>0
SET XPDABORT=2
WRITE !,"Doc Class match found for """_TIUDCNAM_"""",!
End DoDot:1
+13 FOR TIUI=1:1
SET TITLESTR=$PIECE($TEXT(TITLES+TIUI),";",3)
if TITLESTR="EOL"
QUIT
Begin DoDot:1
+14 SET TITLESTR=$PIECE(TITLESTR,U)
if $LENGTH(TITLESTR)'>0
QUIT
+15 SET TIUTLDA=$$FIND(TITLESTR,"DOC")
+16 IF +TIUTLDA>0
SET XPDABORT=2
WRITE !,"Title match found for """_TITLESTR_"""",!
End DoDot:1
+17 IF $GET(XPDABORT)=2
Begin DoDot:1
+18 WRITE !!,"Installation cannot continue until these issues are resolved.",!
+19 WRITE !,"Please review the ""How to Resolve Duplicate Document Classes or Titles""",!,"section of the CPRS v31b Set up and Configuration Guide.",!!
+20 NEW X,Y,DIR
+21 SET DIR(0)="EA"
SET DIR("A")=" Press return to continue "
+22 DO ^DIR
End DoDot:1
+23 QUIT
+24 ;
FIND(TIUNM,TYPE) ; Find IEN of Document Definition
+1 NEW TIUY,TIUPOP
SET (TIUPOP,TIUY)=0
+2 FOR
SET TIUY=$ORDER(^TIU(8925.1,"B",TIUNM,TIUY))
if +TIUY'>0
QUIT
Begin DoDot:1
+3 IF $PIECE($GET(^TIU(8925.1,+TIUY,0)),U,4)=TYPE
SET TIUPOP=1
End DoDot:1
if TIUPOP
QUIT
+4 QUIT TIUY
+5 ;
TITLES ; list of titles NAME
+1 ;;HEALTHELIVING ASSESSMENT SUMMARY
+2 ;;LACTATION STATUS UPDATE REVIEW
+3 ;;PREGNANCY STATUS UPDATE REVIEW
+4 ;;SMART BREAST IMAGING FOLLOW-UP
+5 ;;SMART PATIENT NOTIFICATION
+6 ;;SMART OUTSIDE BREAST IMAGE RESULTS
+7 ;;EOL
INCOBJ(TIUNAME) ;Include TIU DOCUMENT DEFINITION in build?
+1 IF TIUNAME="VA-WH POTENTIAL TERATOGENIC ORDERS"
QUIT 1
+2 IF TIUNAME="VA-WH POTENTIAL UNSAFE ORDERS"
QUIT 1
+3 IF TIUNAME="VA-WH RECENT PREGNANT STATUS"
QUIT 1
+4 IF TIUNAME="VA-WH RECENT LACTATION STATUS"
QUIT 1
+5 IF TIUNAME="VA-WH SRN TEXT LACTATION"
QUIT 1
+6 IF TIUNAME="VA-WH SRN TEXT PREGNANCY"
QUIT 1
+7 IF TIUNAME="VA-WH RECENT LABORATORY PREGNANCY TEST"
QUIT 1
+8 IF TIUNAME="VA-REMINDER TEXT FOR REMINDER ORDER CHECK"
QUIT 1
+9 IF TIUNAME="VA-SMART TEXT FOR ALERT"
QUIT 1
+10 QUIT 0