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

BCHUDISP.m

Go to the documentation of this file.
BCHUDISP ; IHS/CMI/LAB - DISPLAY A RECORD (FILEMAN INQUIRE FORMAT) ; 
 ;;2.0;IHS RPMS CHR SYSTEM;;OCT 23, 2012;Build 27
 ;
 D GETDATE
 I BCHDATE="" W !!,"No Date entered!" D EOJ Q
 D GETPROV
 K BCHR,BCHVRECS,BCHRRECS D RECLKUP
 I '$G(BCHR) D EOJ Q
 D FORMAT
 I BCHTYPE="" D EOJ Q
 I BCHTYPE="S" D DSPLY,EOJ Q
 I BCHTYPE="C" D PRINT1^BCHUFPP
 D EOJ
 Q
GETDATE ; GET DATE OF ENCOUNTER
 W !
 S BCHDATE=""
 S DIR(0)="DO^:"_DT_":EPT",DIR("A")="Enter DATE OF SERVICE" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 Q:$D(DIRUT)
 S %DT="ET" D ^%DT G:Y<0 GETDATE
 I Y>DT W "  <Future dates not allowed>",$C(7),$C(7) K X G GETDATE
 K BCHODAT
 S BCHDATE=Y
 ;
 Q
 ;
GETPROV ;get location of encounter
 S BCHPROV=""
 S DIC("A")="Enter CHR (if known): ",DIC="^VA(200,",DIC(0)="AEMQ" D ^DIC K DIC,DA
 Q:Y<0
 S BCHPROV=+Y
 Q
DSPLY ;
 D EN^BCHUDSP
 Q
 ;
RECLKUP ;
 D ^BCHULKUP
 Q
EOJ ; END OF JOB
 K BCHPROV,BCHDATE,DFN,BCHODAT,BCHR,BCHTYPE
 Q
 ;
EN ;EP called from list manager display a record protocol
 D EN^VALM2(XQORNOD(0),"OS")
 I '$D(VALMY) W !,"No records selected." G EXIT
 S BCHR=$O(VALMY(0)) I 'BCHR K BCHR,VALMY,XQORNOD W !,"No record selected." G EXIT
 S BCHR=BCHVRECS("IDX",BCHR,BCHR) I 'BCHR K BCHRDEL,BCHR D PAUSE^BCHUTIL1 D EXIT Q
 I '$D(^BCHR(BCHR,0)) W !,"Not a valid CHR RECORD." K BCHRDEL,BCHR D PAUSE^BCHUTIL1 D EXIT Q
 D FULL^VALM1
 D FORMAT
 I BCHTYPE="" G DONE
 I BCHTYPE="S" D EN^BCHUDSP G DONE
 I BCHTYPE="C" D PRINT1^BCHUFPP
DONE D EXIT
 Q
FORMAT ;
 S BCHTYPE=""
 S DIR(0)="S^C:CHR PCC Form Format;S:Standard Display",DIR("A")="Select Print Format",DIR("B")="C" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 Q:$D(DIRUT)
 S BCHTYPE=Y
 Q
EXIT ;EP
 S VALMBCK="R"
 D GATHER^BCHUARL
 S VALMCNT=BCHRCNT
 D HDR^BCHUAR
 K BCHV,BCHF,BCHDR,DFN,BCHR,BCHQUIT,BCHRDEL,BCHV,BCHVDLT,BCHTYPE,BCHPRNM
 Q