Index: FOIAVistA/tag/r/CLINICAL_REMINDERS-PXRM/PXRMEXLB.m
===================================================================
--- FOIAVistA/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMEXLB.m	(revision 631)
+++ FOIAVistA/tag/r/CLINICAL_REMINDERS-PXRM/PXRMEXLB.m	(revision 636)
@@ -1,4 +1,4 @@
-PXRMEXLB ;SLC/PJH - Reminder Dialog Exchange. ;05/16/2007
- ;;2.0;CLINICAL REMINDERS;**6**;Feb 04, 2005;Build 123
+PXRMEXLB ;SLC/PJH - Reminder Dialog Exchange. ;07/01/2004
+ ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
  ;
  ;=====================================================================
@@ -7,6 +7,5 @@
  ;-------------------------------
 DBUILD(IND,NITEMS,FILENUM) ;
- N DARRAY,DDATA,DDLG,DEND,DLOC,DMAP,DNAM,DNODE,DSEQ,DSTRT,DSUB,FILE,JND
- N REPCNT,RESGRP,TEMPRESL,CNT
+ N DARRAY,DDATA,DDLG,DEND,DLOC,DMAP,DNAM,DNODE,DSEQ,DSTRT,DSUB,JND
  ;
  K ^TMP("PXRMEXTMP",$J),^TMP("PXRMEXFND",$J)
@@ -20,5 +19,5 @@
  .D DPARSE
  ;Scan dialog components in 120 and save dialog links
- S JND="B",REPCNT=0
+ S JND="B"
  F  S JND=$O(^PXD(811.8,IEN,120,IND,1,JND),-1) Q:'JND  D
  .S DDATA=$G(^PXD(811.8,IEN,120,IND,1,JND,0)) Q:DDATA=""
@@ -31,6 +30,5 @@
  .F  S DSUB=$O(^PXD(811.8,IEN,100,DSUB)) Q:DSUB>DEND  D
  ..S DNODE=$G(^PXD(811.8,IEN,100,DSUB,0))
