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

LR421P.m

Go to the documentation of this file.
LR421P ;DALISC/SED - LR*5.2*421 PATCH POST INIT ROUTINE ;10 Oct 2013  4:49 PM
 ;;5.2;LAB SERVICE;**421**;Sep 27, 1994;Build 48
EN ;
 D BMES^XPDUTL("**** ICD 10 Remediation****")
 D BMES^XPDUTL("**Updating Emerging Pathogen File (69.5) with ICD Codes**")
CONVERT ;
 S LRCSYS="10D"
 I $T(^LREPICD)]"" D ICDCONVT^LREPICD
ICD ;Add the ICD codes to the file.
 ;SET CURRENT CODES TO APPROPRIATE CODE SYSTEMS
 N LRICDDA,LRICDCOD K LRPATH S LRPATH=0 F  S LRPATH=$O(^LAB(69.5,LRPATH)) Q:+LRPATH=0  D
 .I $D(^LAB(69.5,LRPATH,3)) S LRICDDA=0 F  S LRICDDA=$O(^LAB(69.5,LRPATH,3,LRICDDA)) Q:+LRICDDA=0  D
 ..K LRSET S LRICDCOD=+(^LAB(69.5,LRPATH,3,LRICDDA,0)),LRSET=$$CSI^ICDEX(80,LRICDCOD)
 ..S DIE="^LAB(69.5,"_LRPATH_",3,",DA=LRICDDA,DR="1////"_LRSET D ^DIE
 .Q
 ;LEISHMANIASIS   PATH14
 S LRPATH=14
 F LRICDNO=0,1,2,9 S LREPICDX="B55."_LRICDNO_" ",LRICDIEN=+$$CODEN^ICDEX(LREPICDX,80) D
 .Q:+LRICDIEN'>0
 .S LRTMP=$$ICDDATA^ICDXCODE(LRCSYS,LRICDIEN,,)
 .Q:+LRTMP<0
 .D SETIC(LRICDIEN)
 ;MALARIA   PATH11
 S LRPATH=11
 F LREPICDX="B50.0 ","B50.8 ","B50.9 ","B51.0 ","B51.8 ","B51.9 ","B52.0 ","B52.8 ","B52.9 ","B53.0 ","B53.1 ","B53.8 ","B54. " S LRICDIEN=+$$CODEN^ICDEX(LREPICDX,80) D
 .Q:+LRICDIEN'>0
 .S LRTMP=$$ICDDATA^ICDXCODE(LRCSYS,LRICDIEN,,)
 .Q:+LRTMP<0
 .D SETIC(LRICDIEN)
 ;DENGUE   PATH12
 S LRPATH=12
 F LREPICDX="A90. ","A91. ","A93.8 " S LRICDIEN=+$$CODEN^ICDEX(LREPICDX,80) D
 .Q:+LRICDIEN'>0
 .S LRTMP=$$ICDDATA^ICDXCODE(LRCSYS,LRICDIEN,,)
 .Q:+LRTMP<0
 .D SETIC(LRICDIEN)
 ;
 ;JAKOB-CREUTZFELDT DIS   PATH13
 S LRPATH=13
 F LREPICDX="A81.00 ","A81.01 ","A81.09 ","A81.1 ","A81.2 ","A81.81 ","A81.82 ","A81.83 ","A81.89 ","A81.9 " S LRICDIEN=+$$CODEN^ICDEX(LREPICDX,80) D
 .Q:+LRICDIEN'>0
 .S LRTMP=$$ICDDATA^ICDXCODE(LRCSYS,LRICDIEN,,)
 .Q:+LRTMP<0
 .D SETIC(LRICDIEN)
 ;
 ;LEGIONELLA   PATH7
 S LRPATH=7
 F LREPICDX="A48.1 ","A48.2 ","A48.8 " S LRICDIEN=+$$CODEN^ICDEX(LREPICDX,80) D
 .Q:+LRICDIEN'>0
 .S LRTMP=$$ICDDATA^ICDXCODE(LRCSYS,LRICDIEN,,)
 .Q:+LRTMP<0
 .D SETIC(LRICDIEN)
 ;
 ;CRYPTOSPORIDIUM   PATH9
 S LRPATH=9
 F LREPICDX="A07.2 ","A07.9 " S LRICDIEN=+$$CODEN^ICDEX(LREPICDX,80) D
 .Q:+LRICDIEN'>0
 .S LRTMP=$$ICDDATA^ICDXCODE(LRCSYS,LRICDIEN,,)
 .Q:+LRTMP<0
 .D SETIC(LRICDIEN)
 ;
EXIT K LRPATH,LRINT,X,Y,DA,DIC,DIE,DR,LRICDNO,DD,LRCSYS,LREPICDX,LRICDIEN
 K LRND,LRNDM,LRANT,LRTMP,LRMSG,LRANM
 ;
 Q
SETIC(LRINT) ;ADD THE ENTRY FOR ICD
 Q:$D(^LAB(69.5,LRPATH,3,"B",LRINT))
 S LRTMP=$$ICDDATA^ICDXCODE(LRCSYS,LRINT,,)
 Q:LRTMP'>0
 S LRMSG="Adding "_$P(LRTMP,U,2)_" "_$P(LRTMP,U,4)_" into "
 S LRMSG=LRMSG_$P(^LAB(69.5,LRPATH,0),U,1)
 D BMES^XPDUTL(LRMSG)
 K DD
 S DIC="^LAB(69.5,"_LRPATH_",3,",DIC(0)="L",X=LRINT
 S DIC("P")=$P(^DD(69.5,4,0),U,2),DA(1)=LRPATH
 D FILE^DICN
 S DIE="^LAB(69.5,"_LRPATH_",3,",DR="1////"_$P(LRTMP,U,20) D ^DIE
 Q