PXRMOUTC ; SLC/PKR - Clinical Maintenance output. ;13-Apr-2015 10:44;DU
;;2.0;CLINICAL REMINDERS;**4,6,1001,17,26,1005**;Feb 04, 2005;Build 23
;IHS/MSC/MGH Added lookup for non-VA files
;================================================
CM(DEFARR,PXRMPDEM,PCLOGIC,RESLOGIC,RESDATE,FIEVAL,OUTTYPE) ;Prepare the
;Clinical maintenance (OUTTYPE=5) and order check (OUTTPYPE=55)
;output.
N IND,JND,FINDING,FLIST,FTYPE
N HDR,NHDR,IFIEVAL,LIST,NFLINES,NTXT,NUM
N TEMP,TEXT
S NTXT=0
;Check for a dead patient
I +$G(PXRMPDEM("DOD"))>0 D
. S TEMP=$$FMTE^XLFDT(PXRMPDEM("DOD"),"5DZ")
. S TEXT="Patient is deceased, date of death: "_TEMP
. D ADDTXT^PXRMOUTU(1,PXRMRM,.NTXT,TEXT)
;Display the frequency information only if there is resolution logic.
I RESLOGIC'="",OUTTYPE=5 D FREQ(.DEFARR,.NTXT,.TEXT)
;Output the AGE match/no match text.
D AGE^PXRMFNFT(PXRMPDEM("DFN"),.DEFARR,.FIEVAL,.NTXT)
;Process the findings in the order: patient cohort, resolution,
;age, and informational.
F FTYPE="PCL","RES","AGE","INFO" D
. S LIST=$S(FTYPE="PCL":DEFARR(32),FTYPE="RES":DEFARR(36),FTYPE="AGE":DEFARR(40),FTYPE="INFO":DEFARR(42))
.;Output the general logic text.
. I FTYPE="PCL" D LOGIC^PXRMFNFT(PXRMPDEM("DFN"),PCLOGIC,FTYPE,"D",.DEFARR,.NTXT)
. I FTYPE="RES",$P(PCLOGIC,U,1) D LOGIC^PXRMFNFT(PXRMPDEM("DFN"),RESLOGIC,FTYPE,"D",.DEFARR,.NTXT)
.;Process the findings for each type.
. K TEXT
. S (NHDR,NFLINES)=0
. S NUM=+$P(LIST,U,1)
. S FLIST=$P(LIST,U,2)
. F IND=1:1:NUM D
.. S FINDING=$P(FLIST,";",IND)
..;No output for age or sex findings.
.. I (FINDING="AGE")!(FINDING="SEX") Q
..;If the finding is not defined skip it. This can occur when the
..;reminder is N/A.
.. I '$D(FIEVAL(FINDING)) Q
.. K IFIEVAL
.. I FIEVAL(FINDING) D
... M IFIEVAL=FIEVAL(FINDING)
...;Remove any false occurrences so they are not displayed.
... S JND=0
... F S JND=+$O(IFIEVAL(JND)) Q:JND=0 K:'IFIEVAL(JND) IFIEVAL(JND)
.. E S IFIEVAL=0
..;If the regular finding is false all we need to do is process the
..;not found text. If it is true we also need to output the finding
..;information.
..;Function findings are processed as a group.
.. I IFIEVAL,FINDING'["FF" D FOUT(1,.IFIEVAL,.NFLINES,.TEXT)
..;Output the found/not found text for the finding.
.. D FINDING^PXRMFNFT(3,PXRMPDEM("DFN"),FINDING,.IFIEVAL,.NFLINES,.TEXT)
.;
.;Display function finding values for this FTYPE, skip INFO only.
. I (FTYPE'="INFO"),(FLIST["FF") D FFOUT(3,NUM,FLIST,.FIEVAL,.NFLINES,.TEXT)
.;If there was any text for this finding type create a header.
. I OUTTYPE=5 D HEADER(FTYPE,NFLINES,RESDATE,.NHDR,.HDR)
.;Output the header and the finding text.
. D ADDTXTA^PXRMOUTU(1,PXRMRM,.NTXT,NHDR,.HDR)
. D COPYTXT^PXRMOUTU(.NTXT,NFLINES,.TEXT)
;Output INFO nodes
D INFO^PXRMOUTU(PXRMITEM,.NTXT)
Q
;
;================================================
FOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Do output for individual findings
;in the FINDING array.
I $D(IFIEVAL("TERM")) D OUTPUT^PXRMTERM(1,.IFIEVAL,.NFLINES,.TEXT) Q
N FTYPE
S FTYPE=$P(IFIEVAL("FINDING"),U,1)
S FTYPE=$P(FTYPE,";",2)
I FTYPE="AUTTEDT(" D OUTPUT^PXRMEDU(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="AUTTEXAM(" D OUTPUT^PXRMEXAM(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="AUTTHF(" D OUTPUT^PXRMHF(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="AUTTIMM(" D OUTPUT^PXRMIMM(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="AUTTSK(" D OUTPUT^PXRMSKIN(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="GMRD(120.51," D OUTPUT^PXRMVITL(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="LAB(60," D OUTPUT^PXRMLAB(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="ORD(101.43," D OUTPUT^PXRMORDR(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="PS(50.605," D OUTPUT^PXRMDRCL(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="PSDRUG(" D OUTPUT^PXRMDRUG(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="PSNDF(50.6," D OUTPUT^PXRMDGEN(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="PS(55," D OUTPUT^PXRMDRUG(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="PS(55NVA," D OUTPUT^PXRMDRUG(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="PSRX(" D OUTPUT^PXRMDRUG(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="PXD(811.2," D OUTPUT^PXRMTAX(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="PXRMD(802.4," D OUTPUT^PXRMFF(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="PXRMD(810.9," D OUTPUT^PXRMLOCF(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="PXRMD(811.4," D OUTPUT^PXRMCF(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="RAMIS(71," D OUTPUT^PXRMRAD(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="YTT(601.71," D OUTPUT^PXRMMH(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
;IHS/MSC/MGH Added lookup for non-VA files
I FTYPE="AUTTMSR(" D OUTPUT^BPXRMEA(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="AUTTREFT(" D OUTPUT^BPXRMREF(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
I FTYPE="APCDACV(" D OUTPUT^BPXRMAS1(INDENT,.IFIEVAL,.NLINES,.TEXT) Q
Q
;
;================================================
FFOUT(INDENT,NUM,FLIST,FIEVAL,NLINES,TEXT) ;Output for function findings.
I '$D(PXRMDEBG) Q
N IND,FFNUM,FFLIST,FFTEXT,FINDING,NOUT,TEXTOUT
F IND=1:1:NUM D
. S FINDING=$P(FLIST,";",IND)
. I '$D(FIEVAL(FINDING)) Q
. I $E(FINDING,1,2)="FF" S FFNUM=$P(FINDING,"FF",2),FFLIST(FFNUM)=""
I '$D(FFLIST) Q
S FFNUM=$O(FFLIST(0))
S FFTEXT="FF("_FFNUM_")="_FIEVAL("FF"_FFNUM)
F S FFNUM=$O(FFLIST(FFNUM)) Q:FFNUM="" D
. S FFTEXT=FFTEXT_", FF("_FFNUM_")="_FIEVAL("FF"_FFNUM)
S NLINES=NLINES+1,TEXT(NLINES)=""
D FORMATS^PXRMTEXT(INDENT,PXRMRM,FFTEXT,.NOUT,.TEXTOUT)
F IND=1:1:NOUT S NLINES=NLINES+1,TEXT(NLINES)=TEXTOUT(IND)
Q
;
;================================================
FREQ(DEFARR,NTXT,TEXT) ;Display the frequency information.
N FREQ,TEMP
;If there was a custom date due print out that information.
I $D(^TMP(PXRMPID,$J,PXRMITEM,"zCDUE")) D
. S TEMP=^TMP(PXRMPID,$J,PXRMITEM,"zCDUE")
. S TEXT=$$OUTPUT^PXRMCDUE(TEMP,.DEFARR)
. I DEFARR(31)["AGE" D
.. S TEMP=$G(^TMP(PXRMPID,$J,PXRMITEM,"zFREQARNG"))
.. I TEMP'="" S TEXT=TEXT_" Applicable"_$$FMTAGE^PXRMAGE($P(TEMP,U,2),$P(TEMP,U,3))_"."
. D ADDTXT^PXRMOUTU(1,PXRMRM,.NTXT,TEXT)
E D
. S TEMP=$G(^TMP(PXRMPID,$J,PXRMITEM,"zFREQARNG"))
. I TEMP'="" D
.. S FREQ=$P(TEMP,U,1)
.. S TEXT=$$FMTFREQ^PXRMAGE(FREQ)
.. I FREQ=-1 S TEXT=TEXT_" for this patient."
.. I DEFARR(31)["AGE",FREQ'=-1 S TEXT=TEXT_$$FMTAGE^PXRMAGE($P(TEMP,U,2),$P(TEMP,U,3))_"."
.. D ADDTXT^PXRMOUTU(1,PXRMRM,.NTXT,TEXT)
Q
;
;================================================
K HDR
I FTYPE="RES" D Q
. I +RESDATE'=0 D Q
.. S HDR(2)="Resolution: Last done - "_$$EDATE^PXRMDATE(RESDATE)
.. S NHDR=2
.. S HDR(1)="\\"
. I '$D(HDR(2)),NLINES>0 D
.. S HDR(2)="Resolution:"
.. S NHDR=2
.. S HDR(1)="\\"
;
I NLINES=0 Q
I FTYPE="PCL" D Q
. S NHDR=2
. S HDR(1)="\\"
. S HDR(2)="Cohort:"
;
I FTYPE="AGE" D Q
. S NHDR=2
. S HDR(1)="\\"
. S HDR(2)="Age/Frequency:"
;
I FTYPE="INFO" D Q
. S NHDR=2
. S HDR(1)="\\"
. S HDR(2)="Information:"
Q
;
PXRMOUTC ; SLC/PKR - Clinical Maintenance output. ;13-Apr-2015 10:44;DU
+1 ;;2.0;CLINICAL REMINDERS;**4,6,1001,17,26,1005**;Feb 04, 2005;Build 23
+2 ;IHS/MSC/MGH Added lookup for non-VA files
+3 ;================================================
CM(DEFARR,PXRMPDEM,PCLOGIC,RESLOGIC,RESDATE,FIEVAL,OUTTYPE) ;Prepare the
+1 ;Clinical maintenance (OUTTYPE=5) and order check (OUTTPYPE=55)
+2 ;output.
+3 NEW IND,JND,FINDING,FLIST,FTYPE
+4 NEW HDR,NHDR,IFIEVAL,LIST,NFLINES,NTXT,NUM
+5 NEW TEMP,TEXT
+6 SET NTXT=0
+7 ;Check for a dead patient
+8 IF +$GET(PXRMPDEM("DOD"))>0
Begin DoDot:1
+9 SET TEMP=$$FMTE^XLFDT(PXRMPDEM("DOD"),"5DZ")
+10 SET TEXT="Patient is deceased, date of death: "_TEMP
+11 DO ADDTXT^PXRMOUTU(1,PXRMRM,.NTXT,TEXT)
End DoDot:1
+12 ;Display the frequency information only if there is resolution logic.
+13 IF RESLOGIC'=""
IF OUTTYPE=5
DO FREQ(.DEFARR,.NTXT,.TEXT)
+14 ;Output the AGE match/no match text.
+15 DO AGE^PXRMFNFT(PXRMPDEM("DFN"),.DEFARR,.FIEVAL,.NTXT)
+16 ;Process the findings in the order: patient cohort, resolution,
+17 ;age, and informational.
+18 FOR FTYPE="PCL","RES","AGE","INFO"
Begin DoDot:1
+19 SET LIST=$SELECT(FTYPE="PCL":DEFARR(32),FTYPE="RES":DEFARR(36),FTYPE="AGE":DEFARR(40),FTYPE="INFO":DEFARR(42))
+20 ;Output the general logic text.
+21 IF FTYPE="PCL"
DO LOGIC^PXRMFNFT(PXRMPDEM("DFN"),PCLOGIC,FTYPE,"D",.DEFARR,.NTXT)
+22 IF FTYPE="RES"
IF $PIECE(PCLOGIC,U,1)
DO LOGIC^PXRMFNFT(PXRMPDEM("DFN"),RESLOGIC,FTYPE,"D",.DEFARR,.NTXT)
+23 ;Process the findings for each type.
+24 KILL TEXT
+25 SET (NHDR,NFLINES)=0
+26 SET NUM=+$PIECE(LIST,U,1)
+27 SET FLIST=$PIECE(LIST,U,2)
+28 FOR IND=1:1:NUM
Begin DoDot:2
+29 SET FINDING=$PIECE(FLIST,";",IND)
+30 ;No output for age or sex findings.
+31 IF (FINDING="AGE")!(FINDING="SEX")
QUIT
+32 ;If the finding is not defined skip it. This can occur when the
+33 ;reminder is N/A.
+34 IF '$DATA(FIEVAL(FINDING))
QUIT
+35 KILL IFIEVAL
+36 IF FIEVAL(FINDING)
Begin DoDot:3
+37 MERGE IFIEVAL=FIEVAL(FINDING)
+38 ;Remove any false occurrences so they are not displayed.
+39 SET JND=0
+40 FOR
SET JND=+$ORDER(IFIEVAL(JND))
IF JND=0
QUIT
IF 'IFIEVAL(JND)
KILL IFIEVAL(JND)
End DoDot:3
+41 IF '$TEST
SET IFIEVAL=0
+42 ;If the regular finding is false all we need to do is process the
+43 ;not found text. If it is true we also need to output the finding
+44 ;information.
+45 ;Function findings are processed as a group.
+46 IF IFIEVAL
IF FINDING'["FF"
DO FOUT(1,.IFIEVAL,.NFLINES,.TEXT)
+47 ;Output the found/not found text for the finding.
+48 DO FINDING^PXRMFNFT(3,PXRMPDEM("DFN"),FINDING,.IFIEVAL,.NFLINES,.TEXT)
End DoDot:2
+49 ;
+50 ;Display function finding values for this FTYPE, skip INFO only.
+51 IF (FTYPE'="INFO")
IF (FLIST["FF")
DO FFOUT(3,NUM,FLIST,.FIEVAL,.NFLINES,.TEXT)
+52 ;If there was any text for this finding type create a header.
+53 IF OUTTYPE=5
DO HEADER(FTYPE,NFLINES,RESDATE,.NHDR,.HDR)
+54 ;Output the header and the finding text.
+55 DO ADDTXTA^PXRMOUTU(1,PXRMRM,.NTXT,NHDR,.HDR)
+56 DO COPYTXT^PXRMOUTU(.NTXT,NFLINES,.TEXT)
End DoDot:1
+57 ;Output INFO nodes
+58 DO INFO^PXRMOUTU(PXRMITEM,.NTXT)
+59 QUIT
+60 ;
+61 ;================================================
FOUT(INDENT,IFIEVAL,NLINES,TEXT) ;Do output for individual findings
+1 ;in the FINDING array.
+2 IF $DATA(IFIEVAL("TERM"))
DO OUTPUT^PXRMTERM(1,.IFIEVAL,.NFLINES,.TEXT)
QUIT
+3 NEW FTYPE
+4 SET FTYPE=$PIECE(IFIEVAL("FINDING"),U,1)
+5 SET FTYPE=$PIECE(FTYPE,";",2)
+6 IF FTYPE="AUTTEDT("
DO OUTPUT^PXRMEDU(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+7 IF FTYPE="AUTTEXAM("
DO OUTPUT^PXRMEXAM(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+8 IF FTYPE="AUTTHF("
DO OUTPUT^PXRMHF(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+9 IF FTYPE="AUTTIMM("
DO OUTPUT^PXRMIMM(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+10 IF FTYPE="AUTTSK("
DO OUTPUT^PXRMSKIN(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+11 IF FTYPE="GMRD(120.51,"
DO OUTPUT^PXRMVITL(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+12 IF FTYPE="LAB(60,"
DO OUTPUT^PXRMLAB(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+13 IF FTYPE="ORD(101.43,"
DO OUTPUT^PXRMORDR(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+14 IF FTYPE="PS(50.605,"
DO OUTPUT^PXRMDRCL(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+15 IF FTYPE="PSDRUG("
DO OUTPUT^PXRMDRUG(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+16 IF FTYPE="PSNDF(50.6,"
DO OUTPUT^PXRMDGEN(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+17 IF FTYPE="PS(55,"
DO OUTPUT^PXRMDRUG(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+18 IF FTYPE="PS(55NVA,"
DO OUTPUT^PXRMDRUG(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+19 IF FTYPE="PSRX("
DO OUTPUT^PXRMDRUG(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+20 IF FTYPE="PXD(811.2,"
DO OUTPUT^PXRMTAX(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+21 IF FTYPE="PXRMD(802.4,"
DO OUTPUT^PXRMFF(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+22 IF FTYPE="PXRMD(810.9,"
DO OUTPUT^PXRMLOCF(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+23 IF FTYPE="PXRMD(811.4,"
DO OUTPUT^PXRMCF(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+24 IF FTYPE="RAMIS(71,"
DO OUTPUT^PXRMRAD(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+25 IF FTYPE="YTT(601.71,"
DO OUTPUT^PXRMMH(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+26 ;IHS/MSC/MGH Added lookup for non-VA files
+27 IF FTYPE="AUTTMSR("
DO OUTPUT^BPXRMEA(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+28 IF FTYPE="AUTTREFT("
DO OUTPUT^BPXRMREF(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+29 IF FTYPE="APCDACV("
DO OUTPUT^BPXRMAS1(INDENT,.IFIEVAL,.NLINES,.TEXT)
QUIT
+30 QUIT
+31 ;
+32 ;================================================
FFOUT(INDENT,NUM,FLIST,FIEVAL,NLINES,TEXT) ;Output for function findings.
+1 IF '$DATA(PXRMDEBG)
QUIT
+2 NEW IND,FFNUM,FFLIST,FFTEXT,FINDING,NOUT,TEXTOUT
+3 FOR IND=1:1:NUM
Begin DoDot:1
+4 SET FINDING=$PIECE(FLIST,";",IND)
+5 IF '$DATA(FIEVAL(FINDING))
QUIT
+6 IF $EXTRACT(FINDING,1,2)="FF"
SET FFNUM=$PIECE(FINDING,"FF",2)
SET FFLIST(FFNUM)=""
End DoDot:1
+7 IF '$DATA(FFLIST)
QUIT
+8 SET FFNUM=$ORDER(FFLIST(0))
+9 SET FFTEXT="FF("_FFNUM_")="_FIEVAL("FF"_FFNUM)
+10 FOR
SET FFNUM=$ORDER(FFLIST(FFNUM))
IF FFNUM=""
QUIT
Begin DoDot:1
+11 SET FFTEXT=FFTEXT_", FF("_FFNUM_")="_FIEVAL("FF"_FFNUM)
End DoDot:1
+12 SET NLINES=NLINES+1
SET TEXT(NLINES)=""
+13 DO FORMATS^PXRMTEXT(INDENT,PXRMRM,FFTEXT,.NOUT,.TEXTOUT)
+14 FOR IND=1:1:NOUT
SET NLINES=NLINES+1
SET TEXT(NLINES)=TEXTOUT(IND)
+15 QUIT
+16 ;
+17 ;================================================
FREQ(DEFARR,NTXT,TEXT) ;Display the frequency information.
+1 NEW FREQ,TEMP
+2 ;If there was a custom date due print out that information.
+3 IF $DATA(^TMP(PXRMPID,$JOB,PXRMITEM,"zCDUE"))
Begin DoDot:1
+4 SET TEMP=^TMP(PXRMPID,$JOB,PXRMITEM,"zCDUE")
+5 SET TEXT=$$OUTPUT^PXRMCDUE(TEMP,.DEFARR)
+6 IF DEFARR(31)["AGE"
Begin DoDot:2
+7 SET TEMP=$GET(^TMP(PXRMPID,$JOB,PXRMITEM,"zFREQARNG"))
+8 IF TEMP'=""
SET TEXT=TEXT_" Applicable"_$$FMTAGE^PXRMAGE($PIECE(TEMP,U,2),$PIECE(TEMP,U,3))_"."
End DoDot:2
+9 DO ADDTXT^PXRMOUTU(1,PXRMRM,.NTXT,TEXT)
End DoDot:1
+10 IF '$TEST
Begin DoDot:1
+11 SET TEMP=$GET(^TMP(PXRMPID,$JOB,PXRMITEM,"zFREQARNG"))
+12 IF TEMP'=""
Begin DoDot:2
+13 SET FREQ=$PIECE(TEMP,U,1)
+14 SET TEXT=$$FMTFREQ^PXRMAGE(FREQ)
+15 IF FREQ=-1
SET TEXT=TEXT_" for this patient."
+16 IF DEFARR(31)["AGE"
IF FREQ'=-1
SET TEXT=TEXT_$$FMTAGE^PXRMAGE($PIECE(TEMP,U,2),$PIECE(TEMP,U,3))_"."
+17 DO ADDTXT^PXRMOUTU(1,PXRMRM,.NTXT,TEXT)
End DoDot:2
End DoDot:1
+18 QUIT
+19 ;
+20 ;================================================
+1 KILL HDR
+2 IF FTYPE="RES"
Begin DoDot:1
+3 IF +RESDATE'=0
Begin DoDot:2
+4 SET HDR(2)="Resolution: Last done - "_$$EDATE^PXRMDATE(RESDATE)
+5 SET NHDR=2
+6 SET HDR(1)="\\"
End DoDot:2
QUIT
+7 IF '$DATA(HDR(2))
IF NLINES>0
Begin DoDot:2
+8 SET HDR(2)="Resolution:"
+9 SET NHDR=2
+10 SET HDR(1)="\\"
End DoDot:2
End DoDot:1
QUIT
+11 ;
+12 IF NLINES=0
QUIT
+13 IF FTYPE="PCL"
Begin DoDot:1
+14 SET NHDR=2
+15 SET HDR(1)="\\"
+16 SET HDR(2)="Cohort:"
End DoDot:1
QUIT
+17 ;
+18 IF FTYPE="AGE"
Begin DoDot:1
+19 SET NHDR=2
+20 SET HDR(1)="\\"
+21 SET HDR(2)="Age/Frequency:"
End DoDot:1
QUIT
+22 ;
+23 IF FTYPE="INFO"
Begin DoDot:1
+24 SET NHDR=2
+25 SET HDR(1)="\\"
+26 SET HDR(2)="Information:"
End DoDot:1
QUIT
+27 QUIT
+28 ;