RMPOLETU ;EDS/PAK - HO LETTERS - Update Post Letter Transaction file ;7/24/98
;;3.0;PROSTHETICS;**29**;Feb 09, 1996
;
FILE(DFN,LET,LN,L) ;Update file 665.4 with Patient Letter
;
;This is a function that sets up an entry in file 665.4.
;If it succeeds, it returns ONE.
;If it fails, it returns an error_number;error_type.
;
; I/P : DFN= Pointer to the Patient file (# 2)
; L = Prosthetics Letter IEN
; LET= Name of word processing style text array to use in MOVE command
; LN = Number of lines printed in LET
;
;Create Entry
N DA,DD,DIC,DIK,DINUM,DLAYGO,DO,IEN,X
S DIC="^RMPR(665.4,",DIC(0)="L",X=DFN,DLAYGO=665.4
D FILE^DICN
;
I +Y<1 Q "1;Could not create an entry for Patient #"_DFN_"."
;
;Put fields on zero node
;
S IEN=+Y,X=DFN_U_L_U_DT_U_DUZ_"^^"_RMPO("STA")
S ^RMPR(665.4,IEN,0)=X
;
;Move in Word Processing Text
;
M ^RMPR(665.4,IEN,1)=@LET
S ^RMPR(665.4,IEN,1,0)="^^"_LN_U_LN_DT
;
;Reindex entry
;
S DIK=DIC,DA=IEN D IX1^DIK
;
Q 1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRMPOLETU 1027 printed Dec 13, 2024@02:30:58 Page 2
RMPOLETU ;EDS/PAK - HO LETTERS - Update Post Letter Transaction file ;7/24/98
+1 ;;3.0;PROSTHETICS;**29**;Feb 09, 1996
+2 ;
FILE(DFN,LET,LN,L) ;Update file 665.4 with Patient Letter
+1 ;
+2 ;This is a function that sets up an entry in file 665.4.
+3 ;If it succeeds, it returns ONE.
+4 ;If it fails, it returns an error_number;error_type.
+5 ;
+6 ; I/P : DFN= Pointer to the Patient file (# 2)
+7 ; L = Prosthetics Letter IEN
+8 ; LET= Name of word processing style text array to use in MOVE command
+9 ; LN = Number of lines printed in LET
+10 ;
+11 ;Create Entry
+12 NEW DA,DD,DIC,DIK,DINUM,DLAYGO,DO,IEN,X
+13 SET DIC="^RMPR(665.4,"
SET DIC(0)="L"
SET X=DFN
SET DLAYGO=665.4
+14 DO FILE^DICN
+15 ;
+16 IF +Y<1
QUIT "1;Could not create an entry for Patient #"_DFN_"."
+17 ;
+18 ;Put fields on zero node
+19 ;
+20 SET IEN=+Y
SET X=DFN_U_L_U_DT_U_DUZ_"^^"_RMPO("STA")
+21 SET ^RMPR(665.4,IEN,0)=X
+22 ;
+23 ;Move in Word Processing Text
+24 ;
+25 MERGE ^RMPR(665.4,IEN,1)=@LET
+26 SET ^RMPR(665.4,IEN,1,0)="^^"_LN_U_LN_DT
+27 ;
+28 ;Reindex entry
+29 ;
+30 SET DIK=DIC
SET DA=IEN
DO IX1^DIK
+31 ;
+32 QUIT 1