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

APCDFINQ.m

Go to the documentation of this file.
APCDFINQ ; IHS/CMI/LAB - DATA ENTRY OPERATOR INQUIRY 3/16/93 3:11 PM ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;
ASKPAT D GETPAT
 I APCDPAT="" W !!,"No PATIENT selected!" D EOJ Q
 D GETVISIT
 I APCDVSIT="" W !!,"No VISIT selected!" G ASKPAT
 D DSPLY W !!
 D EOJ
 Q
 ;
GETPAT ; GET PATIENT
 W !
 S APCDPAT=""
 S DIC="^AUPNPAT(",DIC(0)="AEMQ" D ^DIC K DIC
 Q:Y<0
 S APCDPAT=+Y
 Q
 ;
GETVISIT ;
 S APCDLOOK="",APCDVSIT=""
 K APCDVLK
 D ^APCDVLK
 K APCDLOOK
 Q
 ;
DSPLY ;
 ;check visit with ien in APCDVSIT
 W !
 S Y=$P(^AUPNVSIT(APCDVSIT,0),U) X ^DD("DD") W !," Visit date/time: ",Y,"   [internal entry# ",APCDVSIT,"]"
 S APCDDATE=$O(^APCDFORM("AB",APCDVSIT,"")) I APCDDATE="" W !," -- no posting data for that visit!" Q
 S Y=$P(^APCDFORM(APCDDATE,0),U) X ^DD("DD") W !," Posting date: ",Y
 S APCDMULT=$O(^APCDFORM("AB",APCDVSIT,APCDDATE,"")) I APCDMULT="" W !," -- missing form control file entry!" Q
 S APCDUSR=$P(^APCDFORM(APCDDATE,11,APCDMULT,0),U,2)
 W !," Data entry operator: ",$P(^VA(200,APCDUSR,0),U)
 W !,"Date Last Modified: ",$$VAL^XBDIQ1(9000010,APCDVSIT,.13)
 W !,"User Last Mofified: ",$$VAL^XBDIQ1(9000010,APCDVSIT,.23)
 Q
 ;
EOJ ; EOJ HOUSE KEEPING
 K %,%DT,%X,%Y,C,DIYS,X,Y
 K APCDCLN,APCDCAT,APCDDATE,APCDLOC,APCDPAT,APCDVSIT,APCDLOOK,APCDTYPE,APCDMULT,APCDUSR
 K AUPNPAT,AUPNDAYS,AUPNDOB,AUPNSEX,AUPNDOD
 Q