source: WorldVistAEHR/trunk/r/PHARMACY_DATA_MANAGEMENT-PSS/PSS59P7.m@ 846

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

initial load of WorldVistAEHR

File size: 1.2 KB
Line 
1PSS59P7 ;BHM/DB - Pharmacy System File API ;1 JUL 05
2 ;;1.0;PHARMACY DATA MANAGEMENT;**101,108**;9/30/97;Build 10
3PSS(PSSIEN,PSSTXT,LIST) ;SRS 3.2.78
4 ;PSSIEN - INTERNAL ENTRY NUMBER (optional)
5 ;PSSTXT - Free Text site name (optional)
6 ;LIST: Subscript name used in ^TMP global [REQUIRED]
7 N X,DA,DR,DIC,DIQ
8 I $G(PSSIEN)="",$G(PSSTXT)="" Q
9 I $G(LIST)="" Q
10 K ^TMP($J,LIST),DA,^UTILITY("DIQ1",$J),DIQ
11 I $G(PSSIEN)]"" S DA=PSSIEN I '$D(^PS(59.7,DA,0)) G RET0
12 I $G(PSSTXT)'="",$G(PSSIEN)'>0,'$D(^PS(59.7,"B",PSSTXT)) G RET0
13 I $G(PSSTXT)'="",$G(DA)'>0 S DA=$O(^PS(59.7,"B",PSSTXT,0))
14 K ^UTILITY("DIQ1",$J),DIC S DIC=59.7,DR=".01;40.1;49.99;81",DIQ(0)="IE" D EN^DIQ1
15 I '$D(^UTILITY("DIQ1",$J)) G RET0
16 S:$G(PSSTXT)="" PSSTXT=^UTILITY("DIQ1",$J,59.7,DA,.01,"E")
17 F X=40.1,49.99,81 S ^TMP($J,LIST,DA,X)=$G(^UTILITY("DIQ1",$J,59.7,DA,X,"I"))
18 S ^TMP($J,LIST,DA,40.1)=$S($G(^UTILITY("DIQ1",$J,59.7,DA,40.1,"E"))'="":^TMP($J,LIST,DA,40.1)_"^"_$G(^UTILITY("DIQ1",$J,59.7,DA,40.1,"E")),1:"")
19 S ^TMP($J,LIST,DA,81)=$S($G(^UTILITY("DIQ1",$J,59.7,DA,81,"E"))'="":^TMP($J,LIST,DA,81)_"^"_$G(^UTILITY("DIQ1",$J,59.7,DA,81,"E")),1:"")
20 S ^TMP($J,LIST,"B",PSSTXT,DA)=""
21 K PSSIEN,DA,X,PSSTXT,DR,DIC,^UTILITY("DIQ1",$J) Q
22RET0 ;return no data
23 S ^TMP($J,LIST,0)="-1^NO DATA FOUND" Q
Note: See TracBrowser for help on using the repository browser.