source: FOIAVistA/trunk/r/PHARMACY_DATA_MANAGEMENT-PSS/PSS52P7A.m@ 1492

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1PSS52P7A ;BIR/LDT - API FOR INFORMATION FROM FILE 52.7; 5 Sep 03
2 ;;1.0;PHARMACY DATA MANAGEMENT;**85,91**;9/30/97
3 ;
4 ;
5SETZERO ;
6 S ^TMP($J,LIST,+PSS(1),.01)=$G(PSS52P7(52.7,PSS(1),.01,"I"))
7 S ^TMP($J,LIST,"B",$G(PSS52P7(52.7,PSS(1),.01,"I")),+PSS(1))=""
8 S ^TMP($J,LIST,+PSS(1),1)=$S($G(PSS52P7(52.7,PSS(1),1,"I"))="":"",1:PSS52P7(52.7,PSS(1),1,"I")_"^"_PSS52P7(52.7,PSS(1),1,"E"))
9 S ^TMP($J,LIST,+PSS(1),2)=$G(PSS52P7(52.7,PSS(1),2,"I"))
10 S ^TMP($J,LIST,+PSS(1),.02)=$G(PSS52P7(52.7,PSS(1),.02,"I"))
11 S ^TMP($J,LIST,+PSS(1),7)=$G(PSS52P7(52.7,PSS(1),7,"I"))
12 S ^TMP($J,LIST,+PSS(1),9)=$S($G(PSS52P7(52.7,PSS(1),9,"I"))="":"",1:PSS52P7(52.7,PSS(1),9,"I")_"^"_PSS52P7(52.7,PSS(1),9,"E"))
13 S ^TMP($J,LIST,+PSS(1),17)=$S($G(PSS52P7(52.7,PSS(1),17,"I"))="":"",1:PSS52P7(52.7,PSS(1),17,"I")_"^"_PSS52P7(52.7,PSS(1),17,"E"))
14 S ^TMP($J,LIST,+PSS(1),8)=$S($G(PSS52P7(52.7,PSS(1),8,"I"))="":"",1:PSS52P7(52.7,PSS(1),8,"I")_"^"_PSS52P7(52.7,PSS(1),8,"E"))
15 Q
16 ;
17SETLTS ;
18 S ^TMP($J,LIST,+PSSIEN,"ELYTES",+PSS(2),.01)=$S($G(PSS52P7(52.702,PSS(2),.01,"I"))="":"",1:PSS52P7(52.702,PSS(2),.01,"I")_"^"_PSS52P7(52.702,PSS(2),.01,"E"))
19 S ^TMP($J,LIST,+PSSIEN,"ELYTES",+PSS(2),1)=$G(PSS52P7(52.702,PSS(2),1,"I"))
20 Q
21 ;
22SETLOOK ;
23 S ^TMP($J,LIST,+PSS(1),.01)=$G(PSS52P7(52.7,PSS(1),.01,"I"))
24 S ^TMP($J,LIST,"B",$G(PSS52P7(52.7,PSS(1),.01,"I")),+PSS(1))=""
25 S ^TMP($J,LIST,+PSS(1),.02)=$G(PSS52P7(52.7,PSS(1),.02,"I"))
26 S ^TMP($J,LIST,+PSS(1),2)=$G(PSS52P7(52.7,PSS(1),2,"I"))
27 Q
28 ;
29LOOP(PSSLOOP) ;
30 N CNT,PSSIEN S CNT=0
31 S PSSIEN=0 F S PSSIEN=$O(^PS(52.7,PSSIEN)) Q:'PSSIEN D @(PSSLOOP)
32 S ^TMP($J,LIST,0)=$S(CNT>1:CNT,1:"-1^NO DATA FOUND")
33 Q
341 ;
35 N CNT2
36 I $G(PSSFL) S ND=$P($G(^PS(52.7,+PSSIEN,"I")),U) I ND,+ND'>PSSFL Q
37 D GETS^DIQ(52.7,+PSSIEN,".01;1;2;.02;7;8;9;17","IE","PSS52P7") S PSS(1)=0
38 F S PSS(1)=$O(PSS52P7(52.7,PSS(1))) Q:'PSS(1) D SETZERO S CNT=CNT+1 D
39 .K PSS52P7 D GETS^DIQ(52.7,+PSSIEN,"4*","IE","PSS52P7") S (PSS(2),CNT2)=0
40 .F S PSS(2)=$O(PSS52P7(52.702,PSS(2))) Q:'PSS(2) D SETLTS S CNT2=CNT2+1
41 .S ^TMP($J,LIST,+PSSIEN,"ELYTES",0)=$S(CNT2>0:CNT2,1:"-1^NO DATA FOUND")
42 Q
43 ;
442 ;
45 K PSS52P7 D GETS^DIQ(52.7,+PSSIEN,".01;2;.02","IE","PSS52P7") S PSS(1)=0
46 F S PSS(1)=$O(PSS52P7(52.7,PSS(1))) Q:'PSS(1) D SETLOOK S CNT=CNT+1
47 Q
Note: See TracBrowser for help on using the repository browser.