source: WorldVistAEHR/trunk/r/DIETETICS-FH/FHPRI.m@ 1704

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

initial load of WorldVistAEHR

File size: 1.5 KB
RevLine 
[613]1FHPRI ; HISC/REL/NCA - Ingredient Management ;2/23/00 12:44
2 ;;5.5;DIETETICS;;Jan 28, 2005
3EN1 ; Enter/Edit Unit File
4 S (DIC,DIE)="^FH(119.1,",DIC(0)="AEQLM",DIC("DR")=".01",DLAYGO=119.1 W ! D ^DIC K DIC,DLAYGO G KIL:U[X!$D(DTOUT),EN1:Y<1
5 I Y<11 W *7,!!,"Cannot edit this unit" G EN1
6 S DA=+Y,DR=".01" S:$D(^XUSEC("FHMGR",DUZ)) DIDEL=119.1 D ^DIE,KIL G EN1
7EN2 ; Enter/Edit Vendor File
8 S (DIC,DIE)="^FH(113.2,",DIC(0)="AEQLM",DIC("DR")=".01",DLAYGO=113.2 W ! D ^DIC K DIC,DLAYGO G KIL:U[X!$D(DTOUT),EN2:Y<1
9 S DA=+Y,DR=".01:99" S:$D(^XUSEC("FHMGR",DUZ)) DIDEL=113.2 D ^DIE,KIL G EN2
10EN3 ; Enter/Edit Ingredients
11 S (DIC,DIE)="^FHING(",DIC(0)="AEQLM",DIC("DR")=".01",DLAYGO=113 W ! D ^DIC K DIC,DLAYGO G KIL:$D(DTOUT),E31:U[X,EN3:Y<1
12 S DA=+Y,DR=".01;31;1;3;2;4;29//^S X=DT;8;6;5;7;23;S REC=X;24;28//^S X=$S(REC=""LB"":1,1:"""");27;11;26;20;99;25;S:X'=""Y"" Y=0;30//^S X=DT;10" S:$D(^XUSEC("FHMGR",DUZ)) DIDEL=113 D ^DIE,KIL G EN3
13E31 K DIE D ^FHREC3 G KIL
14EN4 ; Enter/Edit Storage Locations
15 S (DIC,DIE)="^FH(113.1,",DIC(0)="AEQLM",DIC("DR")=".01",DLAYGO=113.1 W ! D ^DIC K DIC,DLAYGO G KIL:U[X!$D(DTOUT),EN4:Y<1
16 S DA=+Y,DR=".01:99" S:$D(^XUSEC("FHMGR",DUZ)) DIDEL=113.1 D ^DIE,KIL G EN4
17EN6 ; List Units
18 W ! S L=0,DIC="^FH(119.1,",FLDS=".01",BY="NAME"
19 S FR="",TO="",DHD="UNITS" D EN1^DIP,RSET Q
20EN8 ; List Storage Locations
21 W ! S L=0,DIC="^FH(113.1,",FLDS="[FHPSTO]",BY="PRINT ORDER,NAME"
22 S FR="@",TO="",DHD="STORAGE LOCATIONS" D EN1^DIP,RSET Q
23RSET K %ZIS S IOP="" D ^%ZIS
24KIL G KILL^XUSCLEAN
Note: See TracBrowser for help on using the repository browser.