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

PRCHDAM0.m

Go to the documentation of this file.
  1. PRCHDAM0 ;ID/RSD-DISPLAY AN AMENDMENT CONTINUED ;7/27/94 9:15 AM
  1. V ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. REASON ;Come here to display the JUSTIFICATION field on the AMENDMENT display.
  1. N LINE1,LINE2,LINE3,LINE4,F1,PRCHD4,LONG
  1. K LINE1,LINE2,LINE3,LINE4 S F1=0
  1. S PRCHD4=$G(^PRC(443.6,D0,6,D1,4)) Q:PRCHD4=""
  1. I $L(PRCHD4)>65 S F1=1 D
  1. .S LONG=65 F Q:$A(PRCHD4,LONG)=32 S LONG=LONG-1
  1. .S LINE1=$E(PRCHD4,1,LONG-1),PRCHD4=$E(PRCHD4,LONG+1,240)
  1. .S LINE1="JUSTIFICATION: "_LINE1
  1. .I $L(PRCHD4)>80 D Q
  1. ..S LONG=80 F Q:$A(PRCHD4,LONG)=32 S LONG=LONG-1
  1. ..S LINE2=$E(PRCHD4,1,LONG-1),PRCHD4=$E(PRCHD4,LONG+1,240)
  1. ..I $L(PRCHD4)>80 D Q
  1. ...S LONG=80 F Q:$A(PRCHD4,LONG)=32 S LONG=LONG-1
  1. ...S LINE3=$E(PRCHD4,1,LONG-1),LINE4=$E(PRCHD4,LONG+1,240)
  1. ..S LINE3=PRCHD4
  1. ..Q
  1. .I $L(PRCHD4)'>80 S LINE2=PRCHD4
  1. .Q
  1. I F1=0 S LINE1=PRCHD4,LINE1="JUSTIFICATION: "_LINE1
  1. W !,LINE1 W:$D(LINE2) !,LINE2 W:$D(LINE3) !,LINE3 W:$D(LINE4) !,LINE4
  1. W !,PRCHDUL
  1. Q