Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BIREPQ5

BIREPQ5.m

Go to the documentation of this file.
  1. BIREPQ5 ;IHS/CMI/MWR - REPORT, QTR IMM LIST REJECTS;MAY 30,2007
  1. ;;8.2;IMMUNIZATION;;SEP 11,2007
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; QUARTERLY IMM REPORT, VIEW PATIENTS: REJECTED, APPROPRIATE, OR ALL.
  1. ;
  1. ;---> Called by ProtocolS BI REPORT QTR PATIENTS REJECTED, APPRO, ALL.
  1. ;---> on the Protocol Menu BI MENU REPORT QTR VIEW to view
  1. ;
  1. ;----------
  1. MAIN(BIVAL) ;
  1. ;---> Display Patients.
  1. ;---> Parameters:
  1. ; 1 - BIVAL (opt) Value indicates which patients:
  1. ; 0=All, 1=Rejects only, 2=Appropriate only.
  1. ;
  1. S:(($G(BIVAL)<1)!($G(BIVAL)>2)) BIVAL=0
  1. N VALMCNT
  1. ;---> If <STKOV> errors appear here, increase STACK in SYSGEN,
  1. ;---> System Configuration Parameters.
  1. ;
  1. D START(BIVAL)
  1. D RESET1^BIREPQ1
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. START(BIVAL) ;EP
  1. ;---> Display Patients.
  1. ;---> Parameters:
  1. ; 1 - BIVAL (opt) Value indicates which patients.
  1. ; 0=All patients, 1=Rejects only, 2=Appropriate only
  1. ;
  1. ;---> If Vaccine Table is not standard, display Error Text and quit.
  1. I $D(^BISITE(-1)) D ERRCD^BIUTL2(503,,1) Q
  1. D SETVARS^BIUTL5
  1. ;
  1. N BIPOP
  1. D D DIRZ^BIUTL3(.BIPOP)
  1. .I $G(BIVAL)=1 D Q
  1. ..D TITLE^BIUTL5("VIEW PATIENTS NOT APPROPRIATE IN QUARTERLY REPORT"),TEXT1 Q
  1. .I $G(BIVAL)=2 D Q
  1. ..D TITLE^BIUTL5("VIEW PATIENTS APPROPRIATE IN QUARTERLY REPORT"),TEXT2
  1. .D TITLE^BIUTL5("VIEW ALL PATIENTS REVIEWED IN QUARTERLY REPORT"),TEXT3 Q
  1. Q:$G(BIPOP)
  1. W !!?5,"Please hold...",!
  1. ;
  1. ;---> Get Total Patients from ^TMP("BIDUL",$J,1,DOB,NAME,BIDFN)
  1. ;---> From STOR^BIREPQ4, call to STORE^BIDUR1.
  1. N BIT S BIT=0
  1. D
  1. .N M,N,P
  1. .S N=0 F S N=$O(^TMP("BIDUL",$J,1,N)) Q:N="" D
  1. ..S M=0 F S M=$O(^TMP("BIDUL",$J,1,N,M)) Q:M="" D
  1. ...N BIVAL1
  1. ...S P=0 F S P=$O(^TMP("BIDUL",$J,1,N,M,P)) Q:P="" S BIVAL1=^(P) D
  1. ....I $G(BIVAL) Q:BIVAL'=BIVAL1
  1. ....S BIT=BIT+1
  1. ;
  1. ;---> For now, comment out any additional info, per Group's request v8.0.
  1. ;N BINFO S BINFO="1,2,3,5,7,8"
  1. N BIPG
  1. S BIPG=$S(BIVAL=1:"Not Appropriate",BIVAL=2:"Appropriate",1:"Both Groups")
  1. S BIPG="Report - "_BIPG
  1. N BIAG S BIAG="3-27"
  1. ;---> Clear View global.
  1. K ^TMP("BIDULV",$J)
  1. ;---> For now, no Additional Info.
  1. ;D START^BIDUVLS1(BIQDT,BINFO,BIPG,BIAG,BIT,BIVAL)
  1. D START^BIDUVLS1(BIQDT,,BIPG,BIAG,BIT,BIVAL,1)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT1 ;EP
  1. ;;This action will display a List of the patients who were NOT within
  1. ;;the recommended guidelines for immunizations and therefore were
  1. ;;NOT included in the tallies for the "Approp. for Age" row of the
  1. ;;report.
  1. ;;
  1. ;;NOTE! It is possible that some patients rejected by the report
  1. ;; (as Not Appropriate for Age) are NOT DUE for any immunizations.
  1. ;; Immunizations given after the recommended age cutoff will
  1. ;; cause a patient to be rejected from the "Approp for Age" tally.
  1. ;; Also, any immunizations given after the Quarter Ending Date
  1. ;; of the report are not counted.
  1. D PRINTX("TEXT1")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT2 ;EP
  1. ;;This action will display a List of the patients who were WITHIN
  1. ;;the recommended guidelines for immunizations and therefore were
  1. ;;INCLUDED in the tallies for the "Approp. for Age" row of the
  1. ;;report.
  1. ;;
  1. ;;
  1. D PRINTX("TEXT2")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT3 ;EP
  1. ;;This action will display a list of ALL the patients who were
  1. ;;considered in this report.
  1. ;;
  1. ;;
  1. D PRINTX("TEXT3")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. PRINTX(BILINL,BITAB) ;EP
  1. Q:$G(BILINL)=""
  1. N I,T,X S T="" S:'$D(BITAB) BITAB=5 F I=1:1:BITAB S T=T_" "
  1. F I=1:1 S X=$T(@BILINL+I) Q:X'[";;" W !,T,$P(X,";;",2)
  1. Q