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

BIPATER.m

Go to the documentation of this file.
  1. BIPATER ;IHS/CMI/MWR - VIEW/EDIT PATIENT ERRORS ; MAY 10, 2010
  1. ;;8.5;IMMUNIZATION;;SEP 01,2011
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; EDIT/CORRECT PATIENT ERRORS.
  1. ;
  1. ;
  1. ;----------
  1. START ;EP
  1. ;---> Loop through Patient Errors, view/edit/correct.
  1. D SETVARS^BIUTL5 K ^TMP("BIPTER",$J) N BITMP
  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. ;
  1. D TITLE^BIUTL5("VIEW/EDIT PATIENT ERRORS"),TEXT1
  1. N BIACT,DIR
  1. S DIR("A")=" Enter ALL or ONLY ACTIVE: ",DIR("B")="ALL"
  1. S DIR(0)="SAM^0:ALL;1:ONLY ACTIVE"
  1. D ^DIR K DIR
  1. Q:($D(DIRUT)!(Y=-1))
  1. S BIACT=+Y
  1. W !!?5,"Please hold...",!
  1. ;
  1. D EN(BIACT)
  1. D EXIT
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. EN(BIACT) ;EP
  1. ;---> Call Listman to View/Edit Patient Errors.
  1. ;---> Parameters:
  1. ; 1 - BIACT (opt) 0=ALL PATIENTS, 1=ONLY ACTIVE.
  1. ;
  1. N BIT
  1. D EN^VALM("BI PATIENT ERRORS EDIT")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. PRINT ;EP
  1. ;---> Print Vaccine Table.
  1. ;---> Called by Protocol BI VACCINE TABLE PRINT, which is the
  1. ;---> Print List Protocol for the List: BI VACCINE TABLE EDIT.
  1. ;
  1. D DEVICE(.BIPOP)
  1. I $G(BIPOP) D RESET Q
  1. ;
  1. D INIT^BIPATER1(.BIT,$G(BIACT)),HDR(1)
  1. D PRTLST^BIUTL8("BIPTER")
  1. D RESET
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. HDR(BIPRT) ;EP
  1. ;---> Header code for both Listman Screen and Print List.
  1. ;---> Parameters:
  1. ; 1 - BIPRT (opt) If BIPRT=1 array is for print: Change column
  1. ; header line and add Site Header line.
  1. ;
  1. N BILINE,X,Y S BILINE=0 K VALMHDR
  1. N BICRT S BICRT=$S(($E($G(IOST))="C")!(IOST["BROWSER"):1,1:0)
  1. ;
  1. D:'$G(BIPRT) WH^BIW(.BILINE)
  1. S X=$$REPHDR^BIUTL6(DUZ(2)),BIDASH=$L(X)+2 D CENTERT^BIUTL5(.X)
  1. D WH^BIW(.BILINE,X)
  1. ;S X=$$SP^BIUTL5(BIDASH,"-") D CENTERT^BIUTL5(.X)
  1. S X=$$SP^BIUTL5(32,"-") D CENTERT^BIUTL5(.X)
  1. D WH^BIW(.BILINE,X)
  1. ;
  1. S X=$S($G(BIACT):"ACTIVE",1:"ALL")_" PATIENT ERRORS (Total: "
  1. S X=X_$G(BIT)_")"
  1. D CENTERT^BIUTL5(.X)
  1. S:BICRT X=IOINHI_X_IOINORM
  1. D WH^BIW(.BILINE,X)
  1. ;
  1. D:$G(BIPRT)
  1. .D WH^BIW(.BILINE)
  1. .S X="Printed: "_$$NOW^BIUTL5() D CENTERT^BIUTL5(.X)
  1. .D WH^BIW(.BILINE,X,1)
  1. .S X=" # Patient Active HRCN# Age V Grp"
  1. .S X=X_" Error"
  1. .D WH^BIW(.BILINE,X)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. INIT ;EP
  1. ;---> Initialize variables and list array.
  1. ;---> Variables:
  1. ; 1 - BIT (ret) Total Patient Errors.
  1. ; 2 - BIACT (opt) 0=ALL PATIENTS, 1=ONLY ACTIVE.
  1. ;
  1. D INIT^BIPATER1(.BIT,$G(BIACT))
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. RESET ;EP
  1. ;---> Update partition for return to Listmanager.
  1. I $D(VALMQUIT) S VALMBCK="Q" Q
  1. D TERM^VALM0 S VALMBCK="R"
  1. D INIT,HDR() Q
  1. ;
  1. ;
  1. ;----------
  1. DEVICE(BIPOP) ;EP
  1. ;---> Get Device and possibly queue to Taskman.
  1. ;---> Parameters:
  1. ; 1 - BIPOP (ret) If error or Queue, BIPOP=1
  1. ;
  1. K %ZIS,IOP S BIPOP=0
  1. S ZTRTN="DEQUEUE^BIPATER"
  1. D ZSAVES^BIUTL3
  1. D ZIS^BIUTL2(.BIPOP,1)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. DEQUEUE ;EP
  1. ;---> Print Patient Data screen.
  1. N BIT
  1. D INIT^BIPATER1(.BIT,$G(BIACT)),HDR(1)
  1. D PRTLST^BIUTL8("BIPTER"),EXIT
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. HELP ;EP
  1. ;---> Help code.
  1. N BIX S BIX=X
  1. D FULL^VALM1 N BIPOP
  1. D TITLE^BIUTL5("EDIT PATIENT ERRORS - HELP, page 1 of 2")
  1. D TEXT2,DIRZ^BIUTL3(.BIPOP)
  1. I $G(BIPOP) D RE^VALM4 Q
  1. D TITLE^BIUTL5("EDIT PATIENT ERRORS - HELP, page 2 of 2")
  1. D TEXT3,DIRZ^BIUTL3()
  1. D:BIX'="??" RE^VALM4
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT1 ;EP
  1. ;;In the View/Edit Patient Errors screen you may display either
  1. ;;ALL Patients with errors or only those Patients with errors who
  1. ;;have a Status of ACTIVE.
  1. ;;
  1. ;;Enter ALL to include ALL Patients, or enter ONLY ACTIVE to select
  1. ;;only Active Patients.
  1. ;;
  1. ;
  1. D PRINTX("TEXT1")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT2 ;EP
  1. ;;This screen displays patients who whose Immunization Histories
  1. ;;contain errors, according to the Immserve Forecasting Utility, and
  1. ;;provides you with the ability to correct or delete those errors.
  1. ;;
  1. ;;The columns, from left to right, list:
  1. ;; 1) Patient Name
  1. ;; 2) Active/Inactive Status (A=Active, I=Inactive, N=Not In Register)
  1. ;; 3) HRCN# (Health Record Number or Chart#)
  1. ;; 4) Age (y=years, m=months, d=days)
  1. ;; 5) Vaccine Group in which the error is occurring
  1. ;; 6) An abbreviated statement of what the error is
  1. ;;
  1. ;;The three actions at the bottom of the screen allow you to make
  1. ;;corrections to patient errors on the list or to delete them,
  1. ;;either individually or all at once.
  1. ;
  1. D PRINTX("TEXT2")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT3 ;EP
  1. ;;Please note that EACH TIME a patient's forecast is computed (whether
  1. ;;individually or during the processing of a report), any errors found
  1. ;;in the patient's history will be stored in the Patient Errors File,
  1. ;;which is displayed here.
  1. ;;
  1. ;;Therefore, if you simply delete a patient error (rather than correct
  1. ;;it), the error will be placed in the Patient Errors File again the
  1. ;;next time the patient is is viewed or included in a report.
  1. ;;
  1. ;;There may be some cases in which the error cannot be corrected.
  1. ;;In these cases the Patient History reflects a situation that in fact
  1. ;;occurred and cannot be "edited". If these are old cases that are
  1. ;;rarely called up, then simply deleting them from the Error File is
  1. ;;probably the best action to take.
  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
  1. ;
  1. ;
  1. ;----------
  1. EXIT ;EP
  1. ;---> EOJ cleanup.
  1. D KILLALL^BIUTL8()
  1. K ^TMP("BIPTER",$J),^TMP("BIPTER1",$J),^TMP("BIPTER2",$J)
  1. D CLEAR^VALM1
  1. D FULL^VALM1
  1. Q