VistA-WorldVistAEHR/r/OUTPATIENT_PHARMACY-PSO-APS.../PSOQ0236.m

22 lines
941 B
Mathematica

PSOQ0236 ;HINES/RMS - HS VERSION PRE-ADMISSION RX PROFILE ; 11 Feb 2008 9:42 AM
;;7.0;OUTPATIENT PHARMACY;**294**;DEC 1997;Build 13
;
;Reference to BCMALG^PSJMUTL supported by DBIA 5058
;Reference to LIST^TIULMED supported by DBIA 5129
RPT S PSOQDFN=DFN
S TIUDATE=180,PSOQT=$$LIST^TIULMED(PSOQDFN,"PSOQR",0,0,3)
S PSOQPTNM=$P(^DPT(PSOQDFN,0),"^")
D CKP^GMTSUP Q:$D(GMTSQIT) ;->
D CKP^GMTSUP Q:$D(GMTSQIT)
D ATS^PSJMUTL(68,68,1) W !,"Allergies: " D:+PSGVALG
. F I=1:1 W PSGVALG(I)_", " Q:'$D(PSGVALG(I+1))
D CKP^GMTSUP Q:$D(GMTSQIT)
W !,"Adverse Reactions: " D:+PSGVADR W:'+PSGVADR "NONE"
. F I=1:1 W PSGVADR(I)_", " Q:'$D(PSGVADR(I+1))
W !! S PSOQL=0 F S PSOQL=$O(PSOQR(PSOQL)) Q:PSOQL'=+PSOQL Q:$G(PSOQSTOP) D ;
. W !,PSOQR(PSOQL,0) D CKP^GMTSUP Q:$D(GMTSQIT) ;->
K PSOQ,PSOQDFN,PSOQL,PSOQR,PSOQT,PSOQPTNM,VADM,PSGP,PSGVALG,PSGVADR
K PSOQSTOP,DIR,DIROUT,DIRUT,DTOUT,DUOUT,I,X,Y,VA,VAERR,PSGADR,PSGALG
K TIUDATE
Q