- ..I ($P(DNODE,";")'="801.412")&($P(DNODE,";")'="801.41121")&($P(DNODE,";",3)'["118~") Q
- ..S FILE=$P(DNODE,";")
+ ..I $P(DNODE,";")'="801.412"&($P(DNODE,";",3)'["118~") Q
  ..S DNODE=$P(DNODE,";",3)
  ..;;Modified Exchange to handle dialogs with replacement dialogs
@@ -38,15 +36,8 @@
  ...S DNAM=$P(DNODE,"~",2) Q:DNAM=""
  ...S DLOC=$G(^TMP("PXRMEXTMP",$J,"DLOC",DNAM))
- ...S REPCNT=REPCNT+1,^TMP("PXRMEXTMP",$J,"DREPL",REPCNT,DDLG)=DNAM_U_DLOC
+ ...S ^TMP("PXRMEXTMP",$J,"DREPL",DDLG)=DNAM_U_DLOC
  ..I $E(DNODE,1,4)'=".01~" Q
  ..S DSEQ=$P(DNODE,"~",2) Q:DSEQ=""
- ..I FILE="801.41121" D  Q
- ...S DNAM=$P(DNODE,"~",2) Q:DNAM=""
- ...S DLOC=$G(^TMP("PXRMEXTMP",$J,"DLOC",DNAM))
- ...S CNT=0
- ...I $D(^TMP("PXRMEXTMP",$J,"DMAP",DDLG))>0 S CNT=$O(^TMP("PXRMEXTMP",$J,"DMAP",DDLG,""),-1)
- ...S ^TMP("PXRMEXTMP",$J,"DMAP",DDLG,CNT+1)=DNAM_U_DLOC
- ..S DNODE=$G(^PXD(811.8,IEN,100,DSUB+1,0))
- ..I ($P(DNODE,";")'="801.412") Q
+ ..S DNODE=$G(^PXD(811.8,IEN,100,DSUB+1,0)) I $P(DNODE,";")'="801.412" Q
  ..S DNODE=$P(DNODE,";",3) I $E(DNODE,1,2)'="2~" Q
  ..S DNAM=$P(DNODE,"~",2) Q:DNAM=""
@@ -55,4 +46,6 @@
  ;
  ;Build index of dialog findings by name
+ ;
+ ;
  N FDATA,FILENAM,FILENUM,FNAME
  S IND=0
@@ -71,9 +64,4 @@
  ..;Save entry
  ..S ^TMP("PXRMEXFND",$J,FNAME)=FILENUM_U_FILENAM_U_IND
- I $D(TEMPRESL)>0 D
- .S DDLG="" F  S DDLG=$O(TEMPRESL(DDLG)) Q:DDLG=""  D
- ..;S ^TMP("PXRMEXTMP",$J,"RESULT",DDLG,TEMPRESL(DDLG))=""
- ..S DSEQ=$O(^TMP("PXRMEXTMP",$J,"DMAP",DDLG,""),-1)
- ..S ^TMP("PXRMEXTMP",$J,"DMAP",DDLG,DSEQ+1)=TEMPRESL(DDLG)_U_RESGRP(TEMPRESL(DDLG))
  Q
  ;
@@ -83,7 +71,6 @@
  ;
  ;Find where all the field numbers are kept
- N DARRAY,DDATA,DFNUM,DRAW,DSTRING,RESNAM
- S DSUB=DSTRT-1,DSTRING=";.01;4;5;15;24;25;55;"
- ;S DSUB=DSTRT,DSTRING=";4;5;15;24;25;"
+ N DARRAY,DDATA,DFNUM,DRAW,DSTRING
+ S DSUB=DSTRT,DSTRING=";4;5;15;24;25;"
  F  S DSUB=$O(^PXD(811.8,IEN,100,DSUB)) Q:'DSUB  D  Q:DSUB>DEND
  .S DDATA=$G(^PXD(811.8,IEN,100,DSUB,0)) Q:DDATA=""
@@ -91,15 +78,14 @@
  .S DFNUM=$P(DDATA,";",3),DFNUM=$P(DFNUM,"~") Q:DFNUM=""
  .I DSTRING[(";"_DFNUM_";") S DARRAY(DFNUM)=DSUB
- .I $P(DDATA,";")="801.41121" S DARRAY(55)=DSUB
  ;
  ;Determine dialog component type
  S DSUB=DARRAY(4) Q:'DSUB
  S DTYP=$P($G(^PXD(811.8,IEN,100,DSUB,0)),"~",2)
- I DTYP'["result" S:DTYP[" " DTYP=$P(DTYP," ",2) S:DTYP="value" DTYP="forced"
+ S:DTYP[" " DTYP=$P(DTYP," ",2) S:DTYP="value" DTYP="forced"
  ;
  ;Initialise text and finding fields
  S DTXT="*NONE*",DFIND=""
  ;Get text appropriate for the type of component
- I ((DTYP="element")!(DTYP="group"))&(DTYP'["result") D
+ I (DTYP="element")!(DTYP="group") D
  .;search for WP text
  .S DSUB=$G(DARRAY(25)) D:DSUB
@@ -115,8 +101,5 @@
  ..;Reformat text to 50 characters
  ..D DWP(.DTXT)
- ..;Search for Result Group/Element
- ..S DSUB=$G(DARRAY(55)) I DSUB>0 D
- ...S RESNAME=$P($P($G(^PXD(811.8,IEN,100,DSUB,0)),";",3),"~",2)
- ...S TEMPRESL(DNAM)=RESNAME
+ .;
  .;Search for finding item
  .S DSUB=$G(DARRAY(15)) D:DSUB
@@ -136,10 +119,4 @@
  ...I $P(DFNAM,".")="ICD9" S DFNAM=$P(DFNAM," ")
  ...S DCNT=DCNT+1,DFIAD(DCNT)=DFNAM
- ;
- I DTYP["result" D
- .S DSUB=$G(DARRAY(.01)) Q:'DSUB
- .S DTEXT=$P($G(^PXD(811.8,IEN,100,DSUB,0)),";",3) Q:DTEXT=""
- .S DTXT=$P(DTEXT,"~",2)
- .S RESGRP(DNAM)=DSTRT_U_DEND_U_IND_U_JND
  ;
  I DTYP="prompt" D
