ETS1P1 ;O-OIFO/FM23 - ETS*1.0*1 Post-Install ;04/19/2017
;;1.0;Enterprise Terminology Service;**1**;Mar 20, 2017;Build 7
;;Per VA Directive 6402, this routine should not be modified.
;
Q
PRE ;
; Check if Scientific notation for lowercase "e" is enabled. If so, disable it.
N SN
K ^TMP("ETSSN",$J)
S SN=##class(%SYSTEM.Process).ScientificNotation()
; Quit if already disabled.
I SN=0 Q
; If not, disable it
S ^TMP("ETSSN",$J)=SN
D ##class(%SYSTEM.Process).ScientificNotation(0)
Q
;
PST ; Entry Point for post-install
D MES^XPDUTL(" Starting post-install for ETS*1.0*1")
;
; If Scientific notation for lowercase "e" was disabled, re-enable it
I $G(^TMP("ETSSN",$J))=1 D ##class(%SYSTEM.Process).ScientificNotation(1)
;
; Update LOINC AXIS CODES
D AXIS
;
EX ; exit point
;
D MES^XPDUTL(" Finished post-install of ETS*1.0*1")
Q
;
AXIS ;
; Update Name field of AXIS codes
N CNT,LINE,DATA,NAME,TYPE,FDA,IEN,MESS,N,X,FILENO
D MES^XPDUTL(" - Updating LOINC AXIS CODES")
S CNT=0
F LINE=1:1 S DATA=$P($T(AXISNMS+LINE),";;",2,99) Q:DATA="" D
. S NAME=$P(DATA,";",1),TYPE=$P(DATA,";",2)
. K FDA,IEN,MESS
. S N="" F S N=$O(^ETSLNC(129.12,"B",NAME,N)) Q:'N D
.. S X=$G(^ETSLNC(129.12,N,0))
.. I $P(X,"^",7)=TYPE S IEN=N_","
. I '$D(IEN) D MES^XPDUTL(" - No IEN found for name "_NAME_" and type "_TYPE) Q
. S FILENO=129.12
. S FDA(FILENO,IEN,.01)=NAME_"!"_TYPE
. D FILE^DIE("","FDA","MESS")
. I '$D(MESS) S CNT=CNT+1
D MES^XPDUTL(" - "_CNT_" entries updated")
D MES^XPDUTL(" - Done with LOINC AXIS CODES")
D MES^XPDUTL(" ")
Q
;
AXISNMS ;
;;1ST SPECIMEN;CHALLENGE
;;1ST SPECIMEN;ADJUSTMENT
;;ASTERISK;TIME ASPECT
;;ASTERISK;SYSTEM
;;ASTERISK;SCALE TYPE
;;CLOCK TIME;PROPERTY
;;CLOCK TIME;UNITS
;;DASH;PROPERTY
;;DASH;SCALE TYPE
;;DASH;TIME ASPECT
;;NOT SPECIFIED;TIME ASPECT
;;NOT SPECIFIED;SYSTEM
;;PROCEDURE;TIME ASPECT
;;PROCEDURE;SYSTEM
;;SCORE;UNITS
;;SCORE;PROPERTY
;;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HETS1P1 2015 printed Dec 13, 2024@01:53:55 Page 2
ETS1P1 ;O-OIFO/FM23 - ETS*1.0*1 Post-Install ;04/19/2017
+1 ;;1.0;Enterprise Terminology Service;**1**;Mar 20, 2017;Build 7
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 QUIT
PRE ;
+1 ; Check if Scientific notation for lowercase "e" is enabled. If so, disable it.
+2 NEW SN
+3 KILL ^TMP("ETSSN",$JOB)
+4 SET SN=##class(%SYSTEM.Process).ScientificNotation()
+5 ; Quit if already disabled.
+6 IF SN=0
QUIT
+7 ; If not, disable it
+8 SET ^TMP("ETSSN",$JOB)=SN
+9 DO ##class(%SYSTEM.Process).ScientificNotation(0)
+10 QUIT
+11 ;
PST ; Entry Point for post-install
+1 DO MES^XPDUTL(" Starting post-install for ETS*1.0*1")
+2 ;
+3 ; If Scientific notation for lowercase "e" was disabled, re-enable it
+4 IF $GET(^TMP("ETSSN",$JOB))=1
DO ##class(%SYSTEM.Process).ScientificNotation(1)
+5 ;
+6 ; Update LOINC AXIS CODES
+7 DO AXIS
+8 ;
EX ; exit point
+1 ;
+2 DO MES^XPDUTL(" Finished post-install of ETS*1.0*1")
+3 QUIT
+4 ;
AXIS ;
+1 ; Update Name field of AXIS codes
+2 NEW CNT,LINE,DATA,NAME,TYPE,FDA,IEN,MESS,N,X,FILENO
+3 DO MES^XPDUTL(" - Updating LOINC AXIS CODES")
+4 SET CNT=0
+5 FOR LINE=1:1
SET DATA=$PIECE($TEXT(AXISNMS+LINE),";;",2,99)
if DATA=""
QUIT
Begin DoDot:1
+6 SET NAME=$PIECE(DATA,";",1)
SET TYPE=$PIECE(DATA,";",2)
+7 KILL FDA,IEN,MESS
+8 SET N=""
FOR
SET N=$ORDER(^ETSLNC(129.12,"B",NAME,N))
if 'N
QUIT
Begin DoDot:2
+9 SET X=$GET(^ETSLNC(129.12,N,0))
+10 IF $PIECE(X,"^",7)=TYPE
SET IEN=N_","
End DoDot:2
+11 IF '$DATA(IEN)
DO MES^XPDUTL(" - No IEN found for name "_NAME_" and type "_TYPE)
QUIT
+12 SET FILENO=129.12
+13 SET FDA(FILENO,IEN,.01)=NAME_"!"_TYPE
+14 DO FILE^DIE("","FDA","MESS")
+15 IF '$DATA(MESS)
SET CNT=CNT+1
End DoDot:1
+16 DO MES^XPDUTL(" - "_CNT_" entries updated")
+17 DO MES^XPDUTL(" - Done with LOINC AXIS CODES")
+18 DO MES^XPDUTL(" ")
+19 QUIT
+20 ;
AXISNMS ;
+1 ;;1ST SPECIMEN;CHALLENGE
+2 ;;1ST SPECIMEN;ADJUSTMENT
+3 ;;ASTERISK;TIME ASPECT
+4 ;;ASTERISK;SYSTEM
+5 ;;ASTERISK;SCALE TYPE
+6 ;;CLOCK TIME;PROPERTY
+7 ;;CLOCK TIME;UNITS
+8 ;;DASH;PROPERTY
+9 ;;DASH;SCALE TYPE
+10 ;;DASH;TIME ASPECT
+11 ;;NOT SPECIFIED;TIME ASPECT
+12 ;;NOT SPECIFIED;SYSTEM
+13 ;;PROCEDURE;TIME ASPECT
+14 ;;PROCEDURE;SYSTEM
+15 ;;SCORE;UNITS
+16 ;;SCORE;PROPERTY
+17 ;;