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

DGPTMOVE.m

Go to the documentation of this file.
  1. DGPTMOVE ;ALB/JDS - MOVE DRG FY DATA TO UPPER LEVEL ; 26 AUG 84 14:15
  1. ;;5.3;Registration;**78,158,178,256**;Aug 13, 1993
  1. ;
  1. EN F I=1:1 S X=$P($T(TEXT+I),";;",2) Q:X="END" W !,X
  1. S DGFLAG=0
  1. D WHICH
  1. I 'DGFLAG D FY
  1. I 'DGFLAG D SET
  1. Q K DGFLAG,DGFY,DGFY2K,DGWHICH,I,X
  1. Q
  1. ;
  1. ;
  1. WHICH ; select which option (local or all)
  1. N DIR,DTOUT,DUOUT,DIRUT,DIROUT,X,Y
  1. S DIR(0)="SM^A:ALL;L:LOCAL",DIR("A")="Copy which trim values"
  1. S DIR("?",1)="Enter LOCAL if you want to use the local and national trim"
  1. S DIR("?",2)="values from last year until new trim values are offically"
  1. S DIR("?",3)="released. This will copy the local and national trim"
  1. S DIR("?",4)="values into the next fiscal year. It will also copy the"
  1. S DIR("?",5)="local trim values to the upper level of the DRG file for"
  1. S DIR("?",6)="use on the <701> screen and in the DRG Calculation option."
  1. S DIR("?",7)=" "
  1. S DIR("?",8)="Choose ALL if local and national trim values have already"
  1. S DIR("?",9)="been entered for the current fiscal year and you wish to"
  1. S DIR("?",10)="copy those figures to the upper level of the DRG file for"
  1. S DIR("?",11)="use on the <701> screen and in the DRG Calculation option."
  1. S DIR("?",12)=" "
  1. S DIR("?")="Choose L LOCAL or A for ALL."
  1. D ^DIR
  1. S DGWHICH=Y
  1. I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) S DGFLAG=1 Q
  1. Q
  1. ;
  1. ;
  1. FY ; select fiscal year to copy from
  1. N DIR,DTOUT,DUOUT,DIRUT,DIROUT,X,Y
  1. S DIR(0)="F^2:2^I X'?2N K X",DIR("A")="Enter FISCAL YEAR to copy data from"
  1. S DIR("?",1)="Enter the fiscal year from which you want to copy the trim"
  1. S DIR("?",2)="values. The values you selected will be copied from this"
  1. S DIR("?",3)="year to the upper level of the file."
  1. I DGWHICH="L" D
  1. . S DIR("?",3)=DIR("?",3)_" It will also copy"
  1. . S DIR("?",4)="all trim data (local and national) to the fiscal year"
  1. . S DIR("?",5)="following the year you select."
  1. . S DIR("?",6)=" "
  1. E D
  1. . S DIR("?",4)=" "
  1. S DIR("?")="Enter the fiscal year as NN (ex: '94' for fiscal year 1994)."
  1. D ^DIR
  1. S DGFY=Y
  1. I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) S DGFLAG=1 Q
  1. S DGFY2K=$$DGY2K^DGPTOD0(DGFY)
  1. I '$D(^ICD("AFY",DGFY2K)) W !!,"No information has been entered yet for the selected fiscal year.",*7,! G FY
  1. Q
  1. ;
  1. ;
  1. SET ; set values into upper level and next fiscal year
  1. N I,MULT,NODE,UPPER,Y
  1. S Y=DGFY2K
  1. X ^DD("DD")
  1. W !!,"Copying WWU, ALOS, high trims, and low trims from FY",Y," to upper level of file."
  1. I DGWHICH="L" D
  1. .W !,"Also copying values from FY",Y," multiple to FY"
  1. .S Y=DGFY2K+10000 X ^DD("DD") W Y," multiple."
  1. W ".."
  1. W ! F I=0:0 S I=$O(^ICD(I)) Q:I'>0 I $D(^ICD(I,"FY",DGFY2K,0)) D
  1. . N NODE,MULT,UPPER
  1. . S NODE=$G(^ICD(I,0)),MULT=$G(^ICD(I,"FY",DGFY2K,0))
  1. . S $P(NODE,"^",15)="",$P(MULT,"^",15)="" ; ensures '^'s out to end of node
  1. . I DGWHICH="A" D
  1. . . S UPPER=$P(NODE,U,1)_U_$P(MULT,U,2,4)_U_$P(NODE,U,5,6)_U_$P(MULT,U,8,9)_U_$P(MULT,U,6,7)_U_$P(MULT,U,10)_U_$P(NODE,U,12)
  1. . I DGWHICH="L" D
  1. . . S UPPER=NODE
  1. . . S $P(UPPER,"^",9)=$P(MULT,"^",6),$P(UPPER,"^",10)=$P(MULT,"^",7) ; sets local figures into upper level
  1. . . S ^ICD(I,"FY",DGFY2K+10000,0)=(DGFY2K+10000)_"^"_$P(MULT,"^",2,10)
  1. . S ^ICD(I,0)=UPPER
  1. . W "."
  1. W !!?17,"****** COPY COMPLETED ******",!!
  1. Q
  1. ;
  1. ;
  1. TEXT ;
  1. ;;This option is used to copy values from the FISCAL YEAR WEIGHTS&TRIMS
  1. ;;multiple of the DRG File for display purposes on the <701> screen and
  1. ;;in the DRG Calculation option and for the processing of the DRG Reports.
  1. ;;
  1. ;;Values are copied to the upper level of the DRG File for display purposes
  1. ;;and may also be copied from a fiscal year to the next fiscal year to
  1. ;;temporarily use a prior fiscal year's values until the current fiscal
  1. ;;year's values are available.
  1. ;;
  1. ;;Local values must previously have been entered into the DRG File through
  1. ;;the use of the 'Trim Point Entry' option.
  1. ;;
  1. ;;
  1. ;;END