LEX2081A ;ISL/KER - LEX*2.0*81 Pre/Post Install (cont) ;08/17/2011
;;2.0;LEXICON UTILITY;**81**;Sep 23, 1996;Build 1
;
; Global Variables
; ^LEX(757,
; ^LEX(757.001
; ^LEX(757.01
; ^LEX(757.02
; ^LEX(757.1
;
; External References
; ^%ZTLOAD ICR 10063
; ^DIK ICR 10013
; ENALL^DIK ICR 10013
; IX1^DIK ICR 10013
; IX2^DIK ICR 10013
; MES^XPDUTL ICR 10141
;
Q
POST ; Post-Install (Continue)
D AVA,AWRD,CHG
Q
CHG ; Changes
D CHG1,CHG2
Q
AVA ; AVA Cross-Reference
N Y,ZTQUEUED,ZTREQ,ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE
S ZTRTN="AVAT^LEX2081A",ZTIO="",ZTDTH=$H
S ZTDESC="Lexicon Rebuild AVA Cross-Reference" D ^%ZTLOAD
D MES^XPDUTL(" Checking cross-references")
Q
AVAT ; AVA Cross-Reference (task)
N DIK S DIK="^LEX(757.02,",DIK(1)="2^AVA" D ENALL^DIK
S:$D(ZTQUEUED) ZTREQ="@"
Q
AWRD ; AWRD Cross-Reference
N Y,ZTQUEUED,ZTREQ,ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE
S ZTRTN="AWRDT^LEX2081A",ZTIO="",ZTDTH=$H
S ZTDESC="Lexicon Rebuild AWRD Cross-Reference" D ^%ZTLOAD
D:+($G(ZTSK))>0 MES^XPDUTL((" A task has been created to rebuild the AWRD cross-reference (#"_+($G(ZTSK))_")"))
D:+($G(ZTSK))'>0 MES^XPDUTL(" Rebuilding the AWRD cross-reference")
Q
AWRDT ; AWRD Cross-Reference (task)
N DIK S DIK="^LEX(757.01,",DIK(1)="2^AWRD" D ENALL^DIK
S:$D(ZTQUEUED) ZTREQ="@"
Q
CHG1 ; Change 1 - Sleep Deprivation/Lack of Adequate Sleep
N CODE,DA,DIK,EFF,EX,FQ,MC,OM,SAB,SO
; Key Words for #331586, "Lack of Adequate Sleep"
S EX=331586
S ^LEX(757.01,EX,5,0)="^757.18^2^2"
S ^LEX(757.01,EX,5,1,0)="SLEEP"
S ^LEX(757.01,EX,5,2,0)="DEPRIVATION"
S DA=EX,DIK="^LEX(757.01," D IX1^DIK
; Key Words for #111265, "Sleep Deprivation"
S EX=111265
S ^LEX(757.01,EX,5,0)="^757.18^4^4"
S ^LEX(757.01,EX,5,1,0)="LACK"
S ^LEX(757.01,EX,5,2,0)="OF"
S ^LEX(757.01,EX,5,3,0)="SLEEP"
S ^LEX(757.01,EX,5,4,0)="ADEQUATE"
S DA=EX,DIK="^LEX(757.01," D IX1^DIK
; ICD Code for #111265, "Sleep Deprivation"
S MC=22890,FQ=22890,EX=111265,SO=117782,CODE="V69.4",EFF=3041001,SAB=1
S ^LEX(757.02,SO,0)=EX_"^"_CODE_"^"_SAB_"^"_MC_"^0^^1"
S ^LEX(757.02,SO,4,0)="^757.28D^1^1"
S ^LEX(757.02,SO,4,1,0)=EFF_"^1",DA=SO,DIK="^LEX(757.02," D IX1^DIK
; Move Expression to New Major Concept as a Synonym
S MC=22890,OM=7112472
S DA=7224943,DIK="^LEX(757.01," D IX2^DIK
S ^LEX(757.01,7224943,0)="Sleep Deprivation"
S ^LEX(757.01,7224943,1)=MC_"^2^D^1"
S DA=7224943,DIK="^LEX(757.01," D IX1^DIK
S DA=7224944,DIK="^LEX(757.01," D IX2^DIK
S ^LEX(757.01,7224944,0)="Sleep Deprivation (finding)"
S ^LEX(757.01,7224944,1)=MC_"^8^D^15"
S DA=7224944,DIK="^LEX(757.01," D IX1^DIK
; Move Semantic Map to new Major Concept
S DA=7112472,DIK="^LEX(757.1," D IX2^DIK
S ^LEX(757.1,7112472,0)=MC_"^10^71"
S DA=7112472,DIK="^LEX(757.1," D IX1^DIK
; Move Code to new Major Concept
S DA=7112472,DIK="^LEX(757.02," D IX2^DIK
s ^LEX(757.02,7112472,0)="7224943^130989002^56^"_MC_"^1^^1"
S DA=7112472,DIK="^LEX(757.02," D IX1^DIK
; Delete old Frequency
I $D(^LEX(757.001,OM,0)) D
. S DA=OM,DIK="^LEX(757.001," D ^DIK
; Delete old Major Concept Map
I $D(^LEX(757,OM,0)) D
. S DA=OM,DIK="^LEX(757," D ^DIK
Q
CHG2 ; Change 2 - Loss of Consciousness
S MC=7367393,EX=7941742,SO=270124,CODE="780.09",EFF=2781001,SAB=1
; Frequency
S DA=7367393,DIK="^LEX(757.001," D IX2^DIK
S ^LEX(757.001,7367393,0)="7367393^6^6"
S DA=7367393,DIK="^LEX(757.001," D IX1^DIK
; Expression
S DA=EX,DIK="^LEX(757.01," D IX2^DIK
S ^LEX(757.01,7941742,0)="Loss of Consciousness"
S DA=EX,DIK="^LEX(757.01," D IX1^DIK
; Code
S ^LEX(757.02,SO,0)=EX_"^"_CODE_"^"_SAB_"^"_MC_"^0^^1"
S ^LEX(757.02,SO,4,0)="^757.28D^1^1"
S ^LEX(757.02,SO,4,1,0)=EFF_"^1"
S DA=SO,DIK="^LEX(757.02," D IX1^DIK
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLEX2081A 3930 printed Nov 22, 2024@17:15:07 Page 2
LEX2081A ;ISL/KER - LEX*2.0*81 Pre/Post Install (cont) ;08/17/2011
+1 ;;2.0;LEXICON UTILITY;**81**;Sep 23, 1996;Build 1
+2 ;
+3 ; Global Variables
+4 ; ^LEX(757,
+5 ; ^LEX(757.001
+6 ; ^LEX(757.01
+7 ; ^LEX(757.02
+8 ; ^LEX(757.1
+9 ;
+10 ; External References
+11 ; ^%ZTLOAD ICR 10063
+12 ; ^DIK ICR 10013
+13 ; ENALL^DIK ICR 10013
+14 ; IX1^DIK ICR 10013
+15 ; IX2^DIK ICR 10013
+16 ; MES^XPDUTL ICR 10141
+17 ;
+18 QUIT
POST ; Post-Install (Continue)
+1 DO AVA
DO AWRD
DO CHG
+2 QUIT
CHG ; Changes
+1 DO CHG1
DO CHG2
+2 QUIT
AVA ; AVA Cross-Reference
+1 NEW Y,ZTQUEUED,ZTREQ,ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE
+2 SET ZTRTN="AVAT^LEX2081A"
SET ZTIO=""
SET ZTDTH=$HOROLOG
+3 SET ZTDESC="Lexicon Rebuild AVA Cross-Reference"
DO ^%ZTLOAD
+4 DO MES^XPDUTL(" Checking cross-references")
+5 QUIT
AVAT ; AVA Cross-Reference (task)
+1 NEW DIK
SET DIK="^LEX(757.02,"
SET DIK(1)="2^AVA"
DO ENALL^DIK
+2 if $DATA(ZTQUEUED)
SET ZTREQ="@"
+3 QUIT
AWRD ; AWRD Cross-Reference
+1 NEW Y,ZTQUEUED,ZTREQ,ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE
+2 SET ZTRTN="AWRDT^LEX2081A"
SET ZTIO=""
SET ZTDTH=$HOROLOG
+3 SET ZTDESC="Lexicon Rebuild AWRD Cross-Reference"
DO ^%ZTLOAD
+4 if +($GET(ZTSK))>0
DO MES^XPDUTL((" A task has been created to rebuild the AWRD cross-reference (#"_+($GET(ZTSK))_")"))
+5 if +($GET(ZTSK))'>0
DO MES^XPDUTL(" Rebuilding the AWRD cross-reference")
+6 QUIT
AWRDT ; AWRD Cross-Reference (task)
+1 NEW DIK
SET DIK="^LEX(757.01,"
SET DIK(1)="2^AWRD"
DO ENALL^DIK
+2 if $DATA(ZTQUEUED)
SET ZTREQ="@"
+3 QUIT
CHG1 ; Change 1 - Sleep Deprivation/Lack of Adequate Sleep
+1 NEW CODE,DA,DIK,EFF,EX,FQ,MC,OM,SAB,SO
+2 ; Key Words for #331586, "Lack of Adequate Sleep"
+3 SET EX=331586
+4 SET ^LEX(757.01,EX,5,0)="^757.18^2^2"
+5 SET ^LEX(757.01,EX,5,1,0)="SLEEP"
+6 SET ^LEX(757.01,EX,5,2,0)="DEPRIVATION"
+7 SET DA=EX
SET DIK="^LEX(757.01,"
DO IX1^DIK
+8 ; Key Words for #111265, "Sleep Deprivation"
+9 SET EX=111265
+10 SET ^LEX(757.01,EX,5,0)="^757.18^4^4"
+11 SET ^LEX(757.01,EX,5,1,0)="LACK"
+12 SET ^LEX(757.01,EX,5,2,0)="OF"
+13 SET ^LEX(757.01,EX,5,3,0)="SLEEP"
+14 SET ^LEX(757.01,EX,5,4,0)="ADEQUATE"
+15 SET DA=EX
SET DIK="^LEX(757.01,"
DO IX1^DIK
+16 ; ICD Code for #111265, "Sleep Deprivation"
+17 SET MC=22890
SET FQ=22890
SET EX=111265
SET SO=117782
SET CODE="V69.4"
SET EFF=3041001
SET SAB=1
+18 SET ^LEX(757.02,SO,0)=EX_"^"_CODE_"^"_SAB_"^"_MC_"^0^^1"
+19 SET ^LEX(757.02,SO,4,0)="^757.28D^1^1"
+20 SET ^LEX(757.02,SO,4,1,0)=EFF_"^1"
SET DA=SO
SET DIK="^LEX(757.02,"
DO IX1^DIK
+21 ; Move Expression to New Major Concept as a Synonym
+22 SET MC=22890
SET OM=7112472
+23 SET DA=7224943
SET DIK="^LEX(757.01,"
DO IX2^DIK
+24 SET ^LEX(757.01,7224943,0)="Sleep Deprivation"
+25 SET ^LEX(757.01,7224943,1)=MC_"^2^D^1"
+26 SET DA=7224943
SET DIK="^LEX(757.01,"
DO IX1^DIK
+27 SET DA=7224944
SET DIK="^LEX(757.01,"
DO IX2^DIK
+28 SET ^LEX(757.01,7224944,0)="Sleep Deprivation (finding)"
+29 SET ^LEX(757.01,7224944,1)=MC_"^8^D^15"
+30 SET DA=7224944
SET DIK="^LEX(757.01,"
DO IX1^DIK
+31 ; Move Semantic Map to new Major Concept
+32 SET DA=7112472
SET DIK="^LEX(757.1,"
DO IX2^DIK
+33 SET ^LEX(757.1,7112472,0)=MC_"^10^71"
+34 SET DA=7112472
SET DIK="^LEX(757.1,"
DO IX1^DIK
+35 ; Move Code to new Major Concept
+36 SET DA=7112472
SET DIK="^LEX(757.02,"
DO IX2^DIK
+37 SET ^LEX(757.02,7112472,0)="7224943^130989002^56^"_MC_"^1^^1"
+38 SET DA=7112472
SET DIK="^LEX(757.02,"
DO IX1^DIK
+39 ; Delete old Frequency
+40 IF $DATA(^LEX(757.001,OM,0))
Begin DoDot:1
+41 SET DA=OM
SET DIK="^LEX(757.001,"
DO ^DIK
End DoDot:1
+42 ; Delete old Major Concept Map
+43 IF $DATA(^LEX(757,OM,0))
Begin DoDot:1
+44 SET DA=OM
SET DIK="^LEX(757,"
DO ^DIK
End DoDot:1
+45 QUIT
CHG2 ; Change 2 - Loss of Consciousness
+1 SET MC=7367393
SET EX=7941742
SET SO=270124
SET CODE="780.09"
SET EFF=2781001
SET SAB=1
+2 ; Frequency
+3 SET DA=7367393
SET DIK="^LEX(757.001,"
DO IX2^DIK
+4 SET ^LEX(757.001,7367393,0)="7367393^6^6"
+5 SET DA=7367393
SET DIK="^LEX(757.001,"
DO IX1^DIK
+6 ; Expression
+7 SET DA=EX
SET DIK="^LEX(757.01,"
DO IX2^DIK
+8 SET ^LEX(757.01,7941742,0)="Loss of Consciousness"
+9 SET DA=EX
SET DIK="^LEX(757.01,"
DO IX1^DIK
+10 ; Code
+11 SET ^LEX(757.02,SO,0)=EX_"^"_CODE_"^"_SAB_"^"_MC_"^0^^1"
+12 SET ^LEX(757.02,SO,4,0)="^757.28D^1^1"
+13 SET ^LEX(757.02,SO,4,1,0)=EFF_"^1"
+14 SET DA=SO
SET DIK="^LEX(757.02,"
DO IX1^DIK
+15 QUIT