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

PRS8VW1.m

Go to the documentation of this file.
  1. PRS8VW1 ;HISC/MRL-DECOMPOSITION, VIEW RESULTS, CONT. ;01/23/07
  1. ;;4.0;PAID;**6,35,45,69,112**;Sep 21, 1995;Build 54
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. ;This routine is used to view the results of the decomposition.
  1. ;It is a continuation of routine ^PRS8VW.
  1. ;
  1. ;See routine PRS8VW2 at label TYP for type of time
  1. ;text displayed from this routine.
  1. ;
  1. ;Called by Routines: PRS8VW1
  1. ;
  1. S CHECK=0
  1. ;
  1. EN ; --- entry point from PRS8CK1
  1. S E=E(1),W="Wk-1",LOC=1 D SHOW
  1. S E=E(2),W="Wk-2",LOC=2 D SHOW
  1. S E=E(3),W="Misc",LOC=0 D SHOW
  1. I 'CHECK,"C"'[$E(IOST) D
  1. .W !,DASH1
  1. .W !,TR
  1. K %,CHECK,D,E,I,L,LOC,USED,W,X,Y Q
  1. ;
  1. SHOW ; --- show information
  1. F I=1:2 S X=$E(E,I,I+1) Q:X="" D
  1. .I $D(USED(X)) Q
  1. .S USED(X)=""
  1. .S X(1)=$F(OLD,X),X(2)=$F(NEW,X) ; try to find time code in TT8B
  1. .I 'CHECK,'X(1),'X(2) Q ;not in either string
  1. .I CHECK S LOC(1)=(I\2+1) S:'LOC LOC(1)=LOC(1)+50 D
  1. ..S FOUND(LOC(1))=$G(FOUND(LOC(1)))
  1. ..S $P(FOUND(LOC(1)),"^",$S(LOC<2:1,1:4))=X
  1. .S Y=$P($T(@($E(X)_"^PRS8VW2")),";;",2)
  1. .S Y(1)=$F(Y,$E(X,2)_":")
  1. .S Y=$P($E(Y,Y(1),999),":",1,2)
  1. .I 'CHECK W !,W,?10,$P($T(TYP+Y^PRS8VW2),";;",2),?45,X
  1. .S X=X(1),X1=52 D CON
  1. .S X=X(2),X1=67 D CON
  1. Q
  1. ;
  1. CON ; --- convert to proper format
  1. I '+X S X=$E("00000000000",1,+$P(Y,":",2))
  1. I X,X1=52 S (X,Z)=$E(OLD,X(1),X(1)+$P(Y,":",2)-1)
  1. I X,X1=67 S:'$D(Z) Z="" S X=$E(NEW,X(2),X(2)+$P(Y,":",2)-1)
  1. I 'CHECK W ?X1,$J(X,9) D Q
  1. .I OLD=""!(NEW="") Q
  1. .I X1=67,Z'="",X'=Z W " *"
  1. S LOC(2)=$S(X1=52:2,1:3) I LOC=2 S LOC(2)=LOC(2)+3
  1. S $P(FOUND(LOC(1)),"^",LOC(2))=X
  1. Q:X1'=67
  1. I $P(FOUND(LOC(1)),"^",1)="CD" Q
  1. S S=0,X=FOUND(LOC(1))
  1. I +$P(X,"^",2)!(+$P(X,"^",3)) S S=1
  1. I 'S,LOC,+$P(X,"^",5)!(+$P(X,"^",6)) S S=1
  1. I 'S,LOC'=1 K FOUND(LOC(1))
  1. Q