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

PSSDRDO2.m

Go to the documentation of this file.
PSSDRDO2 ;BIR/LE-Display Dosing related information for DRUG File(#50) entry ;07/14/15
 ;;1.0;PHARMACY DATA MANAGEMENT;**195**;9/30/97;Build 25
 ;
 ;Reference to DATA^PSN50P68 supported by DBIA 4545
 ;
 ;called from PSSDRDOS
CLEFF(PSSVAPRD) ;Retrieve and write Clinical Effects of Drug fields
 ;input:  PSSVAPRD = IEN for VA Product file (#50.68) 
 ;
 ; Clinical Effects of Drug fields
 Q:'$G(PSSVAPRD)
 K ^TMP($J,"PSSVAPR")
 D DATA^PSN50P68(PSSVAPRD,"","PSSVAPR") ;using the PRE encapuslation API
 N PSSII,PSSIII,PSSPKG,PSSPKG,PSSOMIT,PSSEXLMT,PSSCLEF,PSSNIEN
 S PSSNIEN=PSSVAPRD
 I $D(^TMP($J,"PSSVAPR",PSSNIEN)) D
 .S (PSSII,PSSIII)=0
 .F  S PSSII=$O(^TMP($J,"PSSVAPR",PSSNIEN,108,PSSII)) Q:PSSII=""  D
 ..S (PSSPKG,PSSOMIT,PSSEXLMT)=""
 ..F  S PSSIII=$O(^TMP($J,"PSSVAPR",PSSNIEN,108,PSSII,PSSIII)) Q:PSSIII=""  D
 ...S:PSSIII=.01 PSSPKG=^TMP($J,"PSSVAPR",PSSNIEN,108,PSSII,PSSIII)
 ...S:PSSIII=1 PSSOMIT=^TMP($J,"PSSVAPR",PSSNIEN,108,PSSII,PSSIII)
 ...S:PSSIII=2 PSSEXLMT=^TMP($J,"PSSVAPR",PSSNIEN,108,PSSII,PSSIII)
 ..S:PSSPKG'="" PSSCLEF(PSSPKG)=PSSOMIT_"^"_PSSEXLMT
 ;
 W !!,"CLINICAL EFFECT DURATION: ",$S($D(^TMP($J,"PSSVAPR",PSSNIEN,108)):"YES",1:"NO")
 ;If package IO is defined only show it, otherwise show all packages
 I $D(PSSCLEF("IO")) S PSSPKG="IO" D CLEFFS,CLEFFW(PSSPKG,PSSOMIT,PSSEXLMT) Q
 S PSSPKG="" F  S PSSPKG=$O(PSSCLEF(PSSPKG)) Q:PSSPKG=""  D
 .D CLEFFS,CLEFFW(PSSPKG,PSSOMIT,PSSEXLMT)
 Q
 ;
CLEFFS ;
 S (PSSOMIT,PSSEXLMT)="",PSSOMIT=$P(PSSCLEF(PSSPKG),"^"),PSSEXLMT=$P(PSSCLEF(PSSPKG),"^",2)
 Q
 ;
CLEFFW(PSSPKG,PSSOMIT,PSSEXLMT) ;
 N PSSPACK2 S PSSPACK2=""
 S (PSSOMIT,PSSEXLMT)="",PSSOMIT=$P(PSSCLEF(PSSPKG),"^"),PSSEXLMT=$P(PSSCLEF(PSSPKG),"^",2)
 N PSSPACK2 S PSSPACK2=""
 S PSSPACK2=$S(PSSPKG="I":"INPATIENT",PSSPKG="O":"OUTPATIENT",PSSPKG="IO":"BOTH INPATIENT AND OUTPATIENT",1:"")
 W !?3,PSSPACK2," DURATION LIMIT: "  W:PSSOMIT=0 PSSEXLMT
 W !?6,"OMIT EXP/DC ORDER CHECK: ",$S(PSSOMIT=1:"YES",PSSOMIT=0:"NO",1:"")
 K ^TMP($J,"PSSVAPR")
 Q
 ;