BRNRLU ; IHS/PHXAO/TMJ - ROI GEN RETR UTILITIES ;
;;2.0;RELEASE OF INFO SYSTEM;*1*;APR 10, 2003
;IHS/OIT/LJF - 01/10/2008 PATCH 1 Removed unused code especially ICD code
;
;
AVDOS(R,F) ;EP - return available Date of Disclosure
NEW BRNDOS
I $G(F)="" S F="S"
S BRNDOS=""
S BRNDOS=$P($G(^BRNREC(R,0)),U,19)
I BRNDOS="" Q BRNDOS
I F="N" Q BRNDOS
I F="E" S BRNDOS=$$FMTE^XLFDT(BRNDOS,"2P")
I F="S" S BRNDOS=$E(BRNDOS,4,5)_"/"_$E(BRNDOS,6,7)_"/"_$E(BRNDOS,2,3)
I F="C" S BRNDOS=$E(BRNDOS,4,5)_"/"_$E(BRNDOS,6,7)_"/"_$E(BRNDOS,2,3)_" ("_$S($$VAL^XBDIQ1(90001,R,.19)]"":"A)",1:"E)")
Q BRNDOS
;
FACREF(R) ;EP return requesting party
N BRNF,%
S %=^BRNREC(R,0)
S BRNF=$S($P(%,U,6):$P($G(^BRNTREQ($P(%,U,6),0)),U),1:"<UNKNOWN>")
Q BRNF
;
REFDTI(R,F) ; EP - Date Disclosure Initiated
NEW BRNDOS
I $G(F)="" S F="E"
S BRNDOS=""
S BRNDOS=$S($P($G(^BRNREC(R,0)),U)]"":$P(^BRNREC(R,0),U),1:$P($G(^BRNREC(R,0)),U,6))
I BRNDOS="" Q BRNDOS
I F="E" S BRNDOS=$$FMTE^XLFDT(BRNDOS)
I F="S" S BRNDOS=$E(BRNDOS,4,5)_"/"_$E(BRNDOS,6,7)_"/"_$E(BRNDOS,2,3)
I F="C" S BRNDOS=$E(BRNDOS,4,5)_"/"_$E(BRNDOS,6,7)_"/"_$E(BRNDOS,2,3)_" ("_$S($$VAL^XBDIQ1(90001,R,.01)]"":"A)",1:"E)")
Q BRNDOS
BRNRLU ; IHS/PHXAO/TMJ - ROI GEN RETR UTILITIES ;
+1 ;;2.0;RELEASE OF INFO SYSTEM;*1*;APR 10, 2003
+2 ;IHS/OIT/LJF - 01/10/2008 PATCH 1 Removed unused code especially ICD code
+3 ;
+4 ;
AVDOS(R,F) ;EP - return available Date of Disclosure
+1 NEW BRNDOS
+2 IF $GET(F)=""
SET F="S"
+3 SET BRNDOS=""
+4 SET BRNDOS=$PIECE($GET(^BRNREC(R,0)),U,19)
+5 IF BRNDOS=""
QUIT BRNDOS
+6 IF F="N"
QUIT BRNDOS
+7 IF F="E"
SET BRNDOS=$$FMTE^XLFDT(BRNDOS,"2P")
+8 IF F="S"
SET BRNDOS=$EXTRACT(BRNDOS,4,5)_"/"_$EXTRACT(BRNDOS,6,7)_"/"_$EXTRACT(BRNDOS,2,3)
+9 IF F="C"
SET BRNDOS=$EXTRACT(BRNDOS,4,5)_"/"_$EXTRACT(BRNDOS,6,7)_"/"_$EXTRACT(BRNDOS,2,3)_" ("_$SELECT($$VAL^XBDIQ1(90001,R,.19)]"":"A)",1:"E)")
+10 QUIT BRNDOS
+11 ;
FACREF(R) ;EP return requesting party
+1 NEW BRNF,%
+2 SET %=^BRNREC(R,0)
+3 SET BRNF=$SELECT($PIECE(%,U,6):$PIECE($GET(^BRNTREQ($PIECE(%,U,6),0)),U),1:"<UNKNOWN>")
+4 QUIT BRNF
+5 ;
REFDTI(R,F) ; EP - Date Disclosure Initiated
+1 NEW BRNDOS
+2 IF $GET(F)=""
SET F="E"
+3 SET BRNDOS=""
+4 SET BRNDOS=$SELECT($PIECE($GET(^BRNREC(R,0)),U)]"":$PIECE(^BRNREC(R,0),U),1:$PIECE($GET(^BRNREC(R,0)),U,6))
+5 IF BRNDOS=""
QUIT BRNDOS
+6 IF F="E"
SET BRNDOS=$$FMTE^XLFDT(BRNDOS)
+7 IF F="S"
SET BRNDOS=$EXTRACT(BRNDOS,4,5)_"/"_$EXTRACT(BRNDOS,6,7)_"/"_$EXTRACT(BRNDOS,2,3)
+8 IF F="C"
SET BRNDOS=$EXTRACT(BRNDOS,4,5)_"/"_$EXTRACT(BRNDOS,6,7)_"/"_$EXTRACT(BRNDOS,2,3)_" ("_$SELECT($$VAL^XBDIQ1(90001,R,.01)]"":"A)",1:"E)")
+9 QUIT BRNDOS