BGPMUD01 ; IHS/MSC/SAT - MU measure NQF0028A ;11-Feb-2011 15:43;DU
;;11.1;IHS CLINICAL REPORTING SYSTEM;**1**;JUN 27, 2011;Build 106
;code to collect meaningful use report tobacco use assessment
ENTRY ;EP
; expects:
; DFN = patient code from VA PATIENT file
; BGPBDATE = begin date of report
; BGPEDATE = end date of report
; BGPPROV = provider code from NEW PERSON file
; BGPMUTF = timeframe variable - "C"=current year; "P"=previous year; "B"=baseline year
N BGP1,BGP2,BGPDEN,BGPDSTR,BGPNUM,BGPNSTR,BGPDT,BGPAGEE,END,FIRST,IEN,START,VDATE,VIEN
N BGPHFI
;K ^TMP("BGPMU0028A",$J)
S BGPDEN=0
S BGPNUM=0
S BGPDSTR=""
S BGPNSTR=""
;Pts must be 18 or older
S BGPAGEE=$$AGE^AUPNPAT(DFN,BGPBDATE)
;No need to check further on children
Q:BGPAGEE<18
;
S START=9999999-BGPBDATE,END=9999999-BGPEDATE
;look for 2 visits with E&M codes
; OR 1 visit with E&M codes
S (BGP1,BGP2)=""
S FIRST=END-0.1 F S FIRST=$O(^AUPNVSIT("AA",DFN,FIRST)) Q:FIRST=""!($P(FIRST,".",1)>START) D Q:($L(BGP2,";")>1)!(BGP1'="")
.S VIEN=0 F S VIEN=$O(^AUPNVSIT("AA",DFN,FIRST,VIEN)) Q:'+VIEN D Q:($L(BGP2,";")>1)!(BGP1'="")
..S BGPDT=$P($P($G(^AUPNVSIT(VIEN,0)),U,1),".",1)
..;Check provider, determine if there are visits with E&M codes
..I $$PRV^BGPMUUT1(VIEN,BGPPROV) D
...D EM2(DFN,VIEN,.BGP2,BGPDT) ;determine if there are visits that have at least one of the E&M codes where 2 are necessary
...D EM1(DFN,VIEN,.BGP1,BGPDT) ;determine if there are visits that have at least one of the E&M codes where only 1 is necessary
;
;quit if visits with E&M code(s) not found for given DFN
Q:(BGP1="")&(BGP2="")
Q:(BGP1="")&($L(BGP2,";")'>1)
;getting here means this patient is in the denominator
S BGPDEN=1
;combine BGP1 and BPG2 into one string
S BGPDSTR=$S(BGP2'="":BGP2_$S(BGP1'="":";"_BGP1,1:""),1:BGP1)
;
;determine if this patient is in the numerator
N BGPH,BGPHFF,BGPTOBN,BGPTOBU
S BGPHFF=0 ;health factor found flag
S BGPTOBU=1
S BGPTOBN=1
D HFA(.BGPTOBU,.BGPTOBN)
S START=9999999-$$FMADD^XLFDT(BGPBDATE,-730)
S FIRST=END-0.1 F S FIRST=$O(^AUPNVSIT("AA",DFN,FIRST)) Q:FIRST=""!($P(FIRST,".",1)>START) D Q:BGPHFF
.S VIEN=0 F S VIEN=$O(^AUPNVSIT("AA",DFN,FIRST,VIEN)) Q:'+VIEN D Q:BGPHFF
..S BGPDT=$P($P($G(^AUPNVSIT(VIEN,0)),U,1),".",1)
..S BGPIEN="" F S BGPIEN=$O(^AUPNVHF("AD",VIEN,BGPIEN)) Q:'+BGPIEN D
...S BGPHFI=$P($G(^AUPNVHF(BGPIEN,0)),U,1)
...S BGPH="" F S BGPH=$O(BGPTOBU(BGPH)) Q:BGPH="" Q:BGPHFF I BGPHFI=BGPH S BGPHFF=1 S BGPNSTR=BGPTOBU(BGPH)_";"_BGPDT
...I 'BGPHFF S BGPH="" F S BGPH=$O(BGPTOBN(BGPH)) Q:BGPH="" Q:BGPHFF I BGPHFI=BGPH S BGPHFF=1 S BGPNSTR=BGPTOBN(BGPH)_";"_BGPDT
I BGPHFF S BGPNUM=1 ;patient is in the numerator
; update TOTAL
D TOTAL(DFN,BGPNUM,BGPMUTF,BGPDSTR,BGPNSTR)
;
; check these
K BGPL,BGPLWTS,BGPLHTS,%,X,BGPLWTS1,BGPLHTS1,Y,TERMINAL,NORMAL,FOLLOW,EXCEPT
Q
;
TOTAL(DFN,BGPNUM,BGPMUTF,BGPDSTR,BGPNSTR) ;See where this patient ends up
; BGPDSTR = Denominator string: encounter dates in FM format pieced by ";"
; BGPNSTR = Numerator string: <health factor text> ";" <health factor edit date in FM format>
;if we got here, this patient is in the denominator
N BGPDT,PTCNT,DEN1CT,INCL1CT,NOT1CT,TOTALS,PT1
S TOTALS=$G(^TMP("BGPMU0028A",$J,BGPMUTF,"TOT"))
S INCL1CT=+$G(^TMP("BGPMU0028A",$J,BGPMUTF,"INCL",1))
S NOT1CT=+$G(^TMP("BGPMU0028A",$J,BGPMUTF,"NOT",1))
S DEN1CT=+$G(^TMP("BGPMU0028A",$J,BGPMUTF,"DEN",1))
S PTCNT=$P(TOTALS,U,1),PT1=$P(TOTALS,U,2)
S PTCNT=PTCNT+1
S PT1=PT1+1
I BGPDEN D
.S DEN1CT=DEN1CT+1 S ^TMP("BGPMU0028A",$J,BGPMUTF,"DEN",1)=DEN1CT
.S ^TMP("BGPMU0028A",$J,BGPMUTF,"DEN","PAT",1,DEN1CT)=DFN_U_BGPDSTR
.I BGPNUM D
..S INCL1CT=INCL1CT+1
..S ^TMP("BGPMU0028A",$J,BGPMUTF,"INCL",1)=INCL1CT
..S ^TMP("BGPMU0028A",$J,BGPMUTF,"INCL","PAT",1,PT1)=DFN_U_BGPDSTR_U_BGPNSTR
.I 'BGPNUM D
..S NOT1CT=NOT1CT+1
..S ^TMP("BGPMU0028A",$J,BGPMUTF,"NOT",1)=NOT1CT
..S ^TMP("BGPMU0028A",$J,BGPMUTF,"NOT","PAT",1,PT1)=DFN_U_BGPDSTR
S ^TMP("BGPMU0028A",$J,BGPMUTF,"TOT")=PTCNT_U_PT1
;Setup iCare array for patient
S BGPICARE("MU.EP.0028a.1",BGPMUTF)=BGPDEN_U_BGPNUM_U_""_U_$G(BGPDSTR)_";"_$G(BGPNSTR)
Q
;
;look for E&M codes related to "office visit", "health and behavior assessment", "occupational therapy", "phychiatric & psychologic"
EM2(DFN,VIEN,BGP2,BGPDT) ;
N BGPI,BGPTMP
F BGPI=1:1 Q:$L(BGP2,";")>1 S BGPTMP=$P($T(CPT2+BGPI),";;",2) Q:BGPTMP="" D
.S X=+$$VSTCPT^BGPMUUT1(DFN,VIEN,BGPTMP)
.I +X S BGP2=BGP2_$S(BGP2'="":";",1:"")_$G(BGPDT)
Q
;
;look for E&M codes related to "preventive medicine service 18 and older"
; "prev - individual counseling"
; "prev med group counseling"
; "prev med other services"
EM1(DFN,VIEN,BGP1,BGPDT) ;
N BGPI,BGPTMP
F BGPI=1:1 Q:BGP1>0 S BGPTMP=$P($T(CPT1+BGPI),";;",2) Q:BGPTMP="" D
.S X=+$$VSTCPT^BGPMUUT1(DFN,VIEN,BGPTMP)
.I +X S BGP1=BGP1_$S(BGP1'="":";",1:"")_$G(BGPDT)
Q
;
TOBU ;;
;;CURRENT SMOKER, EVERY DAY
;;CURRENT SMOKER, SOME DAY
;;CURRENT SMOKER
;;CURRENT SMOKELESS
;;CESSATION-SMOKER
;;CESSATION-SMOKELESS
;;PREVIOUS (FORMER) SMOKELESS
;;PREVIOUS (FORMER) SMOKER
;;EXPOSURE TO ENVIRONMENTAL TOBACCO SMOKE
;;SMOKER IN HOME
;;CURRENT SMOKER & SMOKELESS
;;ASTHMA TRIGGERS
;;TOBACCO
;
TOBN ;;
;;NEVER USED TOBACCO
;;NEVER USED SMOKELESS TOBACCO
;;NEVER SMOKED
;;SMOKING STATUS UNKNOWN
;;SMOKELESS TOBACCO, STATUS UNKNOWN
;;NON-TOBACCO USER
;;CEREMONIAL USE ONLY
;;SMOKE FREE HOME
;
;
CPT1 ;;
;;BGPMU ENC PREV MED SVC 18 UP
;;BGPMU ENC PREV MED IND COUNSEL
;;BGPMU ENC PREV MED GRP COUNSEL
;;BGPMU ENC PREV MED OTHER SVC
;
CPT2 ;;
;;BGPMU ENC OFFICE VISIT
;;BGPMU ENC HEALTH AND BEHAVIOR
;;BGPMU ENC OCCUPATIONAL THERAPY
;;BGPMU ENC PSYCH AND PSYCH
;
HFA(BGPTOBU,BGPTOBN) ;build arrays of health factor pointers
; BGPTOBU(<health factor pointer>) array of health factors indicating tobacco user
; BGPTOBN(<health factor pointer>) array of health factors indicating non-tobacco user
N BGPI,BGPIND,BGPTMP
I $G(BGPTOBU)=1 D
.S BGPTMP=0
.F BGPI=1:1 D Q:BGPTMP=""
..S BGPTMP=$P($T(TOBU+BGPI),";;",2)
..Q:BGPTMP=""
..S BGPIND=$O(^AUTTHF("B",BGPTMP,""))
..S:BGPIND'="" BGPTOBU(BGPIND)=BGPTMP
;
I $G(BGPTOBN)=1 D
.S BGPTMP=0
.F BGPI=1:1 D Q:BGPTMP=""
..S BGPTMP=$P($T(TOBN+BGPI),";;",2)
..Q:BGPTMP=""
..S BGPIND=$O(^AUTTHF("B",BGPTMP,""))
..S:BGPIND'="" BGPTOBN(BGPIND)=BGPTMP
Q
;
TEST ; debug target
;S U="^"
;S DT=$$DT^XLFDT()
;S DFN=184 ; DFN = patient code from VA PATIENT file
;S BGPBDATE=3100401 ; BGPBDATE = begin date of report
;S BGPEDATE=3110401 ; BGPEDATE = end date of report
;S BGPPROV=2 ; BGPPROV = provider code from NEW PERSON file
;S BGPMUTF="C" ; BGPMUTF = timeframe variable - "C"=current year; "P"=previous year; "B"=baseline year
;D ENTRY
Q
BGPMUD01 ; IHS/MSC/SAT - MU measure NQF0028A ;11-Feb-2011 15:43;DU
+1 ;;11.1;IHS CLINICAL REPORTING SYSTEM;**1**;JUN 27, 2011;Build 106
+2 ;code to collect meaningful use report tobacco use assessment
ENTRY ;EP
+1 ; expects:
+2 ; DFN = patient code from VA PATIENT file
+3 ; BGPBDATE = begin date of report
+4 ; BGPEDATE = end date of report
+5 ; BGPPROV = provider code from NEW PERSON file
+6 ; BGPMUTF = timeframe variable - "C"=current year; "P"=previous year; "B"=baseline year
+7 NEW BGP1,BGP2,BGPDEN,BGPDSTR,BGPNUM,BGPNSTR,BGPDT,BGPAGEE,END,FIRST,IEN,START,VDATE,VIEN
+8 NEW BGPHFI
+9 ;K ^TMP("BGPMU0028A",$J)
+10 SET BGPDEN=0
+11 SET BGPNUM=0
+12 SET BGPDSTR=""
+13 SET BGPNSTR=""
+14 ;Pts must be 18 or older
+15 SET BGPAGEE=$$AGE^AUPNPAT(DFN,BGPBDATE)
+16 ;No need to check further on children
+17 IF BGPAGEE<18
QUIT
+18 ;
+19 SET START=9999999-BGPBDATE
SET END=9999999-BGPEDATE
+20 ;look for 2 visits with E&M codes
+21 ; OR 1 visit with E&M codes
+22 SET (BGP1,BGP2)=""
+23 SET FIRST=END-0.1
FOR
SET FIRST=$ORDER(^AUPNVSIT("AA",DFN,FIRST))
IF FIRST=""!($PIECE(FIRST,".",1)>START)
QUIT
Begin DoDot:1
+24 SET VIEN=0
FOR
SET VIEN=$ORDER(^AUPNVSIT("AA",DFN,FIRST,VIEN))
IF '+VIEN
QUIT
Begin DoDot:2
+25 SET BGPDT=$PIECE($PIECE($GET(^AUPNVSIT(VIEN,0)),U,1),".",1)
+26 ;Check provider, determine if there are visits with E&M codes
+27 IF $$PRV^BGPMUUT1(VIEN,BGPPROV)
Begin DoDot:3
+28 ;determine if there are visits that have at least one of the E&M codes where 2 are necessary
DO EM2(DFN,VIEN,.BGP2,BGPDT)
+29 ;determine if there are visits that have at least one of the E&M codes where only 1 is necessary
DO EM1(DFN,VIEN,.BGP1,BGPDT)
End DoDot:3
End DoDot:2
IF ($LENGTH(BGP2,";")>1)!(BGP1'="")
QUIT
End DoDot:1
IF ($LENGTH(BGP2,";")>1)!(BGP1'="")
QUIT
+30 ;
+31 ;quit if visits with E&M code(s) not found for given DFN
+32 IF (BGP1="")&(BGP2="")
QUIT
+33 IF (BGP1="")&($LENGTH(BGP2,";")'>1)
QUIT
+34 ;getting here means this patient is in the denominator
+35 SET BGPDEN=1
+36 ;combine BGP1 and BPG2 into one string
+37 SET BGPDSTR=$SELECT(BGP2'="":BGP2_$SELECT(BGP1'="":";"_BGP1,1:""),1:BGP1)
+38 ;
+39 ;determine if this patient is in the numerator
+40 NEW BGPH,BGPHFF,BGPTOBN,BGPTOBU
+41 ;health factor found flag
SET BGPHFF=0
+42 SET BGPTOBU=1
+43 SET BGPTOBN=1
+44 DO HFA(.BGPTOBU,.BGPTOBN)
+45 SET START=9999999-$$FMADD^XLFDT(BGPBDATE,-730)
+46 SET FIRST=END-0.1
FOR
SET FIRST=$ORDER(^AUPNVSIT("AA",DFN,FIRST))
IF FIRST=""!($PIECE(FIRST,".",1)>START)
QUIT
Begin DoDot:1
+47 SET VIEN=0
FOR
SET VIEN=$ORDER(^AUPNVSIT("AA",DFN,FIRST,VIEN))
IF '+VIEN
QUIT
Begin DoDot:2
+48 SET BGPDT=$PIECE($PIECE($GET(^AUPNVSIT(VIEN,0)),U,1),".",1)
+49 SET BGPIEN=""
FOR
SET BGPIEN=$ORDER(^AUPNVHF("AD",VIEN,BGPIEN))
IF '+BGPIEN
QUIT
Begin DoDot:3
+50 SET BGPHFI=$PIECE($GET(^AUPNVHF(BGPIEN,0)),U,1)
+51 SET BGPH=""
FOR
SET BGPH=$ORDER(BGPTOBU(BGPH))
IF BGPH=""
QUIT
IF BGPHFF
QUIT
IF BGPHFI=BGPH
SET BGPHFF=1
SET BGPNSTR=BGPTOBU(BGPH)_";"_BGPDT
+52 IF 'BGPHFF
SET BGPH=""
FOR
SET BGPH=$ORDER(BGPTOBN(BGPH))
IF BGPH=""
QUIT
IF BGPHFF
QUIT
IF BGPHFI=BGPH
SET BGPHFF=1
SET BGPNSTR=BGPTOBN(BGPH)_";"_BGPDT
End DoDot:3
End DoDot:2
IF BGPHFF
QUIT
End DoDot:1
IF BGPHFF
QUIT
+53 ;patient is in the numerator
IF BGPHFF
SET BGPNUM=1
+54 ; update TOTAL
+55 DO TOTAL(DFN,BGPNUM,BGPMUTF,BGPDSTR,BGPNSTR)
+56 ;
+57 ; check these
+58 KILL BGPL,BGPLWTS,BGPLHTS,%,X,BGPLWTS1,BGPLHTS1,Y,TERMINAL,NORMAL,FOLLOW,EXCEPT
+59 QUIT
+60 ;
TOTAL(DFN,BGPNUM,BGPMUTF,BGPDSTR,BGPNSTR) ;See where this patient ends up
+1 ; BGPDSTR = Denominator string: encounter dates in FM format pieced by ";"
+2 ; BGPNSTR = Numerator string: <health factor text> ";" <health factor edit date in FM format>
+3 ;if we got here, this patient is in the denominator
+4 NEW BGPDT,PTCNT,DEN1CT,INCL1CT,NOT1CT,TOTALS,PT1
+5 SET TOTALS=$GET(^TMP("BGPMU0028A",$JOB,BGPMUTF,"TOT"))
+6 SET INCL1CT=+$GET(^TMP("BGPMU0028A",$JOB,BGPMUTF,"INCL",1))
+7 SET NOT1CT=+$GET(^TMP("BGPMU0028A",$JOB,BGPMUTF,"NOT",1))
+8 SET DEN1CT=+$GET(^TMP("BGPMU0028A",$JOB,BGPMUTF,"DEN",1))
+9 SET PTCNT=$PIECE(TOTALS,U,1)
SET PT1=$PIECE(TOTALS,U,2)
+10 SET PTCNT=PTCNT+1
+11 SET PT1=PT1+1
+12 IF BGPDEN
Begin DoDot:1
+13 SET DEN1CT=DEN1CT+1
SET ^TMP("BGPMU0028A",$JOB,BGPMUTF,"DEN",1)=DEN1CT
+14 SET ^TMP("BGPMU0028A",$JOB,BGPMUTF,"DEN","PAT",1,DEN1CT)=DFN_U_BGPDSTR
+15 IF BGPNUM
Begin DoDot:2
+16 SET INCL1CT=INCL1CT+1
+17 SET ^TMP("BGPMU0028A",$JOB,BGPMUTF,"INCL",1)=INCL1CT
+18 SET ^TMP("BGPMU0028A",$JOB,BGPMUTF,"INCL","PAT",1,PT1)=DFN_U_BGPDSTR_U_BGPNSTR
End DoDot:2
+19 IF 'BGPNUM
Begin DoDot:2
+20 SET NOT1CT=NOT1CT+1
+21 SET ^TMP("BGPMU0028A",$JOB,BGPMUTF,"NOT",1)=NOT1CT
+22 SET ^TMP("BGPMU0028A",$JOB,BGPMUTF,"NOT","PAT",1,PT1)=DFN_U_BGPDSTR
End DoDot:2
End DoDot:1
+23 SET ^TMP("BGPMU0028A",$JOB,BGPMUTF,"TOT")=PTCNT_U_PT1
+24 ;Setup iCare array for patient
+25 SET BGPICARE("MU.EP.0028a.1",BGPMUTF)=BGPDEN_U_BGPNUM_U_""_U_$GET(BGPDSTR)_";"_$GET(BGPNSTR)
+26 QUIT
+27 ;
+28 ;look for E&M codes related to "office visit", "health and behavior assessment", "occupational therapy", "phychiatric & psychologic"
EM2(DFN,VIEN,BGP2,BGPDT) ;
+1 NEW BGPI,BGPTMP
+2 FOR BGPI=1:1
IF $LENGTH(BGP2,";")>1
QUIT
SET BGPTMP=$PIECE($TEXT(CPT2+BGPI),";;",2)
IF BGPTMP=""
QUIT
Begin DoDot:1
+3 SET X=+$$VSTCPT^BGPMUUT1(DFN,VIEN,BGPTMP)
+4 IF +X
SET BGP2=BGP2_$SELECT(BGP2'="":";",1:"")_$GET(BGPDT)
End DoDot:1
+5 QUIT
+6 ;
+7 ;look for E&M codes related to "preventive medicine service 18 and older"
+8 ; "prev - individual counseling"
+9 ; "prev med group counseling"
+10 ; "prev med other services"
EM1(DFN,VIEN,BGP1,BGPDT) ;
+1 NEW BGPI,BGPTMP
+2 FOR BGPI=1:1
IF BGP1>0
QUIT
SET BGPTMP=$PIECE($TEXT(CPT1+BGPI),";;",2)
IF BGPTMP=""
QUIT
Begin DoDot:1
+3 SET X=+$$VSTCPT^BGPMUUT1(DFN,VIEN,BGPTMP)
+4 IF +X
SET BGP1=BGP1_$SELECT(BGP1'="":";",1:"")_$GET(BGPDT)
End DoDot:1
+5 QUIT
+6 ;
TOBU ;;
+1 ;;CURRENT SMOKER, EVERY DAY
+2 ;;CURRENT SMOKER, SOME DAY
+3 ;;CURRENT SMOKER
+4 ;;CURRENT SMOKELESS
+5 ;;CESSATION-SMOKER
+6 ;;CESSATION-SMOKELESS
+7 ;;PREVIOUS (FORMER) SMOKELESS
+8 ;;PREVIOUS (FORMER) SMOKER
+9 ;;EXPOSURE TO ENVIRONMENTAL TOBACCO SMOKE
+10 ;;SMOKER IN HOME
+11 ;;CURRENT SMOKER & SMOKELESS
+12 ;;ASTHMA TRIGGERS
+13 ;;TOBACCO
+14 ;
TOBN ;;
+1 ;;NEVER USED TOBACCO
+2 ;;NEVER USED SMOKELESS TOBACCO
+3 ;;NEVER SMOKED
+4 ;;SMOKING STATUS UNKNOWN
+5 ;;SMOKELESS TOBACCO, STATUS UNKNOWN
+6 ;;NON-TOBACCO USER
+7 ;;CEREMONIAL USE ONLY
+8 ;;SMOKE FREE HOME
+9 ;
+10 ;
CPT1 ;;
+1 ;;BGPMU ENC PREV MED SVC 18 UP
+2 ;;BGPMU ENC PREV MED IND COUNSEL
+3 ;;BGPMU ENC PREV MED GRP COUNSEL
+4 ;;BGPMU ENC PREV MED OTHER SVC
+5 ;
CPT2 ;;
+1 ;;BGPMU ENC OFFICE VISIT
+2 ;;BGPMU ENC HEALTH AND BEHAVIOR
+3 ;;BGPMU ENC OCCUPATIONAL THERAPY
+4 ;;BGPMU ENC PSYCH AND PSYCH
+5 ;
HFA(BGPTOBU,BGPTOBN) ;build arrays of health factor pointers
+1 ; BGPTOBU(<health factor pointer>) array of health factors indicating tobacco user
+2 ; BGPTOBN(<health factor pointer>) array of health factors indicating non-tobacco user
+3 NEW BGPI,BGPIND,BGPTMP
+4 IF $GET(BGPTOBU)=1
Begin DoDot:1
+5 SET BGPTMP=0
+6 FOR BGPI=1:1
Begin DoDot:2
+7 SET BGPTMP=$PIECE($TEXT(TOBU+BGPI),";;",2)
+8 IF BGPTMP=""
QUIT
+9 SET BGPIND=$ORDER(^AUTTHF("B",BGPTMP,""))
+10 IF BGPIND'=""
SET BGPTOBU(BGPIND)=BGPTMP
End DoDot:2
IF BGPTMP=""
QUIT
End DoDot:1
+11 ;
+12 IF $GET(BGPTOBN)=1
Begin DoDot:1
+13 SET BGPTMP=0
+14 FOR BGPI=1:1
Begin DoDot:2
+15 SET BGPTMP=$PIECE($TEXT(TOBN+BGPI),";;",2)
+16 IF BGPTMP=""
QUIT
+17 SET BGPIND=$ORDER(^AUTTHF("B",BGPTMP,""))
+18 IF BGPIND'=""
SET BGPTOBN(BGPIND)=BGPTMP
End DoDot:2
IF BGPTMP=""
QUIT
End DoDot:1
+19 QUIT
+20 ;
TEST ; debug target
+1 ;S U="^"
+2 ;S DT=$$DT^XLFDT()
+3 ;S DFN=184 ; DFN = patient code from VA PATIENT file
+4 ;S BGPBDATE=3100401 ; BGPBDATE = begin date of report
+5 ;S BGPEDATE=3110401 ; BGPEDATE = end date of report
+6 ;S BGPPROV=2 ; BGPPROV = provider code from NEW PERSON file
+7 ;S BGPMUTF="C" ; BGPMUTF = timeframe variable - "C"=current year; "P"=previous year; "B"=baseline year
+8 ;D ENTRY
+9 QUIT