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

PSN50612.m

Go to the documentation of this file.
  1. PSN50612 ;BIR/LDT - API FOR INFORMATION FROM FILE 50.612; 5 Sep 03
  1. ;;4.0; NATIONAL DRUG FILE;**80**; 30 Oct 98
  1. ;
  1. DATA(PSNIEN,LIST) ;
  1. ;PSNIEN - IEN of entry in NATIONAL DRUG TRANSLATION file (#50.612).
  1. ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
  1. ; Field Number of the data piece being returned.
  1. N DIERR,ZZERR,PSN50612,PSN,CNT
  1. I $G(LIST)']"" Q
  1. K ^TMP($J,LIST)
  1. I +$G(PSNIEN)'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
  1. I $G(PSNIEN)]"",+$G(PSNIEN)'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
  1. I $G(PSNIEN)]"" N PSNIEN2 S PSNIEN2=$$FIND1^DIC(50.612,"","B","`"_PSNIEN,,,"") D
  1. .I +PSNIEN2'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
  1. .S ^TMP($J,LIST,0)=1
  1. .D GETS^DIQ(50.612,+PSNIEN,"10;11","IE","PSN50612") S PSN(1)=0
  1. .F S PSN(1)=$O(PSN50612(50.612,PSN(1))) Q:'PSN(1) D SETZRO
  1. K ^TMP("DILIST",$J)
  1. Q
  1. SETZRO ;
  1. S ^TMP($J,LIST,+PSN(1),10)=$G(PSN50612(50.612,PSN(1),10,"I"))
  1. S ^TMP($J,LIST,+PSN(1),11)=$G(PSN50612(50.612,PSN(1),11,"I"))
  1. Q