source: WorldVistAEHR/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSO53.m@ 1195

Last change on this file since 1195 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.0 KB
Line 
1PSO53 ;BHM/DB - API FOR PATIENT STATUS FILE ;8 JUN 05
2 ;;7.0;OUTPATIENT PHARMACY;**213,245**;DEC 1997;Build 20
3PSO(PSOIEN,PSOTXT,LIST) ;
4 N DA,DIQ,DR,X,I,DIC
5 I $G(LIST)'="" K ^TMP($J,LIST)
6 I $G(PSOIEN)="",$G(PSOTXT)="",$G(LIST)="" Q
7 I $G(PSOIEN)="",$G(PSOTXT)="",$G(LIST)'="" S ^TMP($J,LIST,0)="-1^NO DATA FOUND" Q
8 I $G(LIST)="" Q
9 I $G(PSOIEN)'>0,$G(PSOTXT)'="" S DA=$O(^PS(53,"B",PSOTXT,0)) I DA'>0 S ^TMP($J,LIST,0)="-1^NO DATA FOUND" Q
10 I $G(DA)'>0,$G(PSOIEN)>0 S DA=PSOIEN
11 K ^UTILITY("DIQ1",$J),DIC S DIC=53,DR=".01;2;3;4;5;6;15;16",DIQ(0)="IE" D EN^DIQ1
12 I '$D(^UTILITY("DIQ1",$J)) S ^TMP($J,LIST,PSOIEN,0)="-1^NO DATA FOUND" Q
13 F X=.01,2,3,4,5,6,15,16 S ^TMP($J,LIST,DA,X)=^UTILITY("DIQ1",$J,53,DA,X,"I")
14 S PSOTXT=$G(^UTILITY("DIQ1",$J,53,DA,.01,"E"))
15 F X=5,6,15,16 S ^TMP($J,LIST,DA,X)=$S(^UTILITY("DIQ1",$J,53,DA,X,"E")'="":^TMP($J,LIST,DA,X)_"^"_^UTILITY("DIQ1",$J,53,DA,X,"E"),1:"")
16 K ^UTILITY("DIQ1",$J) S ^TMP($J,LIST,"B",PSOTXT,DA)="",^TMP($J,LIST,DA,0)=$G(^TMP($J,LIST,DA,0))+1
17 K DA,DIC,DIQ,DA,DR,X Q
Note: See TracBrowser for help on using the repository browser.