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

ACHSYCS.m

Go to the documentation of this file.
  1. ACHSYCS ; IHS/ITSC/PMF - RETRANSMIT BY TRANSACTION CODE AND DATE RANGE ; [ 12/06/2002 10:36 AM ]
  1. ;;3.1;CONTRACT HEALTH MGMT SYSTEM;**5**;JUN 11, 2001
  1. ;IHS/SET/GTH ACHS*3.1*5 12/06/2002
  1. ;IHS/DSD/CS;2991001;FIND ALL OF A TYPE OF TRANSITION AND RETRANSMIT
  1. ;
  1. ;Variables Used
  1. ; ZCS1=BATCH DATE (?)
  1. ; ZCS1S=START DATE
  1. ; ZCS1E=END DATE
  1. ; ZCS2=TYPE
  1. ; ZCS3=DOCUMENT IEN
  1. ; ZCS4=TRANSACTION IEN
  1. ;
  1. BEGIN ;
  1. ;TEST FOR EXISTANCE OF DATA
  1. I '$D(^ACHSF(DUZ(2),"TB")) W *7,!!,*7,"No data to process. Quiting." Q
  1. S (ZCS1,ZCS1S,ZCS1E,ZCS2,ZCS3,ZCS4,ZCS5)=""
  1. ;
  1. ;GET TRANSACTION TYPE
  1. K DIR
  1. S DIR(0)="F^1:2^K:X'?.U X"
  1. S DIR("A",1)="Select Transaction Type:"
  1. S DIR("A",2)=" C Cancelation"
  1. S DIR("A",3)=" I Initial"
  1. S DIR("A",4)=" P Payment"
  1. S DIR("A",5)=" IP Intrim Payment"
  1. S DIR("A",6)=" ZA Adjustment"
  1. S DIR("A")="Select C, I, P, IP, or ZA: "
  1. S DIR("B")="C"
  1. D ^DIR
  1. Q:X=""
  1. S ZCS2=X
  1. ;
  1. BDATE ;GET START DATE
  1. N DIR,Y
  1. W !!
  1. S DIR(0)="DO^::EX"
  1. S DIR("A")="Enter Start Date: "
  1. D ^DIR
  1. I Y="" W *7," No date supplyed. Terminating." Q
  1. I Y>DT W *7," NO FUTURE DATES ALLOWED" G BDATE
  1. S ZCS1S=Y
  1. ;
  1. EDATE ;GET END DATE
  1. N DIR,Y
  1. W !
  1. S DIR(0)="DO^::EX"
  1. S DIR("A")="Enter End Date: "
  1. S DIR("B")=ZCS1S
  1. D ^DIR
  1. I Y="" W *7," No date supplyed. Returning to Start Date Entry." G BDATE
  1. I Y>DT W *7," NO FUTURE DATES ALLOWED" G EDATE
  1. I Y<ZCS1S W *7," Ending date must be after beginning date." G EDATE
  1. S ZCS1E=Y
  1. ;
  1. PROC ;ACTUAL PROCESSING STARTS HERE
  1. S ZCS1=ZCS1S-1
  1. F S ZCS1=$O(^ACHSF(DUZ(2),"TB",ZCS1)) Q:ZCS1>ZCS1E!(ZCS1="") D
  1. .Q:'$D(^ACHSF(DUZ(2),"TB",ZCS1,ZCS2))
  1. .S ZCS3=""
  1. .F S ZCS3=$O(^ACHSF(DUZ(2),"TB",ZCS1,ZCS2,ZCS3)) Q:ZCS3="" D
  1. ..S ZCS4=""
  1. ..F S ZCS4=$O(^ACHSF(DUZ(2),"TB",ZCS1,ZCS2,ZCS3,ZCS4)) Q:ZCS4="" D
  1. ...;IF PROMPTING IS REQUIRED BEFORE CLEARING, IT GOES HERE.
  1. ...I ZCS2="C",$P(^ACHSF(DUZ(2),"D",ZCS3,"T",ZCS4,0),U,5)'="F" Q ; NOT FULL
  1. ...S ^TMP("ACHSTXAR",$J,ZCS1,ZCS3,ZCS4)=""
  1. ...S ZCS5=1
  1. ; GO AND TRANSMIT THIS DATA NOW
  1. S ACHSIO=IO ; JUST BECAUSE WE WANT TO
  1. S ACHSARCO=$P(^ACHSF(DUZ(2),0),U,11) ; AREA CONTRACTING NUMBER
  1. ;I +ACHSARCO<1!($L(ACHSARCO)'=3) D G EXIT ; CAN'T CONTINUE W/O THIS;IHS/SET/GTH ACHS*3.1*5 12/06/2002
  1. ;. W !,"MISSING AREA CONTRACTING NUMBER - JOB ABBORTING";IHS/SET/GTH ACHS*3.1*5 12/06/2002
  1. I '(ACHSARCO?3UN) U IO(0) W *7,!!,"Area Contracting Number is not 3 Upper-case Alpha-Numerics",!,"JOB CANCELLED" G EXIT ;IHS/SET/GTH ACHS*3.1*5 12/06/2002
  1. ;
  1. S ACHSRCT=0 ; INITIALIZE RECORD COUNTER
  1. ;
  1. ;pmf 6/6/1 add next line. init the re-export flag to NO.
  1. S ACHSREEX=0
  1. D:ZCS5 ^ACHSTXA1
  1. ;
  1. EXIT ; PUT CLEANUP STUFF HERE IF NEEDED
  1. Q