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

PSO5291.m

Go to the documentation of this file.
PSO5291 ;BHM/DB - TPB Eligibility file API ; 18 JUL 05
 ;;7.0;OUTPATIENT PHARMACY;**213**;DEC 1997
PSO(PSOIEN,PSOTXT,LIST) ;SDD 3.2.21
 ;PSOIEN - IEN
 ;PSOTXT - FREE TEXT ENTRY
 Q:$G(LIST)=""
 N DA,DIC,DR,DIQ,X K ^TMP($J,LIST),^UTILITY("DIQ1",$J)
 I $G(PSOIEN)="",$G(PSOTXT)="" S ^TMP($J,LIST,0)="-1^NO DATA FOUND" Q
 I $G(PSOIEN)]"" D  G Q
 .I '$G(^PS(52.91,PSOIEN,0)) S ^TMP($J,LIST,PSOIEN,0)="-1^NO DATA FOUND" Q
 .S DA=PSOIEN D TMP
 I $G(PSOTXT)]"" D  G Q
 .S DA=$O(^DPT("B",PSOTXT,0)) I DA="" S ^TMP($J,LIST,PSOTXT,0)="-1^NO DATA FOUND" Q
 .D TMP
 Q
TMP S ^TMP($J,LIST,DA,0)=1
 S DIC=52.91,DR=".01:11",DIQ(0)="IE"
 D EN^DIQ1 I '$D(^UTILITY("DIQ1",$J)) S ^TMP($J,LIST,DA,0)="-1^NO DATA FOUND" Q
 F X=.01,1,2,3,4,5,6,7,8,9,10,11 D
 .S ^TMP($J,LIST,DA,X)=$G(^UTILITY("DIQ1",$J,52.91,DA,X,"I"))
 .S ^TMP($J,LIST,DA,X)=$S($G(^UTILITY("DIQ1",$J,52.91,DA,X,"E"))'="":^TMP($J,LIST,DA,X)_"^"_$G(^UTILITY("DIQ1",$J,52.91,DA,X,"E")),1:"")
 S DFN=$G(^UTILITY("DIQ1",$J,52.91,DA,.01,"I")),^TMP($J,LIST,"B",DFN,DA)=""
 K ^UTILITY("DIQ1",$J)
 Q
Q K DA,DFN,DIC,DIQ,DR,LIST,PSOIEN,PSOTXT,X Q