BPXRMIDX ;IHS/MSC/MGH - Create cross-references. ;31-May-2013 11:01;DU
;;2.0;CLINICAL REMINDERS;**1001**;Feb 04, 2005;Build 21
;
Q
;===============================================================
CVPRC ;Create cross-reference for V PROCEDURE.
N MSG,RESULT,UITEM,XREF
D BMES^XPDUTL("Creating V PROCEDURE cross-reference.")
;Set the XREF nodes
S XREF("FILE")=9000010.08
S XREF("ROOT FILE")=9000010.08
S XREF("SET")="D SVFILEC^PXPXRM(9000010.08,.X,.DA)"
S XREF("KILL")="D KVFILEC^PXPXRM(9000010.08,.X,.DA)"
S XREF("WHOLE KILL")="K ^PXRMINDX(9000010.08)"
D SXREFVF(.XREF,"ICD0 code")
S UITEM="ICD0 CODE"
S XREF("DESCR",5)=" ^PXRMINDX("_XREF("FILE")_",""IPP"","_UITEM_",PP,DFN,VISIT DATE,DAS) and"
S XREF("DESCR",6)=" ^PXRMINDX("_XREF("FILE")_",""PPI"",DFN,PP,"_UITEM_",VISIT DATE,DAS)"
S XREF("DESCR",7)="respectively. PP is the principal procedure code. Possible values are Y (yes), N (no) or U (undefined)."
S XREF("DESCR",8)="For all the details, see the Clinical Reminders Index Technical Guide/Programmer's Manual."
S XREF("VAL",4)=.07
D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
Q
;
;===============================================================
CVFILE ;Create all the V file cross-references.
D BMES^XPDUTL("Creating V file cross-references.")
D CVPRC
D CVMEA
Q
;
;===============================================================
CVLAB ;Create cross-reference for V LAB.
N MSG,RESULT,XREF
D BMES^XPDUTL("Creating V LAB cross-reference.")
;Set the XREF nodes
S XREF("FILE")=9000010.09
S XREF("ROOT FILE")=9000010.09
S XREF("SET")="D SVFILE^PXPXRM(9000010.09,.X,.DA)"
S XREF("KILL")="D KVFILE^PXPXRM(9000010.09,.X,.DA)"
S XREF("WHOLE KILL")="K ^PXRMINDX(9000010.09)"
D SXREFVF(.XREF,"Lab test")
D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
I RESULT="" W !,"ERROR"
Q
;
;===============================================================
CVMEA ;Create cross-reference for V MEASUREMENT.
N MSG,RESULT,XREF
D BMES^XPDUTL("Creating V MEASUREMENT.")
;Set the XREF nodes
S XREF("FILE")=9000010.01
S XREF("ROOT FILE")=9000010.01
S XREF("SET")="D EVFILE^PXPXRM(9000010.01,.X,.DA)"
S XREF("KILL")="D KEFILE^PXPXRM(9000010.01,.X,.DA)"
S XREF("WHOLE KILL")="K ^PXRMINDX(9000010.01)"
D SXREFVF(.XREF,"measurement type")
D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
I RESULT="" W !,"ERROR"
Q
;
;===============================================================
DCERRMSG(MSG,XREF) ;Display creation error message.
W !,"Cross-reference could not be created!"
W !,"Error message:"
D AWRITE^PXRMUTIL("MSG")
W !!,"Cross-reference information:"
D AWRITE^PXRMUTIL("XREF")
Q
;
;===============================================================
SXREFVF(XREF,ITEM) ;Set XREF array nodes common for all V files.
N UITEM
S UITEM=$$UP^XLFSTR(ITEM)
S XREF("TYPE")="MU"
S XREF("NAME")="ACR"
S XREF("SHORT DESCR")="Clinical Reminders index."
S XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
S XREF("DESCR",2)="all patients with a particular "_ITEM_" and one for finding all"
S XREF("DESCR",3)="the "_ITEM_"s a patient has."
S XREF("DESCR",4)="The indexes are stored in the Clinical Reminders index global as:"
S XREF("DESCR",5)=" ^PXRMINDX("_XREF("FILE")_",""IP"","_UITEM_",DFN,VISIT DATE,DAS) and"
S XREF("DESCR",6)=" ^PXRMINDX("_XREF("FILE")_",""PI"",DFN,"_UITEM_",VISIT DATE,DAS)"
S XREF("DESCR",7)="respectively."
S XREF("DESCR",8)="For all the details, see the Clinical Reminders Index Technical Guide/Programmer's Manual."
S XREF("USE")="ACTION"
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)=1201
S XREF("VAL",3,"SUBSCRIPT")=3
Q
;
BPXRMIDX ;IHS/MSC/MGH - Create cross-references. ;31-May-2013 11:01;DU
+1 ;;2.0;CLINICAL REMINDERS;**1001**;Feb 04, 2005;Build 21
+2 ;
+3 QUIT
+4 ;===============================================================
CVPRC ;Create cross-reference for V PROCEDURE.
+1 NEW MSG,RESULT,UITEM,XREF
+2 DO BMES^XPDUTL("Creating V PROCEDURE cross-reference.")
+3 ;Set the XREF nodes
+4 SET XREF("FILE")=9000010.08
+5 SET XREF("ROOT FILE")=9000010.08
+6 SET XREF("SET")="D SVFILEC^PXPXRM(9000010.08,.X,.DA)"
+7 SET XREF("KILL")="D KVFILEC^PXPXRM(9000010.08,.X,.DA)"
+8 SET XREF("WHOLE KILL")="K ^PXRMINDX(9000010.08)"
+9 DO SXREFVF(.XREF,"ICD0 code")
+10 SET UITEM="ICD0 CODE"
+11 SET XREF("DESCR",5)=" ^PXRMINDX("_XREF("FILE")_",""IPP"","_UITEM_",PP,DFN,VISIT DATE,DAS) and"
+12 SET XREF("DESCR",6)=" ^PXRMINDX("_XREF("FILE")_",""PPI"",DFN,PP,"_UITEM_",VISIT DATE,DAS)"
+13 SET XREF("DESCR",7)="respectively. PP is the principal procedure code. Possible values are Y (yes), N (no) or U (undefined)."
+14 SET XREF("DESCR",8)="For all the details, see the Clinical Reminders Index Technical Guide/Programmer's Manual."
+15 SET XREF("VAL",4)=.07
+16 DO CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
+17 QUIT
+18 ;
+19 ;===============================================================
CVFILE ;Create all the V file cross-references.
+1 DO BMES^XPDUTL("Creating V file cross-references.")
+2 DO CVPRC
+3 DO CVMEA
+4 QUIT
+5 ;
+6 ;===============================================================
CVLAB ;Create cross-reference for V LAB.
+1 NEW MSG,RESULT,XREF
+2 DO BMES^XPDUTL("Creating V LAB cross-reference.")
+3 ;Set the XREF nodes
+4 SET XREF("FILE")=9000010.09
+5 SET XREF("ROOT FILE")=9000010.09
+6 SET XREF("SET")="D SVFILE^PXPXRM(9000010.09,.X,.DA)"
+7 SET XREF("KILL")="D KVFILE^PXPXRM(9000010.09,.X,.DA)"
+8 SET XREF("WHOLE KILL")="K ^PXRMINDX(9000010.09)"
+9 DO SXREFVF(.XREF,"Lab test")
+10 DO CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
+11 IF RESULT=""
WRITE !,"ERROR"
+12 QUIT
+13 ;
+14 ;===============================================================
CVMEA ;Create cross-reference for V MEASUREMENT.
+1 NEW MSG,RESULT,XREF
+2 DO BMES^XPDUTL("Creating V MEASUREMENT.")
+3 ;Set the XREF nodes
+4 SET XREF("FILE")=9000010.01
+5 SET XREF("ROOT FILE")=9000010.01
+6 SET XREF("SET")="D EVFILE^PXPXRM(9000010.01,.X,.DA)"
+7 SET XREF("KILL")="D KEFILE^PXPXRM(9000010.01,.X,.DA)"
+8 SET XREF("WHOLE KILL")="K ^PXRMINDX(9000010.01)"
+9 DO SXREFVF(.XREF,"measurement type")
+10 DO CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
+11 IF RESULT=""
WRITE !,"ERROR"
+12 QUIT
+13 ;
+14 ;===============================================================
DCERRMSG(MSG,XREF) ;Display creation error message.
+1 WRITE !,"Cross-reference could not be created!"
+2 WRITE !,"Error message:"
+3 DO AWRITE^PXRMUTIL("MSG")
+4 WRITE !!,"Cross-reference information:"
+5 DO AWRITE^PXRMUTIL("XREF")
+6 QUIT
+7 ;
+8 ;===============================================================
SXREFVF(XREF,ITEM) ;Set XREF array nodes common for all V files.
+1 NEW UITEM
+2 SET UITEM=$$UP^XLFSTR(ITEM)
+3 SET XREF("TYPE")="MU"
+4 SET XREF("NAME")="ACR"
+5 SET XREF("SHORT DESCR")="Clinical Reminders index."
+6 SET XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
+7 SET XREF("DESCR",2)="all patients with a particular "_ITEM_" and one for finding all"
+8 SET XREF("DESCR",3)="the "_ITEM_"s a patient has."
+9 SET XREF("DESCR",4)="The indexes are stored in the Clinical Reminders index global as:"
+10 SET XREF("DESCR",5)=" ^PXRMINDX("_XREF("FILE")_",""IP"","_UITEM_",DFN,VISIT DATE,DAS) and"
+11 SET XREF("DESCR",6)=" ^PXRMINDX("_XREF("FILE")_",""PI"",DFN,"_UITEM_",VISIT DATE,DAS)"
+12 SET XREF("DESCR",7)="respectively."
+13 SET XREF("DESCR",8)="For all the details, see the Clinical Reminders Index Technical Guide/Programmer's Manual."
+14 SET XREF("USE")="ACTION"
+15 SET XREF("EXECUTION")="R"
+16 SET XREF("ACTIVITY")="IR"
+17 SET XREF("VAL",1)=.01
+18 SET XREF("VAL",1,"SUBSCRIPT")=1
+19 SET XREF("VAL",2)=.02
+20 SET XREF("VAL",2,"SUBSCRIPT")=2
+21 SET XREF("VAL",3)=1201
+22 SET XREF("VAL",3,"SUBSCRIPT")=3
+23 QUIT
+24 ;