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

VBECRPCH.m

Go to the documentation of this file.
  1. VBECRPCH ; HOIFO/BNT - VBECS HCPCS Codes lookup;19 May 2004
  1. ;;2.0;VBEC;;Jun 05, 2015;Build 4
  1. ;
  1. ; Note: This routine supports data exchange with an FDA registered
  1. ; medical device. As such, it may not be changed in any way without
  1. ; prior written approval from the medical device manufacturer.
  1. ;
  1. ; Integration Agreements:
  1. ; Reference to CPT CATEGORY file supported by IA #1587
  1. ; Reference to CPT file supported by IA #4776
  1. ; Reference to LIST^DIC supported by IA #2051
  1. ; Reference to $$FIND1^DIC supported by IA #2051
  1. ; Reference to $$CHARCHK^XOBVLIB supported by IA #4090
  1. ; Reference to $$CPT^ICPTCOD supported by IA #1995
  1. ;
  1. QUIT
  1. ;
  1. ; ---------------------------------------------------------------
  1. ; Private Method Supports IA #4610
  1. ; ---------------------------------------------------------------
  1. HCPCS(RESULTS) ; Get active HCPCS codes from the CPT file for Path/Lab CPT Categories
  1. ;
  1. N OUT,X
  1. S VBECCNT=0
  1. S RESULTS=$NA(^TMP("VBECHCPCS",$J))
  1. K @RESULTS,^TMP("DILIST",$J)
  1. D BEGROOT^VBECRPC("Root")
  1. S VBHPC=194
  1. ;The following lines were commented out to remove the lookup and switch to a hard coded variable.
  1. ;S VBHPC=$$FIND1^DIC(81.1,,,"PATHOLOGY AND LABORATORY SERVICES",,,"VBERR")
  1. ;I 'VBHPC!($D(VBERR)) D Q
  1. ;. D ERROR^VBECRPC("Error collecting HCPCS data")
  1. ;. D ENDROOT^VBECRPC("Root")
  1. ;. Q
  1. S VBSCRN="N CPT S CPT=$$CPT^ICPTCOD(Y) I $P(CPT,U,4)="_VBHPC_",$P(CPT,U,7),$P(CPT,U,5)=""H"""
  1. D LIST^DIC(81,,.01,,,,,"D",VBSCRN,,.OUT,"VBERR")
  1. I $D(VBERR) D Q
  1. . D ERROR^VBECRPC("Error collecting HCPCS data")
  1. . D ENDROOT^VBECRPC("Root")
  1. . Q
  1. ;Replace the next lines with code to call $$CPT^ICPTCOD(x) and get code and name.
  1. ;Use ^XTMP($J,"DILIST","ID",n,.01)=P2028 to get the code (28 characters)
  1. S VBB=0 F S VBB=$O(^TMP("DILIST",$J,"ID",VBB)) Q:'VBB S VBDATA=^TMP("DILIST",$J,"ID",VBB,.01) D
  1. . S VBDATA=$$CPT^ICPTCOD(VBDATA) Q:$P(VBDATA,"^")=-1
  1. . D ADD^VBECRPC("<HCPCS>")
  1. . D ADD^VBECRPC("<Code>"_$P(VBDATA,"^",2)_"</Code>")
  1. . D ADD^VBECRPC("<Name>"_$P(VBDATA,"^",3)_"</Name>")
  1. . D ADD^VBECRPC("</HCPCS>")
  1. ;S VBB=0 F S VBB=$O(^TMP("DILIST",$J,"ID",VBB)) Q:'VBB S VBDATA="" D
  1. ; . D ADD^VBECRPC("<HCPCS>")
  1. ; . F VBC=".01^Code","2^Name" D ADD^VBECRPC("<"_$P(VBC,"^",2)_">"_$$STRIPL^VBECRPC($$CHARCHK^XOBVLIB(^TMP("DILIST",$J,"ID",VBB,$P(VBC,"^"))))_"</"_$P(VBC,"^",2)_">")
  1. ; . D ADD^VBECRPC("</HCPCS>")
  1. D ENDROOT^VBECRPC("Root")
  1. K @OUT,VBB,VBC,VBDATA,VBECCNT,VBFLD,VBHPC,VBSCRN
  1. Q