Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BPXRMIDX

BPXRMIDX.m

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