source: FOIAVistA/tag/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPOLZU.m@ 636

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

initial load of FOIAVistA 6/30/08 version

File size: 1.1 KB
Line 
1RMPOLZU ;EDS/PAK - HO LETTERS - Update Post Letter Transaction file ;7/24/98
2 ;;3.0;PROSTHETICS;**29**;Feb 09, 1996
3 ;
4FILE(DFN,LET,L) ;Update file 665.4 with Patient Letter
5 ;
6 ;This is a function that sets up an entry in file 665.4.
7 ;If it succeeds, it returns ONE.
8 ;If it fails, it returns an error_number;error_type.
9 ;
10 ; I/P : DFN = Pointer to the Patient file (# 2)
11 ; L = Prosthetics Letter IEN
12 ; LET = Name of word processing style text array to use in MOVE command
13 ;
14 ;Create Entry
15 N DA,DD,DIC,DIK,DINUM,DLAYGO,DO,IEN,X,Y,DIE,DR,DTOUT
16 S DIC="^RMPR(665.4,",DIC(0)="L",X=DFN,DLAYGO=665.4
17 D FILE^DICN
18 ;
19 S DA=+Y
20 I DA<1 Q "1;Could not create a transaction entry for Patient #"_DFN_"."
21 L +^RMPR(665.4,DA):0
22 ;
23 ;Update fields .01, 2, 4 & 6
24 S DA=+Y,DR=".01////"_DFN_";1////"_L_";2////"_DT_";4////"_DUZ_";6////"_RMPO("STA")
25 S DIE=665.4 D ^DIE
26 I $D(DTOUT) Q "1;Could not complete a transaction entry for Patient #"_DFN_"."
27 ;
28 ;Move in Word Processing Text
29 D WP^DIE(665.4,DA_",",3,"KZ",LET)
30 I $D(^TMP("DIERR",$J)) Q "1;Could not complete a transaction entry for Patient #"_DFN_"."
31 ;
32 L -^RMPR(665.4,DA)
33 Q 0
Note: See TracBrowser for help on using the repository browser.