source: WorldVistAEHR/trunk/r/LIBRARY-LBR-LBRS/LBRYPRC1.m@ 1801

Last change on this file since 1801 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1LBRYPRC1 ;SSI/ALA-PROCESS TRANSACTIONS CONTINUED ;[ 05/23/97 12:13 PM ]
2 ;;2.5;Library;**2**;Mar 11, 1996
3FR ; Update frequencies
4 S IDA=$P(LDATA(1),U,3),FRQ=$P(LDATA(4),U,4),SYN=$P(LDATA(2),U),DIC="^LBRY(680.2,"
5 I $D(^LBRY(680.2,IDA)) S DIE=DIC,DA=IDA,DR="[LBRYFRUP]" D ^DIE
6 I '$D(^LBRY(680.2,IDA)) S ^LBRY(680.2,IDA,0)=FRQ_U_SYN,DIK=DIC,DA=IDA D EN^DIK
7 I TAF'="",$G(^LBRY(680.5,TAF,0))'="" S $P(^LBRY(680.5,TAF,0),U,4)=IDA
8 K IDA,LDATA,FRQ,SYN,DIC,DIE,DA,DR,DIK,TAF,D,D0,DA,X
9 Q
10PU ; Update publishers
11 S IDA=$P(LDATA(1),U,3),PUB=$P(LDATA(4),U),DIC="^LBRY(680.1,"
12 I $D(^LBRY(680.1,IDA)) S DIE=DIC,DA=IDA,DR="[LBRYPUUP]" D ^DIE
13 I '$D(^LBRY(680.1,IDA)) S ^LBRY(680.1,IDA,0)=PUB,DIK=DIC,DA=IDA D EN^DIK
14 I TAF'="",$G(^LBRY(680.5,TAF,3))'="" S $P(^LBRY(680.5,TAF,3),U,2)=IDA
15 K IDA,LDATA,FRQ,SYN,DIC,DIE,DA,DR,DIK,TAF,D,D0,DA,X
16 Q
17IN ; Update indexing sources
18 K LDATA S NM=$O(^LBRY(682.1,TRN,6,"")),LDATA=^LBRY(682.1,TRN,6,NM,0)
19 S IDA=$P(LDATA,U,3),TIT=$P(LDATA,U),COD=$P(LDATA,U,2),DIC="^LBRY(680.8,"
20 I $D(^LBRY(680.8,IDA)) S DIE=DIC,DA=IDA,DR="[LBRYINUP]" D ^DIE
21 I '$D(^LBRY(680.8,IDA)) S ^LBRY(680.8,IDA,0)=TIT_U_COD,DIK=DIC,DA=IDA D EN^DIK
22 I TAF'="",'$D(^LBRY(680.5,TAF,1,"B",IDA)) D
23 . S NM=0 F S NM=$O(^LBRY(680.5,TAF,1,NM)) Q:NM'>0!(NM="") S LNM=NM
24 . Q:$G(LNM)=""
25 . S LNM=LNM+1,^LBRY(680.5,TAF,1,LNM,0)=IDA,^LBRY(680.5,TAF,1,"B",IDA,LNM)=""
26 . S $P(^LBRY(680.5,TAF,1,0),U,3,4)=LNM_U_LNM
27 K LDATA,NM,IDA,TIT,COD,DIC,DIE,DA,DR,DIK,LNM,D,D0,DA,X
28 Q
29PP ; Update prediction patterns
30 S LDATA(5)=$G(^LBRY(682.1,TRN,5)),IDA=$P(LDATA(1),U,3),DIC="^LBRY(680.9,"
31 S COD=$P(LDATA(4),U,6),NAM=$P(LDATA(4),U,5)
32 I $D(^LBRY(680.9,IDA)) S DIE=DIC,DA=IDA,DR="[LBRYPPUP]" D ^DIE
33 I '$D(^LBRY(680.9,IDA)) S $P(^LBRY(680.9,IDA,0),U,1,2)=COD_U_NAM,DIK=DIC,DA=IDA D EN^DIK
34 S FRM="5;1^5;2^5;3^5;4^5;5^5;6^5;7^5;8",TOM="0;3^3;1^0;4^2;4^2;1^2;3^2;2^0;5"
35 F I=1:1:8 S FR=$P(FRM,U,I),TO=$P(TOM,U,I) D
36 . S ND1=$P(FR,";"),PC1=$P(FR,";",2),ND2=$P(TO,";"),PC2=$P(TO,";",2)
37 . S $P(^LBRY(680.9,IDA,ND2),U,PC2)=$P(^LBRY(682.1,TRN,ND1),U,PC1)
38 K ^LBRY(680.9,IDA,1) S NM=0
39 F S NM=$O(^LBRY(682.1,TRN,8,NM)) Q:NM="" D
40 . S ^LBRY(680.9,IDA,1,NM,0)=^LBRY(682.1,TRN,8,NM,0)
41 . S $P(^LBRY(680.9,IDA,1,0),U,3,4)=NM_U_NM
42 I $D(^LBRY(680.9,IDA,1))>0 S $P(^LBRY(680.9,IDA,1,0),U,5)=DT
43 I TAF'="",$G(^LBRY(680.5,TAF,0))'="" S $P(^LBRY(680.5,TAF,0),U,3)=IDA
44 K LDATA,NAM,COD,IDA,TAF,ND1,ND2,PC1,PC2,FRM,FR,TOM,TM,NM,DR,DIC,DIE,D,D0,DA,X
45 Q
Note: See TracBrowser for help on using the repository browser.