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

VAQUTL96.m

Go to the documentation of this file.
  1. VAQUTL96 ;ALB/JFP - PDX Transaction Lookup ;01-APR-93
  1. ;;1.5;PATIENT DATA EXCHANGE;**37**;NOV 17, 1993
  1. ;
  1. ;
  1. GETTRN(PATIENT) ;-- Return DFN for PDX transaction
  1. ; -- Only returns patients patients with results of PDX
  1. ; -- This will return the same information that DIC returns in Y
  1. ;
  1. N DIC,X,Y,RESULT,USRABORT
  1. N TRNFLAG
  1. ;
  1. S USRABORT=-1
  1. S:'$D(PATIENT) PATIENT=""
  1. ;
  1. ; -- User interface
  1. S DIC(0)="EQMZ"
  1. S DIC("S")="I $$TRN1^VAQUTL96()"
  1. S X=PATIENT
  1. S DIC="^VAT(394.61,"
  1. K ^TMP("BS5",$J)
  1. D ^DIC K DIC,NM,SSN,BS5
  1. K ^TMP("BS5",$J)
  1. ;
  1. ; -- User abort process
  1. ;
  1. Q:$D(DTOUT) USRABORT
  1. Q:$D(DUOUT) USRABORT
  1. Q Y
  1. ;
  1. TRN1() ; -- filters out transactions flaged as purged OR exceed life days
  1. S TRNFLAG=$$EXPTRN^VAQUTL97(Y)
  1. I TRNFLAG Q 0
  1. ;
  1. N NODE
  1. S NODE=$G(^VAT(394.61,Y,"QRY"))
  1. S NM=$P(NODE,U,1)
  1. Q:NM="" 0
  1. S SSN=$P(NODE,U,2)
  1. Q:SSN="" 0
  1. ;S BS5=$E(NM,1,1)_$E(SSN,6,10) ; before patch VAQ*1.5*37
  1. S BS5=$E(NM,1,1)_SSN ; after patch VAQ*1.5*37
  1. ;
  1. ; -- filters out duplicate entries from multiple cross references
  1. I $D(^TMP("BS5",$J,BS5)) Q 0
  1. S ^TMP("BS5",$J,BS5)=1
  1. Q 1
  1. ;
  1. END ; -- End of code
  1. QUIT