- PXAPIUTL ;ISL/dee - some of PCE's utilities used by PCE's API ;3/14/97
- ;;1.0;PCE PATIENT CARE ENCOUNTER;**27**;Aug 12, 1996
- Q
- ;
- SOURCE(X) ;Get IEN of data source in the PCE Data Source file
- N DIC,Y,DLAYGO
- S DIC="^PX(839.7,"
- S DLAYGO=839.7
- S DIC(0)="LMNOX"
- D ^DIC
- Q +Y
- ;
- TMPSOURC(X) ;Gets the IEN of the data source the builds the ^TMP("PXK" node for it
- S ^TMP("PXK",$J,"SOR")=$$SOURCE(X)
- Q
- ;
- PRVCLASS(PROVIDER,VISITDT) ;See if this is a good provider
- ;Call with a pointer to $VA(200, and a date
- ; (if no date is passed then it defauts to DT) and returns
- ;IEN^Occupation^specialty^sub-specialty^Effective date^expiration date
- ; if + of the return is >0 provider is active
- ; else -1 the provider is not active or bad call
- ; else -2 if no current person class.
- ;
- S:VISITDT="" VISITDT=DT
- Q:VISITDT<1800000 -1
- Q:'$D(^VA(200,+PROVIDER,0)) -1
- ;
- N PXACTIVE
- S PXACTIVE=$P(^VA(200,PROVIDER,0),"^",11)
- I PXACTIVE'="",PXACTIVE<VISITDT Q -1
- Q $$GET^XUA4A72(PROVIDER,VISITDT)
- ;
- PXAPIUTL ;ISL/dee - some of PCE's utilities used by PCE's API ;3/14/97
- +1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**27**;Aug 12, 1996
- +2 QUIT
- +3 ;
- SOURCE(X) ;Get IEN of data source in the PCE Data Source file
- +1 NEW DIC,Y,DLAYGO
- +2 SET DIC="^PX(839.7,"
- +3 SET DLAYGO=839.7
- +4 SET DIC(0)="LMNOX"
- +5 DO ^DIC
- +6 QUIT +Y
- +7 ;
- TMPSOURC(X) ;Gets the IEN of the data source the builds the ^TMP("PXK" node for it
- +1 SET ^TMP("PXK",$JOB,"SOR")=$$SOURCE(X)
- +2 QUIT
- +3 ;
- PRVCLASS(PROVIDER,VISITDT) ;See if this is a good provider
- +1 ;Call with a pointer to $VA(200, and a date
- +2 ; (if no date is passed then it defauts to DT) and returns
- +3 ;IEN^Occupation^specialty^sub-specialty^Effective date^expiration date
- +4 ; if + of the return is >0 provider is active
- +5 ; else -1 the provider is not active or bad call
- +6 ; else -2 if no current person class.
- +7 ;
- +8 IF VISITDT=""
- SET VISITDT=DT
- +9 IF VISITDT<1800000
- QUIT -1
- +10 IF '$DATA(^VA(200,+PROVIDER,0))
- QUIT -1
- +11 ;
- +12 NEW PXACTIVE
- +13 SET PXACTIVE=$PIECE(^VA(200,PROVIDER,0),"^",11)
- +14 IF PXACTIVE'=""
- IF PXACTIVE<VISITDT
- QUIT -1
- +15 QUIT $$GET^XUA4A72(PROVIDER,VISITDT)
- +16 ;