ROUTINE VASITE

From VistApedia
Revision as of 17:05, 23 April 2019 by DavidWhitten (talk | contribs) (Created page with " <pre> PRIM^VASITE:PRIM+9 PRIM(DATE) ; -returns medical center division of primary medical center division ; - input date, if date is null then date will be today...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
PRIM^VASITE:PRIM+9
 PRIM(DATE) ;  -returns medical center division of primary medical center division
  ;          - input date, if date is null then date will be today
  ;
  N PRIM
  S:'$D(DATE) DATE=DT S DATE=DATE+.24
  S PRIM=$G(^VA(389.9,+$O(^(+$O(^VA(389.9,"AIVDT1",1,$$IVDATE(DATE))),0)),0))
  Q $S($P(PRIM,"^",4)?3N:$P(PRIM,"^",3),1:-1)
  ;