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

PSJ53P46.m

Go to the documentation of this file.
PSJ53P46 ;SLC/JLC - API FOR INFORMATION FROM FILE 53.46; ;12/21/15  12:14
 ;;5.0;INPATIENT MEDICATIONS;**307**;16 DEC 97;Build 18
 ;
 ;
 ;
ALL(PSJIEN,LIST) ;
 ;PSJIEN - IEN of CLINIC from the HOSPITAL LOCATION file (#44).
 ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
 ;       Field Number of the data piece being returned.
 ;Returns NUMBER OF DAYS UNTIL STOP (#1), AUTO-DC IMO ORDERS (#2), SEND TO BCMA? (#3)
 ;        IMO DC/EXPIRED DATE LIMIT (#6), PRE-EXCHANGE REPORT DEVICE (#5), MISSING DOSE PRINTER (#4)
 N PSJ53P46,PSJ,PSJIEN2,PSJIEN3
 I $G(LIST)="" Q
 K ^TMP($J,LIST)
 I $G(PSJIEN)="" S ^TMP($J,LIST,0)="-1^NO CLINIC SPECIFIED" Q
 I $G(PSJIEN)]"",+$G(PSJIEN)'>0 S ^TMP($J,LIST,0)="-1^NO DATA FOUND" Q
 I $G(PSJIEN)]"",'$D(^PS(53.46,"B",PSJIEN)) S ^TMP($J,LIST,0)="-1^NO DATA FOUND"
 S PSJIEN3=$O(^PS(53.46,"B",PSJIEN,""))
 I +$G(PSJIEN3)>0 D
 . S ^TMP($J,LIST,0)=1
 . D GETS^DIQ(53.46,+PSJIEN3,"1;2;3;4;5;6","IE","PSJ53P46")
 . S PSJ(1)=$O(PSJ53P46(53.46,"")) Q:'PSJ(1)  D SETALL
 K ^TMP("DILIST",$J)
 Q
 ;
SETALL ;
 N I
 F I=1:1:6 S ^TMP($J,LIST,1,I)=$G(PSJ53P46(53.46,PSJ(1),I,"I"))_"^"_$G(PSJ53P46(53.46,PSJ(1),I,"E"))
 Q
 ;