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.
  1. PSGAP ;BIR/CML3-ACTION PROFILE (#1) ;12 Mar 98 / 9:28 AM
  1. ;;5.0; INPATIENT MEDICATIONS ;**8,111**;16 DEC 97
  1. N PSJNEW,PSGPTMP,PPAGE S PSJNEW=1
  1. D ENCV^PSGSETU I $D(XQUIT) Q
  1. ;
  1. START ;
  1. N PSGWD,PSJPWDO
  1. 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")
  1. S PSGSS=PSJSEL("SELECT") D EN^PSGAP0
  1. G:$G(PSJSTOP) START
  1. ;
  1. DONE ;
  1. 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
  1. 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
  1. K ^TMP($J)
  1. Q
  1. ;
  1. G ; get ward group
  1. S PSGAPWG=+PSJSEL("WG"),PSGAPWGN=$P(PSJSEL("WG"),"^",2) Q
  1. ;
  1. W ; get ward (and Admin. Team if present)
  1. S (PSGWD,PSGAPWD)=+PSJSEL("W"),PSGAPWDN=$P(PSJSEL("W"),"^",2)
  1. I $D(PSJSEL("TM")) S TM="",PSJTEAM=1 F S TM=$O(PSJSEL("TM",TM)) Q:TM="" S PSGAPTM(TM)=TM
  1. Q
  1. ;
  1. P ; get patient
  1. S PT="" F S PT=$O(PSJSEL("P",PT)) Q:PT="" S DFN="",DFN=$O(PSJSEL("P",PT,DFN)) Q:'DFN S PSGPAT(DFN)=""
  1. Q
  1. ;
  1. ENOR ;
  1. D ENCV^PSGSETU I $D(XQUIT) Q
  1. 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
  1. ENLM ;Entry point from PSJ LM AP1 protocol
  1. N PSJNEW,PSGPTMP,PPAGE S PSJNEW=1
  1. S PSGPTMP=0,PPAGE=1,PSGSSH="AP",PSGY=1
  1. D ENCV^PSGSETU I $D(XQUIT) Q
  1. S PSGPAT=PSGP,PSGPAT(DFN)="",(PSGAPWD,PSGAPWG)=0,(PSGAPWDN,PSGAPWGN)="",PSGSS="P" D EN^PSGAP0 S PSJNKF=1 G DONE