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

HBHCDEM.m

Go to the documentation of this file.
HBHCDEM ; LR VAMC(IRMS)/MJT-HBHC Medical Foster Home (MFH) demographic data entry ; May 20, 2021@13:31
 ;;1.0;HOSPITAL BASED HOME CARE;**24,32**;NOV 01, 1993;Build 58
 ;
START ; Initialization
 ;Sites must have at least one parent site defined.
 I $O(^HBHC(631.9,1,1,"B",""))="" D  Q
 . W !!,"No parent sites are defined at this facility."
 . W !,"Contact your HBPC Program Manager to define at least one"
 . W !,"parent site in option ""System Parameters Edit"".",!
 . N DIR
 . S DIR("A")="Press any key to continue",DIR(0)="FO"
 . D ^DIR
 S HBHCFORM=7
PROMPT ; Prompt user for Medical Foster Home (MFH) name
 K DIC,HBHCPRCT S DIC="^HBHC(633.2,",DIC(0)="AELMQZ" D ^DIC
 G:Y=-1 EXIT
 S HBHCDFN=+Y,HBHCXMT7=$P($G(^HBHC(633.2,HBHCDFN,12)),U)
 I (HBHCXMT7]"")&(HBHCXMT7'="N") D FORMMSG^HBHCUTL1 G:$D(HBHCNHSP) EXIT G:HBHCPRCT'=1 PROMPT
 I $P(Y,U,3) S $P(^HBHC(633.2,HBHCDFN,12),U)="N",^HBHC(633.2,"AC","N",HBHCDFN)=""
 K DIE S DIE="^HBHC(633.2,",DA=HBHCDFN,DR="[HBHC MFH DEMOGRAPHIC INPUT]"
 L +^HBHC(633.2,HBHCDFN):0 I $T D  L -^HBHC(633.2,HBHCDFN) W !! G PROMPT
 . D ^DIE
 . ;HBH*1.0*32: add PARENT SITE (#91) field
 . ;set a default if there is only one parent site defined
 . ;at this site
 . W !!,"A Parent Site is required for each Medical Foster Home."
 . W !,"If you exit without entering a Parent Site, this entry"
 . W !,"will not be transmitted to Austin until a Parent Site"
 . W !,"is defined. An HBHC Medical Foster Home Error will be"
 . W !,"generated by the transmission record verification process.",!
 . N HBHCPREV,HBHCPARN
 . S HBHCPREV=$P($G(^HBHC(633.2,HBHCDFN,13)),"^")
 . S HBHCPARN=$S($P(^HBHC(631.9,1,1,0),"^",4)=1:$O(^HBHC(631.9,1,1,"B","")),1:"")
 . I HBHCPARN]"" S HBHCPARN=$P(^DG(40.8,HBHCPARN,0),"^")
 . S DR="35//^S X=HBHCPARN"
 . S DIE="^HBHC(633.2,",DA=HBHCDFN
 . D ^DIE
 . ;This MFH has not yet transmitted, so warning message below not necessary.
 . Q:$G(HBHCPRCT)'=1
 . I HBHCPREV]"",HBHCPREV'=$P($G(^HBHC(633.2,HBHCDFN,13)),"^") D
 . . W !!,"This Medical Foster Home has had an AITC transaction built with"
 . . W !,"the former Parent Site. All patients in this Medical Foster Home"
 . . W !,"need to be reviewed using Option Evaluation/Admission Data Entry."
 . . W !!,"If the following message appears, answer ""YES"":"
 . . W !!,"Transmit Status Flag must be reset before editing this record is allowed"
 . . W !,"Do you wish to reset the Flag?"
 . . W !!,"If the message does not display, no further action is needed for this patient.",!
 . . N DIR
 . . S DIR("A")="Press any key to continue",DIR(0)="FO"
 . . D ^DIR
 W $C(7),!!,"Another user is editing this entry.",!! G PROMPT
EXIT ; Exit module
 K DA,DIC,DIE,DR,HBHCDFN,HBHCFORM,HBHCNHSP,HBHCPRCT,HBHCXMT7,X,Y
 Q