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

DVBAREG3.m

Go to the documentation of this file.
  1. DVBAREG3 ;ALB/JLU;continuation of DVBAREG2 and DVBAREG1
  1. ;;2.7;AMIE;;Apr 10, 1995
  1. ;
  1. DOC(ANS) ;returns a document type.
  1. ;the return will either be a "A" for admission or "L"
  1. S ANS=$S(^TMP("DVBA",$J,ANS)["ADMISSION":"A",1:"L")
  1. Q ANS
  1. ;
  1. PAT() ;this is a function call to look up the patient
  1. N STOP
  1. S DIC="^DPT(",DIC(0)="AEMQZ",DIC("A")="Enter Patient name: "
  1. K DIC("W")
  1. D ^DIC
  1. I $D(DTOUT)!($D(DUOUT))!(X="") S STOP=0
  1. E S STOP=Y
  1. Q STOP
  1. ;
  1. SET1 ;sets more variables
  1. S (ONFILE,REOPEN,ARROWOUT,OUT)=0
  1. Q
  1. ;
  1. SET2 ;sets the patient information variables
  1. S PNAM=$P(DFN,U,2),SSN=$P(^DPT(+DFN,0),U,9)
  1. S CNUM=$S($D(^DPT(+DFN,.31)):$P(^(.31),U,3),1:"Unknown")
  1. Q