GMPLP44I ; SLC/PKR - Update cross-references for Clinical Reminders Index. ;04/18/2014
;;2.0;Problem List;**44**;Aug 25, 1994;Build 92
;
Q
;===========================================
AWRITE(REF) ;Write all the descendants of the array.
N DONE,IND,LEN,LN,PROOT,ROOT,START,TEMP,TEXT
I REF="" Q
S LN=0
S PROOT=$P(REF,")",1)
;Build the root so we can tell when we are done.
S TEMP=$NA(@REF)
S ROOT=$P(TEMP,")",1)
S REF=$Q(@REF)
I REF'[ROOT Q
S DONE=0
F Q:(REF="")!(DONE) D
. S START=$F(REF,ROOT)
. S LEN=$L(REF)
. S IND=$E(REF,START,LEN)
. S LN=LN+1,TEXT(LN)=PROOT_IND_"="_@REF
. S REF=$Q(@REF)
. I REF'[ROOT S DONE=1
D MES^XPDUTL(.TEXT)
Q
;
;===========================================
CACR01 ;Update the cross-reference for the .01 field.
N MSG,NAME,RESULT,XREF
D BMES^XPDUTL("Creating Problem List .01 diagnosis cross-reference.")
S XREF("FILE")=9000011
S XREF("ROOT FILE")=9000011
S XREF("TYPE")="MU"
S XREF("SHORT DESCR")="Clinical Reminders Index for ICD diagnosis code lookup."
S XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
S XREF("DESCR",2)="all patients with a particular ICD diagnosis code and one for"
S XREF("DESCR",3)="finding all the ICD diagnosis codes a patient has. The indexes are"
S XREF("DESCR",4)="stored in the Clinical Reminders Index global as:"
S XREF("DESCR",5)=" ^PXRMINDX(9000011,CODESYS,""ISPP"",CODE,STATUS,PRIORITY,DFN,DLM,DAS)"
S XREF("DESCR",6)=" ^PXRMINDX(9000011,CODESYS,""PSPI"",DFN,STATUS,PRIORITY,CODE,DLM,DAS)"
S XREF("DESCR",7)="respectively."
S XREF("DESCR",8)=" "
S XREF("DESCR",9)="CODESYS is the standard three-character abbreviation for the coding system."
S XREF("DESCR",10)="STATUS can be ""A"" for active or ""I"" for inactive. PRIORITY"
S XREF("DESCR",11)="can be ""A"" for acute or ""C"" for chronic. If PRIORITY is"
S XREF("DESCR",12)="missing, then a ""U"" will be stored in the Index. For"
S XREF("DESCR",13)="Problems whose PRIORITY is ""C"", Clinical Reminders uses"
S XREF("DESCR",14)="today's date for the date of the Problem. In all other"
S XREF("DESCR",15)="cases, Clinical Reminders uses DLM, where DLM is the Date"
S XREF("DESCR",16)="Last Modified. When Problems are ""removed"", then CONDITION"
S XREF("DESCR",17)="is set to ""H"" for hidden. Hidden Problems are not indexed."
S XREF("DESCR",18)="For complete details, see the Clinical Reminders Index"
S XREF("DESCR",19)="Technical Guide/Programmer's Manual."
;
S XREF("EXECUTION")="R"
S XREF("ACTIVITY")="IR"
S XREF("VAL",1)=.01
S XREF("VAL",1,"SUBSCRIPT")=1
S XREF("VAL",2)=.02
S XREF("VAL",2,"SUBSCRIPT")=2
S XREF("VAL",3)=.03
S XREF("VAL",3,"SUBSCRIPT")=3
S XREF("VAL",4)=.12
S XREF("VAL",4,"SUBSCRIPT")=4
S XREF("VAL",5)=1.14
S XREF("VAL",6)=1.02
S XREF("VAL",7)=80202
;
S XREF("NAME")="ACR01"
S XREF("SET")="D SPROB01^GMPLPXRM(.X,.DA)"
S XREF("KILL")="D KPROB01^GMPLPXRM(.X,.DA)"
;Remove any existing cross-references before creating the new one.
D DELIXN^DDMOD(9000011,"ACR","","MSG")
D DELIXN^DDMOD(9000011,"ACR01","","MSG")
K MSG
D CREIXN^DDMOD(.XREF,"",.RESULT,"","MSG")
I RESULT="" D DCERRMSG^GMPLP44I(.MSG,.XREF)
Q
;
;===========================================
CACRMT ;Create the cross-reference for Mapping Targets multiple.
;Make sure the field exists.
I $$GET1^DID(9000011,80300,"","GLOBAL SUBSCRIPT LOCATION")="" Q
N MSG,NAME,RESULT,XREF
D BMES^XPDUTL("Creating Problem List Mapping Targets cross-reference.")
S XREF("FILE")=9000011
S XREF("ROOT FILE")=9000011.803
S XREF("TYPE")="MU"
S XREF("SHORT DESCR")="Clinical Reminders Index for Mapping Targets code lookup."
S XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
S XREF("DESCR",2)="all patients with a particular Mapping Target code and one for"
S XREF("DESCR",3)="finding all the Mapping Target codes a patient has. The indexes are"
S XREF("DESCR",4)="stored in the Clinical Reminders Index global as:"
S XREF("DESCR",5)=" ^PXRMINDX(9000011,CODESYS,""ISPP"",CODE,STATUS,PRIORITY,DFN,DLM,DAS)"
S XREF("DESCR",6)=" ^PXRMINDX(9000011,CODESYS,""PSPI"",DFN,STATUS,PRIORITY,CODE,DLM,DAS)"
S XREF("DESCR",7)="respectively."
S XREF("DESCR",8)=" "
S XREF("DESCR",9)="CODESYS is the standard three-character abbreviation for the coding system."
S XREF("DESCR",10)="STATUS can be ""A"" for active or ""I"" for inactive. PRIORITY"
S XREF("DESCR",11)="can be ""A"" for acute or ""C"" for chronic. If PRIORITY is"
S XREF("DESCR",12)="missing, then a ""U"" will be stored in the Index. For"
S XREF("DESCR",13)="Problems whose PRIORITY is ""C"", Clinical Reminders uses"
S XREF("DESCR",14)="today's date for the date of the Problem. In all other"
S XREF("DESCR",15)="cases, Clinical Reminders uses DLM, where DLM is the Date"
S XREF("DESCR",16)="Last Modified. When Problems are ""removed"", then CONDITION"
S XREF("DESCR",17)="is set to ""H"" for hidden. Hidden Problems are not indexed."
S XREF("DESCR",18)="For complete details, see the Clinical Reminders Index"
S XREF("DESCR",19)="Technical Guide/Programmer's Manual."
;
S XREF("EXECUTION")="R"
S XREF("ACTIVITY")="IR"
S XREF("VAL",1)=.01
S XREF("VAL",1,"SUBSCRIPT")=1
S XREF("VAL",2)=.02
S XREF("VAL",2,"SUBSCRIPT")=2
;
S XREF("NAME")="ACRMT"
S XREF("SET")="D SPROBMT^GMPLPXRM(.X,.DA)"
S XREF("KILL")="D KPROBMT^GMPLPXRM(.X,.DA)"
;Remove any existing cross-references before creating the new one.
D DELIXN^DDMOD(9000011,"ACRMT","","MSG")
K MSG
D CREIXN^DDMOD(.XREF,"",.RESULT,"","MSG")
I RESULT="" D DCERRMSG^GMPLP44I(.MSG,.XREF)
Q
;
;===========================================
CACRSCT ;Create the cross-reference for the SNOMED CT CONCEPT CODE.
;Make sure the field exists.
I $$GET1^DID(9000011,80001,"","GLOBAL SUBSCRIPT LOCATION")="" Q
N MSG,NAME,RESULT,XREF
D BMES^XPDUTL("Creating Problem List SNOMED CT cross-reference.")
S XREF("FILE")=9000011
S XREF("ROOT FILE")=9000011
S XREF("TYPE")="MU"
S XREF("SHORT DESCR")="Clinical Reminders Index for SNOMED CT concept code lookup."
S XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
S XREF("DESCR",2)="all patients with a particular SNOMED CT code and one for"
S XREF("DESCR",3)="finding all the SNOMED CT codes a patient has. The indexes are"
S XREF("DESCR",4)="stored in the Clinical Reminders Index global as:"
S XREF("DESCR",5)=" ^PXRMINDX(9000011,CODESYS,""ISPP"",CODE,STATUS,PRIORITY,DFN,DLM,DAS)"
S XREF("DESCR",6)=" ^PXRMINDX(9000011,CODESYS,""PSPI"",DFN,STATUS,PRIORITY,CODE,DLM,DAS)"
S XREF("DESCR",7)="respectively."
S XREF("DESCR",8)=" "
S XREF("DESCR",9)="CODESYS is the standard three-character abbreviation for the coding system."
S XREF("DESCR",10)="STATUS can be ""A"" for active or ""I"" for inactive. PRIORITY"
S XREF("DESCR",11)="can be ""A"" for acute or ""C"" for chronic. If PRIORITY is"
S XREF("DESCR",12)="missing, then a ""U"" will be stored in the Index. For"
S XREF("DESCR",13)="Problems whose PRIORITY is ""C"", Clinical Reminders uses"
S XREF("DESCR",14)="today's date for the date of the Problem. In all other"
S XREF("DESCR",15)="cases, Clinical Reminders uses DLM, where DLM is the Date"
S XREF("DESCR",16)="Last Modified. When Problems are ""removed"", then CONDITION"
S XREF("DESCR",17)="is set to ""H"" for hidden. Hidden Problems are not indexed."
S XREF("DESCR",18)="For complete details, see the Clinical Reminders Index"
S XREF("DESCR",19)="Technical Guide/Programmer's Manual."
;
S XREF("EXECUTION")="R"
S XREF("ACTIVITY")="IR"
S XREF("VAL",1)=80001
S XREF("VAL",1,"SUBSCRIPT")=1
S XREF("VAL",2)=.02
S XREF("VAL",2,"SUBSCRIPT")=2
S XREF("VAL",3)=.03
S XREF("VAL",3,"SUBSCRIPT")=3
S XREF("VAL",4)=.12
S XREF("VAL",4,"SUBSCRIPT")=4
S XREF("VAL",5)=1.14
S XREF("VAL",6)=1.02
;
S XREF("NAME")="ACRSCT"
S XREF("SET")="D SPROBSCT^GMPLPXRM(.X,.DA)"
S XREF("KILL")="D KPROBSCT^GMPLPXRM(.X,.DA)"
;Remove any existing cross-references before creating the new one.
D DELIXN^DDMOD(9000011,"ACRSCT","","MSG")
K MSG
D CREIXN^DDMOD(.XREF,"",.RESULT,"","MSG")
I RESULT="" D DCERRMSG^GMPLP44I(.MSG,.XREF)
Q
;
;===========================================
CPROBXR ;Create all the cross-references.
D BMES^XPDUTL("Creating Clinical Reminders Index cross-references.")
D CACR01^GMPLP44I
D CACRSCT^GMPLP44I
D CACRMT^GMPLP44I
Q
;
;===========================================
DCERRMSG(MSG,XREF) ;Display cross-reference creation errors.
D BMES^XPDUTL("A cross-reference could not be created. The error message is:")
D AWRITE^DG53862I("MSG")
D BMES^XPDUTL("Cross-reference information:")
D AWRITE^DG53862I("XREF")
Q
;
;===========================================
POST ;Post-init
;Update the cross-references.
D CPROBXR^GMPLP44I
;Rebuild the Index in the new format.
D REINDEX^GMPLP44I
Q
;
;===========================================
REINDEX ;Rebuild the Problem List portion of the Clinical Reminders Index in
;the new structure.
N TEXT,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSK
;If the Index has already been restructured don't do it again.
I $D(^PXRMINDX(9000011,"ICD")),$D(^PXRMINDX(9000011,"DATE BUILT")) D
. S TEXT(1)="The Problem List Index has already been rebuilt, skipping another rebuild."
I $D(^PXRMINDX(9000011,"ICD")),'$D(^PXRMINDX(9000011,"DATE BUILT")) D
. S TEXT(1)="The Problem List Index has been partially rebuilt; not starting another rebuild in case a rebuild is in progress."
. S TEXT(2)="Please make sure the Index is completely rebuilt."
I $D(TEXT(1)) D BMES^XPDUTL(.TEXT) Q
S ZTRTN="INDEX^GMPLPXRM"
S ZTDESC="Problem List Clinical Reminders Index rebuild"
S ZTDTH=$H
S ZTIO=""
D ^%ZTLOAD
S TEXT(1)="Problem List Clinical Reminders Index rebuild queued."
S TEXT(2)="The task number is "_ZTSK_"."
D MES^XPDUTL(.TEXT)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMPLP44I 9949 printed Oct 16, 2024@18:30:56 Page 2
GMPLP44I ; SLC/PKR - Update cross-references for Clinical Reminders Index. ;04/18/2014
+1 ;;2.0;Problem List;**44**;Aug 25, 1994;Build 92
+2 ;
+3 QUIT
+4 ;===========================================
AWRITE(REF) ;Write all the descendants of the array.
+1 NEW DONE,IND,LEN,LN,PROOT,ROOT,START,TEMP,TEXT
+2 IF REF=""
QUIT
+3 SET LN=0
+4 SET PROOT=$PIECE(REF,")",1)
+5 ;Build the root so we can tell when we are done.
+6 SET TEMP=$NAME(@REF)
+7 SET ROOT=$PIECE(TEMP,")",1)
+8 SET REF=$QUERY(@REF)
+9 IF REF'[ROOT
QUIT
+10 SET DONE=0
+11 FOR
if (REF="")!(DONE)
QUIT
Begin DoDot:1
+12 SET START=$FIND(REF,ROOT)
+13 SET LEN=$LENGTH(REF)
+14 SET IND=$EXTRACT(REF,START,LEN)
+15 SET LN=LN+1
SET TEXT(LN)=PROOT_IND_"="_@REF
+16 SET REF=$QUERY(@REF)
+17 IF REF'[ROOT
SET DONE=1
End DoDot:1
+18 DO MES^XPDUTL(.TEXT)
+19 QUIT
+20 ;
+21 ;===========================================
CACR01 ;Update the cross-reference for the .01 field.
+1 NEW MSG,NAME,RESULT,XREF
+2 DO BMES^XPDUTL("Creating Problem List .01 diagnosis cross-reference.")
+3 SET XREF("FILE")=9000011
+4 SET XREF("ROOT FILE")=9000011
+5 SET XREF("TYPE")="MU"
+6 SET XREF("SHORT DESCR")="Clinical Reminders Index for ICD diagnosis code lookup."
+7 SET XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
+8 SET XREF("DESCR",2)="all patients with a particular ICD diagnosis code and one for"
+9 SET XREF("DESCR",3)="finding all the ICD diagnosis codes a patient has. The indexes are"
+10 SET XREF("DESCR",4)="stored in the Clinical Reminders Index global as:"
+11 SET XREF("DESCR",5)=" ^PXRMINDX(9000011,CODESYS,""ISPP"",CODE,STATUS,PRIORITY,DFN,DLM,DAS)"
+12 SET XREF("DESCR",6)=" ^PXRMINDX(9000011,CODESYS,""PSPI"",DFN,STATUS,PRIORITY,CODE,DLM,DAS)"
+13 SET XREF("DESCR",7)="respectively."
+14 SET XREF("DESCR",8)=" "
+15 SET XREF("DESCR",9)="CODESYS is the standard three-character abbreviation for the coding system."
+16 SET XREF("DESCR",10)="STATUS can be ""A"" for active or ""I"" for inactive. PRIORITY"
+17 SET XREF("DESCR",11)="can be ""A"" for acute or ""C"" for chronic. If PRIORITY is"
+18 SET XREF("DESCR",12)="missing, then a ""U"" will be stored in the Index. For"
+19 SET XREF("DESCR",13)="Problems whose PRIORITY is ""C"", Clinical Reminders uses"
+20 SET XREF("DESCR",14)="today's date for the date of the Problem. In all other"
+21 SET XREF("DESCR",15)="cases, Clinical Reminders uses DLM, where DLM is the Date"
+22 SET XREF("DESCR",16)="Last Modified. When Problems are ""removed"", then CONDITION"
+23 SET XREF("DESCR",17)="is set to ""H"" for hidden. Hidden Problems are not indexed."
+24 SET XREF("DESCR",18)="For complete details, see the Clinical Reminders Index"
+25 SET XREF("DESCR",19)="Technical Guide/Programmer's Manual."
+26 ;
+27 SET XREF("EXECUTION")="R"
+28 SET XREF("ACTIVITY")="IR"
+29 SET XREF("VAL",1)=.01
+30 SET XREF("VAL",1,"SUBSCRIPT")=1
+31 SET XREF("VAL",2)=.02
+32 SET XREF("VAL",2,"SUBSCRIPT")=2
+33 SET XREF("VAL",3)=.03
+34 SET XREF("VAL",3,"SUBSCRIPT")=3
+35 SET XREF("VAL",4)=.12
+36 SET XREF("VAL",4,"SUBSCRIPT")=4
+37 SET XREF("VAL",5)=1.14
+38 SET XREF("VAL",6)=1.02
+39 SET XREF("VAL",7)=80202
+40 ;
+41 SET XREF("NAME")="ACR01"
+42 SET XREF("SET")="D SPROB01^GMPLPXRM(.X,.DA)"
+43 SET XREF("KILL")="D KPROB01^GMPLPXRM(.X,.DA)"
+44 ;Remove any existing cross-references before creating the new one.
+45 DO DELIXN^DDMOD(9000011,"ACR","","MSG")
+46 DO DELIXN^DDMOD(9000011,"ACR01","","MSG")
+47 KILL MSG
+48 DO CREIXN^DDMOD(.XREF,"",.RESULT,"","MSG")
+49 IF RESULT=""
DO DCERRMSG^GMPLP44I(.MSG,.XREF)
+50 QUIT
+51 ;
+52 ;===========================================
CACRMT ;Create the cross-reference for Mapping Targets multiple.
+1 ;Make sure the field exists.
+2 IF $$GET1^DID(9000011,80300,"","GLOBAL SUBSCRIPT LOCATION")=""
QUIT
+3 NEW MSG,NAME,RESULT,XREF
+4 DO BMES^XPDUTL("Creating Problem List Mapping Targets cross-reference.")
+5 SET XREF("FILE")=9000011
+6 SET XREF("ROOT FILE")=9000011.803
+7 SET XREF("TYPE")="MU"
+8 SET XREF("SHORT DESCR")="Clinical Reminders Index for Mapping Targets code lookup."
+9 SET XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
+10 SET XREF("DESCR",2)="all patients with a particular Mapping Target code and one for"
+11 SET XREF("DESCR",3)="finding all the Mapping Target codes a patient has. The indexes are"
+12 SET XREF("DESCR",4)="stored in the Clinical Reminders Index global as:"
+13 SET XREF("DESCR",5)=" ^PXRMINDX(9000011,CODESYS,""ISPP"",CODE,STATUS,PRIORITY,DFN,DLM,DAS)"
+14 SET XREF("DESCR",6)=" ^PXRMINDX(9000011,CODESYS,""PSPI"",DFN,STATUS,PRIORITY,CODE,DLM,DAS)"
+15 SET XREF("DESCR",7)="respectively."
+16 SET XREF("DESCR",8)=" "
+17 SET XREF("DESCR",9)="CODESYS is the standard three-character abbreviation for the coding system."
+18 SET XREF("DESCR",10)="STATUS can be ""A"" for active or ""I"" for inactive. PRIORITY"
+19 SET XREF("DESCR",11)="can be ""A"" for acute or ""C"" for chronic. If PRIORITY is"
+20 SET XREF("DESCR",12)="missing, then a ""U"" will be stored in the Index. For"
+21 SET XREF("DESCR",13)="Problems whose PRIORITY is ""C"", Clinical Reminders uses"
+22 SET XREF("DESCR",14)="today's date for the date of the Problem. In all other"
+23 SET XREF("DESCR",15)="cases, Clinical Reminders uses DLM, where DLM is the Date"
+24 SET XREF("DESCR",16)="Last Modified. When Problems are ""removed"", then CONDITION"
+25 SET XREF("DESCR",17)="is set to ""H"" for hidden. Hidden Problems are not indexed."
+26 SET XREF("DESCR",18)="For complete details, see the Clinical Reminders Index"
+27 SET XREF("DESCR",19)="Technical Guide/Programmer's Manual."
+28 ;
+29 SET XREF("EXECUTION")="R"
+30 SET XREF("ACTIVITY")="IR"
+31 SET XREF("VAL",1)=.01
+32 SET XREF("VAL",1,"SUBSCRIPT")=1
+33 SET XREF("VAL",2)=.02
+34 SET XREF("VAL",2,"SUBSCRIPT")=2
+35 ;
+36 SET XREF("NAME")="ACRMT"
+37 SET XREF("SET")="D SPROBMT^GMPLPXRM(.X,.DA)"
+38 SET XREF("KILL")="D KPROBMT^GMPLPXRM(.X,.DA)"
+39 ;Remove any existing cross-references before creating the new one.
+40 DO DELIXN^DDMOD(9000011,"ACRMT","","MSG")
+41 KILL MSG
+42 DO CREIXN^DDMOD(.XREF,"",.RESULT,"","MSG")
+43 IF RESULT=""
DO DCERRMSG^GMPLP44I(.MSG,.XREF)
+44 QUIT
+45 ;
+46 ;===========================================
CACRSCT ;Create the cross-reference for the SNOMED CT CONCEPT CODE.
+1 ;Make sure the field exists.
+2 IF $$GET1^DID(9000011,80001,"","GLOBAL SUBSCRIPT LOCATION")=""
QUIT
+3 NEW MSG,NAME,RESULT,XREF
+4 DO BMES^XPDUTL("Creating Problem List SNOMED CT cross-reference.")
+5 SET XREF("FILE")=9000011
+6 SET XREF("ROOT FILE")=9000011
+7 SET XREF("TYPE")="MU"
+8 SET XREF("SHORT DESCR")="Clinical Reminders Index for SNOMED CT concept code lookup."
+9 SET XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
+10 SET XREF("DESCR",2)="all patients with a particular SNOMED CT code and one for"
+11 SET XREF("DESCR",3)="finding all the SNOMED CT codes a patient has. The indexes are"
+12 SET XREF("DESCR",4)="stored in the Clinical Reminders Index global as:"
+13 SET XREF("DESCR",5)=" ^PXRMINDX(9000011,CODESYS,""ISPP"",CODE,STATUS,PRIORITY,DFN,DLM,DAS)"
+14 SET XREF("DESCR",6)=" ^PXRMINDX(9000011,CODESYS,""PSPI"",DFN,STATUS,PRIORITY,CODE,DLM,DAS)"
+15 SET XREF("DESCR",7)="respectively."
+16 SET XREF("DESCR",8)=" "
+17 SET XREF("DESCR",9)="CODESYS is the standard three-character abbreviation for the coding system."
+18 SET XREF("DESCR",10)="STATUS can be ""A"" for active or ""I"" for inactive. PRIORITY"
+19 SET XREF("DESCR",11)="can be ""A"" for acute or ""C"" for chronic. If PRIORITY is"
+20 SET XREF("DESCR",12)="missing, then a ""U"" will be stored in the Index. For"
+21 SET XREF("DESCR",13)="Problems whose PRIORITY is ""C"", Clinical Reminders uses"
+22 SET XREF("DESCR",14)="today's date for the date of the Problem. In all other"
+23 SET XREF("DESCR",15)="cases, Clinical Reminders uses DLM, where DLM is the Date"
+24 SET XREF("DESCR",16)="Last Modified. When Problems are ""removed"", then CONDITION"
+25 SET XREF("DESCR",17)="is set to ""H"" for hidden. Hidden Problems are not indexed."
+26 SET XREF("DESCR",18)="For complete details, see the Clinical Reminders Index"
+27 SET XREF("DESCR",19)="Technical Guide/Programmer's Manual."
+28 ;
+29 SET XREF("EXECUTION")="R"
+30 SET XREF("ACTIVITY")="IR"
+31 SET XREF("VAL",1)=80001
+32 SET XREF("VAL",1,"SUBSCRIPT")=1
+33 SET XREF("VAL",2)=.02
+34 SET XREF("VAL",2,"SUBSCRIPT")=2
+35 SET XREF("VAL",3)=.03
+36 SET XREF("VAL",3,"SUBSCRIPT")=3
+37 SET XREF("VAL",4)=.12
+38 SET XREF("VAL",4,"SUBSCRIPT")=4
+39 SET XREF("VAL",5)=1.14
+40 SET XREF("VAL",6)=1.02
+41 ;
+42 SET XREF("NAME")="ACRSCT"
+43 SET XREF("SET")="D SPROBSCT^GMPLPXRM(.X,.DA)"
+44 SET XREF("KILL")="D KPROBSCT^GMPLPXRM(.X,.DA)"
+45 ;Remove any existing cross-references before creating the new one.
+46 DO DELIXN^DDMOD(9000011,"ACRSCT","","MSG")
+47 KILL MSG
+48 DO CREIXN^DDMOD(.XREF,"",.RESULT,"","MSG")
+49 IF RESULT=""
DO DCERRMSG^GMPLP44I(.MSG,.XREF)
+50 QUIT
+51 ;
+52 ;===========================================
CPROBXR ;Create all the cross-references.
+1 DO BMES^XPDUTL("Creating Clinical Reminders Index cross-references.")
+2 DO CACR01^GMPLP44I
+3 DO CACRSCT^GMPLP44I
+4 DO CACRMT^GMPLP44I
+5 QUIT
+6 ;
+7 ;===========================================
DCERRMSG(MSG,XREF) ;Display cross-reference creation errors.
+1 DO BMES^XPDUTL("A cross-reference could not be created. The error message is:")
+2 DO AWRITE^DG53862I("MSG")
+3 DO BMES^XPDUTL("Cross-reference information:")
+4 DO AWRITE^DG53862I("XREF")
+5 QUIT
+6 ;
+7 ;===========================================
POST ;Post-init
+1 ;Update the cross-references.
+2 DO CPROBXR^GMPLP44I
+3 ;Rebuild the Index in the new format.
+4 DO REINDEX^GMPLP44I
+5 QUIT
+6 ;
+7 ;===========================================
REINDEX ;Rebuild the Problem List portion of the Clinical Reminders Index in
+1 ;the new structure.
+2 NEW TEXT,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSK
+3 ;If the Index has already been restructured don't do it again.
+4 IF $DATA(^PXRMINDX(9000011,"ICD"))
IF $DATA(^PXRMINDX(9000011,"DATE BUILT"))
Begin DoDot:1
+5 SET TEXT(1)="The Problem List Index has already been rebuilt, skipping another rebuild."
End DoDot:1
+6 IF $DATA(^PXRMINDX(9000011,"ICD"))
IF '$DATA(^PXRMINDX(9000011,"DATE BUILT"))
Begin DoDot:1
+7 SET TEXT(1)="The Problem List Index has been partially rebuilt; not starting another rebuild in case a rebuild is in progress."
+8 SET TEXT(2)="Please make sure the Index is completely rebuilt."
End DoDot:1
+9 IF $DATA(TEXT(1))
DO BMES^XPDUTL(.TEXT)
QUIT
+10 SET ZTRTN="INDEX^GMPLPXRM"
+11 SET ZTDESC="Problem List Clinical Reminders Index rebuild"
+12 SET ZTDTH=$HOROLOG
+13 SET ZTIO=""
+14 DO ^%ZTLOAD
+15 SET TEXT(1)="Problem List Clinical Reminders Index rebuild queued."
+16 SET TEXT(2)="The task number is "_ZTSK_"."
+17 DO MES^XPDUTL(.TEXT)
+18 QUIT
+19 ;