BIOUTPT ;IHS/CMI/MWR - HEADERS & PROMPTS FOR REPORTS.; MAY 10, 2010
;;8.5;IMMUNIZATION;;SEP 01,2011
;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
;; COMMON HEADERS FOR REPORTS AND PROMPTS FOR REPORT PARAMETERS.
;
;
;----------
FDATE(BIFDT,BIRTN) ;EP
;---> Ask Forecast Date. Called by Protocol BI OUTPUT FORECAST DATE.
;---> Parameters:
; 1 - BIFDT (ret) Forecast Date, Fileman format.
; (opt) Default Date.
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
FDATE1 ;EP
S:$G(BIFDT)="" BIFDT=DT
N BIDFLT,DIR S BIDFLT=$$TXDT^BIUTL5(BIFDT)
S DIR(0)="DA^::FEX"
S DIR("A")=" Please enter a Forecast Date: ",DIR("B")=BIDFLT
D FULL^VALM1
D TITLE^BIUTL5("SELECT FORECAST DATE")
D TEXT1
D ^DIR W !
I $D(DIRUT) D @("RESET^"_BIRTN) Q
S BIFDT=$P(Y,".")
I BIFDT<DT D G FDATE1
.W !?5,"The date may not be in the past. "
.W "It must be today or in the future."
.K BIFDT D DIRZ^BIUTL3()
D @("RESET^"_BIRTN)
Q
;
;
;----------
TEXT1 ;EP
;;The "Forecast Date" (or "Clinic Date") is the date that will
;;be used for calculating which immunizations patients are due for.
;;
;;For example, if you choose today, the letter or report will
;;list the immunizations that patients are due for today.
;;If you choose a future date (the date of a clinic), the letter
;;or report will list immunizations due on that future date.
;;
;;NOTE: If you select a Forecast date in the future, some patients
;; may appear as PAST DUE for that date in the future, even
;; though they are not PAST DUE today.
;;
;;
D PRINTX("TEXT1")
Q
;
;
;----------
QDATE(BIQDT,BIRTN) ;EP
;---> Ask Quarter Ending Date.
;---> Called by Protocol BI OUTPUT QUARTER DATE.
;---> Parameters:
; 1 - BIQDT (ret) Quarter Ending Date, Fileman format.
; (opt) Default Date.
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
N DIR
S:$G(BIQDT) DIR("B")=$$TXDT^BIUTL5(BIQDT)
S DIR(0)="DA^::PE"
S DIR("A")=" Please enter a Quarter Ending Date: "
D FULL^VALM1
D TITLE^BIUTL5("SELECT QUARTER ENDING DATE")
D TEXT2 W !
D ^DIR W !
I $D(DIRUT) D @("RESET^"_BIRTN) Q
S BIQDT=$P(Y,".")
I $E(BIQDT,6,7)="00" D
.N X S X=$E(BIQDT,4,5) D
..I +X=2 S X=28 Q
..I +X=1 S X=31 Q
..I 94611[+X S X=30 Q
..S X=31
.S BIQDT=BIQDT+X
D @("RESET^"_BIRTN)
Q
;
;
;----------
TEXT2 ;EP
;;The "Quarter Ending Date" should be the last day of the quarter
;;being reported on. Typically, this date is either March 31,
;;June 30, September 30, or December 31. However, you may enter
;;any date you choose and the report will generate immunization
;;statistics based on the date entered. NOTE: The patient ages
;;(3 months, 5 months, 91 years, etc.) will be calculated as of
;;the Quarter Ending Date you enter here.
;;
;;For convenience's sake, if you enter only month/year, such as 9/98,
;;the program will automatically assign the report to the last day
;;of that month, such as 9/30/1998.
;;
D PRINTX("TEXT2")
Q
;
;
;----------
DTRANGE(BIBEGDT,BIENDDT,BIPOP,BIRTN,BIBEGDF,BIENDDF) ;EP
;---> Ask date range.
;---> Called by Protocol BI OUTPUT DATE RANGE.
;---> Parameters:
; 1 - BIBEGDT (ret) Begin Date, Fileman format.
; 2 - BIENDDT (ret) End Date, Fileman format.
; 3 - BIPOP (ret) BIPOP=1 If quit, fail, DTOUT, DUOUT.
; 4 - BIRTN (req) Calling routine for reset.
; 5 - BIBEGDF (opt) Begin Date default, Fileman format.
; 6 - BIENDDF (opt) End Date default, Fileman format.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
D TITLE^BIUTL5("SELECT DATE RANGE")
D TEXT3 W !
D ASKDATES^BIUTL3(.BIBEGDT,.BIENDDT,.BIPOP,$G(BIBEGDT),$G(BIENDDT))
D @("RESET^"_BIRTN)
Q
;
;
;----------
TEXT3 ;EP
;;Please enter the beginning and ending dates for the period you
;;wish this report to cover. (NOTE: The ending date must be after
;;the beginning date.)
;;
D PRINTX("TEXT3")
Q
;
;
;----------
AGE(BIAG,BIRTN) ;EP
;---> Select age range. Called by Protocol BI OUTPUT AGE.
;---> If not limited to an age range, BIAG="".
;---> Parameters:
; 1 - BIAG (ret) Age Range in months.
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
D AGERNG^BIAGE(.BIAG,.BIPOP,"1-72",0)
I $G(BIPOP) S BIAG="" D @("RESET^"_BIRTN) Q
S:BIAG="" BIAG="ALL"
D @("RESET^"_BIRTN)
Q
;
;
;----------
TAR(BITAR,BIRTN) ;EP
;---> Select Two-Yr-Old Age Range for same Report.
;---> Called by Protocol BI OUTPUT TWO-YR-OLD REPORT AGE RANGE.
;---> Parameters:
; 1 - BITAR (ret) Two-Yr-Old Age Range in months;
; either "19-35" or "24-35".
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
D FULL^VALM1
D TITLE^BIUTL5("TWO-YR-OLD AGE RANGE")
D TEXT6
N A,X,Y S A=" Choose either 1 or 2"
S X="SO^1:19-35 months;2:24-35 months"
D DIR^BIFMAN(X,.Y,.BIPOP,A,$G(BITAR))
S BITAR=$S(Y=2:"24-35",1:"19-35")
D @("RESET^"_BIRTN)
Q
;
;
;----------
TEXT6 ;EP
;;This parameter allows you to select the Age Range of Patients for
;;the Two-Yr-Old Report.
;;
;;Selecting "19-35 months" will include in the report all children who
;;were between those ages on the date entered in the "Quarter Ending Date"
;;parameter.
;;
;;Selecting "24-35 months" will only include children who were between
;;those ages on the date entered in the "Quarter Ending Date" parameter.
;;
D PRINTX("TEXT6")
Q
;
;
;----------
CC(BICC,BIRTN,BIPOP) ;EP
;---> Select Current Community(s).
;---> Called by Protocol BI OUTPUT COMMUNITY.
;---> Parameters:
; 1 - BICC (ret) Local array of Current Community IENs.
; 2 - BIRTN (req) Calling routine for reset.
; 3 - BIPOP (opt) BIQUIT=1 if user quit, ^-arrowed.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
S BIPOP=0
D TITLE^BIUTL5("SELECTION OF COMMUNITIES")
D TEXT8
;
N DIR S DIR("A")=" Select G, L, or P: ",DIR("B")="Load"
S DIR(0)="SAM^G:GPRA;L:LOAD;P:PREVIOUS"
D ^DIR K DIR
I Y=-1!($D(DIRUT)) D @("RESET^"_BIRTN) S BIPOP=1 Q
;
K BICC
;---> Load GPRA Set of Communities.
I "GL"[Y D GETGPRA^BISITE4(.BICC,$G(DUZ(2)))
;
D:Y'="G"
.;---> Select cases for one or more CURRENT COMMUNITY (OR ALL).
.N BIID S BIID="3;I $G(X) S:$D(^DIC(5,X,0)) X=$P(^(0),U);25"
.N BICOL S BICOL=" # Community State"
.D SEL^BISELECT(9999999.05,"BICC","Community",,,,BIID,BICOL,.BIPOP)
;
D @("RESET^"_BIRTN)
Q
;
;
;----------
TEXT8 ;EP
;;You have the opportunity here to use the GPRA set of Communities.
;;
;;* Enter "G" to automatically use the GPRA set and proceed.
;;* Enter "L" to LOAD the GPRA set and then edit your list before proceeding.
;;* Enter "P" to load the PREVIOUS set of Communities you used.
;;
D PRINTX("TEXT8")
Q
;
;
;----------
HCF(BIHCF,BIRTN) ;EP
;---> Select Health Care Facility(s).
;---> Called by Protocol BI OUTPUT FACILITY.
;---> Parameters:
; 1 - BIHCF (ret) Local array of Health Care Facility IENs.
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
;---> Default Facilty=DUZ(0); but if user decides to select more than
;---> DUZ(0) site, goes to ^BISELECT and get user's previous list
;---> (by killing the single BIHCF(DUZ(0))).
N M,N S (M,N)=0
F S N=$O(BIHCF(N)) Q:'N S M=M+1
K:M=1 BIHCF
;
;---> Code to display Area as an identifier.
N BIID
S BIID="1;I $G(BIIEN) S X=$P($G(^AUTTLOC(BIIEN,0)),U,4)"
S BIID=BIID_" I X S:$D(^AUTTAREA(X,0)) X="" ""_$P(^(0),U);28"
N BICOL S BICOL=" # Health Care Facility IHS Area"
D SEL^BISELECT(4,"BIHCF","Health Care Facility",,,,BIID,BICOL,.BIPOP)
D @("RESET^"_BIRTN)
Q
;
;
;----------
CMGR(BICM,BIRTN) ;EP
;---> Select Case Managers.
;---> Called by Protocol BI OUTPUT CASE MANAGER.
;---> Parameters:
; 1 - BICM (ret) Local array of Current Community IENs.
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
;---> Select cases for one or more CASE MANAGERS (OR ALL).
N BISCRN S BISCRN="I $D(^BIMGR(Y,0))"
D SEL^BISELECT(9002084.01,"BICM","Case Manager",BISCRN,,,,,.BIPOP)
D @("RESET^"_BIRTN)
Q
;
;
;----------
DPRV(BIDPRV,BIRTN) ;EP
;---> Select Designated Provider.
;---> Called by Protocol BI OUTPUT DESIGNATED PROVIDER.
;---> Parameters:
; 1 - BIDPRV (ret) Designated Provider IENs.
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
;---> Select cases for one or more DESIGNATED PROVIDERS (OR ALL).
N BISCRN S BISCRN="I $D(^XUSEC(""PROVIDER"",Y))"
D SEL^BISELECT(200,"BIDPRV","Designated Provider",BISCRN,,,,,.BIPOP)
D @("RESET^"_BIRTN)
Q
;
;
;----------
BEN(BIBEN,BIRTN) ;EP
;---> Select Types of Beneficiaries.
;---> Called by Protocol BI OUTPUT CASE MANAGER.
;---> Parameters:
; 1 - BIBEN (ret) Local array of Beneficiary Types.
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
;---> Select cases for one or more BENEFICIARY TYPES (OR ALL).
N BINAM S BINAM="Beneficiary Type"
N BIID S BIID="2;;34"
N BICOL S BICOL=" # Beneficiary Type Code"
D SEL^BISELECT(9999999.25,"BIBEN",BINAM,,,,BIID,BICOL,.BIPOP)
D @("RESET^"_BIRTN)
Q
;
;
;----------
VTYPE(BIVT,BIRTN) ;EP
;---> Select Visit Types.
;---> Called by Protocol BI OUTPUT CASE MANAGER.
;---> Parameters:
; 1 - BIBEN (ret) Local array of VISIT Types.
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
;---> Select cases for one or more VISIT TYPES (OR ALL).
N BINAM S BINAM="Visit Type"
N BICOL S BICOL=" # Visit Type Code"
D SEL^BISELECT(9000010,"BIVT",BINAM,,,,,BICOL,.BIPOP,,".03")
D @("RESET^"_BIRTN)
Q
;
;
;----------
INCLHPV(BIHPV,BIRTN) ;EP
;---> Answer Yes/No to include Hepatitis A in Quarterly Report.
;---> Called by Protocol BI OUTPUT INCLUDE HPV.
;---> Parameters:
; 1 - BIHPV (ret) 1=YES, 0=NO.
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
D FULL^VALM1
D TITLE^BIUTL5("INCLUDE VARICELLA & PNEUMO IN REPORT")
D TEXT4 W ! N Y
D DIR^BIFMAN("YAO",.Y,," Include Varicella & Pneumo? (YES/NO): ","YES")
S:Y=0 BIHPV=0 S:Y=1 BIHPV=1
D @("RESET^"_BIRTN)
Q
;
;
;----------
TEXT4 ;EP
;;This option allows you to include Varicella and Pneumo
;;in the statistics of the "Appropriate for Age" row at the
;;top of the report.
;;
;;If you answer "YES," Varicella & Pneumo will appear in the
;;Minimum needs header row at the top of the report and will
;;count when computing whether patients are Appropriate for Age.
;;
;;Answer "NO" in order to exclude Varicella & Pneumo from the
;;Minimum Needs when computing Appropriate for Age statistics.
;;
;;In both cases, the statistics for Varicella & Pneumo will be
;;displayed individually in additional rows at the bottom of the
;;report.
;;
D PRINTX("TEXT4")
Q
;
;
;----------
INCLCPT(BICPT,BIRTN) ;EP
;---> Answer Yes/No to include CPT Coded Visits in report.
;---> Called by Protocol BI OUTPUT INCLUDE CPT.
;---> Parameters:
; 1 - BICPT (ret) 1=YES, 0=NO.
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
D FULL^VALM1
D TITLE^BIUTL5("INCLUDE CPT CODED VISITS IN REPORT")
D TEXT5 W ! N Y
D DIR^BIFMAN("YAO",.Y,," Include CPT Coded Visits in report? (YES/NO): ")
S:Y=0 BICPT=0 S:Y=1 BICPT=1
D @("RESET^"_BIRTN)
Q
;
;
;----------
TEXT5 ;EP
;;This option allows you to include CPT Coded Visits in the report.
;;
;;Explanation: Most immunizations will be recorded as Immunization
;;Visits and will be included in this report. However, it is possible
;;that some immunizations were recorded only by CPT Code for the
;;patient's visit and not actually recorded in the Immunization Files;
;;in other words, not entered via the Immunization Package.
;;
;;Answer "YES" to this question if you wish to have the report search
;;for any immunizations that were only entered as CPT Codes, and to
;;include those immunizations in the statistical results of this report.
;;NOTE: Including CPT Coded visits may cause some patients to appear on
;;the report's patient roster who do not have immunizations recorded in
;;the Immunization Package.
;;
;;Answer "NO" to ignore any immunizations that might have been recorded
;;only by CPT Coding.
D PRINTX("TEXT5")
Q
;
;
;----------
DISP24M(BIAGRPS,BIRTN) ;EP
;---> Answer Yes/No to display the 24-month column in the Two-Yr-Old Report.
;---> Called by Protocol BI OUTPUT DISPLAY 24-MO COLUMN.
;---> Parameters:
; 1 - BIAGRPS (ret) 1=Display 24-Month Column, 0=Do not.
; 2 - BIRTN (req) Calling routine for reset.
;
I $G(BIRTN)="" D ERRCD^BIUTL2(621,,1) Q
;
D FULL^VALM1
D TITLE^BIUTL5("DISPLAY 24-MONTH COLUMN")
D TEXT7 W ! N Y
D DIR^BIFMAN("YAO",.Y,," Display 24-Month column on report? (YES/NO): ")
S:Y=0 BIAGRPS="3,5,7,16,19,36" S:Y=1 BIAGRPS="3,5,7,16,19,24,36"
D @("RESET^"_BIRTN)
Q
;
;
;----------
TEXT7 ;EP
;;This option allows you to specifiy whether the 24-Month Column
;;should appear in the Two-Yr-Old Report. The final totals in the
;;report will not be affected by this choice.
;;
D PRINTX("TEXT7")
Q
;
;
;----------
HELPTX(BILINL,BITAB) ;EP
N I,T,X S T="" S:'$D(BITAB) BITAB=5 F I=1:1:BITAB S T=T_" "
F I=1:1 S X=$T(@BILINL+I) Q:X'[";;" S DIR("?",I)=T_$P(X,";;",2)
S DIR("?")=DIR("?",I-1) K DIR("?",I-1)
Q
;
;
;----------
PRINTX(BILINL,BITAB) ;EP
Q:$G(BILINL)=""
N I,T,X S T="" S:'$D(BITAB) BITAB=5 F I=1:1:BITAB S T=T_" "
F I=1:1 S X=$T(@BILINL+I) Q:X'[";;" W !,T,$P(X,";;",2)
Q
BIOUTPT ;IHS/CMI/MWR - HEADERS & PROMPTS FOR REPORTS.; MAY 10, 2010
+1 ;;8.5;IMMUNIZATION;;SEP 01,2011
+2 ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
+3 ;; COMMON HEADERS FOR REPORTS AND PROMPTS FOR REPORT PARAMETERS.
+4 ;
+5 ;
+6 ;----------
FDATE(BIFDT,BIRTN) ;EP
+1 ;---> Ask Forecast Date. Called by Protocol BI OUTPUT FORECAST DATE.
+2 ;---> Parameters:
+3 ; 1 - BIFDT (ret) Forecast Date, Fileman format.
+4 ; (opt) Default Date.
+5 ; 2 - BIRTN (req) Calling routine for reset.
+6 ;
+7 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+8 ;
FDATE1 ;EP
+1 IF $GET(BIFDT)=""
SET BIFDT=DT
+2 NEW BIDFLT,DIR
SET BIDFLT=$$TXDT^BIUTL5(BIFDT)
+3 SET DIR(0)="DA^::FEX"
+4 SET DIR("A")=" Please enter a Forecast Date: "
SET DIR("B")=BIDFLT
+5 DO FULL^VALM1
+6 DO TITLE^BIUTL5("SELECT FORECAST DATE")
+7 DO TEXT1
+8 DO ^DIR
WRITE !
+9 IF $DATA(DIRUT)
DO @("RESET^"_BIRTN)
QUIT
+10 SET BIFDT=$PIECE(Y,".")
+11 IF BIFDT<DT
Begin DoDot:1
+12 WRITE !?5,"The date may not be in the past. "
+13 WRITE "It must be today or in the future."
+14 KILL BIFDT
DO DIRZ^BIUTL3()
End DoDot:1
GOTO FDATE1
+15 DO @("RESET^"_BIRTN)
+16 QUIT
+17 ;
+18 ;
+19 ;----------
TEXT1 ;EP
+1 ;;The "Forecast Date" (or "Clinic Date") is the date that will
+2 ;;be used for calculating which immunizations patients are due for.
+3 ;;
+4 ;;For example, if you choose today, the letter or report will
+5 ;;list the immunizations that patients are due for today.
+6 ;;If you choose a future date (the date of a clinic), the letter
+7 ;;or report will list immunizations due on that future date.
+8 ;;
+9 ;;NOTE: If you select a Forecast date in the future, some patients
+10 ;; may appear as PAST DUE for that date in the future, even
+11 ;; though they are not PAST DUE today.
+12 ;;
+13 ;;
+14 DO PRINTX("TEXT1")
+15 QUIT
+16 ;
+17 ;
+18 ;----------
QDATE(BIQDT,BIRTN) ;EP
+1 ;---> Ask Quarter Ending Date.
+2 ;---> Called by Protocol BI OUTPUT QUARTER DATE.
+3 ;---> Parameters:
+4 ; 1 - BIQDT (ret) Quarter Ending Date, Fileman format.
+5 ; (opt) Default Date.
+6 ; 2 - BIRTN (req) Calling routine for reset.
+7 ;
+8 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+9 ;
+10 NEW DIR
+11 IF $GET(BIQDT)
SET DIR("B")=$$TXDT^BIUTL5(BIQDT)
+12 SET DIR(0)="DA^::PE"
+13 SET DIR("A")=" Please enter a Quarter Ending Date: "
+14 DO FULL^VALM1
+15 DO TITLE^BIUTL5("SELECT QUARTER ENDING DATE")
+16 DO TEXT2
WRITE !
+17 DO ^DIR
WRITE !
+18 IF $DATA(DIRUT)
DO @("RESET^"_BIRTN)
QUIT
+19 SET BIQDT=$PIECE(Y,".")
+20 IF $EXTRACT(BIQDT,6,7)="00"
Begin DoDot:1
+21 NEW X
SET X=$EXTRACT(BIQDT,4,5)
Begin DoDot:2
+22 IF +X=2
SET X=28
QUIT
+23 IF +X=1
SET X=31
QUIT
+24 IF 94611[+X
SET X=30
QUIT
+25 SET X=31
End DoDot:2
+26 SET BIQDT=BIQDT+X
End DoDot:1
+27 DO @("RESET^"_BIRTN)
+28 QUIT
+29 ;
+30 ;
+31 ;----------
TEXT2 ;EP
+1 ;;The "Quarter Ending Date" should be the last day of the quarter
+2 ;;being reported on. Typically, this date is either March 31,
+3 ;;June 30, September 30, or December 31. However, you may enter
+4 ;;any date you choose and the report will generate immunization
+5 ;;statistics based on the date entered. NOTE: The patient ages
+6 ;;(3 months, 5 months, 91 years, etc.) will be calculated as of
+7 ;;the Quarter Ending Date you enter here.
+8 ;;
+9 ;;For convenience's sake, if you enter only month/year, such as 9/98,
+10 ;;the program will automatically assign the report to the last day
+11 ;;of that month, such as 9/30/1998.
+12 ;;
+13 DO PRINTX("TEXT2")
+14 QUIT
+15 ;
+16 ;
+17 ;----------
DTRANGE(BIBEGDT,BIENDDT,BIPOP,BIRTN,BIBEGDF,BIENDDF) ;EP
+1 ;---> Ask date range.
+2 ;---> Called by Protocol BI OUTPUT DATE RANGE.
+3 ;---> Parameters:
+4 ; 1 - BIBEGDT (ret) Begin Date, Fileman format.
+5 ; 2 - BIENDDT (ret) End Date, Fileman format.
+6 ; 3 - BIPOP (ret) BIPOP=1 If quit, fail, DTOUT, DUOUT.
+7 ; 4 - BIRTN (req) Calling routine for reset.
+8 ; 5 - BIBEGDF (opt) Begin Date default, Fileman format.
+9 ; 6 - BIENDDF (opt) End Date default, Fileman format.
+10 ;
+11 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+12 ;
+13 DO TITLE^BIUTL5("SELECT DATE RANGE")
+14 DO TEXT3
WRITE !
+15 DO ASKDATES^BIUTL3(.BIBEGDT,.BIENDDT,.BIPOP,$GET(BIBEGDT),$GET(BIENDDT))
+16 DO @("RESET^"_BIRTN)
+17 QUIT
+18 ;
+19 ;
+20 ;----------
TEXT3 ;EP
+1 ;;Please enter the beginning and ending dates for the period you
+2 ;;wish this report to cover. (NOTE: The ending date must be after
+3 ;;the beginning date.)
+4 ;;
+5 DO PRINTX("TEXT3")
+6 QUIT
+7 ;
+8 ;
+9 ;----------
AGE(BIAG,BIRTN) ;EP
+1 ;---> Select age range. Called by Protocol BI OUTPUT AGE.
+2 ;---> If not limited to an age range, BIAG="".
+3 ;---> Parameters:
+4 ; 1 - BIAG (ret) Age Range in months.
+5 ; 2 - BIRTN (req) Calling routine for reset.
+6 ;
+7 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+8 ;
+9 DO AGERNG^BIAGE(.BIAG,.BIPOP,"1-72",0)
+10 IF $GET(BIPOP)
SET BIAG=""
DO @("RESET^"_BIRTN)
QUIT
+11 IF BIAG=""
SET BIAG="ALL"
+12 DO @("RESET^"_BIRTN)
+13 QUIT
+14 ;
+15 ;
+16 ;----------
TAR(BITAR,BIRTN) ;EP
+1 ;---> Select Two-Yr-Old Age Range for same Report.
+2 ;---> Called by Protocol BI OUTPUT TWO-YR-OLD REPORT AGE RANGE.
+3 ;---> Parameters:
+4 ; 1 - BITAR (ret) Two-Yr-Old Age Range in months;
+5 ; either "19-35" or "24-35".
+6 ; 2 - BIRTN (req) Calling routine for reset.
+7 ;
+8 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+9 ;
+10 DO FULL^VALM1
+11 DO TITLE^BIUTL5("TWO-YR-OLD AGE RANGE")
+12 DO TEXT6
+13 NEW A,X,Y
SET A=" Choose either 1 or 2"
+14 SET X="SO^1:19-35 months;2:24-35 months"
+15 DO DIR^BIFMAN(X,.Y,.BIPOP,A,$GET(BITAR))
+16 SET BITAR=$SELECT(Y=2:"24-35",1:"19-35")
+17 DO @("RESET^"_BIRTN)
+18 QUIT
+19 ;
+20 ;
+21 ;----------
TEXT6 ;EP
+1 ;;This parameter allows you to select the Age Range of Patients for
+2 ;;the Two-Yr-Old Report.
+3 ;;
+4 ;;Selecting "19-35 months" will include in the report all children who
+5 ;;were between those ages on the date entered in the "Quarter Ending Date"
+6 ;;parameter.
+7 ;;
+8 ;;Selecting "24-35 months" will only include children who were between
+9 ;;those ages on the date entered in the "Quarter Ending Date" parameter.
+10 ;;
+11 DO PRINTX("TEXT6")
+12 QUIT
+13 ;
+14 ;
+15 ;----------
CC(BICC,BIRTN,BIPOP) ;EP
+1 ;---> Select Current Community(s).
+2 ;---> Called by Protocol BI OUTPUT COMMUNITY.
+3 ;---> Parameters:
+4 ; 1 - BICC (ret) Local array of Current Community IENs.
+5 ; 2 - BIRTN (req) Calling routine for reset.
+6 ; 3 - BIPOP (opt) BIQUIT=1 if user quit, ^-arrowed.
+7 ;
+8 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+9 ;
+10 SET BIPOP=0
+11 DO TITLE^BIUTL5("SELECTION OF COMMUNITIES")
+12 DO TEXT8
+13 ;
+14 NEW DIR
SET DIR("A")=" Select G, L, or P: "
SET DIR("B")="Load"
+15 SET DIR(0)="SAM^G:GPRA;L:LOAD;P:PREVIOUS"
+16 DO ^DIR
KILL DIR
+17 IF Y=-1!($DATA(DIRUT))
DO @("RESET^"_BIRTN)
SET BIPOP=1
QUIT
+18 ;
+19 KILL BICC
+20 ;---> Load GPRA Set of Communities.
+21 IF "GL"[Y
DO GETGPRA^BISITE4(.BICC,$GET(DUZ(2)))
+22 ;
+23 IF Y'="G"
Begin DoDot:1
+24 ;---> Select cases for one or more CURRENT COMMUNITY (OR ALL).
+25 NEW BIID
SET BIID="3;I $G(X) S:$D(^DIC(5,X,0)) X=$P(^(0),U);25"
+26 NEW BICOL
SET BICOL=" # Community State"
+27 DO SEL^BISELECT(9999999.05,"BICC","Community",,,,BIID,BICOL,.BIPOP)
End DoDot:1
+28 ;
+29 DO @("RESET^"_BIRTN)
+30 QUIT
+31 ;
+32 ;
+33 ;----------
TEXT8 ;EP
+1 ;;You have the opportunity here to use the GPRA set of Communities.
+2 ;;
+3 ;;* Enter "G" to automatically use the GPRA set and proceed.
+4 ;;* Enter "L" to LOAD the GPRA set and then edit your list before proceeding.
+5 ;;* Enter "P" to load the PREVIOUS set of Communities you used.
+6 ;;
+7 DO PRINTX("TEXT8")
+8 QUIT
+9 ;
+10 ;
+11 ;----------
HCF(BIHCF,BIRTN) ;EP
+1 ;---> Select Health Care Facility(s).
+2 ;---> Called by Protocol BI OUTPUT FACILITY.
+3 ;---> Parameters:
+4 ; 1 - BIHCF (ret) Local array of Health Care Facility IENs.
+5 ; 2 - BIRTN (req) Calling routine for reset.
+6 ;
+7 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+8 ;
+9 ;---> Default Facilty=DUZ(0); but if user decides to select more than
+10 ;---> DUZ(0) site, goes to ^BISELECT and get user's previous list
+11 ;---> (by killing the single BIHCF(DUZ(0))).
+12 NEW M,N
SET (M,N)=0
+13 FOR
SET N=$ORDER(BIHCF(N))
IF 'N
QUIT
SET M=M+1
+14 IF M=1
KILL BIHCF
+15 ;
+16 ;---> Code to display Area as an identifier.
+17 NEW BIID
+18 SET BIID="1;I $G(BIIEN) S X=$P($G(^AUTTLOC(BIIEN,0)),U,4)"
+19 SET BIID=BIID_" I X S:$D(^AUTTAREA(X,0)) X="" ""_$P(^(0),U);28"
+20 NEW BICOL
SET BICOL=" # Health Care Facility IHS Area"
+21 DO SEL^BISELECT(4,"BIHCF","Health Care Facility",,,,BIID,BICOL,.BIPOP)
+22 DO @("RESET^"_BIRTN)
+23 QUIT
+24 ;
+25 ;
+26 ;----------
CMGR(BICM,BIRTN) ;EP
+1 ;---> Select Case Managers.
+2 ;---> Called by Protocol BI OUTPUT CASE MANAGER.
+3 ;---> Parameters:
+4 ; 1 - BICM (ret) Local array of Current Community IENs.
+5 ; 2 - BIRTN (req) Calling routine for reset.
+6 ;
+7 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+8 ;
+9 ;---> Select cases for one or more CASE MANAGERS (OR ALL).
+10 NEW BISCRN
SET BISCRN="I $D(^BIMGR(Y,0))"
+11 DO SEL^BISELECT(9002084.01,"BICM","Case Manager",BISCRN,,,,,.BIPOP)
+12 DO @("RESET^"_BIRTN)
+13 QUIT
+14 ;
+15 ;
+16 ;----------
DPRV(BIDPRV,BIRTN) ;EP
+1 ;---> Select Designated Provider.
+2 ;---> Called by Protocol BI OUTPUT DESIGNATED PROVIDER.
+3 ;---> Parameters:
+4 ; 1 - BIDPRV (ret) Designated Provider IENs.
+5 ; 2 - BIRTN (req) Calling routine for reset.
+6 ;
+7 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+8 ;
+9 ;---> Select cases for one or more DESIGNATED PROVIDERS (OR ALL).
+10 NEW BISCRN
SET BISCRN="I $D(^XUSEC(""PROVIDER"",Y))"
+11 DO SEL^BISELECT(200,"BIDPRV","Designated Provider",BISCRN,,,,,.BIPOP)
+12 DO @("RESET^"_BIRTN)
+13 QUIT
+14 ;
+15 ;
+16 ;----------
BEN(BIBEN,BIRTN) ;EP
+1 ;---> Select Types of Beneficiaries.
+2 ;---> Called by Protocol BI OUTPUT CASE MANAGER.
+3 ;---> Parameters:
+4 ; 1 - BIBEN (ret) Local array of Beneficiary Types.
+5 ; 2 - BIRTN (req) Calling routine for reset.
+6 ;
+7 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+8 ;
+9 ;---> Select cases for one or more BENEFICIARY TYPES (OR ALL).
+10 NEW BINAM
SET BINAM="Beneficiary Type"
+11 NEW BIID
SET BIID="2;;34"
+12 NEW BICOL
SET BICOL=" # Beneficiary Type Code"
+13 DO SEL^BISELECT(9999999.25,"BIBEN",BINAM,,,,BIID,BICOL,.BIPOP)
+14 DO @("RESET^"_BIRTN)
+15 QUIT
+16 ;
+17 ;
+18 ;----------
VTYPE(BIVT,BIRTN) ;EP
+1 ;---> Select Visit Types.
+2 ;---> Called by Protocol BI OUTPUT CASE MANAGER.
+3 ;---> Parameters:
+4 ; 1 - BIBEN (ret) Local array of VISIT Types.
+5 ; 2 - BIRTN (req) Calling routine for reset.
+6 ;
+7 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+8 ;
+9 ;---> Select cases for one or more VISIT TYPES (OR ALL).
+10 NEW BINAM
SET BINAM="Visit Type"
+11 NEW BICOL
SET BICOL=" # Visit Type Code"
+12 DO SEL^BISELECT(9000010,"BIVT",BINAM,,,,,BICOL,.BIPOP,,".03")
+13 DO @("RESET^"_BIRTN)
+14 QUIT
+15 ;
+16 ;
+17 ;----------
INCLHPV(BIHPV,BIRTN) ;EP
+1 ;---> Answer Yes/No to include Hepatitis A in Quarterly Report.
+2 ;---> Called by Protocol BI OUTPUT INCLUDE HPV.
+3 ;---> Parameters:
+4 ; 1 - BIHPV (ret) 1=YES, 0=NO.
+5 ; 2 - BIRTN (req) Calling routine for reset.
+6 ;
+7 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+8 ;
+9 DO FULL^VALM1
+10 DO TITLE^BIUTL5("INCLUDE VARICELLA & PNEUMO IN REPORT")
+11 DO TEXT4
WRITE !
NEW Y
+12 DO DIR^BIFMAN("YAO",.Y,," Include Varicella & Pneumo? (YES/NO): ","YES")
+13 IF Y=0
SET BIHPV=0
IF Y=1
SET BIHPV=1
+14 DO @("RESET^"_BIRTN)
+15 QUIT
+16 ;
+17 ;
+18 ;----------
TEXT4 ;EP
+1 ;;This option allows you to include Varicella and Pneumo
+2 ;;in the statistics of the "Appropriate for Age" row at the
+3 ;;top of the report.
+4 ;;
+5 ;;If you answer "YES," Varicella & Pneumo will appear in the
+6 ;;Minimum needs header row at the top of the report and will
+7 ;;count when computing whether patients are Appropriate for Age.
+8 ;;
+9 ;;Answer "NO" in order to exclude Varicella & Pneumo from the
+10 ;;Minimum Needs when computing Appropriate for Age statistics.
+11 ;;
+12 ;;In both cases, the statistics for Varicella & Pneumo will be
+13 ;;displayed individually in additional rows at the bottom of the
+14 ;;report.
+15 ;;
+16 DO PRINTX("TEXT4")
+17 QUIT
+18 ;
+19 ;
+20 ;----------
INCLCPT(BICPT,BIRTN) ;EP
+1 ;---> Answer Yes/No to include CPT Coded Visits in report.
+2 ;---> Called by Protocol BI OUTPUT INCLUDE CPT.
+3 ;---> Parameters:
+4 ; 1 - BICPT (ret) 1=YES, 0=NO.
+5 ; 2 - BIRTN (req) Calling routine for reset.
+6 ;
+7 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+8 ;
+9 DO FULL^VALM1
+10 DO TITLE^BIUTL5("INCLUDE CPT CODED VISITS IN REPORT")
+11 DO TEXT5
WRITE !
NEW Y
+12 DO DIR^BIFMAN("YAO",.Y,," Include CPT Coded Visits in report? (YES/NO): ")
+13 IF Y=0
SET BICPT=0
IF Y=1
SET BICPT=1
+14 DO @("RESET^"_BIRTN)
+15 QUIT
+16 ;
+17 ;
+18 ;----------
TEXT5 ;EP
+1 ;;This option allows you to include CPT Coded Visits in the report.
+2 ;;
+3 ;;Explanation: Most immunizations will be recorded as Immunization
+4 ;;Visits and will be included in this report. However, it is possible
+5 ;;that some immunizations were recorded only by CPT Code for the
+6 ;;patient's visit and not actually recorded in the Immunization Files;
+7 ;;in other words, not entered via the Immunization Package.
+8 ;;
+9 ;;Answer "YES" to this question if you wish to have the report search
+10 ;;for any immunizations that were only entered as CPT Codes, and to
+11 ;;include those immunizations in the statistical results of this report.
+12 ;;NOTE: Including CPT Coded visits may cause some patients to appear on
+13 ;;the report's patient roster who do not have immunizations recorded in
+14 ;;the Immunization Package.
+15 ;;
+16 ;;Answer "NO" to ignore any immunizations that might have been recorded
+17 ;;only by CPT Coding.
+18 DO PRINTX("TEXT5")
+19 QUIT
+20 ;
+21 ;
+22 ;----------
DISP24M(BIAGRPS,BIRTN) ;EP
+1 ;---> Answer Yes/No to display the 24-month column in the Two-Yr-Old Report.
+2 ;---> Called by Protocol BI OUTPUT DISPLAY 24-MO COLUMN.
+3 ;---> Parameters:
+4 ; 1 - BIAGRPS (ret) 1=Display 24-Month Column, 0=Do not.
+5 ; 2 - BIRTN (req) Calling routine for reset.
+6 ;
+7 IF $GET(BIRTN)=""
DO ERRCD^BIUTL2(621,,1)
QUIT
+8 ;
+9 DO FULL^VALM1
+10 DO TITLE^BIUTL5("DISPLAY 24-MONTH COLUMN")
+11 DO TEXT7
WRITE !
NEW Y
+12 DO DIR^BIFMAN("YAO",.Y,," Display 24-Month column on report? (YES/NO): ")
+13 IF Y=0
SET BIAGRPS="3,5,7,16,19,36"
IF Y=1
SET BIAGRPS="3,5,7,16,19,24,36"
+14 DO @("RESET^"_BIRTN)
+15 QUIT
+16 ;
+17 ;
+18 ;----------
TEXT7 ;EP
+1 ;;This option allows you to specifiy whether the 24-Month Column
+2 ;;should appear in the Two-Yr-Old Report. The final totals in the
+3 ;;report will not be affected by this choice.
+4 ;;
+5 DO PRINTX("TEXT7")
+6 QUIT
+7 ;
+8 ;
+9 ;----------
HELPTX(BILINL,BITAB) ;EP
+1 NEW I,T,X
SET T=""
IF '$DATA(BITAB)
SET BITAB=5
FOR I=1:1:BITAB
SET T=T_" "
+2 FOR I=1:1
SET X=$TEXT(@BILINL+I)
IF X'[";;"
QUIT
SET DIR("?",I)=T_$PIECE(X,";;",2)
+3 SET DIR("?")=DIR("?",I-1)
KILL DIR("?",I-1)
+4 QUIT
+5 ;
+6 ;
+7 ;----------
PRINTX(BILINL,BITAB) ;EP
+1 IF $GET(BILINL)=""
QUIT
+2 NEW I,T,X
SET T=""
IF '$DATA(BITAB)
SET BITAB=5
FOR I=1:1:BITAB
SET T=T_" "
+3 FOR I=1:1
SET X=$TEXT(@BILINL+I)
IF X'[";;"
QUIT
WRITE !,T,$PIECE(X,";;",2)
+4 QUIT