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

IBORAT1B.m

Go to the documentation of this file.
IBORAT1B	;ALB/RJS - DATE SETUP IBROUTINE  - 3/02/92
	;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
	;CALLED BY IBORAT1A
	;THIS IBROUTINE PARSES A TMP FILE CONTAINING DATA FROM FILES
	;350.2 AND CALCULATES BEGINNING AND ENDING DATES
	;FOR BILLING RATES AND MEDICARE DEDUCTIBLES.
	;EG. IF RATE IS EFFECTIVE ON 1/1/87 AND IS SUPERSEDED BY A NEW RATE
	;ON 1/1/88 IT IS IN EFFECT FROM 1/1/87-12/31/87
	;THIS DATA IS STORED IN ^TMP($J,IBROUT,IBSPEC,IBEFFDAT)=IBCANCEL^AMOUNT
	;OUTPUT BY IBORAT4
	;
START	;
	S IBROUT="IBORAT1A",IBSPEC=""
	F  S IBSPEC=$O(^TMP($J,IBROUT,IBSPEC)) Q:IBSPEC=""  D IBSPEC2
END	;
	K IBCANCEL,IBEFFDAT,IBROUT,IBSPEC,X,X1,X2
	Q
IBSPEC2	;
	S IBEFFDAT=-1
	F  S IBEFFDAT=$O(^TMP($J,IBROUT,IBSPEC,IBEFFDAT)) Q:IBEFFDAT=""  D IBCANCEL
	Q
IBCANCEL	;
	S IBCANCEL=$O(^TMP($J,IBROUT,IBSPEC,IBEFFDAT))
	I IBCANCEL="" D CANDATE2 Q
	S X1=IBCANCEL,X2=-1 D C^%DTC
	S ^TMP($J,IBROUT,IBSPEC,IBEFFDAT)=X_"^"_^(IBEFFDAT)
	Q
CANDATE2	;
	S ^TMP($J,IBROUT,IBSPEC,IBEFFDAT)=9999999_"^"_^(IBEFFDAT)
	Q