PROSPECT ;Prospecten [ 01/23/96 2:17 PM ] Kill Do INIT^vhTERMINA Set r=$$SELECT("","Test : ") Write !,r,@F2,! q ; SELECT(DefInp,Titel) New X,Y,Tekst,PPn,Pp,TPp,DefPP Set DefInp=$G(DefInp) Set:'$L($G(DefPP)) DefPP=$G(sRef("PP")) If $L(DefPP),'$D(^VERSLAG("IP",DefPP)) Set DefPP="" If '$L($G(Titel)) Set Titel="Prospect : " Do ADD^vhScherm(21,24) Set PPn="" Set:$L(DefInp) Pp=DefInp SEL2 Set:'$L(DefInp) Pp=$$ASK^vhINP(Titel,20,"","Ingave prospect dmv. naam") Set DefInp="" Quit:Pp="-"!(Pp=".") Pp Set Pp=$$UPCASE^vhRtn1(Pp) If Pp=""!zb Do LIST("") Goto SEL2:'PPn,EXIT Set TPp=$O(^VERSLAG("IP",Pp)) If $E(TPp,1,$L(Pp))'=Pp Goto SEL2 If $E($O(^VERSLAG("IP",TPp)),1,$L(Pp))'=Pp Set PPn=TPp Goto EXIT Do LIST(Pp) Goto SEL2:'$L(PPn),EXIT EXIT Quit PPn LIST(Kode) New Y,X Set TPp=Pp If '$L(Pp) Set Pp="ZZZZZ" Set Y="5\\Selecteer een prospect\\MORE^PROSPECT\PROSPECT\K" X "Set Y(0)=$$"_$P(Y,"\",5)_"(0,3)" Quit:'Y(0) Do ^POP Set:X PPn=Y(X) Quit MORE(Max,Len,Ref) If Max>200 w *7 Quit Max Set Count=0 If Max,TPp="" Quit Max For Set TPp=$O(^VERSLAG("IP",TPp)) Quit:TPp=""!($E(TPp,1,$L(Pp))'=Pp) Set Count=Count+1,Y(Max+Count)=TPp Quit:Count>Len Set:$E(TPp,1,$L(Pp))'=Pp TPp="" Quit Max+Count ;