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

APCLAP0.m

Go to the documentation of this file.
  1. APCLAP0 ; IHS/CMI/LAB - INFO FOR APCLAP1 AND APCLAP2 REPORTS ;
  1. ;;2.0;IHS PCC SUITE;;MAY 14, 2009
  1. GETINFO ;EP
  1. I $T(@(APCLRPT))="" W !!,$C(7),$C(7),"REPORT INFORMATION MISSING!! NOTIFY PROGRAMMER!",!! S APCLQUIT="" Q
  1. S APCLINFO=$T(@(APCLRPT)),APCLSORT=$P(APCLINFO,";;",2),APCLPROC=$P(APCLINFO,";;",4),APCLINF=$P(APCLINFO,";;",3),APCLTITL=$P(APCLINFO,";;",5),APCLHD1=$P(APCLINFO,";;",6),APCLHD2=$P(APCLINFO,";;",7)
  1. Q
  1. ;
  1. P ;;APCLPROV;;Provider of Service;;PROV;;PROVIDER OF SERVICE;;PROVIDER;;PROVIDER DISCIPLINE
  1. DIS ;;APCLDISC;;Discipline of Provider;;DISC;;DISCIPLINE OF PROVIDER;;DISCIPLINE;;DISCPLINE CODE
  1. C ;;APCLCLIN;;Clinic Type;;CLIN;;CLINIC TYPE;;TYPE OF CLINIC;;CLINIC CODE
  1. ALLDISC ;;APCLADIS;;Provider Discipline (All Providers);;ALLDISC;;ALL PROVIDER DISCIPLINES;;PROVIDER DISCIPLINE;;DISCIPLINE CODE
  1. ALLP ;;APCLSEC;;All Providers of Service;;ALLP;;ALL PROVIDERS OF SERVICE;;PROVIDER OF SERVICE;;DISCIPLINE OF PROV
  1. DISC ;;APCLDISC;;Primary Provider Discipline;;DISC;;PRIMARY PROVIDER DISCIPLINE;;PROVIDER DISCIPLINE;;DISCIPLINE CODE
  1. D ;;APCLDATE;;Date of Visit;;DATE;;DATE OF VISIT;;DATE OF VISIT;;DAY OF WEEK
  1. PROV ;;APCLPROV;;Primary Provider of Service;;PROV;;PRIMARY PROVIDER OF SERVICE;;PROVIDER OF SERVICE;;DISCIPLINE OF PROV
  1. DX ;;APCLDX;;Primary Diagnosis (APC Code);;DX;;PRIMARY DX (APC CODE);;APC DX NARRATIVE;;APC DX CODE
  1. ICD ;;APCLDX;;Primary Diagnosis (ICD Code);;DX;;PRIMARY DX (ICD CODE);;ICD DX NARRATIVE;;ICD DX CODE
  1. LOS ;;APCLVLOC;;Location of Service;;LOS;;LOCATION OF SERVICE;;LOCATION OF SERVICE;;LOCATION CODE
  1. SC ;;APCLCAT;;Service Category of Visit;;SC;;SERVICE CATEGORY OF VISIT;;SERVICE CATEGORY;;CODE
  1. APCC ;;APCLAPCC;;Primary Diagnosis (APC Category);;APCC;;PRIMARY DX (APC CATEGORY);; APC DX CATEGORY NARRATIVE;;
  1. Q
  1. DXX ;ENTRY POINT
  1. GETCODE ;
  1. I $E(APCLX)="." D CODE10 G HIGH
  1. S APCLICD="09"_($P(APCLICD,".")_$P(APCLICD,".",2))_" "
  1. I $E(APCLX)="V" S APCLX=(9_$E(APCLX,2,9999)-.000001),APCLX="09V"_$E(APCLX,2,9999),APCLX=$P(APCLX,".")_$P(APCLX,".",2)_" " G HIGH
  1. S APCLX="09"_APCLX-.000001
  1. S APCLDX="",APCLX="0"_($P(APCLX,".")_$P(APCLX,".",2))_" "
  1. HIGH S APCLHIGH=$O(^AUTTRCD("AH",APCLX)) I APCLHIGH="" S APCLDX=999 G DX2
  1. S APCLDA1=$O(^AUTTRCD("AH",APCLHIGH,"")) I APCLDA1="" Q
  1. S APCLDA2=$O(^AUTTRCD("AH",APCLHIGH,APCLDA1,""))
  1. S APCLLOW=$P(^AUTTRCD(APCLDA1,11,APCLDA2,0),U)_" "
  1. I APCLLOW]APCLICD S APCLDX=999 G DX2
  1. S APCLDX=$P(^AUTTRCD(APCLDA1,0),U,3)
  1. DX2 S APCLSRT2=$P(^AUTTRCD(APCLDA1,0),U)
  1. Q
  1. ;
  1. CODE10 ;
  1. S APCLICD="10"_$P(APCLICD,".",2)_" "
  1. S APCLX="10"_APCLX,APCLX=APCLX-.000001,APCLX=$P(APCLX,".")_$P(APCLX,".",2)_" "
  1. Q