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

APCDFCT1.m

Go to the documentation of this file.
  1. APCDFCT1 ; IHS/CMI/LAB - FORMS COUNT (FILE) report process ;
  1. ;;2.0;IHS PCC SUITE;;MAY 14, 2009
  1. S APCDJOB=$J,APCDBT=$H
  1. S ^XTMP("APCDFCT",0)=$$FMADD^XLFDT(DT,14)_"^"_DT_"^"_"PCC DE TRANS CODE REPORT"
  1. P ; Run by posting date
  1. S APCDODAT=APCDSD_".9999" F S APCDODAT=$O(^APCDTCT("B",APCDODAT)) Q:APCDODAT=""!((APCDODAT\1)>APCDED) S APCDDFN=$O(^APCDTCT("B",APCDODAT,"")) D V1
  1. Q
  1. V1 ;
  1. S APCDC=0 F S APCDC=$O(^APCDTCT(APCDDFN,11,APCDC)) Q:APCDC'=+APCDC S APCDVDFN=$P(^APCDTCT(APCDDFN,11,APCDC,0),U) I APCDVDFN]"",$D(^AUPNVSIT(APCDVDFN,0)) D PROC
  1. Q
  1. PROC ;
  1. I APCDDEC'="ALL",APCDDEC'=$P(^APCDTCT(APCDDFN,11,APCDC,0),U,2) Q
  1. Q:$P(^APCDTCT(APCDDFN,11,APCDC,0),U,2)=""
  1. Q:'$D(^VA(200,$P(^APCDTCT(APCDDFN,11,APCDC,0),U,2),0))
  1. S APCDAP=$P(^VA(200,$P(^APCDTCT(APCDDFN,11,APCDC,0),U,2),0),U),APCDTC=$P(^APCDTCT(APCDDFN,11,APCDC,0),U,3)
  1. S APCDVREC=^AUPNVSIT(APCDVDFN,0)
  1. Q:'$P(APCDVREC,U,9)
  1. Q:$P(APCDVREC,U,11)
  1. D @APCDPROC
  1. S APCDDATE=$P(APCDODAT,".")
  1. SET S ^(APCDDATE)=$S($D(^XTMP("APCDFCT",APCDJOB,APCDBT,APCDAP,APCDSORT,APCDDATE)):^(APCDDATE)+1,1:1)
  1. S ^(APCDDATE)=$S($D(^XTMP("APCDFCT",APCDJOB,APCDBT,APCDAP,APCDSORT,"DEP COUNT",APCDDATE)):^(APCDDATE)+APCDTC,1:APCDTC)
  1. Q
  1. EOJ ; clean up and exit
  1. K APCDVREC,APCDCLIN,APCDSKIP,APCD1,APCD2,APCDAP,APCDX,APCDY,APCDTC,APCDDATE,APCDPROV,APCDSEC,APCDZ
  1. Q
  1. ;
  1. 1 ;
  1. S APCDCLIN=$P(APCDVREC,U,8) I APCDCLIN="" S APCDSORT="NO CLINIC ENTERED" Q
  1. S APCDSORT=$P(^DIC(40.7,APCDCLIN,0),U)
  1. Q
  1. ;
  1. 2 ;
  1. K ^UTILITY("DIQ1",$J)
  1. K DIQ,DIC,DA,DR
  1. S DIC="^AUPNVSIT(",DR=".07",DA=APCDVDFN,DIQ(0)="E" D EN^DIQ1 K DIC,DA,DR,DIQ
  1. S APCDSORT=^UTILITY("DIQ1",$J,9000010,APCDVDFN,.07,"E")
  1. K ^UTILITY("DIQ1",$J)
  1. Q
  1. ;
  1. 4 ;
  1. S APCDSORT="NONE"
  1. Q
  1. 3 ;TYPE
  1. K ^UTILITY("DIQ1",$J)
  1. K DIQ,DIC,DA,DR
  1. S DIC="^AUPNVSIT(",DR=".03",DA=APCDVDFN,DIQ(0)="E" D EN^DIQ1 K DIC,DA,DR,DIQ
  1. S APCDSORT=^UTILITY("DIQ1",$J,9000010,APCDVDFN,.03,"E")
  1. K ^UTILITY("DIQ1",$J)
  1. Q
  1. ;
  1. ;