AMHGUVF ; IHS/CMI/MAW - AMH GUI Visit Form Utilities (frmVisitDataEntry) 2/13/2009 8:51:56 AM ;
;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
;
;
;
Q
;
FNDPOV(IEN,R) ;-- find POV based on ien of pov and amhrec ptr
N DA,POV
S POV=0
S DA=0 F S DA=$O(^AMHRPRO("AD",R,DA)) Q:'DA!($G(POV)) D
. N AMHPOV
. S AMHPOV=$P($G(^AMHRPRO(DA,0)),U)
. I AMHPOV=IEN S POV=DA Q
Q $G(POV)
;
AMHGUVF ; IHS/CMI/MAW - AMH GUI Visit Form Utilities (frmVisitDataEntry) 2/13/2009 8:51:56 AM ;
+1 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
+2 ;
+3 ;
+4 ;
+5 QUIT
+6 ;
FNDPOV(IEN,R) ;-- find POV based on ien of pov and amhrec ptr
+1 NEW DA,POV
+2 SET POV=0
+3 SET DA=0
FOR
SET DA=$ORDER(^AMHRPRO("AD",R,DA))
IF 'DA!($GET(POV))
QUIT
Begin DoDot:1
+4 NEW AMHPOV
+5 SET AMHPOV=$PIECE($GET(^AMHRPRO(DA,0)),U)
+6 IF AMHPOV=IEN
SET POV=DA
QUIT
End DoDot:1
+7 QUIT $GET(POV)
+8 ;