source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LR132P.m@ 1791

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

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1LR132P ;DALISC/SED - LR*5.2*132 PATCH POST INIT ROUTINE
2 ;;5.2;LAB SERVICE;**132**;Oct 20, 1996
3EN ; Updates for file 69.5 that will not work with KIDS
4 ;First enter the protocal from file 101 and enter it into 69.5
5 S LRPROT=$O(^ORD(101,"B","LREPI",0))
6 I +LRPROT>0 D
7 .K DD
8 .S DIC="^LAB(69.4,",DIC(0)="L",(DINUM,X)=LRPROT
9 .D FILE^DICN
10 .S MSG="Adding Protocal '"_$P(^ORD(101,LRPROT,0),U,1)_"' to the "
11 .S MSG=MSG_"Emerging Pathogen File (69.5)"
12 .D BMES^XPDUTL(MSG) K MSG
13 .F I=1:1:14 S $P(^LAB(69.5,I,0),U,7)=LRPROT,$P(^LAB(69.5,I,0),U,9)=I
14 I +LRPROT'>0 D BMES^XPDUTL("Unable to add a Protocal to the Emerging Pathogen File (69.5)") G EXIT
15MAIL ;Add the report mail group to file 69.4
16 S LRMAIL=$O(^XMB(3.8,"B","EPI-REPORT",0))
17 S $P(^LAB(69.4,LRPROT,0),U,2)=$G(LRMAIL)
18 S $P(^LAB(69.4,LRPROT,0),U,3)="32000"
19ICD9 ;Add the ICD9 codes to the file.
20 D BMES^XPDUTL("********")
21 D BMES^XPDUTL("**Updating Emerging Pathogen File (69.5) with ICD9 Codes**")
22 ;LEISHMANIAS
23 F ICD=0:1:9 S ICD9="085."_ICD_" ",INT=$O(^ICD9("AB",ICD9,0)) D
24 .Q:+INT'>0
25 .Q:'$D(^ICD9(INT,0))
26 .S LRPATH=14 D SETIC
27 ;MALARIA
28 F ICD=0:1:9 S ICD9="084."_ICD_" ",INT=$O(^ICD9("AB",ICD9,0)) D
29 .Q:+INT'>0
30 .Q:'$D(^ICD9(INT,0))
31 .S LRPATH=11 D SETIC
32 ;DENGUE,JAKOB-CREUTZFELDT DIS,LEGIONELLA
33TST F ICD9="007.8 ","065.4 ","046.1 ","061. ","482.80 " S INT=$O(^ICD9("AB",ICD9,0)) D
34 .Q:+INT'>0
35 .Q:'$D(^ICD9(INT,0))
36 .S LRPATH=$S(ICD9="007.8 ":9,ICD9="046.1 ":13,ICD9="482.80 ":7,1:12) D SETIC
37 ;
38BUGS ;ADD THE BUGS TO FILE 69.5
39 D BMES^XPDUTL("********")
40 D BMES^XPDUTL("**Updating Emerging Pathogen File (69.5) with Etiology**")
41 S BUG="" F S BUG=$O(^LAB(61.2,"B",BUG)) Q:BUG="" D
42 .I BUG'["CANDIDA",BUG'["LEGIONELLA",BUG'["ENTEROCOCCUS" Q
43 .S BUGI=$O(^LAB(61.2,"B",BUG,0)) Q:+BUGI'>0
44 .S LRPATH=$S(BUG["ENTEROCOCCUS":1,BUG["LEGIONELLA":7,1:8) D SETBG
45 ;
46NLT ;AUTO LINKS THE FILE 62.06 WITH FILE 64
47 S MSG="I will auto link file '62.06 ANTIMICROBIAL SUSCEPIBILTY' to file '64 WKLD CODE."
48 D BMES^XPDUTL(MSG)
49 S LRANT=0 F S LRANT=$O(^LAB(62.06,LRANT)) Q:+LRANT'>0 D
50 .S LRANM=$P(^LAB(62.06,LRANT,0),U,1),LRND=$P(^LAB(62.06,LRANT,0),U,4)
51 .S LRNDM=""
52 .I +LRND>0,$D(^DD(63.3,LRND,0)) S LRNDM=$P(^DD(63.3,LRND,0),U,1)
53 .S DIC=64,DIC(0)="XMO",X=LRANM D ^DIC
54 .I +Y<0&(LRNDM'="") S DIC=64,DIC(0)="XMO",X=LRNDM D ^DIC
55 .S:+Y>0 MSG=LRANM_" <----Linked----> "_$P(Y,U,2)
56 .S:+Y'>0 MSG=LRANM_" <----Not Linked----> "_"No Match Found"
57 .D BMES^XPDUTL(MSG)
58 .Q:+Y'>0
59 .K DIC,DD,DR,DA,DIE
60 .S ^LAB(62.06,LRANT,64)=""
61 .S DIE=62.06,DA=LRANT,DR="64////"_+Y D ^DIE
62 ;
63EXIT K LRPATH,BUG,BUGI,INT,X,Y,DIC,ICD9,DD,LRPROT,LRMAIL
64 ;
65 Q
66SETBG ;ADD THE ENTRY FOR ETIOLOGY
67 Q:$D(^LAB(69.5,LRPATH,2,"B",BUGI))
68 S MSG="Adding "_BUG_" into "_$P(^LAB(69.5,LRPATH,0),U,1)
69 D BMES^XPDUTL(MSG)
70 K DD
71 S DIC="^LAB(69.5,"_LRPATH_",2,",DIC(0)="L",X=BUGI
72 S DIC("P")=$P(^DD(69.5,3,0),U,2),DA(1)=LRPATH
73 D FILE^DICN
74 Q
75SETIC ;ADD THE ENTRY FOR ICD9
76 Q:$D(^LAB(69.5,LRPATH,3,"B",INT))
77 S MSG="Adding "_$P(^ICD9(INT,0),U,1)_" "_$P(^ICD9(INT,0),U,3)_" into "
78 S MSG=MSG_$P(^LAB(69.5,LRPATH,0),U,1)
79 D BMES^XPDUTL(MSG)
80 K DD
81 S DIC="^LAB(69.5,"_LRPATH_",3,",DIC(0)="L",X=INT
82 S DIC("P")=$P(^DD(69.5,4,0),U,2),DA(1)=LRPATH
83 D FILE^DICN
84 Q
Note: See TracBrowser for help on using the repository browser.