source: FOIAVistA/trunk/r/DIETETICS-FH/FHADR8.m@ 1163

Last change on this file since 1163 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1FHADR8 ; HISC/NCA/FAI- Dietetic Costs ;11/17/04 09:20
2 ;;5.5;DIETETICS;;Jan 28, 2005
3EN1 ; Enter/Edit Cost Diem
4 K COST,N S COST="",NFLG=0 D QR^FHADR1 G:'PRE KIL
5 S FHYR=$E(PRE,1,3) D Q2^FHADRPT K FHYR G:'SDT!('EDT) KIL
6 S Z1=$P($G(^FH(117.3,PRE,"COST",0)),"^",3),Z2=$P($G(^FH(117.3,PRE,"COST",+Z1,0)),"^",1)
7 I Z2="" S NFLG=1
8E1 K DIR S DIR(0)="117.332,.01",DIR("A")="Enter Cumulative Total on the 830 Report of Costs" S:Z2 DIR("B")=Z2
9 D ^DIR I X="@" W *7," REQUIRED FIELD!" G E1
10 G:$D(DIRUT)!($D(DIROUT)) KIL
11 S:X["$" X=$P(X,"$",2) S FHX=+X
12 I Z1,Z2'=+FHX S $P(^FH(117.3,PRE,"COST",+Z1,0),"^",1)=+FHX K:$D(^FH(117.3,PRE,"COST","B",+Z2,+Z1)) ^FH(117.3,PRE,"COST","B",+Z2,+Z1) S ^FH(117.3,PRE,"COST","B",+FHX,+Z1)=""
13 I 'NFLG G EDIT
14 I '$D(^FH(117.3,PRE,"COST",0)) S ^FH(117.3,PRE,"COST",0)="^117.332^^"
15 K DIC,DD,DO S DIC="^FH(117.3,PRE,""COST"",",DIC(0)="L",DLAYGO=117.3,DA(1)=PRE
16 S DA=$P($G(^FH(117.3,PRE,"COST",0)),"^",3)+1 I $D(^FH(117.3,PRE,"COST",0)) S $P(^FH(117.3,PRE,"COST",0),"^",3)=DA
17 S X=+FHX,DINUM=DA D FILE^DICN K DA,DIC,DLAYGO,DINUM S Z1=+Y
18EDIT K DIC,DIE S DA(0)=PRE,DA=+Z1,DIE="^FH(117.3,"_DA(0)_",""COST"","
19 S DR="1:7"
20 L +^FH(117.3,PRE,"COST",0):0 I '$T W !?5,"Another user is editing this entry." G KIL
21 D ^DIE L -^FH(117.3,PRE,"COST",0)
22KIL G KILL^XUSCLEAN
Note: See TracBrowser for help on using the repository browser.