PSJORUTL ;BIR/MLM-MISC. PROCEDURE CALLS FOR OE/RR 3.0 ;24 Feb 99 / 10:43 AM ;;5.0; INPATIENT MEDICATIONS ;**4,14,22**;16 DEC 97 ; ;Reference to ^PS(50.416 is supported by DBIA 2196 ;Reference to ^PS(50.606 is supported by DBIA 2174 ;Reference to ^PS(52.6 is supported by DBIA 1231 ;Reference to ^PS(52.7 is supported by DBIA 2173 ;Reference to ^PSDRUG is supported by DBIA 2192 ;Reference to ^PSNDF( is supported by DBIA 2195 ;Reference to ^YSCL(603.01 is supported by DBIA 2697 ; ENDD(PD,TYP,PSJ,DFN) ; Find all entries in DRUG file (50) for the passed primary/usage. ;Input: PD - NATIONAL DRUG FILE ENTRY (20).PSNDF VA PRODUCT NAME ENTRY ; ^NDF ptr.NDF form ptr^NDF Name^Primary IEN^Primary ; Name^"99PSP". ; TYP- String identifying type of drug (O:OP; U:UD; I:IV etc). ;Output:PSJ- Array containing all entries in the DRUG file (50) tied ; to the PD for the type(s) of drugs specified. Array is ; returned: ARRAY(PSJ)=IEN^GENERIC NAME (.01)^PRICE PER ; DISPENSE UNIT (16)^NON-FORMULARY (51)^DISPENSE UNIT (14.5) ; ^MAX NUMBER OF REFILLS ;5.27.97/SAB ; If no 50 entries found, PSJ=0; Else PSJ=# of entries. ; N MAX,DEA,DEAI,DDRG,INACT,ND,X,Y S PSJ=0,PD=+$P(PD,U,4) F DDRG=0:0 S DDRG=$O(^PSDRUG("ASP",PD,DDRG)) Q:'DDRG S INACT=$G(^PSDRUG(DDRG,"I")) I ('INACT)!(INACT'