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

BRNREF.m

Go to the documentation of this file.
  1. BRNREF ; IHS/PHXAO/TMJ - SET DISCOSURE VARIABLES ;
  1. ;;2.0;RELEASE OF INFO SYSTEM;;APR 10, 2003
  1. ;
  1. ; BRNRIEN=Disclosure ien
  1. ; BRNRDATE=Disclosure date in internal FileMan form (.01 field)
  1. ; BRNRNUMB=Disclosure number (.02 field)
  1. ; BRNDFN=patient ien (.03 field)
  1. ; BRNRTYPE=type of Disclosure (.04 field)
  1. ; BRNREC("PAT NAME")=patient name
  1. ; BRNREC("REF DATE")=Disclosure date in external form
  1. ;
  1. START ;
  1. Q:'$G(Y)
  1. Q:$D(BRNOVRPS) ;override post selection variable
  1. S (BRNCHSCT,BRNRIEN,BRNRDATE,BRNRNUMB,BRNDFN,BRNRTYPE,BRNRIO,BRNREC("PAT NAME"),BRNREC("REF DATE"))=""
  1. Q:'$G(Y)
  1. Q:'$D(^BRNREC(+Y,0))
  1. NEW X
  1. S BRNRIEN=+Y
  1. S X=^BRNREC(BRNRIEN,0)
  1. S BRNRDATE=$P(X,U)
  1. S BRNRNUMB=$P(X,U,2)
  1. S BRNDFN=$P(X,U,3)
  1. S BRNRSTAT=$P(X,U,8)
  1. S BRNRTYPE=$P(X,U,4)
  1. ;S BRNRIO=$P(X,U,14)
  1. S:$G(BRNDFN) BRNREC("PAT NAME")=$P(^DPT(BRNDFN,0),U)
  1. ;
  1. ;S BRNCHSCT=+$P($G(^BRNREF(BRNRIEN,11)),U,15)
  1. ;
  1. NEW Y
  1. S Y=BRNRDATE
  1. D DD^%DT
  1. S BRNREC("REF DATE")=Y
  1. Q