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

PSODOSU4.m

Go to the documentation of this file.
PSODOSU4 ;BIR/cmf - Dose Check Utility routine continued ;11/18/08
 ;;7.0;OUTPATIENT PHARMACY;**402,518**;DEC 1997;Build 3
 ;
 ;Called from PSODOSUT*.  The variable PSODTYPE is expected to be defined.
 ; PSODTYPE values can be N for dosing for new order, copy, and renews, E for edited and display of individual complex doses, and C for complex orders
 ;
WRITEXC ;format and write exception messages to the screen
 N PSORSNT1,PSORSNT3,PSORSNT4 S PSODLWW=0,DIWL=4,DIWR=76 K ^UTILITY($J,"W")
 I PSODLERB["Range Check Error Summary" S PSODLERS=1 I PSODLERZ W:'PSODLQT ! D HD Q:$G(PSODLQTC)
 I $G(PSODLERS),$L(PSODLERB)>76&($G(PSOCPXB)>1)  S PSODLERB=$E(PSODLERB,14,999),DIWR=76,DIWL=17,DIWF="W" S PSODLERW=1
 S X=PSODLERB D:'PSODLQT ^DIWP D HD Q:$G(PSODLQTC)
 I '$G(PSODLERW) S (PSODELXF,PSORSNT1,PSORSNT3)=0 F PSODELXR=0:0 S PSODELXR=$O(^UTILITY($J,"W",DIWL,PSODELXR)) Q:'PSODELXR  D
 .S PSORSNT1=PSORSNT1+1 I PSORSNT1=1 D SPAC
 .W:PSODELXF&('PSODLQT) ! D HD Q:$G(PSODLQTC)  W:'PSODLQT $S(PSORSNT1>1&(PSORSNT3):PSORSNT4,1:"   ")_$G(^UTILITY($J,"W",DIWL,PSODELXR,0)) S (PSONFRNF,PSODELXF,PSODLERZ,PSODLEXR,PSOEXCPT)=1
 I $G(PSODLERW)&('PSODLQT) D ^DIWW K PSODLERW,PSODLERL S PSODLWW=1 S PSOLASTD(PSOLASTS)=2
 K ^UTILITY($J,"W")
 Q
 ;
SPAC ; See if leading spaces need to be added after line 1
 N PSORSNT2,PSORSNT5
 S PSORSNT2=$G(^UTILITY($J,"W",DIWL,PSODELXR,0)) Q:$E(PSORSNT2)'=" "
 F PSORSNT3=1:1:$L(PSORSNT2) I $E(PSORSNT2,PSORSNT3)'=" " Q
 S:PSORSNT3'=$L(PSORSNT2) PSORSNT3=PSORSNT3+2 S PSORSNT4="" F PSORSNT5=1:1:PSORSNT3 S PSORSNT4=PSORSNT4_" "
 Q
 ;
HD ;
 D HD^PSODOSU2 Q
 ;;