fixes to GETN1^C0CRNF and EXP2^C0CRXN
This commit is contained in:
parent
0d40f4972f
commit
d03298f977
|
@ -116,7 +116,8 @@ GETN1(GRTN,GFILE,GREF,GNDX,GNN) ; NEW GET ;GPL ; RETURN A FIELD VALUE MAP
|
|||
. . S C0CVALUE=C0CTMP(C0CJ,C0CREF,C0CI) ;
|
||||
. . I C0CVALUE["C0CTMP" D ; WP FIELD
|
||||
. . . N ZT,ZWP S ZWP=0 ;ITERATOR
|
||||
. . . S C0CVALUE="" ; INITIALIZE
|
||||
. . . S ZWP=$O(C0CTMP(C0CJ,C0CREF,C0CI,ZWP)) ; INIT TO FIRST LINE
|
||||
. . . S C0CVALUE=C0CTMP(C0CJ,C0CREF,C0CI,ZWP) ; INIT TO FIRST LINE
|
||||
. . . F S ZWP=$O(C0CTMP(C0CJ,C0CREF,C0CI,ZWP)) Q:'ZWP D ;
|
||||
. . . . S ZT=" "_C0CTMP(C0CJ,C0CREF,C0CI,ZWP) ;LINE OF WP
|
||||
. . . . S ZT=$TR(ZT,"^""","|'") ;HACK TO GET RID OF ^ AND " IN TEXT "
|
||||
|
|
17
p/C0CRXN.m
17
p/C0CRXN.m
|
@ -85,10 +85,15 @@ EXPAND ; MAIN ROUTINE TO CREATE THE C0C RXNORM VUID EXPANSION FILE (176.112)
|
|||
EXP2 ; ROUTINE TO CREATE 176.113 C0C RXNORM VUID MAPPING DISCREPANCIES FILE
|
||||
; CROSS CHECKS THE NATIONAL DRUG FILE AND THE VA MAPPING FILE AGAINST
|
||||
; THE UMLS RXNORM DATABASE
|
||||
; THIS ROUTINE HAS BEEN ENHANCED TO ALSO CHECK THE 50.416 DRUG INGREDIENT
|
||||
; FILE AND TREAT VUIDS FOUND THERE LIKE THE ONES BEING FOUND IN THE NDF
|
||||
; IF THE VUID EXISISTS IN ALL THREE FILES, THE RXNORM CODE MATCHES IN
|
||||
; THE VA MAPPING FILE AND THE TEXT STRINGS ARE THE SAME, THE VUID IS INCLUDED
|
||||
; IN THE FILE BUT NO FLAGS ARE SET
|
||||
; IF THE VUID IS MISSING FROM THE NATIONAL DRUG FILE NDF=N
|
||||
; (IF THE VUID IS MISSING FROM THE NDF, IT IS CHECKED IN THE DRUG INGREDIENT
|
||||
; FILE, AND IF FOUND, THE FLAG IS NOT SET. IN THIS CASE THE TEXT FROM THE
|
||||
; DRUG INGREDIENT FILE IS USED FOR COMPARISONS)
|
||||
; IF THE VUID IS MISSING FROM THE VA MAPPING FILE VAMAP=N
|
||||
; IF THE VUID IS PRESENT IN THE VA MAPPING FILE, BUT THE RXNORM
|
||||
; CODE IS MISSING IN THAT FILE, VARXN=N
|
||||
|
@ -114,6 +119,7 @@ EXP2 ; ROUTINE TO CREATE 176.113 C0C RXNORM VUID MAPPING DISCREPANCIES FILE
|
|||
. D GETN1^C0CRNF("C0CA",176.001,C0CZX,"VUID","ALL") ;GET FROM RXNORM FILE
|
||||
. D GETN1^C0CRNF("C0CB",176.111,C0CZX,"B","ALL") ;GET FROM VA MAPPING FILE
|
||||
. D GETN1^C0CRNF("C0CD",50.68,C0CZX,"AVUID","ALL") ;GET FROM NDF
|
||||
. D GETN1^C0CRNF("C0CE",50.416,C0CZX,"AVUID","ALL") ;GET FROM DRUG INGREDIENTS
|
||||
. ;D SETFDA("VUID",$$ZVALUE("CODE")) ;SET THE VUID CODE
|
||||
. D SETFDA("RXNORM",$$ZVALUE("RXCUI")) ;SET THE RXNORM CODE
|
||||
. D SETFDA("RXNORM TEXT",$$ZVALUE("STR")) ;SET THE RXNORM TEXT
|
||||
|
@ -128,12 +134,15 @@ EXP2 ; ROUTINE TO CREATE 176.113 C0C RXNORM VUID MAPPING DISCREPANCIES FILE
|
|||
. . S VANO=VANO+1
|
||||
. . D SETFDA("VAMAP","N") ;MARK AS MISSING FROM VA MAPPING FILE
|
||||
. ; NATIONAL DRUG FILE TESTS
|
||||
. I $$ZVALUE("VUID","C0CD")=C0CZX D ; FOUND IN NATIONAL DRUG FILE
|
||||
. I ($$ZVALUE("VUID","C0CD")=C0CZX)!($$ZVALUE("VUID","C0CE")=C0CZX) D ;
|
||||
. . ;FOUND IN NATIONAL DRUG FILE OR DRUG INGREDIENT FILE
|
||||
. . S NDFVCNT=NDFVCNT+1 ;INCREMENT VUID FOUND COUNT
|
||||
. . I $$ZVALUE("NAME","C0CD")'=$$ZVALUE("STR") D ;NDF TEXT DOESN'T MATCH
|
||||
. . . S NDFTCNT=NDFTCNT+1 ; INCREMENT MISMATCHED NDF TEXT COUNT
|
||||
. . . D SETFDA("TXTM","N") ; SET TEXT MATCH FLAG TO N
|
||||
. . . D SETFDA("NDF TEXT",$$ZVALUE("NAME","C0CD")) ;POST THE TEXT
|
||||
. . . I $$ZVALUE("NAME","C0CE")'=$$ZVALUE("STR") D ;DRUG ING FILE ALSO
|
||||
. . . . S NDFTCNT=NDFTCNT+1 ; INCREMENT MISMATCHED NDF TEXT COUNT
|
||||
. . . . D SETFDA("TXTM","N") ; SET TEXT MATCH FLAG TO N
|
||||
. . . . D SETFDA("NDF TEXT",$$ZVALUE("NAME","C0CD")) ;POST THE TEXT
|
||||
. . . . D SETFDA("NAT DRUG TEXT",$$ZVALUE("NAME","C0CE")) ;POST TEXT
|
||||
. E D ;
|
||||
. . D SETFDA("NDF","N") ;MARK AS MISSING
|
||||
. . S NDFNO=NDFNO+1 ;INCREMENT MISSING COUNT
|
||||
|
|
Loading…
Reference in New Issue