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