HBHCTXT ; LR VAMC(IRMS)/MJT-HBHC MFH Rate Paid delimited text file; user selects: pt or MFH; active only, indiv, or all pts or MFHs; current rate paid only or entire rate paid history, entry: TXT called by ^HBHCUTL5; calls ^HBHCUTL5;Dec 2007
;;1.0;HOSPITAL BASED HOME CARE;**24**;NOV 01, 1993;Build 201
; note: HBHCCNT only defined to allow PT & MFH entry point calls in ^HBHCUTL5
S (HBHCTXT,HBHCCNT)="",HBHCDLMT=U
; Prompt for patient or Medical Foster Home (MFH) report
D EN^HBHCUTL5
S %ZIS="Q",HBHCCC=0 K IOP,ZTIO,ZTSAVE D ^%ZIS G:POP EXIT^HBHCUTL5
I $D(IO("Q")) S ZTRTN="DQ^HBHCTXT",ZTDESC="HBPC MFH Delimited File Output",ZTSAVE("HBHC*")="" D ^%ZTLOAD G EXIT^HBHCUTL5
DQ ; De-queue
U IO
; Write column headers
W "Patient Name"_HBHCDLMT_"Last Four"_HBHCDLMT_"Rate Paid"_HBHCDLMT_"Start Date" W:HBHCXREF="AK" HBHCDLMT_"Medical Foster Home (MFH) Name"
D:HBHCXREF="AJ" PT^HBHCUTL5
D:HBHCXREF="AK" MFH^HBHCUTL5
I $D(^TMP("HBHC",$J)) D:HBHCXREF="AJ" PRTPT^HBHCUTL5 D:HBHCXREF="AK" PRTMFH^HBHCUTL5
D EXIT^HBHCUTL5
Q
TXT ; Output to delimited text file format
W !,HBHCM_HBHCDLMT_$P(HBHCINFO,U,2)_HBHCDLMT_$P(HBHCINFO,U)_HBHCDLMT_$E(HBHCJ,4,5)_"-"_$E(HBHCJ,6,7)_"-"_$S($E(HBHCJ)=3:20,1:19)_$E(HBHCJ,2,3) W:HBHCXREF="AK" HBHCDLMT_HBHCL
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHBHCTXT 1270 printed Dec 13, 2024@01:58:44 Page 2
HBHCTXT ; LR VAMC(IRMS)/MJT-HBHC MFH Rate Paid delimited text file; user selects: pt or MFH; active only, indiv, or all pts or MFHs; current rate paid only or entire rate paid history, entry: TXT called by ^HBHCUTL5; calls ^HBHCUTL5;Dec 2007
+1 ;;1.0;HOSPITAL BASED HOME CARE;**24**;NOV 01, 1993;Build 201
+2 ; note: HBHCCNT only defined to allow PT & MFH entry point calls in ^HBHCUTL5
+3 SET (HBHCTXT,HBHCCNT)=""
SET HBHCDLMT=U
+4 ; Prompt for patient or Medical Foster Home (MFH) report
+5 DO EN^HBHCUTL5
+6 SET %ZIS="Q"
SET HBHCCC=0
KILL IOP,ZTIO,ZTSAVE
DO ^%ZIS
if POP
GOTO EXIT^HBHCUTL5
+7 IF $DATA(IO("Q"))
SET ZTRTN="DQ^HBHCTXT"
SET ZTDESC="HBPC MFH Delimited File Output"
SET ZTSAVE("HBHC*")=""
DO ^%ZTLOAD
GOTO EXIT^HBHCUTL5
DQ ; De-queue
+1 USE IO
+2 ; Write column headers
+3 WRITE "Patient Name"_HBHCDLMT_"Last Four"_HBHCDLMT_"Rate Paid"_HBHCDLMT_"Start Date"
if HBHCXREF="AK"
WRITE HBHCDLMT_"Medical Foster Home (MFH) Name"
+4 if HBHCXREF="AJ"
DO PT^HBHCUTL5
+5 if HBHCXREF="AK"
DO MFH^HBHCUTL5
+6 IF $DATA(^TMP("HBHC",$JOB))
if HBHCXREF="AJ"
DO PRTPT^HBHCUTL5
if HBHCXREF="AK"
DO PRTMFH^HBHCUTL5
+7 DO EXIT^HBHCUTL5
+8 QUIT
TXT ; Output to delimited text file format
+1 WRITE !,HBHCM_HBHCDLMT_$PIECE(HBHCINFO,U,2)_HBHCDLMT_$PIECE(HBHCINFO,U)_HBHCDLMT_$EXTRACT(HBHCJ,4,5)_"-"_$EXTRACT(HBHCJ,6,7)_"-"_$SELECT($EXTRACT(HBHCJ)=3:20,1:19)_$EXTRACT(HBHCJ,2,3)
if HBHCXREF="AK"
WRITE HBHCDLMT_HBHCL
+2 QUIT