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

PXRMEXLC.m

Go to the documentation of this file.
  1. PXRMEXLC ; SLC/PKR/PJH - Routines to display repository entry components. ;08/01/2013
  1. ;;2.0;CLINICAL REMINDERS;**4,6,12,26**;Feb 04, 2005;Build 404
  1. ;======================================================
  1. BLDLIST(FORCE) ;Build a list of all repository entries.
  1. ;If FORCE is true then force rebuilding of the list.
  1. I FORCE K ^TMP("PXRMEXLR",$J)
  1. I $D(^TMP("PXRMEXLR",$J,"VALMCNT")) S VALMCNT=^TMP("PXRMEXLR",$J,"VALMCNT")
  1. E D
  1. . D REXL^PXRMLIST("PXRMEXLR")
  1. . S VALMCNT=^TMP("PXRMEXLR",$J,"VALMCNT")
  1. Q
  1. ;
  1. ;======================================================
  1. CDISP(IEN) ;Format component list for display.
  1. N CAT,CLOK,CMPNT,END,EXISTS,FILENUM,FMTSTR,FOKTT,IOKTI,IND,INDEX
  1. N JND,JNDS,KND,MSG,NCMPNT,NDLINE,NITEMS,NLINE,NSEL,PT01
  1. N START,TEMP,TEMP0,TYPE
  1. K ^TMP("PXRMEXLC",$J),^TMP("PXRMEXLD",$J)
  1. S CLOK=1
  1. I ('$D(^PXD(811.8,IEN,119)))!('$D(^PXD(811.8,IEN,120))) D CLIST^PXRMEXCO(IEN,.CLOK)
  1. I 'CLOK Q
  1. ;If this is being called by the Silent Installer VALMDDF will not
  1. ;exist.
  1. S FMTSTR=$S('$D(VALMDDF):"4R2^50L4^8C5^6C",1:$$LMFMTSTR^PXRMTEXT(.VALMDDF,"RLCC"))
  1. S (NDLINE,NLINE,NSEL)=0
  1. ;Load the description.
  1. F IND=1:1:$P(^PXD(811.8,IEN,110,0),U,4) D
  1. . S NLINE=NLINE+1
  1. . S ^TMP("PXRMEXLC",$J,NLINE,0)=^PXD(811.8,IEN,110,IND,0)
  1. S NLINE=NLINE+1
  1. S ^TMP("PXRMEXLC",$J,NLINE,0)=" "
  1. S NCMPNT=^PXD(811.8,IEN,119)
  1. ;Load the text for display.
  1. ;Build and load the item selection list for display.
  1. F IND=1:1:NCMPNT D
  1. . S NLINE=NLINE+1
  1. . S TEMP=^PXD(811.8,IEN,120,IND,0)
  1. . S ^TMP("PXRMEXLC",$J,NLINE,0)=$P(TEMP,U,1)
  1. . S FILENUM=$P(TEMP,U,2)
  1. . S NITEMS=$P(TEMP,U,3)
  1. .;See if items in this file are ok to transport.
  1. . S FOKTT=$$FOKTT^PXRMEXFI(FILENUM)
  1. . F JND=1:1:NITEMS D
  1. .. S TEMP=^PXD(811.8,IEN,120,IND,1,JND,0)
  1. ..;If items from this file can be installed make sure the individual
  1. ..;item is installable.
  1. .. S IOKTI=$S('FOKTT:0,1:$$IOKTI^PXRMEXFI(IEN,FILENUM,TEMP))
  1. .. S PT01=$P(TEMP,U,1)
  1. .. S EXISTS=$S(FILENUM=0:$$EXISTS^PXRMEXCF(PT01),1:$$EXISTS^PXRMEXIU(FILENUM,PT01,"W"))
  1. ..;If this is a health factor see if it is a category.
  1. .. S CAT=""
  1. .. I (FILENUM=9999999.64) D
  1. ... S TYPE=""
  1. ... S START=$P(TEMP,U,2)
  1. ... S END=$P(TEMP,U,3)
  1. ... F KND=START:1:END D
  1. .... S TEMP0=$P(^PXD(811.8,IEN,100,KND,0),";",3)
  1. .... I $P(TEMP0,"~",1)=.1 S TYPE=$P(TEMP0,"~",2)
  1. ... I TYPE="CATEGORY" S CAT="X"
  1. ..;If entries in this file are ok to install add them to the
  1. ..;selectable list. For dialog items only display those that are
  1. ..;selectable.
  1. .. I FILENUM=801.41,'IOKTI Q
  1. .. I IOKTI D
  1. ... S NSEL=NSEL+1,INDEX=NSEL
  1. ... S ^TMP("PXRMEXLC",$J,"SEL",NSEL)=FILENUM_U_IND_U_JND_U_EXISTS
  1. ... S ^TMP("PXRMEXLC",$J,"IDX",NSEL,NSEL)=""
  1. .. E S INDEX=""
  1. .. D FMTDATA(FMTSTR,INDEX,PT01,CAT,EXISTS,.NLINE)
  1. . S NLINE=NLINE+1
  1. . S ^TMP("PXRMEXLC",$J,NLINE,0)=""
  1. Q
  1. ;
  1. ;======================================================
  1. FMTDATA(FMTSTR,NSEL,PT01,CAT,EXISTS,NLINE) ;Format items for display.
  1. N IND,NL,NSTI,OUTPUT,TEMP
  1. S TEMP=NSEL_U_PT01_U_CAT_U_$S(EXISTS:"X",1:"")
  1. D COLFMT^PXRMTEXT(FMTSTR,TEMP," ",.NL,.OUTPUT)
  1. F IND=1:1:NL S NLINE=NLINE+1,^TMP("PXRMEXLC",$J,NLINE,0)=OUTPUT(IND)
  1. Q
  1. ;
  1. ;======================================================
  1. INSCHR(NUM,CHR) ;Return a string of NUM characters (CHR).
  1. N IND,TEMP
  1. S TEMP=""
  1. I NUM<1 Q TEMP
  1. F IND=1:1:NUM S TEMP=TEMP_CHR
  1. Q TEMP
  1. ;
  1. ;======================================================
  1. ORDER(STRING,ORDER) ;Rebuild string in ascending or descending order.
  1. N ARRAY,ITEM,CNT
  1. F CNT=1:1 S ITEM=$P(STRING,",",CNT) Q:'ITEM S ARRAY(ITEM)=""
  1. K STRING
  1. F CNT=1:1 S ITEM=$O(ARRAY(ITEM),ORDER) Q:'ITEM S $P(STRING,",",CNT)=ITEM
  1. Q
  1. ;