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

BMCDSP.m

Go to the documentation of this file.
BMCDSP ; IHS/PHXAO/TMJ - BMC - DISPLAY REFERRAL RECORD ;  
 ;;4.0;REFERRED CARE INFO SYSTEM;;JAN 09, 2006
 ;
 ; This routine displays a RCIS REFERRAL record with subordinate
 ; file entries.
 ;
START ;
 D DEV^BMC
 Q:BMCQ
 F  D REFLOOP Q:BMCQ
 D EOJ
 Q
 ;
REFLOOP ; DISPLAY REFERRALS UNTIL DONE
 D GETREF
 Q:BMCQ
 D DISPLAY ;               display selected record
 U 0
 D HDR^BMC
 Q
 ;
GETREF ; GET REFERRAL
 S BMCQ=1
 W !
 S DIC="^BMCREF(",DIC(0)="AEMQ",DIC("A")="Select RCIS REFERRAL by Patient or by Referral Date or #: "
 D DIC^BMCFMC
 Q:Y<1
 S BMCRIEN=+Y
 S BMCQ=0
 Q
 ;
DISPLAY ; EP - DISPLAY REFERRAL RECORD AND SUBORDINATE FILE ENTRIES
 I $D(IO("Q")) D  Q
 . S ZTRTN="DISPLAYQ^BMCRDSP",ZTDESC="RCIS REFERRAL DISPLAY",ZTDTH=$H,ZTSAVE("BMC*")=""
 . D ^%ZTLOAD
 . Q
 D DISPLAYQ
 Q
 ;
DISPLAYQ ; EP - FOR TASKMAN
 U IO
 W @IOF
 D:$E(IOST,1,2)="P-" CONF^BMC
 W !
 S DIC="^BMCREF(",DA=BMCRIEN,DIQ(0)="C"
 D DIQ^BMCFMC
 D:$E(IOST,1,2)'="P-" PAUSE^BMC
 ;D DSPDX,DSPPX,DSPCMT
 D DSPDX,DSPPX
 F BMCCTYP="M","B","C","D" D DSPCMTS
 U 0
 I $D(ZTQUEUED) D EOJ S ZTREQ="@"
 Q
 ;
DSPDX ; DISPLAY DIAGNOSES
 S BMCY=0
 F  S BMCY=$O(^BMCDX("AD",BMCRIEN,BMCY)) Q:'BMCY  D
 . S DIC="^BMCDX(",DA=BMCY,DIQ(0)="C"
 . D DIQ^BMCFMC
 . I $E(IOST,1,2)'="P-" D PAUSE^BMC S:$D(DIRUT) BMCY=99999
 Q
 ;
DSPPX ; DISPLAY PROCEDURES
 S BMCY=0
 F  S BMCY=$O(^BMCPX("AD",BMCRIEN,BMCY)) Q:'BMCY  D
 . S DIC="^BMCPX(",DA=BMCY,DIQ(0)="C"
 . D DIQ^BMCFMC
 . I $E(IOST,1,2)'="P-" D PAUSE^BMC S:$D(DIRUT) BMCY=99999
 Q
 ;
DSPCMTS ; DISPLAY COMMENTS
 S BMCCMT=0
 F  S BMCCMT=$O(^BMCCOM("AD",BMCRIEN,BMCCMT))  Q:BMCCMT'?1N.N  D
 .Q:$P(^BMCCOM(BMCCMT,0),U,5)'=BMCCTYP
 .S DA=BMCCMT
 .D DSPCMT
 Q
DSPCMT ; DISPLAY COMMENTS
 Q:'DA
 S DIC="^BMCCOM("
 D DIQ^BMCFMC
 D:$E(IOST,1,2)'="P-" PAUSE^BMC
 Q
 ;
EOJ ;
 D:IO'=IO(0) ^%ZISC
 D ^BMCKILL
 Q