Changeset 303 for ccr/trunk


Ignore:
Timestamp:
Dec 9, 2008, 5:19:48 PM (16 years ago)
Author:
George Lilly
Message:

started EXPANDC0CRXN to reconcile null RXNORM codes in 176.111

Location:
ccr/trunk/p
Files:
2 edited

Legend:

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

    r301 r303  
    5353 D GETS^DIQ(GFILE,C0CREF,"**","","C0CTMP")
    5454 D FIELDS(GRTN,GFILE) ;GET ALL THE FIELD NAMES FOR THE FILE
     55 S @GRTN@(0)=GFILE_"^RNF1^"_GIEN_"^"_DT_"^"_$J ; STRUCTURE SIGNATURE
    5556 S (C0CI,C0CJ)=""
    5657 F  S C0CJ=$O(C0CTMP(C0CJ)) Q:C0CJ=""  D  ; FOR ALL SUBFILES
     
    8788 ;
    8889 N GIEN,GF
     90
    8991 S GF=$$FILEREF(GFILE) ;CLOSED FILE REFERENCE FOR FILE NUMBER GFILE
    9092 I '$D(GNDX) S GIEN=GREF ; IF NO INDEX USED, GREF IS THE IEN
     
    103105 D GETS^DIQ(GFILE,C0CREF,"**","","C0CTMP")
    104106 D FIELDS(GRTN,GFILE) ;GET ALL THE FIELD NAMES FOR THE FILE
     107 S @GRTN@(0)=GFILE_"^RNF1^"_GIEN_"^"_DT_"^"_$J_"^"_DUZ ; STRUCTURE SIGNATURE
    105108 S (C0CI,C0CJ)=""
    106109 F  S C0CJ=$O(C0CTMP(C0CJ)) Q:C0CJ=""  D  ; FOR ALL SUBFILES
  • ccr/trunk/p/C0CRXN.m

    r302 r303  
    2525 ; READ EACH RECORD FROM 176.111 AND USE THE VUID TO LOOK UP THE RXNORM
    2626 ; CODE FROM 176.001 (RXNORM CONCEPTS)
    27  ; POPULATE ALL FIELDS IN 176.112 AND SET "NEW" TO "Y" IF 176.111 DOES NOT 
     27 ; POPULATE ALL FIELDS IN 176.112 AND SET "NEW" TO "Y" IF 176.111 DOES NOT
    2828 ; ALREADY HAVE AN RXNORM CODE.
    2929 ; ADD THE RXNORM TEXT FIELD TO EVERY RECORD (NOT PRESENT IN 176.111)
    30  ; AND COMPARE THE RXNORM TEXT FIELD WITH THE VUID TEXT FIELD, SETTING THE 
     30 ; AND COMPARE THE RXNORM TEXT FIELD WITH THE VUID TEXT FIELD, SETTING THE
    3131 ; "DIFFERENT TEXT" FIELD TO "Y" IF THERE ARE DIFFERENCES
    3232 ; USES SUPPORT ROUTINES FROM C0CRNF.m
     
    3535 N C0CF ; CLOSED ROOT FOR DESTINATION FILE
    3636 S C0CVA=$$FILEREF^C0CRNF(176.111) ; C0C PHARMACY VA RXNORM MAPPING FILE
    37  S C0CFRXN=$$FILEREF^C0CRNF(176.001) ; CLOSED ROOT FOR RXNORM CONCEPT FILE
    38  S C0CF=$$FILEREF^C0CRNF(176.112) ; C0C RXNORM VUID MAPPING EXPANSION FILE
    39  W C0CVA,C0CFRXN,C0CF,!
    40  S C0CZX=""
    41  ; F  S C0CZX=
     37 ;S C0CFRXN=$$FILEREF^C0CRNF(176.001) ; CLOSED ROOT FOR RXNORM CONCEPT FILE
     38 ;S C0CF=$$FILEREF^C0CRNF(176.112) ; C0C RXNORM VUID MAPPING EXPANSION FILE
     39 ;W C0CVA,C0CFRXN,C0CF,!
     40 S C0CZX=0
     41 S (HASRXN,NORXN,NOVUID)=0 ; INITIALIZE COUNTERS
     42 F  S C0CZX=$O(^C0CCODES(176.111,C0CZX)) Q:+C0CZX=0  D  ; FOR EVERY RECORD
     43 . D GETN^C0CRNF("C0CA",176.111,C0CZX,"ALL") ;GET THE FIELDS
     44 . I $$ZVALUE("MEDIATION CODE")="" D
     45 . . S NORXN=NORXN+1 ;
     46 . E  S HASRXN=HASRXN+1
     47 . I $$ZVALUE("VUID")="" D  ; BAD RECORD
     48 . . S NOVUID=NOVUID+1
     49 . . ZWR C0CA
     50 W "HAS RXN=",HASRXN,!
     51 W "NO RXN=",NORXN,!
     52 W "NO VUID=",NOVUID,!
    4253 Q
    4354 ;
Note: See TracChangeset for help on using the changeset viewer.