HBHCXMA1 ;LR VAMC(IRMS)/MJT - HBHC, called by ^HBHCXMA, entry points: START, ERROR, EXIT, calls HOSP^HBHCUTL1 ;Jul 2000
;;1.0;HOSPITAL BASED HOME CARE;**2,6,14,19,24,25**;NOV 01, 1993;Build 45
;******************************************************************************
;******************************************************************************
; --- ROUTINE MODIFICATION LOG ---
;
;PKG/PATCH DATE DEVELOPER MODIFICATION
;----------- ---------- ----------- ----------------------------------------
;HBH*1.0*25 APR 2012 K GUPTA Support for ICD-10 Coding System
;******************************************************************************
;******************************************************************************
;
START ; Initialization
W !,"Processing Admission/Form 3 Data"
S HBHCFORM=3,$P(HBHCSP1," ",2)="",$P(HBHCSP2," ",3)="",$P(HBHCSP4," ",5)="",$P(HBHCSP5," ",6)="",$P(HBHCSP6," ",7)="",$P(HBHCSP8," ",9)="",$P(HBHCSP14," ",15)="",HBHCLNTH=30
D HOSP^HBHCUTL1
S HBHCFLD1="HBHCMARE^HBHCLIVE^HBHCCARE^HBHCTYPE"
S HBHCFLD2="HBHCVISA^HBHCHERA^HBHCEXCA^HBHCRECA^HBHCBTHA^HBHCDRSA^HBHCTLTA^HBHCTRNA^HBHCEATA^HBHCWLKA^HBHCBWLA^HBHCBLDA^HBHCMOBA^HBHCADTA^HBHCBHVA^HBHCDSOA^HBHCMODA^HBHCLMTA"
K %DT S X="T" D ^%DT S HBHCTDY=Y
; Initialize variables passed for $$PRT2CODE^DGUTL4(VALUE,TYPE,CODE) calls
; Following comments stolen from DGUTL4 routine:
; Convert pointer to specified code
; Input: VALUE - Pointer to RACE file (#10), ETHNICITY file (#10.2),
; or RACE AND ETHNICITY COLLECTION METHOD file (#10.3)
; TYPE - Flag indicating which file VALUE is for
; 1 = Race (default)
; 2 = Ethnicity
; 3 = Collection Method
; CODE - Flag indicating which code to return
; 1 = Abbreviation (default)
; 2 = HL7
; 3 = CDC (not applicable for Collection Method)
; 4 = PTF
; End of DGUTL4 comment theft mjt
; Race = 10, Ethnicity = 102, Collection Method = 103
; Type
S HBHCT103=3
; Code, PTF Value used for all files
S HBHCPTF=4
; Race field set to "X" & became Historical only, beginning w/Jan 2003 new Race & Ethnicity Information fields mandate mjt
S HBHCRC="X"
Q
ERROR ; Set node in ^HBHC(634.1) if data is incomplete or proper fields invalid for 'Admit/Reject Action'
L +^HBHC(634.1,0):$S($D(DILOCKTM):DILOCKTM,1:3) Q:'$T S HBHCNDX2=$P(^HBHC(634.1,0),U,3)+1,$P(^HBHC(634.1,0),U,3)=HBHCNDX2,$P(^HBHC(634.1,0),U,4)=$P(^HBHC(634.1,0),U,4)+1 L -^HBHC(634.1,0)
S ^HBHC(634.1,HBHCNDX2,0)=$P(HBHCINFO,U)_U_HBHCDFN,^HBHC(634.1,HBHCNDX2,1)=HBHCDR,^HBHC(634.1,"B",$P(HBHCINFO,U),HBHCNDX2)=""
Q
EXIT ; Exit module => cleanup for HBHCXMA
K DILOCKTM,HBHC,HBHCACTN,HBHCADDT,HBHCADTA,HBHCAFLG,HBHCBHVA,HBHCBLDA,HBHCBTHA,HBHCBWLA,HBHCBYR,HBHCCM,HBHCCARE,HBHCCDTS,HBHCCNTY,HBHCCURJ,HBHCCURK,HBHCDATE,HBHCDFN,HBHCDPT0,HBHCDR,HBHCDRSA,HBHCDSOA,HBHCEATA,HBHCELGE,HBHCEND,HBHCETH
K HBHCEXCA,HBHCFIL,HBHCFLD,HBHCFLD1,HBHCFLD2,HBHCFLG,HBHCFORM,HBHCHERA,HBHCHOSP,HBHCI,HBHCICDA,HBHCIEN,HBHCIEN2,HBHCIENP,HBHCINFO,HBHCJ,HBHCK,HBHCL,HBHCLIVE,HBHCLMTA,HBHCLNTH,HBHCMARE,HBHCMFHP,HBHCMFHS,HBHCMOBA,HBHCMODA,HBHCMPT
K HBHCNAME,HBHCNDX1,HBHCNDX2,HBHCNOD3,HBHCNODE,HBHCPSRV,HBHCPTF,HBHCPTFV,HBHCRACE,HBHCRC,HBHCREC,HBHCRECA,HBHCREJ,HBHCREJD,HBHCRFIN,HBHCRFLG,HBHCRTDT,HBHCRTPD,HBHCSEX,HBHCSP1,HBHCSP14,HBHCSP2,HBHCSP4,HBHCSP5,HBHCSP6,HBHCSP8
K HBHCSSN,HBHCST,HBHCSX,HBHCT103,HBHCTDY,HBHCTLTA,HBHCTRNA,HBHCTYPE,HBHCVAR,HBHCVISA,HBHCWLKA,HBHCX,HBHCXMT3,HBHCZIP,X,Y,%DT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHBHCXMA1 3634 printed Dec 13, 2024@01:58:55 Page 2
HBHCXMA1 ;LR VAMC(IRMS)/MJT - HBHC, called by ^HBHCXMA, entry points: START, ERROR, EXIT, calls HOSP^HBHCUTL1 ;Jul 2000
+1 ;;1.0;HOSPITAL BASED HOME CARE;**2,6,14,19,24,25**;NOV 01, 1993;Build 45
+2 ;******************************************************************************
+3 ;******************************************************************************
+4 ; --- ROUTINE MODIFICATION LOG ---
+5 ;
+6 ;PKG/PATCH DATE DEVELOPER MODIFICATION
+7 ;----------- ---------- ----------- ----------------------------------------
+8 ;HBH*1.0*25 APR 2012 K GUPTA Support for ICD-10 Coding System
+9 ;******************************************************************************
+10 ;******************************************************************************
+11 ;
START ; Initialization
+1 WRITE !,"Processing Admission/Form 3 Data"
+2 SET HBHCFORM=3
SET $PIECE(HBHCSP1," ",2)=""
SET $PIECE(HBHCSP2," ",3)=""
SET $PIECE(HBHCSP4," ",5)=""
SET $PIECE(HBHCSP5," ",6)=""
SET $PIECE(HBHCSP6," ",7)=""
SET $PIECE(HBHCSP8," ",9)=""
SET $PIECE(HBHCSP14," ",15)=""
SET HBHCLNTH=30
+3 DO HOSP^HBHCUTL1
+4 SET HBHCFLD1="HBHCMARE^HBHCLIVE^HBHCCARE^HBHCTYPE"
+5 SET HBHCFLD2="HBHCVISA^HBHCHERA^HBHCEXCA^HBHCRECA^HBHCBTHA^HBHCDRSA^HBHCTLTA^HBHCTRNA^HBHCEATA^HBHCWLKA^HBHCBWLA^HBHCBLDA^HBHCMOBA^HBHCADTA^HBHCBHVA^HBHCDSOA^HBHCMODA^HBHCLMTA"
+6 KILL %DT
SET X="T"
DO ^%DT
SET HBHCTDY=Y
+7 ; Initialize variables passed for $$PRT2CODE^DGUTL4(VALUE,TYPE,CODE) calls
+8 ; Following comments stolen from DGUTL4 routine:
+9 ; Convert pointer to specified code
+10 ; Input: VALUE - Pointer to RACE file (#10), ETHNICITY file (#10.2),
+11 ; or RACE AND ETHNICITY COLLECTION METHOD file (#10.3)
+12 ; TYPE - Flag indicating which file VALUE is for
+13 ; 1 = Race (default)
+14 ; 2 = Ethnicity
+15 ; 3 = Collection Method
+16 ; CODE - Flag indicating which code to return
+17 ; 1 = Abbreviation (default)
+18 ; 2 = HL7
+19 ; 3 = CDC (not applicable for Collection Method)
+20 ; 4 = PTF
+21 ; End of DGUTL4 comment theft mjt
+22 ; Race = 10, Ethnicity = 102, Collection Method = 103
+23 ; Type
+24 SET HBHCT103=3
+25 ; Code, PTF Value used for all files
+26 SET HBHCPTF=4
+27 ; Race field set to "X" & became Historical only, beginning w/Jan 2003 new Race & Ethnicity Information fields mandate mjt
+28 SET HBHCRC="X"
+29 QUIT
ERROR ; Set node in ^HBHC(634.1) if data is incomplete or proper fields invalid for 'Admit/Reject Action'
+1 LOCK +^HBHC(634.1,0):$SELECT($DATA(DILOCKTM):DILOCKTM,1:3)
if '$TEST
QUIT
SET HBHCNDX2=$PIECE(^HBHC(634.1,0),U,3)+1
SET $PIECE(^HBHC(634.1,0),U,3)=HBHCNDX2
SET $PIECE(^HBHC(634.1,0),U,4)=$PIECE(^HBHC(634.1,0),U,4)+1
LOCK -^HBHC(634.1,0)
+2 SET ^HBHC(634.1,HBHCNDX2,0)=$PIECE(HBHCINFO,U)_U_HBHCDFN
SET ^HBHC(634.1,HBHCNDX2,1)=HBHCDR
SET ^HBHC(634.1,"B",$PIECE(HBHCINFO,U),HBHCNDX2)=""
+3 QUIT
EXIT ; Exit module => cleanup for HBHCXMA
+1 KILL DILO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