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

APCPREG.m

Go to the documentation of this file.
  1. APCPREG ; IHS/TUCSON/LAB - OHPRD-TUCSON/LAB - Check Registration export AUGUST 14, 1992 ; [ 04/03/98 08:39 AM ]
  1. ;;2.0;IHS PCC DATA EXTRACTION SYSTEM;;APR 03, 1998
  1. CHKREG ; Code to check and see if a Registration tape has been
  1. ; created for all dates in this PCC tape range
  1. S (APCP("REG END"),APCP("REG"))="",APCP("RDFN")=0
  1. I '$D(^AGTXST(DUZ(2))) W:$D(ZTQUEUED) !!,$C(7),$C(7),"Patient Registration Transmission for this Facility has not been activated.",!,"No PCC Transmission can be done! NOTIFY YOUR SUPERVISOR",! S APCP("QFLG")=19 Q
  1. F S APCP("RDFN")=$O(^AGTXST(DUZ(2),1,APCP("RDFN"))) Q:APCP("RDFN")'=+APCP("RDFN")!(APCP("REG")=1) S APCP("REG END")=$P(^AGTXST(DUZ(2),1,APCP("RDFN"),0),U) D CHKDATE
  1. I APCP("REG")="" S APCP("QFLG")=20 D REGINF
  1. K APCP("REG END"),APCP("REG"),APCP("RDFN")
  1. Q
  1. CHKDATE ;
  1. I APCP("REG END")'<APCP("RUN END") S APCP("REG")=1
  1. Q
  1. REGINF ;
  1. Q:$D(ZTQUEUED)
  1. W $C(7),$C(7),!!,"A Patient Registration Tape that includes all of the dates in the PCC",!,"date range has not been created!",!,"You cannot create a PCC tape until a Patient Registration tape has been created."
  1. W !,"SEE YOUR SUPERVISOR FOR ASSISTANCE",!
  1. Q