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

PSGAP.m

Go to the documentation of this file.
PSGAP ;BIR/CML3-ACTION PROFILE (#1) ;12 Mar 98 / 9:28 AM
 ;;5.0; INPATIENT MEDICATIONS ;**8,111**;16 DEC 97
 N PSJNEW,PSGPTMP,PPAGE S PSJNEW=1
 D ENCV^PSGSETU I $D(XQUIT) Q
 ;
START ;
 N PSGWD,PSJPWDO
 S (PSGP,PSGAPWD,PSGAPWG)=0,(PSGAPWDN,PSGAPWGN)="",PSGSSH="AP",PSGY=1 S PSGPTMP=0,PPAGE=1 D GWP^PSJPDIR G:'$D(PSJSEL)!($G(PSJSTOP)=1) DONE D @PSJSEL("SELECT")
 S PSGSS=PSJSEL("SELECT") D EN^PSGAP0
 G:$G(PSJSTOP) START
 ;
DONE ;
 D ENKV^PSGSETU K CA,CNTR,DFN,DIAG,DO,DRG,FD,N,NF,ND,ND2,PSJJORD,PAGE,PDOB,PN,PND,PSEX,PSGAP,PSGAPTM,PSGAPWD,PSGAPWDN,PSGAPWG,PSGAPWGN,PSGDICA,PSGPAT,PSGSS,PSGSSH
 K PFLG,QFLG,PSGMTYPE,PSGFL,PSGEXPDT,PSGY,PSJSI,PSJSTOP,PSJACNWP,PSJOPC,PSJSEL,PT,RB,RTE,SD,SI,SM,ST,STRT,STP,STT,TM,WS,WT,ZTOUT,ZTSK,PSJDLW
 K ^TMP($J)
 Q
 ;
G ; get ward group
 S PSGAPWG=+PSJSEL("WG"),PSGAPWGN=$P(PSJSEL("WG"),"^",2) Q
 ;
W ; get ward (and Admin. Team if present)
 S (PSGWD,PSGAPWD)=+PSJSEL("W"),PSGAPWDN=$P(PSJSEL("W"),"^",2)
 I $D(PSJSEL("TM")) S TM="",PSJTEAM=1 F  S TM=$O(PSJSEL("TM",TM)) Q:TM=""  S PSGAPTM(TM)=TM
 Q
 ;
P ; get patient
 S PT="" F  S PT=$O(PSJSEL("P",PT)) Q:PT=""  S DFN="",DFN=$O(PSJSEL("P",PT,DFN)) Q:'DFN  S PSGPAT(DFN)=""
 Q
 ;
ENOR ;
 D ENCV^PSGSETU I $D(XQUIT) Q
 S PSGP=+ORVP D PSJAC2^PSJAC(1) S PSGPAT=PSGP,PSGPAT(DFN)="",(PSGAPWD,PSGAPWG)=0,(PSGAPWDN,PSGAPWGN)="",PSGSS="P" D EN^PSGAP0 S PSJNKF=1 G DONE
ENLM ;Entry point from PSJ LM AP1 protocol
 N PSJNEW,PSGPTMP,PPAGE S PSJNEW=1
 S PSGPTMP=0,PPAGE=1,PSGSSH="AP",PSGY=1
 D ENCV^PSGSETU I $D(XQUIT) Q
 S PSGPAT=PSGP,PSGPAT(DFN)="",(PSGAPWD,PSGAPWG)=0,(PSGAPWDN,PSGAPWGN)="",PSGSS="P" D EN^PSGAP0 S PSJNKF=1 G DONE