- BRNREF ; IHS/PHXAO/TMJ - SET DISCOSURE VARIABLES ;
- ;;2.0;RELEASE OF INFO SYSTEM;;APR 10, 2003
- ;
- ; BRNRIEN=Disclosure ien
- ; BRNRDATE=Disclosure date in internal FileMan form (.01 field)
- ; BRNRNUMB=Disclosure number (.02 field)
- ; BRNDFN=patient ien (.03 field)
- ; BRNRTYPE=type of Disclosure (.04 field)
- ; BRNREC("PAT NAME")=patient name
- ; BRNREC("REF DATE")=Disclosure date in external form
- ;
- START ;
- Q:'$G(Y)
- Q:$D(BRNOVRPS) ;override post selection variable
- S (BRNCHSCT,BRNRIEN,BRNRDATE,BRNRNUMB,BRNDFN,BRNRTYPE,BRNRIO,BRNREC("PAT NAME"),BRNREC("REF DATE"))=""
- Q:'$G(Y)
- Q:'$D(^BRNREC(+Y,0))
- NEW X
- S BRNRIEN=+Y
- S X=^BRNREC(BRNRIEN,0)
- S BRNRDATE=$P(X,U)
- S BRNRNUMB=$P(X,U,2)
- S BRNDFN=$P(X,U,3)
- S BRNRSTAT=$P(X,U,8)
- S BRNRTYPE=$P(X,U,4)
- ;S BRNRIO=$P(X,U,14)
- S:$G(BRNDFN) BRNREC("PAT NAME")=$P(^DPT(BRNDFN,0),U)
- ;
- ;S BRNCHSCT=+$P($G(^BRNREF(BRNRIEN,11)),U,15)
- ;
- NEW Y
- S Y=BRNRDATE
- D DD^%DT
- S BRNREC("REF DATE")=Y
- Q
- BRNREF ; IHS/PHXAO/TMJ - SET DISCOSURE VARIABLES ;
- +1 ;;2.0;RELEASE OF INFO SYSTEM;;APR 10, 2003
- +2 ;
- +3 ; BRNRIEN=Disclosure ien
- +4 ; BRNRDATE=Disclosure date in internal FileMan form (.01 field)
- +5 ; BRNRNUMB=Disclosure number (.02 field)
- +6 ; BRNDFN=patient ien (.03 field)
- +7 ; BRNRTYPE=type of Disclosure (.04 field)
- +8 ; BRNREC("PAT NAME")=patient name
- +9 ; BRNREC("REF DATE")=Disclosure date in external form
- +10 ;
- START ;
- +1 IF '$GET(Y)
- QUIT
- +2 ;override post selection variable
- IF $DATA(BRNOVRPS)
- QUIT
- +3 SET (BRNCHSCT,BRNRIEN,BRNRDATE,BRNRNUMB,BRNDFN,BRNRTYPE,BRNRIO,BRNREC("PAT NAME"),BRNREC("REF DATE"))=""
- +4 IF '$GET(Y)
- QUIT
- +5 IF '$DATA(^BRNREC(+Y,0))
- QUIT
- +6 NEW X
- +7 SET BRNRIEN=+Y
- +8 SET X=^BRNREC(BRNRIEN,0)
- +9 SET BRNRDATE=$PIECE(X,U)
- +10 SET BRNRNUMB=$PIECE(X,U,2)
- +11 SET BRNDFN=$PIECE(X,U,3)
- +12 SET BRNRSTAT=$PIECE(X,U,8)
- +13 SET BRNRTYPE=$PIECE(X,U,4)
- +14 ;S BRNRIO=$P(X,U,14)
- +15 IF $GET(BRNDFN)
- SET BRNREC("PAT NAME")=$PIECE(^DPT(BRNDFN,0),U)
- +16 ;
- +17 ;S BRNCHSCT=+$P($G(^BRNREF(BRNRIEN,11)),U,15)
- +18 ;
- +19 NEW Y
- +20 SET Y=BRNRDATE
- +21 DO DD^%DT
- +22 SET BRNREC("REF DATE")=Y
- +23 QUIT