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

RMPOLZU.m

Go to the documentation of this file.
  1. RMPOLZU ;EDS/PAK - HO LETTERS - Update Post Letter Transaction file ;7/24/98
  1. ;;3.0;PROSTHETICS;**29**;Feb 09, 1996
  1. ;
  1. FILE(DFN,LET,L) ;Update file 665.4 with Patient Letter
  1. ;
  1. ;This is a function that sets up an entry in file 665.4.
  1. ;If it succeeds, it returns ONE.
  1. ;If it fails, it returns an error_number;error_type.
  1. ;
  1. ; I/P : DFN = Pointer to the Patient file (# 2)
  1. ; L = Prosthetics Letter IEN
  1. ; LET = Name of word processing style text array to use in MOVE command
  1. ;
  1. ;Create Entry
  1. N DA,DD,DIC,DIK,DINUM,DLAYGO,DO,IEN,X,Y,DIE,DR,DTOUT
  1. S DIC="^RMPR(665.4,",DIC(0)="L",X=DFN,DLAYGO=665.4
  1. D FILE^DICN
  1. ;
  1. S DA=+Y
  1. I DA<1 Q "1;Could not create a transaction entry for Patient #"_DFN_"."
  1. L +^RMPR(665.4,DA):0
  1. ;
  1. ;Update fields .01, 2, 4 & 6
  1. S DA=+Y,DR=".01////"_DFN_";1////"_L_";2////"_DT_";4////"_DUZ_";6////"_RMPO("STA")
  1. S DIE=665.4 D ^DIE
  1. I $D(DTOUT) Q "1;Could not complete a transaction entry for Patient #"_DFN_"."
  1. ;
  1. ;Move in Word Processing Text
  1. D WP^DIE(665.4,DA_",",3,"KZ",LET)
  1. I $D(^TMP("DIERR",$J)) Q "1;Could not complete a transaction entry for Patient #"_DFN_"."
  1. ;
  1. L -^RMPR(665.4,DA)
  1. Q 0