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

RABWPCE.m

Go to the documentation of this file.
  1. RABWPCE ;HISC/MM - Billing Awareness Project: PCE API ; 3/23/04 10:17am
  1. ;;5.0;Radiology/Nuclear Medicine;**41,70**; Mar 16, 1998;Build 7
  1. Q
  1. ;
  1. DX(RAO) ; Create ^TMP("RAPXAPI",$J,"DX/PL" for PCE API: Ordering ICD Dx.
  1. ; Called from LON+n^RAPCE.
  1. ; ^RAO(75.1,RAO,"BAx",0) = ICD Diagnosis^SC^AO^IR^EC^SHAD^MST^HNC
  1. ; NOTE: "EC" now represents "SWAC" but this internal value is not being changed. only
  1. ; external display text is being modified. This instance of "EC" is passed to PCE and
  1. ; PCE will handle converting it to any external value on their end.
  1. ; Set an Order" node for Billing Replacement
  1. S ^TMP("RAPXAPI",$J,"PROCEDURE",1,"ORD REFERENCE")=$P(^RAO(75.1,RAO,0),U,7)
  1. I '$D(^RAO(75.1,RAO,"BA")) Q
  1. N RA1,RA2,RA3,RACNT,RADXTYP,RAIND
  1. ;
  1. ; Create Temp. Array of the Clinical Indicators.
  1. S RAIND(1)="SC",RAIND(2)="AO",RAIND(3)="IR"
  1. S RAIND(4)="EC",RAIND(5)="MST",RAIND(6)="HNC",RAIND(7)="CV",RAIND(8)="SHAD"
  1. ;
  1. S RACNT=0
  1. S RA2=^RAO(75.1,RAO,"BA") D DXPL ; Primary Ordering ICD Dx.
  1. S RA1=0
  1. F S RA1=$O(^RAO(75.1,RAO,"BAS",RA1)) Q:+RA1<1 S RA2=^(RA1,0) D DXPL
  1. Q
  1. ;
  1. DXPL ; Create "DX/PL" Node.
  1. S RACNT=RACNT+1
  1. S RADXTYP=$S(RACNT=1:"P",1:"S")
  1. S ^TMP("RAPXAPI",$J,"DX/PL",RACNT,"DIAGNOSIS")=$P(RA2,U)
  1. S ^TMP("RAPXAPI",$J,"DX/PL",RACNT,"PRIMARY")=RADXTYP
  1. ;F RA3=2:1:8 I $P(RA2,U,RA3)'="" D
  1. F RA3=2:1:9 D
  1. .S ^TMP("RAPXAPI",$J,"DX/PL",RACNT,"PL "_RAIND(RA3-1))=$P(RA2,U,RA3)
  1. Q
  1. ;
  1. PROCDX(X) ; Called from PROC^RAPCE.
  1. ; Add Ordering ICD Dx to Procedure for Billing Purposes.
  1. N I
  1. F I=1:1:9 Q:'$D(^TMP("RAPXAPI",$J,"DX/PL",I,"DIAGNOSIS")) D
  1. .I I=1 S ^TMP("RAPXAPI",$J,"PROCEDURE",X,"DIAGNOSIS")=^("DIAGNOSIS") Q
  1. .S ^TMP("RAPXAPI",$J,"PROCEDURE",X,"DIAGNOSIS "_I)=^("DIAGNOSIS")
  1. Q