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

BKMPLKP.m

Go to the documentation of this file.
  1. BKMPLKP ;PRXM/HC/ALA - Patient Lookup ; 19 Jul 2005 12:32 PM
  1. ;;2.1;HIV MANAGEMENT SYSTEM;;Feb 07, 2011
  1. ;
  1. ;** Program Description **
  1. ; This program contains a registry patient lookup as well as
  1. ; a standard patient lookup
  1. ;
  1. Q
  1. ;
  1. RLK(SCREEN) ; EP - Registry Lookup
  1. K DFN,BKMRIEN,PTNAME,SEX,SSN,DOB,AUPNDOB,AGE,AUPNDOD,AUPNPAT,AUPNDAYS,AUPNSEX
  1. ; Input Variable
  1. ; SCREEN - any DIC("S") screen value
  1. ;
  1. ; Output variables returned if patient selected
  1. ; BKMRIEN - Registry IEN
  1. ; DFN - Patient IEN
  1. ; PTNAME - Patient Name
  1. ; SEX - Patient Sex
  1. ; SSN - Patient SSN
  1. ; DOB - Patient Date of Birth
  1. ; AUPNDOB - Patient Date of Birth
  1. ; AGE - Patient Age
  1. ; AUPNDOD - Patient Date of Death
  1. ; AUPNPAT - Patient IEN
  1. ; AUPNDAYS - Patient Age in # of Days
  1. ;
  1. NEW Y,X,DIC
  1. I $G(SCREEN)'="" S DIC("S")=SCREEN
  1. S DIC("A")="Registry Patient Name (HRN, DOB, SSN): ",DIC(0)="AEMQZ",DIC="^BKM(90451," D ^DIC
  1. I Y=-1 K SCREEN Q
  1. ;S DFN=+Y,BKMRIEN=$O(^BKM(90451,"B",DFN,"")),PTNAME=$P(^DPT(DFN,0),U,1)
  1. S BKMRIEN=+Y,DFN=$P(^BKM(90451,BKMRIEN,0),U,1),PTNAME=$P(^DPT(DFN,0),U,1)
  1. K SCREEN
  1. I $G(AUPNSEX)="" S Y=DFN D ^AUPNPAT K Y
  1. Q
  1. ;
  1. PLK ; EP - Patient Lookup
  1. K DFN,PTNAME,SEX,SSN,DOB,AUPNDOB,AGE,AUPNDOD,AUPNPAT,AUPNDAYS
  1. ;
  1. ; Output variables returned if patient selected
  1. ; DFN - Patient IEN
  1. ; SEX - Patient Sex
  1. ; SSN - Patient SSN
  1. ; DOB - Patient Date of Birth
  1. ; AUPNDOB - Patient Date of Birth
  1. ; AGE - Patient Age
  1. ; AUPNDOD - Patient Date of Death
  1. ; AUPNPAT - Patient IEN
  1. ; AUPNSEX - Patient Sex
  1. ; AUPNDAYS - Patient Age in # of Days
  1. ; PTNAME - Patient name
  1. ;
  1. NEW Y,X,DIC,DO
  1. ; PRX/HMS/DLS 3/30/2006 Added prompt to include HRN,DOB,SSN.
  1. S DIC("A")="Select Patient Name (HRN, DOB, SSN):"
  1. S DIC="^AUPNPAT(",DIC(0)="AEMQZ" D ^DIC
  1. S PTNAME=$G(Y(0,0))
  1. Q
  1. ;
  1. PLKN(NDFN) ; Non-interactive Patient Lookup
  1. ;
  1. ; Input Parameter
  1. ; NDFN - Patient IEN
  1. ;
  1. ; Output Parameters
  1. ; See list in PLK
  1. ;
  1. I $G(NDFN)="" Q
  1. NEW Y,X,DIC,DO
  1. S DIC="^AUPNPAT(",DIC(0)="MNQZ",X=NDFN D ^DIC
  1. K NDFN
  1. Q