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

AGSSRX.m

Go to the documentation of this file.
  1. AGSSRX ; IHS/ASDS/EFG - REPORT WRITER #2 ;
  1. ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
  1. ;
  1. ;report SSNs POTENTIAL/PENDING
  1. K AGSSDT
  1. Q:'$D(AGSSP("P")) ;this report not indicated
  1. ;crossreferences used 5:P
  1. LOAD ;EP - load crossreference into ^AGSTEMP
  1. ;gather dfns from "AS" cross reference(s)
  1. K ^AGSTEMP(AGSS("JOBID"),"RP")
  1. S DFN=0,AGSSC("P")=0 F S DFN=$O(^AUPNPAT("AS",5,DFN)) Q:'DFN I $D(^DPT(DFN)) S AGSSCREC="" D
  1. .S AGSSC("P")=AGSSC("P")+1
  1. .I AGSSP("P")="C" S AGSSCREC=$G(^AGSSTEMP(AGSSITE,"RP",DFN)),^AGSTEMP(AGSS("JOBID"),"RP",$P(^DPT(DFN,0),U),DFN)=AGSSCREC
  1. S ^AGSTEMP(AGSS("JOBID"),"RP")=AGSSC("P")
  1. Q
  1. PRINT ;EP -
  1. Q:'$D(AGSSP("P"))
  1. I '$D(AGSSC("P")) S AGSSC("P")=$G(^AGSTEMP(AGSS("JOBID"),"RP"))
  1. S AGSLVC="P",AGSSPG=1,AGSGLO="RP"
  1. S AGSSHDR="SSNs POTENTIAL and/or PENDING " D AGSSHDR^AGSSPRT
  1. SPRINT ;
  1. W !!,"The number of ",AGSSHDR," is ",$G(^AGSSTEMP(AGSSITE,"TOT","RX")),!
  1. Q:(AGSSP("P")'="C")!(AGSSC("P")=0)
  1. D AGSSHD^AGSSPRT
  1. D ^AGSSPRT
  1. Q