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

AUPATDIC.m

Go to the documentation of this file.
AUPATDIC ; IHS/ACC - GATEWAY TO IHS GENERAL PATIENT LOOKUP ; [ 02/18/87  8:01 AM ]
 I $D(AU)#2 S:AU'[U AU=U_AU D @AU G COMMON
 G:DIPGM(0)=2 EN2
EN1 ; FIRST ENTRY FROM DIC
 S AUIHADA=0 S:'$D(DIC("W")) DIC("W")=""
 I DIC(0)["A" S AUIHADA=1 S:'$D(DIC("A")) DIC("A")="Select PATIENT: " S:$E(DIC("A"),1,3)="VA " DIC("A")=$E(DIC("A"),4,255)
 G:DIC(0)["A" ASK^DIC
EN2 ; SECOND ENTRY FROM DIC OR FALL-THROUGH IF NO 'ASK' INDICATED
 K DIC("A") ;**********
 S:'$D(AUIHADA) AUIHADA=0
 I $D(DIC("W")),DIC("W")="" K DIC("W")
 I DIC'="^AUPNPAT(",DIC'="^DPT(" G RTN^DIC
 G:"`^ "[$E(X) RTN^DIC
 I X="?BAD" S Y=-1 Q
 I X'["?",'$D(DUZ(2)) S DUZ(2)=0 W:DIC(0)["A" !,*7,"WARNING: SITE NUMBER SET TO 0 (""UNIVERSAL"")",!
 D ^AUIHSPAT
 I Y<0,U'[X S:AUIHADA&(DIC(0)'["A") DIC(0)=DIC(0)_"A" I DIC(0)["A" S DIPGM(0)=1,D="B" G AUPATDIC
 K AUIHADA
COMMON ;
 I $D(DIC(0)),DIC(0)["Z",+Y>0 S Y(0)=^DPT(+Y,0)
 Q