XDRDSCOR ;IHS/OHPRD/JCM - SETS SCORES FOR DUPLICATE CHECKING;   [ 08/13/92  09:50 AM ]
 ;;7.3;TOOLKIT;;Apr 25, 1995
START ;
 S XDRQFLG=0
 I '$D(XDRFL)!('$D(XDRD(0))) D FILE^XDRDQUE G:XDRQFLG END
 S XDRDSCOR("PDT%")=$P(XDRD(0),U,15)
 S:$P(XDRD(0),U,18) XDRDSCOR("VDT%")=$P(XDRD(0),U,18)
 I '$O(^VA(15.1,XDRFL,11,0)) S XDRERR=3 D ^XDREMSG G END
 F XDRDORD=0:0 S XDRDORD=$O(^VA(15.1,XDRFL,11,"AO",XDRDORD)) Q:'XDRDORD  D TEST
END ;
 K XDRDORD
 Q
 ;
TEST ;
 S XDRDTST=$O(^VA(15.1,XDRFL,11,"AO",XDRDORD,0))
 S XDRDTEST(XDRDORD)=^VA(15.1,XDRFL,11,XDRDTST,0)
 S XDRDTEST("FILE")=$S('$P(XDRDTEST(XDRDORD),U,4):XDRFL,1:$P(XDRDTEST(XDRDORD),U,4))
 S XDRDSCOR("DR",XDRDTEST("FILE"))=$S($D(XDRDSCOR("DR",XDRDTEST("FILE"))):XDRDSCOR("DR",XDRDTEST("FILE"))_$P(XDRDTEST(XDRDORD),U,5)_";",1:$P(XDRDTEST(XDRDORD),U,5)_";")
 K XDRDTST,XDRDTEST("FILE")
 Q
