- BIREPH3 ;IHS/CMI/MWR - REPORT, H1N1 ACCOUNTABILITY; AUG 10,2010
- ;;8.5;IMMUNIZATION;;SEP 01,2011
- ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
- ;; VIEW OR PRINT H1N1 ACCOUNTABILITY REPORT.
- ;; v8.3 PATCH 3: BIREPH* routines are completely new for H1N1 Report.
- ;; v8.3 PATCH 4: Modify H1N1 Report to count 2nd doses regardless of Date Range.
- ;; v8.4 PATCH 1: Extend time frame of report: 8/1/09 to 8/31/10. GETIMMS+32
- ;
- ;
- ;----------
- GETIMMS(BIBEGDT,BIENDDT,BICC,BIHCF,BICM,BIBEN,BIHIST,BIVT) ;EP
- ;---> Get Immunizations from V Files.
- ;---> Parameters:
- ; 1 - BIBEGDT (req) Begin Visit Date.
- ; 2 - BIENDDT (req) End Visit Date.
- ; 3 - BICC (req) Current Community array.
- ; 4 - BIHCF (req) Health Care Facility array.
- ; 5 - BICM (req) Case Manager array.
- ; 6 - BIBEN (req) Beneficiary Type array.
- ; 7 - BIHIST (req) Include Historical (1=yes,0=no).
- ; 8 - BIVT (req) Visit Type array.
- ;
- ;---> Set begin and end dates for search through V Immunization File.
- ;
- ;***********************************************************
- ;********** PATCH 4, v8.3, DEC 30,2009, IHS/CMI/MWR
- ;---> PATCH: Modify H1N1 Report to count 2nd doses regardless of Date Range.
- ;
- ;Q:'$G(BIBEGDT) Q:'$G(BIENDDT)
- ;N N S N=BIBEGDT-.9999
- ;F S N=$O(^AUPNVIMM("ADT",N)) Q:(N>(BIENDDT+.9999)!('N)) D
- ;.N M S M=0
- ;.F S M=$O(^AUPNVIMM("ADT",N,M)) Q:'M D
- ;..N P S P=0
- ;..F S P=$O(^AUPNVIMM("ADT",N,M,P)) Q:'P D
- ;...D CHKSET(N,M,P,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
- ;
- ;---> Hard code for 2009-2010 Season.
- ;
- Q:'$G(BIBEGDT) Q:'$G(BIENDDT)
- ;
- ;********** PATCH 1, v8.4, AUG 01,2010, IHS/CMI/MWR
- ;---> Extend time frame of report from Aug 1, 2009 until Aug 30, 2010.
- ;N N S N=3090901-.9999
- ;F S N=$O(^AUPNVIMM("ADT",N)) Q:(N>(3100430+.9999)!('N)) D
- N N S N=3090801-.9999
- F S N=$O(^AUPNVIMM("ADT",N)) Q:(N>(3100830+.9999)!('N)) D
- .;**********
- .;
- .N M S M=0
- .F S M=$O(^AUPNVIMM("ADT",N,M)) Q:'M D
- ..N P S P=0
- ..F S P=$O(^AUPNVIMM("ADT",N,M,P)) Q:'P D
- ...D CHKSET(N,M,P,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT,BIBEGDT,BIENDDT)
- ;
- ;************************************************************
- ;
- Q
- ;
- ;
- ;----------
- ;************************************************************
- ;********** PATCH 4, v8.3, DEC 30,2009, IHS/CMI/MWR
- ;---> PATCH: Pass Date Range Parameters to limit report display.
- CHKSET(BIDATE,BIVIEN,BIIIEN,BICC,BIHCF,BICM,BIBEN,BIHIST,BIVT,BIBEGDT,BIENDDT) ;EP
- ;************************************************************
- ;(BIDATE,BIVIEN,BIIIEN,BICC,BIHCF,BICM,BIBEN,BIHIST,BIVT)
- ;---> Check if this visit fits criteria; if so, set it
- ;---> in ^TMP("BIREPH1".
- ;---> Parameters:
- ; 1 - BIDATE (req) Date of Visit.
- ; 2 - BIVIEN (req) VISIT IEN.
- ; 3 - BIIIEN (req) V IMMUNIZAITON IEN.
- ; 4 - BICC (req) Current Community array.
- ; 5 - BIHCF (req) Health Care Facility array.
- ; 6 - BICM (req) Case Manager array.
- ; 7 - BIBEN (req) Beneficiary Type array.
- ; 8 - BIHIST (req) Include Historical (1=yes,0=no).
- ; 9 - BIVT (req) Visit Type array.
- ;
- ;************************************************************
- ; 10 - BIBEGDT (req) Begin Visit Date.
- ; 11 - BIENDDT (req) End Visit Date.
- ;************************************************************
- ;
- Q:'$G(BIDATE)
- Q:'$G(BIVIEN)
- Q:'$G(BIIIEN)
- Q:'$D(^AUPNVSIT(BIVIEN,0))
- Q:'$D(^AUPNVIMM(BIIIEN,0))
- Q:'$D(BICC)
- Q:'$D(BIHCF)
- Q:'$D(BICM)
- Q:'$D(BIBEN)
- Q:'$D(BIVT)
- ;
- N BIAGRP,BIDFN,BIIMM,BIVGRP,BIVNAM,BIDOSE,Y
- S Y=^AUPNVIMM(BIIIEN,0)
- S BIDFN=$P(Y,U,2),BIIMM=$P(Y,U) ;,BIDOSE=$P(Y,U,4)
- ;
- ;---> Quit if this Vaccine should not be included in this report.
- ;---> As of v8.4, include all vaccines given during the selected time.
- ;Q:'$P($G(^AUTTIMM(BIIMM,0)),U,17) ;vvv8.4
- ;
- ;---> Quit if Current Community doesn't match.
- Q:$$CURCOM^BIEXPRT2(BIDFN,.BICC)
- ;
- ;---> Quit if Health Care Facility doesn't match.
- N BIVDATA S BIVDATA=^AUPNVSIT(BIVIEN,0)
- Q:$$HCF(BIVDATA,.BIHCF)
- ;---> Quit if Visit Type doesn't match.
- Q:$$VT(BIVDATA,.BIVT)
- ;
- ;---> Quit if not including Historical Visits and this Visit has
- ;---> a Category of "Historical".
- I '$G(BIHIST) Q:$$HIST(BIVDATA)
- ;
- ;---> Quit if Case Manager doesn't match.
- Q:$$CMGR^BIDUR(BIDFN,.BICM)
- ;
- ;---> Quit if Beneficiary Type doesn't match.
- Q:$$BENT^BIDUR1(BIDFN,.BIBEN)
- ;
- ;---> Quit if this is not H1N1.
- Q:($$IMMVG^BIUTL2(BIIMM,2)'=18)
- ;
- S BIVNAM=$$VNAME^BIUTL2(BIIMM)
- S BIAGRP=$$AGEGRP(BIDFN,BIDATE)
- ;S BIVGRP=$$IMMVG^BIUTL2(BIIMM,4)
- ;---> Check if this is Dose #1 or #2.
- D
- .I '$D(^TMP("BIDFN",$J,BIDFN)) S BIDOSE=1,^TMP("BIDFN",$J,BIDFN)="" Q
- .S BIDOSE=2
- ;
- ;************************************************************
- ;********** PATCH 4, v8.3, DEC 30,2009, IHS/CMI/MWR
- ;---> PATCH: Do not store this result if it is not in the REQUESTED Date Range.
- ;
- Q:(BIDATE<BIBEGDT)
- Q:(BIDATE>(BIENDDT+.9999))
- ;
- ;************************************************************
- ;
- N Z
- ;---> Add for this Vaccine, Dose, Age.
- ;S Z=$G(BITMP("STATS",BIVGRP,BIVNAM,BIDOSE,BIAGRP))
- ;S BITMP("STATS",BIVGRP,BIVNAM,BIDOSE,BIAGRP)=Z+1
- ;
- ;---> Add for this Vaccine, Dose, Total.
- ;S Z=$G(BITMP("STATS",BIVGRP,BIVNAM,BIDOSE,"TOTAL"))
- ;S BITMP("STATS",BIVGRP,BIVNAM,BIDOSE,"TOTAL")=Z+1
- ;
- ;---> Add for this Date, Dose, Age, Total.
- S Z=$G(BITMP("STATS",BIDATE,BIDOSE,"AGE",BIAGRP))
- S BITMP("STATS",BIDATE,BIDOSE,"AGE",BIAGRP)=Z+1
- ;
- ;---> Add for this Date, Dose, Total.
- S Z=$G(BITMP("STATS",BIDATE,BIDOSE,"TOTAL"))
- S BITMP("STATS",BIDATE,BIDOSE,"TOTAL")=Z+1
- ;
- ;---> Add for this Dose, Total.
- S Z=$G(BITMP("STATS","DOSES",BIDOSE,"TOTAL"))
- S BITMP("STATS","DOSES",BIDOSE,"TOTAL")=Z+1
- ;
- ;---> Add for ALL Doses, Total.
- S Z=$G(BITMP("STATS","ALL","TOTAL"))
- S BITMP("STATS","ALL","TOTAL")=Z+1 K Z
- ;
- ;---> Add refusals, if any.
- ;---> Not desired on this report, per Ros 10-12-05
- ;D CONTRA^BIUTL11(BIDFN,.Z,1) I $O(Z(0)) S BITMP("REFUSALS",BIDFN)=""
- ;
- Q
- ;
- ;
- ;
- ;----------
- AGEGRP(BIDFN,BIDATE) ;EP
- ;---> Return Patient's Age Group.
- ;---> Parameters:
- ; 1 - BIDFN (req) IEN in PATIENT File.
- ; 2 - BIDATE (req) Date of Visit.
- ;
- N X S X=$$AGE^BIUTL1(BIDFN,1,BIDATE)
- Q:X<2 1
- Q:X<5 2
- Q:X<19 3
- Q:X<25 4
- Q:X<50 5
- Q:X<65 6
- Q 7
- ;
- ;
- ;----------
- HCF(BIVDATA,BIHCF) ;EP
- ;---> Return Health Care Facility indicator.
- ;---> Return 1 if not selecting all Health Care Facilities (Locations)
- ;---> and if the Health Care Facility of this visit is not one of the
- ;---> ones selected.
- ;---> Parameters:
- ; 1 - BIVDATA (req) Data in ^AUPNVSIT(BIVIEN,0).
- ; 2 - BIHCF (req) Health Care Facility array.
- ;
- Q:$D(BIHCF("ALL")) 0
- Q:'$G(BIVDATA) 1
- N BILOC S BILOC=$P(BIVDATA,U,6)
- Q:'BILOC 1
- Q:'$D(BIHCF(BILOC)) 1
- Q 0
- ;
- ;
- ;----------
- VT(BIVDATA,BIVT) ;EP
- ;---> Return Visit Type indicator.
- ;---> Return 1 if not selecting all Visit Types and if this Visit Type
- ;---> is not one of the ones selected.
- ;---> Parameters:
- ; 1 - BIVDATA (req) Data in ^AUPNVSIT(BIVIEN,0).
- ; 2 - BIVT (req) Health Care Facility array.
- ;
- Q:$D(BIVT("ALL")) 0
- Q:'$G(BIVDATA) 1
- N BIVTYPE S BIVTYPE=$P(BIVDATA,U,3)
- Q:BIVTYPE="" 1
- Q:'$D(BIVT(BIVTYPE)) 1
- Q 0
- ;
- ;
- ;----------
- HIST(BIVDATA) ;EP
- ;---> Return Historical Visit indicator.
- ;---> Return 1 if this Visit has a Category of "Historical".
- ;---> Parameters:
- ; 1 - BIVDATA (req) Data in ^AUPNVSIT(BIVIEN,0).
- ;
- Q:'$G(BIVDATA) 1
- Q:$P(BIVDATA,U,7)="E" 1
- Q 0
- BIREPH3 ;IHS/CMI/MWR - REPORT, H1N1 ACCOUNTABILITY; AUG 10,2010
- +1 ;;8.5;IMMUNIZATION;;SEP 01,2011
- +2 ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
- +3 ;; VIEW OR PRINT H1N1 ACCOUNTABILITY REPORT.
- +4 ;; v8.3 PATCH 3: BIREPH* routines are completely new for H1N1 Report.
- +5 ;; v8.3 PATCH 4: Modify H1N1 Report to count 2nd doses regardless of Date Range.
- +6 ;; v8.4 PATCH 1: Extend time frame of report: 8/1/09 to 8/31/10. GETIMMS+32
- +7 ;
- +8 ;
- +9 ;----------
- GETIMMS(BIBEGDT,BIENDDT,BICC,BIHCF,BICM,BIBEN,BIHIST,BIVT) ;EP
- +1 ;---> Get Immunizations from V Files.
- +2 ;---> Parameters:
- +3 ; 1 - BIBEGDT (req) Begin Visit Date.
- +4 ; 2 - BIENDDT (req) End Visit Date.
- +5 ; 3 - BICC (req) Current Community array.
- +6 ; 4 - BIHCF (req) Health Care Facility array.
- +7 ; 5 - BICM (req) Case Manager array.
- +8 ; 6 - BIBEN (req) Beneficiary Type array.
- +9 ; 7 - BIHIST (req) Include Historical (1=yes,0=no).
- +10 ; 8 - BIVT (req) Visit Type array.
- +11 ;
- +12 ;---> Set begin and end dates for search through V Immunization File.
- +13 ;
- +14 ;***********************************************************
- +15 ;********** PATCH 4, v8.3, DEC 30,2009, IHS/CMI/MWR
- +16 ;---> PATCH: Modify H1N1 Report to count 2nd doses regardless of Date Range.
- +17 ;
- +18 ;Q:'$G(BIBEGDT) Q:'$G(BIENDDT)
- +19 ;N N S N=BIBEGDT-.9999
- +20 ;F S N=$O(^AUPNVIMM("ADT",N)) Q:(N>(BIENDDT+.9999)!('N)) D
- +21 ;.N M S M=0
- +22 ;.F S M=$O(^AUPNVIMM("ADT",N,M)) Q:'M D
- +23 ;..N P S P=0
- +24 ;..F S P=$O(^AUPNVIMM("ADT",N,M,P)) Q:'P D
- +25 ;...D CHKSET(N,M,P,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
- +26 ;
- +27 ;---> Hard code for 2009-2010 Season.
- +28 ;
- +29 IF '$GET(BIBEGDT)
- QUIT
- IF '$GET(BIENDDT)
- QUIT
- +30 ;
- +31 ;********** PATCH 1, v8.4, AUG 01,2010, IHS/CMI/MWR
- +32 ;---> Extend time frame of report from Aug 1, 2009 until Aug 30, 2010.
- +33 ;N N S N=3090901-.9999
- +34 ;F S N=$O(^AUPNVIMM("ADT",N)) Q:(N>(3100430+.9999)!('N)) D
- +35 NEW N
- SET N=3090801-.9999
- +36 FOR
- SET N=$ORDER(^AUPNVIMM("ADT",N))
- IF (N>(3100830+.9999)!('N))
- QUIT
- Begin DoDot:1
- +37 ;**********
- +38 ;
- +39 NEW M
- SET M=0
- +40 FOR
- SET M=$ORDER(^AUPNVIMM("ADT",N,M))
- IF 'M
- QUIT
- Begin DoDot:2
- +41 NEW P
- SET P=0
- +42 FOR
- SET P=$ORDER(^AUPNVIMM("ADT",N,M,P))
- IF 'P
- QUIT
- Begin DoDot:3
- +43 DO CHKSET(N,M,P,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT,BIBEGDT,BIENDDT)
- End DoDot:3
- End DoDot:2
- End DoDot:1
- +44 ;
- +45 ;************************************************************
- +46 ;
- +47 QUIT
- +48 ;
- +49 ;
- +50 ;----------
- +51 ;************************************************************
- +52 ;********** PATCH 4, v8.3, DEC 30,2009, IHS/CMI/MWR
- +53 ;---> PATCH: Pass Date Range Parameters to limit report display.
- CHKSET(BIDATE,BIVIEN,BIIIEN,BICC,BIHCF,BICM,BIBEN,BIHIST,BIVT,BIBEGDT,BIENDDT) ;EP
- +1 ;************************************************************
- +2 ;(BIDATE,BIVIEN,BIIIEN,BICC,BIHCF,BICM,BIBEN,BIHIST,BIVT)
- +3 ;---> Check if this visit fits criteria; if so, set it
- +4 ;---> in ^TMP("BIREPH1".
- +5 ;---> Parameters:
- +6 ; 1 - BIDATE (req) Date of Visit.
- +7 ; 2 - BIVIEN (req) VISIT IEN.
- +8 ; 3 - BIIIEN (req) V IMMUNIZAITON IEN.
- +9 ; 4 - BICC (req) Current Community array.
- +10 ; 5 - BIHCF (req) Health Care Facility array.
- +11 ; 6 - BICM (req) Case Manager array.
- +12 ; 7 - BIBEN (req) Beneficiary Type array.
- +13 ; 8 - BIHIST (req) Include Historical (1=yes,0=no).
- +14 ; 9 - BIVT (req) Visit Type array.
- +15 ;
- +16 ;************************************************************
- +17 ; 10 - BIBEGDT (req) Begin Visit Date.
- +18 ; 11 - BIENDDT (req) End Visit Date.
- +19 ;************************************************************
- +20 ;
- +21 IF '$GET(BIDATE)
- QUIT
- +22 IF '$GET(BIVIEN)
- QUIT
- +23 IF '$GET(BIIIEN)
- QUIT
- +24 IF '$DATA(^AUPNVSIT(BIVIEN,0))
- QUIT
- +25 IF '$DATA(^AUPNVIMM(BIIIEN,0))
- QUIT
- +26 IF '$DATA(BICC)
- QUIT
- +27 IF '$DATA(BIHCF)
- QUIT
- +28 IF '$DATA(BICM)
- QUIT
- +29 IF '$DATA(BIBEN)
- QUIT
- +30 IF '$DATA(BIVT)
- QUIT
- +31 ;
- +32 NEW BIAGRP,BIDFN,BIIMM,BIVGRP,BIVNAM,BIDOSE,Y
- +33 SET Y=^AUPNVIMM(BIIIEN,0)
- +34 ;,BIDOSE=$P(Y,U,4)
- SET BIDFN=$PIECE(Y,U,2)
- SET BIIMM=$PIECE(Y,U)
- +35 ;
- +36 ;---> Quit if this Vaccine should not be included in this report.
- +37 ;---> As of v8.4, include all vaccines given during the selected time.
- +38 ;Q:'$P($G(^AUTTIMM(BIIMM,0)),U,17) ;vvv8.4
- +39 ;
- +40 ;---> Quit if Current Community doesn't match.
- +41 IF $$CURCOM^BIEXPRT2(BIDFN,.BICC)
- QUIT
- +42 ;
- +43 ;---> Quit if Health Care Facility doesn't match.
- +44 NEW BIVDATA
- SET BIVDATA=^AUPNVSIT(BIVIEN,0)
- +45 IF $$HCF(BIVDATA,.BIHCF)
- QUIT
- +46 ;---> Quit if Visit Type doesn't match.
- +47 IF $$VT(BIVDATA,.BIVT)
- QUIT
- +48 ;
- +49 ;---> Quit if not including Historical Visits and this Visit has
- +50 ;---> a Category of "Historical".
- +51 IF '$GET(BIHIST)
- IF $$HIST(BIVDATA)
- QUIT
- +52 ;
- +53 ;---> Quit if Case Manager doesn't match.
- +54 IF $$CMGR^BIDUR(BIDFN,.BICM)
- QUIT
- +55 ;
- +56 ;---> Quit if Beneficiary Type doesn't match.
- +57 IF $$BENT^BIDUR1(BIDFN,.BIBEN)
- QUIT
- +58 ;
- +59 ;---> Quit if this is not H1N1.
- +60 IF ($$IMMVG^BIUTL2(BIIMM,2)'=18)
- QUIT
- +61 ;
- +62 SET BIVNAM=$$VNAME^BIUTL2(BIIMM)
- +63 SET BIAGRP=$$AGEGRP(BIDFN,BIDATE)
- +64 ;S BIVGRP=$$IMMVG^BIUTL2(BIIMM,4)
- +65 ;---> Check if this is Dose #1 or #2.
- +66 Begin DoDot:1
- +67 IF '$DATA(^TMP("BIDFN",$JOB,BIDFN))
- SET BIDOSE=1
- SET ^TMP("BIDFN",$JOB,BIDFN)=""
- QUIT
- +68 SET BIDOSE=2
- End DoDot:1
- +69 ;
- +70 ;************************************************************
- +71 ;********** PATCH 4, v8.3, DEC 30,2009, IHS/CMI/MWR
- +72 ;---> PATCH: Do not store this result if it is not in the REQUESTED Date Range.
- +73 ;
- +74 IF (BIDATE<BIBEGDT)
- QUIT
- +75 IF (BIDATE>(BIENDDT+.9999))
- QUIT
- +76 ;
- +77 ;************************************************************
- +78 ;
- +79 NEW Z
- +80 ;---> Add for this Vaccine, Dose, Age.
- +81 ;S Z=$G(BITMP("STATS",BIVGRP,BIVNAM,BIDOSE,BIAGRP))
- +82 ;S BITMP("STATS",BIVGRP,BIVNAM,BIDOSE,BIAGRP)=Z+1
- +83 ;
- +84 ;---> Add for this Vaccine, Dose, Total.
- +85 ;S Z=$G(BITMP("STATS",BIVGRP,BIVNAM,BIDOSE,"TOTAL"))
- +86 ;S BITMP("STATS",BIVGRP,BIVNAM,BIDOSE,"TOTAL")=Z+1
- +87 ;
- +88 ;---> Add for this Date, Dose, Age, Total.
- +89 SET Z=$GET(BITMP("STATS",BIDATE,BIDOSE,"AGE",BIAGRP))
- +90 SET BITMP("STATS",BIDATE,BIDOSE,"AGE",BIAGRP)=Z+1
- +91 ;
- +92 ;---> Add for this Date, Dose, Total.
- +93 SET Z=$GET(BITMP("STATS",BIDATE,BIDOSE,"TOTAL"))
- +94 SET BITMP("STATS",BIDATE,BIDOSE,"TOTAL")=Z+1
- +95 ;
- +96 ;---> Add for this Dose, Total.
- +97 SET Z=$GET(BITMP("STATS","DOSES",BIDOSE,"TOTAL"))
- +98 SET BITMP("STATS","DOSES",BIDOSE,"TOTAL")=Z+1
- +99 ;
- +100 ;---> Add for ALL Doses, Total.
- +101 SET Z=$GET(BITMP("STATS","ALL","TOTAL"))
- +102 SET BITMP("STATS","ALL","TOTAL")=Z+1
- KILL Z
- +103 ;
- +104 ;---> Add refusals, if any.
- +105 ;---> Not desired on this report, per Ros 10-12-05
- +106 ;D CONTRA^BIUTL11(BIDFN,.Z,1) I $O(Z(0)) S BITMP("REFUSALS",BIDFN)=""
- +107 ;
- +108 QUIT
- +109 ;
- +110 ;
- +111 ;
- +112 ;----------
- AGEGRP(BIDFN,BIDATE) ;EP
- +1 ;---> Return Patient's Age Group.
- +2 ;---> Parameters:
- +3 ; 1 - BIDFN (req) IEN in PATIENT File.
- +4 ; 2 - BIDATE (req) Date of Visit.
- +5 ;
- +6 NEW X
- SET X=$$AGE^BIUTL1(BIDFN,1,BIDATE)
- +7 IF X<2
- QUIT 1
- +8 IF X<5
- QUIT 2
- +9 IF X<19
- QUIT 3
- +10 IF X<25
- QUIT 4
- +11 IF X<50
- QUIT 5
- +12 IF X<65
- QUIT 6
- +13 QUIT 7
- +14 ;
- +15 ;
- +16 ;----------
- HCF(BIVDATA,BIHCF) ;EP
- +1 ;---> Return Health Care Facility indicator.
- +2 ;---> Return 1 if not selecting all Health Care Facilities (Locations)
- +3 ;---> and if the Health Care Facility of this visit is not one of the
- +4 ;---> ones selected.
- +5 ;---> Parameters:
- +6 ; 1 - BIVDATA (req) Data in ^AUPNVSIT(BIVIEN,0).
- +7 ; 2 - BIHCF (req) Health Care Facility array.
- +8 ;
- +9 IF $DATA(BIHCF("ALL"))
- QUIT 0
- +10 IF '$GET(BIVDATA)
- QUIT 1
- +11 NEW BILOC
- SET BILOC=$PIECE(BIVDATA,U,6)
- +12 IF 'BILOC
- QUIT 1
- +13 IF '$DATA(BIHCF(BILOC))
- QUIT 1
- +14 QUIT 0
- +15 ;
- +16 ;
- +17 ;----------
- VT(BIVDATA,BIVT) ;EP
- +1 ;---> Return Visit Type indicator.
- +2 ;---> Return 1 if not selecting all Visit Types and if this Visit Type
- +3 ;---> is not one of the ones selected.
- +4 ;---> Parameters:
- +5 ; 1 - BIVDATA (req) Data in ^AUPNVSIT(BIVIEN,0).
- +6 ; 2 - BIVT (req) Health Care Facility array.
- +7 ;
- +8 IF $DATA(BIVT("ALL"))
- QUIT 0
- +9 IF '$GET(BIVDATA)
- QUIT 1
- +10 NEW BIVTYPE
- SET BIVTYPE=$PIECE(BIVDATA,U,3)
- +11 IF BIVTYPE=""
- QUIT 1
- +12 IF '$DATA(BIVT(BIVTYPE))
- QUIT 1
- +13 QUIT 0
- +14 ;
- +15 ;
- +16 ;----------
- HIST(BIVDATA) ;EP
- +1 ;---> Return Historical Visit indicator.
- +2 ;---> Return 1 if this Visit has a Category of "Historical".
- +3 ;---> Parameters:
- +4 ; 1 - BIVDATA (req) Data in ^AUPNVSIT(BIVIEN,0).
- +5 ;
- +6 IF '$GET(BIVDATA)
- QUIT 1
- +7 IF $PIECE(BIVDATA,U,7)="E"
- QUIT 1
- +8 QUIT 0