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

XUMFXP2.m

Go to the documentation of this file.
  1. XUMFXP2 ;ISS/RAM - MFS parameters query/group ;06/28/00
  1. ;;8.0;KERNEL;**299**;Jul 10, 1995
  1. ;
  1. ; this routine is a called by XUMFXP1 and is a continuation of that
  1. ; routine
  1. ;
  1. Q
  1. ;
  1. MAIN ; -- main
  1. ;
  1. N X
  1. ;
  1. QRD ; -- query definition segment
  1. ;
  1. ;Query Date/Time
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","QDT")) D
  1. .S ^TMP("XUMF MFS",$J,"PARAM","QDT")=$$HLDATE^HLFNC($$NOW^XLFDT)
  1. ;
  1. ;Query Format Code
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","QFC")) D
  1. .S ^TMP("XUMF MFS",$J,"PARAM","QFC")="R"
  1. ;
  1. ;Query Priority
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","QP")) D
  1. .S ^TMP("XUMF MFS",$J,"PARAM","QP")="I"
  1. ;
  1. ;Query ID
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","QID")) D
  1. .S X=$P($G(^DIC(4.001,+IFN,0)),U,3)
  1. .S ^TMP("XUMF MFS",$J,"PARAM","QID")=X_$S(ARRAY:" ARRAY",1:" FILE")
  1. ;
  1. ;Deferred Response Type (optional)
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","DRT")) D
  1. .S ^TMP("XUMF MFS",$J,"PARAM","DRT")=""
  1. ;
  1. ;Deferred Response Date/Time (optional)
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","DRDT")) D
  1. .S ^TMP("XUMF MFS",$J,"PARAM","DRDT")=""
  1. ;
  1. ;Quantity Limited Request
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","QLR")) D
  1. .S ^TMP("XUMF MFS",$J,"PARAM","QLR")="RD"_HLCS_999
  1. ;
  1. ;Who Subject Filter - ID, source table (use x-ref), assigning authority
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","WHO")) D
  1. .N PKV,XREF,AA
  1. .S PKV=$$PKV^XUMFX(IFN,IEN,HLCS)
  1. .S XREF=$P($G(^DIC(4.001,+IFN,"MFE")),U,8)
  1. .S AA=$P($G(^DIC(4.001,+IFN,"MFE")),U,9)
  1. .N X S X=$S(ALL:"ALL",IEN:$P(PKV,HLCS),1:"IEN ARRAY")
  1. .S $P(X,HLCS,9,10)=XREF_HLCS_AA
  1. .S ^TMP("XUMF MFS",$J,"PARAM","WHO")=X
  1. ;
  1. ;What Subject Filter
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","WHAT")) D
  1. .S ^TMP("XUMF MFS",$J,"PARAM","WHAT")=IFN_HLCS_"IFN"_HLCS_"VA FM"
  1. ;
  1. ;What Department Data Code
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","WDDC")) D
  1. .N X S X="INFRASTRUCTURE"_HLCS_"INFORMATION INFRASTRUCTURE"
  1. .S X=X_HLCS_"VA TS"
  1. .S ^TMP("XUMF MFS",$J,"PARAM","WDDC")=X
  1. ;
  1. ;What Data Code Value Qual (optional)
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","WDCVQ")) D
  1. .S ^TMP("XUMF MFS",$J,"PARAM","WDCVQ")=""
  1. ;
  1. ;Query Results Level (optional)
  1. I '$D(^TMP("XUMF MFS",$J,"PARAM","QRL")) D
  1. .S ^TMP("XUMF MFS",$J,"PARAM","QRL")=""
  1. ;
  1. Q
  1. ;
  1. GROUP ; -- query group
  1. ;
  1. N XXX,IDX,SEQ
  1. ;
  1. S (IDX,SEQ)=0
  1. F S IDX=$O(^DIC(4.001,IFN,1,IDX)) Q:'IDX D
  1. .S SEQ=SEQ+1
  1. .N FUNC,SUBFILE,X,Y
  1. .S Y=$G(^DIC(4.001,+IFN,1,+IDX,0))
  1. .S SUBFILE=$P(Y,U,4)
  1. .Q:'SUBFILE
  1. .S FUNC=$P(Y,U,8)
  1. .I 'FUNC,FUNC'="" D
  1. ..I FUNC'["(" S FUNC="$$"_FUNC_"^XUMFF" Q
  1. ..S FUNC="$$"_$P(FUNC,"(")_"^XUMFF("_$P(FUNC,"(",2)
  1. ..S XXX(SEQ)=FUNC
  1. ;
  1. S IEN=0
  1. F S IEN=$O(^TMP("XUMF MFS",$J,"PARAM","IEN",IEN)) Q:'IEN D
  1. .S PKV=$$PKV^XUMFX(IFN,IEN,HLCS)
  1. .I CDSYS'="" D
  1. ..S $P(PKV,HLCS,1)=^TMP("XUMF MFS",$J,"PARAM","IEN",IEN)
  1. ..S $P(PKV,HLCS,2)=$P($G(@ROOT@(+IEN,0)),U)
  1. ..S $P(PKV,HLCS,3)=CDSYS
  1. .S ^TMP("XUMF MFS",$J,"PARAM",IEN,"PKV")=PKV
  1. .;
  1. .S SEQ=0
  1. .F S SEQ=$O(XXX(SEQ)) Q:'SEQ D
  1. ..S FUNC=XXX(SEQ)
  1. ..S X="S X="_FUNC X X
  1. ..Q:'X
  1. ..S ^TMP("XUMF MFS",$J,"PARAM",IEN,"IENS",SEQ)=X_","_IEN_","
  1. ;
  1. Q
  1. ;