Changeset 309 for ccr


Ignore:
Timestamp:
Dec 19, 2008, 11:54:05 AM (16 years ago)
Author:
George Lilly
Message:

fixes to GETN1C0CRNF and EXP2C0CRXN

Location:
ccr/trunk/p
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/C0CRNF.m

    r308 r309  
    117117 . . I C0CVALUE["C0CTMP" D  ; WP FIELD
    118118 . . . N ZT,ZWP S ZWP=0 ;ITERATOR
    119  . . . S C0CVALUE="" ; INITIALIZE
     119 . . . S ZWP=$O(C0CTMP(C0CJ,C0CREF,C0CI,ZWP)) ; INIT TO FIRST LINE
     120 . . . S C0CVALUE=C0CTMP(C0CJ,C0CREF,C0CI,ZWP) ; INIT TO FIRST LINE
    120121 . . . F  S ZWP=$O(C0CTMP(C0CJ,C0CREF,C0CI,ZWP)) Q:'ZWP  D  ;
    121122 . . . . S ZT=" "_C0CTMP(C0CJ,C0CREF,C0CI,ZWP) ;LINE OF WP
  • ccr/trunk/p/C0CRXN.m

    r307 r309  
    8686 ; CROSS CHECKS THE NATIONAL DRUG FILE AND THE VA MAPPING FILE AGAINST
    8787 ; THE UMLS RXNORM DATABASE
     88 ; THIS ROUTINE HAS BEEN ENHANCED TO ALSO CHECK THE 50.416 DRUG INGREDIENT
     89 ; FILE AND TREAT VUIDS FOUND THERE LIKE THE ONES BEING FOUND IN THE NDF
    8890 ; IF THE VUID EXISISTS IN ALL THREE FILES, THE RXNORM CODE MATCHES IN
    8991 ; THE VA MAPPING FILE AND THE TEXT STRINGS ARE THE SAME, THE VUID IS INCLUDED
    9092 ; IN THE FILE BUT NO FLAGS ARE SET
    9193 ; IF THE VUID IS MISSING FROM THE NATIONAL DRUG FILE NDF=N
     94 ; (IF THE VUID IS MISSING FROM THE NDF, IT IS CHECKED IN THE DRUG INGREDIENT
     95 ; FILE, AND IF FOUND, THE FLAG IS NOT SET. IN THIS CASE THE TEXT FROM THE
     96 ; DRUG INGREDIENT FILE IS USED FOR COMPARISONS)
    9297 ; IF THE VUID IS MISSING FROM THE VA MAPPING FILE VAMAP=N
    9398 ; IF THE VUID IS PRESENT IN THE VA MAPPING FILE, BUT THE RXNORM
     
    115120 . D GETN1^C0CRNF("C0CB",176.111,C0CZX,"B","ALL") ;GET FROM VA MAPPING FILE
    116121 . D GETN1^C0CRNF("C0CD",50.68,C0CZX,"AVUID","ALL") ;GET FROM NDF
     122 . D GETN1^C0CRNF("C0CE",50.416,C0CZX,"AVUID","ALL") ;GET FROM DRUG INGREDIENTS
    117123 . ;D SETFDA("VUID",$$ZVALUE("CODE")) ;SET THE VUID CODE
    118124 . D SETFDA("RXNORM",$$ZVALUE("RXCUI")) ;SET THE RXNORM CODE
     
    129135 . . D SETFDA("VAMAP","N") ;MARK AS MISSING FROM VA MAPPING FILE
    130136 . ; NATIONAL DRUG FILE TESTS
    131  . I $$ZVALUE("VUID","C0CD")=C0CZX D  ; FOUND IN NATIONAL DRUG FILE
     137 . I ($$ZVALUE("VUID","C0CD")=C0CZX)!($$ZVALUE("VUID","C0CE")=C0CZX) D  ;
     138 . . ;FOUND IN NATIONAL DRUG FILE OR DRUG INGREDIENT FILE
    132139 . . S NDFVCNT=NDFVCNT+1 ;INCREMENT VUID FOUND COUNT
    133140 . . I $$ZVALUE("NAME","C0CD")'=$$ZVALUE("STR") D  ;NDF TEXT DOESN'T MATCH
    134  . . . S NDFTCNT=NDFTCNT+1 ; INCREMENT MISMATCHED NDF TEXT COUNT
    135  . . . D SETFDA("TXTM","N") ; SET TEXT MATCH FLAG TO N
    136  . . . D SETFDA("NDF TEXT",$$ZVALUE("NAME","C0CD")) ;POST THE TEXT
     141 . . . I $$ZVALUE("NAME","C0CE")'=$$ZVALUE("STR") D  ;DRUG ING FILE ALSO
     142 . . . . S NDFTCNT=NDFTCNT+1 ; INCREMENT MISMATCHED NDF TEXT COUNT
     143 . . . . D SETFDA("TXTM","N") ; SET TEXT MATCH FLAG TO N
     144 . . . . D SETFDA("NDF TEXT",$$ZVALUE("NAME","C0CD")) ;POST THE TEXT
     145 . . . . D SETFDA("NAT DRUG TEXT",$$ZVALUE("NAME","C0CE")) ;POST TEXT
    137146 . E  D  ;
    138147 . . D SETFDA("NDF","N") ;MARK AS MISSING
Note: See TracChangeset for help on using the changeset viewer.