Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PXBSTOR1

PXBSTOR1.m

Go to the documentation of this file.
PXBSTOR1 ;ISL/JVS - REMOVE THE DELETED PROVIDER FROM CPT'S ;7/24/96  10:29
 ;;1.0;PCE PATIENT CARE ENCOUNTER;**88**;Aug 12, 1996
 ;
 ;
 ;
 ;
DCPT(CPTPRV,PXBVST) ;---ENTRY POINT
 ;CPTPRV=IEN of Provider to be removed
 ;PXBVST=VISIT of the encounter
 ;
 ;
 Q:'$D(CPTPRV)  Q:'$D(PXBVST)
 ;
 K ^TMP("PXK",$J)
 N IEN
 S IEN=0 F  S IEN=$O(^AUPNVCPT("AD",PXBVST,IEN)) Q:IEN=""  D
 .I $D(^AUPNVCPT(IEN,12)),$P(^AUPNVCPT(IEN,12),"^",4)=CPTPRV D CHANGE
 Q
CHANGE ;--Remove the Provider form the CPT code
 ;
 I '$D(^TMP("PXBSTOR",$J,"SEQ")) S SEQ=1
 I $D(^TMP("PXBSTOR",$J,"SEQ")) S SEQ=^TMP("PXBSTOR",$J,"SEQ")
 ;------CHANGE SOURCE TO MATCH THAT SENT IN -********-
 S ^TMP("PXK",$J,"SOR")=$O(^PX(839.7,"B","SD/PCE-INTERFACE-PROMPTS",0))
 ;-------------
 S ^TMP("PXK",$J,"VST",1,"IEN")=PXBVST
 S ^TMP("PXK",$J,"VST",1,0,"AFTER")=$G(^AUPNVSIT(PXBVST,0))
 S ^TMP("PXK",$J,"VST",1,0,"BEFORE")=$G(^AUPNVSIT(PXBVST,0))
 ;
 S (CPTBEF,CPTAFT)=$G(^AUPNVCPT(IEN,0))
 S (CPTBEF12,CPTAFT12)=$G(^AUPNVCPT(IEN,12))
 S $P(CPTAFT12,"^",4)="@"
 ;
 S SEQ=SEQ+(1)
 ;
 S ^TMP("PXK",$J,"CPT",SEQ,0,"AFTER")=CPTAFT
 S ^TMP("PXK",$J,"CPT",SEQ,0,"BEFORE")=CPTBEF
 S ^TMP("PXK",$J,"CPT",SEQ,12,"AFTER")=CPTAFT12
 S ^TMP("PXK",$J,"CPT",SEQ,12,"BEFORE")=CPTBEF12
 S ^TMP("PXK",$J,"CPT",SEQ,"IEN")=IEN
 ;
 ;
 ;
 D EN1^PXKMAIN
 K ^TMP("PXK",$J)
 ;
 ;
 Q
STP ;--AMIS STOP CODES
 ;--STOP CODE ARE ON PIECE 10 AND 11 IS THE VISIT
 Q:'$D(REQI)
 N SOURCE
 S SOURCE=$O(^PX(839.7,"B","SD/PCE-INTERFACE-PROMPTS",0))
 S STOPI=$P(REQI,"^",10)
 S SECVSIT=$P(REQI,"^",11)
 S VISIT=+$$STOPCODE^PXUTLSTP(SOURCE,STOPI,PXBVST,SECVSIT)
 Q