BIREPQ5 ;IHS/CMI/MWR - REPORT, QTR IMM LIST REJECTS;MAY 30,2007
;;8.2;IMMUNIZATION;;SEP 11,2007
;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
;; QUARTERLY IMM REPORT, VIEW PATIENTS: REJECTED, APPROPRIATE, OR ALL.
;
;---> Called by ProtocolS BI REPORT QTR PATIENTS REJECTED, APPRO, ALL.
;---> on the Protocol Menu BI MENU REPORT QTR VIEW to view
;
;----------
MAIN(BIVAL) ;
;---> Display Patients.
;---> Parameters:
; 1 - BIVAL (opt) Value indicates which patients:
; 0=All, 1=Rejects only, 2=Appropriate only.
;
S:(($G(BIVAL)<1)!($G(BIVAL)>2)) BIVAL=0
N VALMCNT
;---> If <STKOV> errors appear here, increase STACK in SYSGEN,
;---> System Configuration Parameters.
;
D START(BIVAL)
D RESET1^BIREPQ1
Q
;
;
;----------
START(BIVAL) ;EP
;---> Display Patients.
;---> Parameters:
; 1 - BIVAL (opt) Value indicates which patients.
; 0=All patients, 1=Rejects only, 2=Appropriate only
;
;---> If Vaccine Table is not standard, display Error Text and quit.
I $D(^BISITE(-1)) D ERRCD^BIUTL2(503,,1) Q
D SETVARS^BIUTL5
;
N BIPOP
D D DIRZ^BIUTL3(.BIPOP)
.I $G(BIVAL)=1 D Q
..D TITLE^BIUTL5("VIEW PATIENTS NOT APPROPRIATE IN QUARTERLY REPORT"),TEXT1 Q
.I $G(BIVAL)=2 D Q
..D TITLE^BIUTL5("VIEW PATIENTS APPROPRIATE IN QUARTERLY REPORT"),TEXT2
.D TITLE^BIUTL5("VIEW ALL PATIENTS REVIEWED IN QUARTERLY REPORT"),TEXT3 Q
Q:$G(BIPOP)
W !!?5,"Please hold...",!
;
;---> Get Total Patients from ^TMP("BIDUL",$J,1,DOB,NAME,BIDFN)
;---> From STOR^BIREPQ4, call to STORE^BIDUR1.
N BIT S BIT=0
D
.N M,N,P
.S N=0 F S N=$O(^TMP("BIDUL",$J,1,N)) Q:N="" D
..S M=0 F S M=$O(^TMP("BIDUL",$J,1,N,M)) Q:M="" D
...N BIVAL1
...S P=0 F S P=$O(^TMP("BIDUL",$J,1,N,M,P)) Q:P="" S BIVAL1=^(P) D
....I $G(BIVAL) Q:BIVAL'=BIVAL1
....S BIT=BIT+1
;
;---> For now, comment out any additional info, per Group's request v8.0.
;N BINFO S BINFO="1,2,3,5,7,8"
N BIPG
S BIPG=$S(BIVAL=1:"Not Appropriate",BIVAL=2:"Appropriate",1:"Both Groups")
S BIPG="Report - "_BIPG
N BIAG S BIAG="3-27"
;---> Clear View global.
K ^TMP("BIDULV",$J)
;---> For now, no Additional Info.
;D START^BIDUVLS1(BIQDT,BINFO,BIPG,BIAG,BIT,BIVAL)
D START^BIDUVLS1(BIQDT,,BIPG,BIAG,BIT,BIVAL,1)
Q
;
;
;----------
TEXT1 ;EP
;;This action will display a List of the patients who were NOT within
;;the recommended guidelines for immunizations and therefore were
;;NOT included in the tallies for the "Approp. for Age" row of the
;;report.
;;
;;NOTE! It is possible that some patients rejected by the report
;; (as Not Appropriate for Age) are NOT DUE for any immunizations.
;; Immunizations given after the recommended age cutoff will
;; cause a patient to be rejected from the "Approp for Age" tally.
;; Also, any immunizations given after the Quarter Ending Date
;; of the report are not counted.
D PRINTX("TEXT1")
Q
;
;
;----------
TEXT2 ;EP
;;This action will display a List of the patients who were WITHIN
;;the recommended guidelines for immunizations and therefore were
;;INCLUDED in the tallies for the "Approp. for Age" row of the
;;report.
;;
;;
D PRINTX("TEXT2")
Q
;
;
;----------
TEXT3 ;EP
;;This action will display a list of ALL the patients who were
;;considered in this report.
;;
;;
D PRINTX("TEXT3")
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
BIREPQ5 ;IHS/CMI/MWR - REPORT, QTR IMM LIST REJECTS;MAY 30,2007
+1 ;;8.2;IMMUNIZATION;;SEP 11,2007
+2 ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
+3 ;; QUARTERLY IMM REPORT, VIEW PATIENTS: REJECTED, APPROPRIATE, OR ALL.
+4 ;
+5 ;---> Called by ProtocolS BI REPORT QTR PATIENTS REJECTED, APPRO, ALL.
+6 ;---> on the Protocol Menu BI MENU REPORT QTR VIEW to view
+7 ;
+8 ;----------
MAIN(BIVAL) ;
+1 ;---> Display Patients.
+2 ;---> Parameters:
+3 ; 1 - BIVAL (opt) Value indicates which patients:
+4 ; 0=All, 1=Rejects only, 2=Appropriate only.
+5 ;
+6 IF (($GET(BIVAL)<1)!($GET(BIVAL)>2))
SET BIVAL=0
+7 NEW VALMCNT
+8 ;---> If <STKOV> errors appear here, increase STACK in SYSGEN,
+9 ;---> System Configuration Parameters.
+10 ;
+11 DO START(BIVAL)
+12 DO RESET1^BIREPQ1
+13 QUIT
+14 ;
+15 ;
+16 ;----------
START(BIVAL) ;EP
+1 ;---> Display Patients.
+2 ;---> Parameters:
+3 ; 1 - BIVAL (opt) Value indicates which patients.
+4 ; 0=All patients, 1=Rejects only, 2=Appropriate only
+5 ;
+6 ;---> If Vaccine Table is not standard, display Error Text and quit.
+7 IF $DATA(^BISITE(-1))
DO ERRCD^BIUTL2(503,,1)
QUIT
+8 DO SETVARS^BIUTL5
+9 ;
+10 NEW BIPOP
+11 Begin DoDot:1
+12 IF $GET(BIVAL)=1
Begin DoDot:2
+13 DO TITLE^BIUTL5("VIEW PATIENTS NOT APPROPRIATE IN QUARTERLY REPORT")
DO TEXT1
QUIT
End DoDot:2
QUIT
+14 IF $GET(BIVAL)=2
Begin DoDot:2
+15 DO TITLE^BIUTL5("VIEW PATIENTS APPROPRIATE IN QUARTERLY REPORT")
DO TEXT2
End DoDot:2
QUIT
+16 DO TITLE^BIUTL5("VIEW ALL PATIENTS REVIEWED IN QUARTERLY REPORT")
DO TEXT3
QUIT
End DoDot:1
DO DIRZ^BIUTL3(.BIPOP)
+17 IF $GET(BIPOP)
QUIT
+18 WRITE !!?5,"Please hold...",!
+19 ;
+20 ;---> Get Total Patients from ^TMP("BIDUL",$J,1,DOB,NAME,BIDFN)
+21 ;---> From STOR^BIREPQ4, call to STORE^BIDUR1.
+22 NEW BIT
SET BIT=0
+23 Begin DoDot:1
+24 NEW M,N,P
+25 SET N=0
FOR
SET N=$ORDER(^TMP("BIDUL",$JOB,1,N))
IF N=""
QUIT
Begin DoDot:2
+26 SET M=0
FOR
SET M=$ORDER(^TMP("BIDUL",$JOB,1,N,M))
IF M=""
QUIT
Begin DoDot:3
+27 NEW BIVAL1
+28 SET P=0
FOR
SET P=$ORDER(^TMP("BIDUL",$JOB,1,N,M,P))
IF P=""
QUIT
SET BIVAL1=^(P)
Begin DoDot:4
+29 IF $GET(BIVAL)
IF BIVAL'=BIVAL1
QUIT
+30 SET BIT=BIT+1
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+31 ;
+32 ;---> For now, comment out any additional info, per Group's request v8.0.
+33 ;N BINFO S BINFO="1,2,3,5,7,8"
+34 NEW BIPG
+35 SET BIPG=$SELECT(BIVAL=1:"Not Appropriate",BIVAL=2:"Appropriate",1:"Both Groups")
+36 SET BIPG="Report - "_BIPG
+37 NEW BIAG
SET BIAG="3-27"
+38 ;---> Clear View global.
+39 KILL ^TMP("BIDULV",$JOB)
+40 ;---> For now, no Additional Info.
+41 ;D START^BIDUVLS1(BIQDT,BINFO,BIPG,BIAG,BIT,BIVAL)
+42 DO START^BIDUVLS1(BIQDT,,BIPG,BIAG,BIT,BIVAL,1)
+43 QUIT
+44 ;
+45 ;
+46 ;----------
TEXT1 ;EP
+1 ;;This action will display a List of the patients who were NOT within
+2 ;;the recommended guidelines for immunizations and therefore were
+3 ;;NOT included in the tallies for the "Approp. for Age" row of the
+4 ;;report.
+5 ;;
+6 ;;NOTE! It is possible that some patients rejected by the report
+7 ;; (as Not Appropriate for Age) are NOT DUE for any immunizations.
+8 ;; Immunizations given after the recommended age cutoff will
+9 ;; cause a patient to be rejected from the "Approp for Age" tally.
+10 ;; Also, any immunizations given after the Quarter Ending Date
+11 ;; of the report are not counted.
+12 DO PRINTX("TEXT1")
+13 QUIT
+14 ;
+15 ;
+16 ;----------
TEXT2 ;EP
+1 ;;This action will display a List of the patients who were WITHIN
+2 ;;the recommended guidelines for immunizations and therefore were
+3 ;;INCLUDED in the tallies for the "Approp. for Age" row of the
+4 ;;report.
+5 ;;
+6 ;;
+7 DO PRINTX("TEXT2")
+8 QUIT
+9 ;
+10 ;
+11 ;----------
TEXT3 ;EP
+1 ;;This action will display a list of ALL the patients who were
+2 ;;considered in this report.
+3 ;;
+4 ;;
+5 DO PRINTX("TEXT3")
+6 QUIT
+7 ;
+8 ;
+9 ;----------
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