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

PSUDEM0.m

Go to the documentation of this file.
  1. PSUDEM0 ;BIR/DAM - Patient Demographics Summary Print Routine ; 20 DEC 2001
  1. ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
  1. ;
  1. ;
  1. PRINT ;Print header for pt demographics
  1. Q
  1. ;
  1. OPV ;EN Outpatient Visit "No Data" message. Called only when
  1. ; user answers 'yes'
  1. ;to "Do you want to receive this in a MailMan message?" AND when there
  1. ;is no data to report.
  1. ;
  1. Q:$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG3"))
  1. Q:PSUSMRY ;Don't print if user wants summary only
  1. Q:$D(^XTMP("PSU_"_PSUJOB,"PSUOPV"))
  1. ;
  1. W @IOF
  1. D DT^DILF("E",PSUSDT,.EXTD)
  1. S PSURP("START")=EXTD(0)
  1. D DT^DILF("E",PSUEDT,.EXTD)
  1. S PSURP("END")=EXTD(0)
  1. ;
  1. S PSUOVSUB="PSUOPV_"_PSUJOB
  1. S ^XTMP(PSUOVSUB,"PSUOPV",PSUSNDR,1)="Outpatient Visits for "_PSURP("START")_" through "_PSURP("END")
  1. S ^XTMP(PSUOVSUB,"PSUOPV",PSUSNDR,2)=" "
  1. S ^XTMP(PSUOVSUB,"PSUOPV",PSUSNDR,3)="No data to report"
  1. ;
  1. U IO
  1. ;
  1. ;F I=1:1:3 W !
  1. S PSUL=0
  1. F S PSUL=$O(^XTMP(PSUOVSUB,"PSUOPV",PSUSNDR,PSUL)) Q:PSUL="" D
  1. .S X=^XTMP(PSUOVSUB,"PSUOPV",PSUSNDR,PSUL) W !,X
  1. .I PSUL=1 W " for ",$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2),!,?72,"PAGE: 1"
  1. ;
  1. Q
  1. ;
  1. PTF ;EN Inpatient Visit "No Data" message.
  1. ;Called only when user answers 'YES'
  1. ;to "Do you want to receive this in a MailMan message?" AND when there
  1. ;is no data to report.
  1. ;
  1. Q:$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG3"))
  1. Q:PSUSMRY ;Don't print if user wants summary only
  1. Q:$D(^XTMP("PSU_"_PSUJOB,"PSUIPV"))
  1. ;
  1. W @IOF
  1. D DT^DILF("E",PSUSDT,.EXTD)
  1. S PSURP("START")=EXTD(0)
  1. D DT^DILF("E",PSUEDT,.EXTD)
  1. S PSURP("END")=EXTD(0)
  1. ;
  1. S PSUIVSUB="PSUIPV_"_PSUJOB
  1. S ^XTMP(PSUIVSUB,"PSUIPV",PSUSNDR,1)="Inpatient PTF Records for "_PSURP("START")_" through "_PSURP("END")
  1. S ^XTMP(PSUIVSUB,"PSUIPV",PSUSNDR,2)=" "
  1. S ^XTMP(PSUIVSUB,"PSUIPV",PSUSNDR,3)="No data to report"
  1. ;
  1. U IO
  1. ;
  1. ;F I=1:1:3 W !
  1. S PSUL=0
  1. F S PSUL=$O(^XTMP(PSUIVSUB,"PSUIPV",PSUSNDR,PSUL)) Q:PSUL="" D
  1. .S X=^XTMP(PSUIVSUB,"PSUIPV",PSUSNDR,PSUL) W !,X
  1. .I PSUL=1 W " for ",$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2),!,?72,"PAGE: 1"
  1. ;
  1. Q
  1. ;
  1. PRO ;EN Provider information print routine. Prints summary report.
  1. ;Called only when user answers 'NO'
  1. ;to "Do you want to receive this in a MailMan message?"
  1. ;
  1. D DT^DILF("E",PSUSDT,.EXTD)
  1. S PSURP("START")=EXTD(0)
  1. D DT^DILF("E",PSUEDT,.EXTD)
  1. S PSURP("END")=EXTD(0)
  1. ;
  1. S PSUPGS("PG")=1
  1. ;
  1. S PSUPROSB="PSUPRO_"_PSUJOB
  1. D PGHDR
  1. ;
  1. S N=0,K=3
  1. F S N=$O(^XTMP("PSU_"_PSUJOB,"PSUSUM",N)) Q:N="" D
  1. .M ^XTMP(PSUPROSB,"PSUPRO",PSUSNDR,K)=^XTMP("PSU_"_PSUJOB,"PSUSUM",N)
  1. .S K=K+1 ;Set Provider summary into XTMP global
  1. ;
  1. ;
  1. S PSUL=0
  1. F S PSUL=$O(^XTMP(PSUPROSB,"PSUPRO",PSUSNDR,PSUL)) Q:PSUL="" D
  1. .I LNCNT+4>IOSL D PGHDR
  1. .S X=^XTMP(PSUPROSB,"PSUPRO",PSUSNDR,PSUL) W !,X
  1. .S LNCNT=LNCNT+1
  1. ;
  1. K ^XTMP("PSU_"_PSUJOB,"PSUSUM")
  1. Q
  1. ;
  1. PGHDR ;Page header for Provider summary message
  1. ;VMP-IOFO BAY PINES;ELR;PSU*3.0*26 REMOVE FORM FEED
  1. ;U IO W @IOF
  1. W "Provider Data for "_PSURP("START")_" through "_PSURP("END")_" for "_$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2)
  1. W !,?68,"PAGE: "_PSUPGS("PG")
  1. S PSUPGS("PG")=PSUPGS("PG")+1
  1. F PSUH=9:1:12 W !,$G(^XTMP(PSUPROSB,"PSUPRO",PSUSNDR,PSUH))
  1. S LNCNT=5
  1. Q
  1. ;
  1. IVSUM ;EN Print routine for all Pt. Demographics Summary reports.
  1. ;Prints NO Data
  1. ;and Summary report to screen if user answers 'N' to "Do you want a
  1. ;copy of this message sent to you in mailman?"
  1. ;
  1. D INST^PSUDEM1
  1. D COMM
  1. U IO
  1. W @IOF
  1. ;
  1. S PSUIVSUB="PSUPD_"_PSUJOB
  1. S ^XTMP(PSUIVSUB,"PSUPD",PSUSNDR,1)="Patient Demographics Summary for "_PSURP("START")_" through "_PSURP("END")
  1. S ^XTMP(PSUIVSUB,"PSUPD",PSUSNDR,2)=" "
  1. ;
  1. ;Do the following if there is no data to report
  1. I $D(^XTMP("PSU_"_PSUJOB,"PSUNONE")) D Q
  1. .S ^XTMP(PSUIVSUB,"PSUPD",PSUSNDR,3)="No data to report"
  1. .S PSUL=0
  1. .F S PSUL=$O(^XTMP(PSUIVSUB,"PSUPD",PSUSNDR,PSUL)) Q:PSUL="" D
  1. ..S X=^XTMP(PSUIVSUB,"PSUPD",PSUSNDR,PSUL) W !,X
  1. ..I PSUL=2 W " for ",$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2),!,?69,"Page: 1"
  1. ;
  1. ;Do the following if there is data to report in a summary
  1. S N=0,K=3
  1. F S N=$O(^XTMP("PSU_"_PSUJOB,"PSUSUMA",N)) Q:N="" D
  1. .M ^XTMP(PSUIVSUB,"PSUPD",PSUSNDR,K)=^XTMP("PSU_"_PSUJOB,"PSUSUMA",N)
  1. .S K=K+1 ;Set Provider summary into XTMP global
  1. ;
  1. ;
  1. S PSUL=0
  1. F S PSUL=$O(^XTMP(PSUIVSUB,"PSUPD",PSUSNDR,PSUL)) Q:PSUL="" D
  1. .S X=^XTMP(PSUIVSUB,"PSUPD",PSUSNDR,PSUL) W !,X
  1. .I PSUL=2 W " for ",$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2),!,?69,"Page: 1"
  1. ;
  1. Q
  1. ;
  1. COMM ;Common variables among all print subroutines
  1. ;
  1. D DT^DILF("E",PSUSDT,.EXTD)
  1. S PSURP("START")=EXTD(0)
  1. D DT^DILF("E",PSUEDT,.EXTD)
  1. S PSURP("END")=EXTD(0)
  1. ;
  1. Q