Changeset 302 for ccr


Ignore:
Timestamp:
Dec 8, 2008, 8:26:07 PM (16 years ago)
Author:
George Lilly
Message:

beginning to write EXPANDC0CRXN to validate 176.111

File:
1 edited

Legend:

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

    r300 r302  
    2222 Q
    2323 ;
     24EXPAND ; MAIN ROUTINE TO CREATE THE C0C RXNORM VUID EXPANSION FILE (176.112)
     25 ; READ EACH RECORD FROM 176.111 AND USE THE VUID TO LOOK UP THE RXNORM
     26 ; CODE FROM 176.001 (RXNORM CONCEPTS)
     27 ; POPULATE ALL FIELDS IN 176.112 AND SET "NEW" TO "Y" IF 176.111 DOES NOT
     28 ; ALREADY HAVE AN RXNORM CODE.
     29 ; 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
     31 ; "DIFFERENT TEXT" FIELD TO "Y" IF THERE ARE DIFFERENCES
     32 ; USES SUPPORT ROUTINES FROM C0CRNF.m
     33 N C0CFDA,C0CA,C0CB,C0CZX ;FDA WORK ARRAY, RNF ARRAYS, AND IEN ITERATOR
     34 N C0CFVA,C0CFRXN ; CLOSED ROOTS FOR SOURCE FILES
     35 N C0CF ; CLOSED ROOT FOR DESTINATION FILE
     36 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=
     42 Q
     43 ;
     44SETFDA(C0CSN,C0CSV) ; INTERNAL ROUTINE TO MAKE AN FDA ENTRY FOR FIELD C0CSN
     45 ; TO SET TO VALUE C0CSV.
     46 ; C0CFDA,C0CA,C0CZX ARE ASSUMED FROM THE CALLING ROUTINE
     47 ; C0CSN,C0CSV ARE PASSED BY VALUE
     48 ;
     49 N C0CSI,C0CSJ
     50 S C0CSI=$$ZFILE(C0CSN,"C0CA") ; FILE NUMBER
     51 S C0CSJ=$$ZFIELD(C0CSN,"C0CA") ; FIELD NUMBER
     52 S C0CFDA(C0CZX,C0CSI,C0CZX_",",C0CSJ)=C0CSV
     53 Q
     54ZFILE(ZFN,ZTAB) ; EXTRINSIC TO RETURN FILE NUMBER FOR FIELD NAME PASSED
     55 ; BY VALUE IN ZFN. FILE NUMBER IS PIECE 1 OF C0CA(ZFN)
     56 ; IF ZTAB IS NULL, IT DEFAULTS TO C0CA
     57 I '$D(ZTAB) S ZTAB="C0CA"
     58 Q $P(@ZTAB@(ZFN),"^",1)
     59ZFIELD(ZFN,ZTAB) ;EXTRINSIC TO RETURN FIELD NUMBER FOR FIELD NAME PASSED
     60 ; BY VALUE IN ZFN. FILE NUMBER IS PIECE 2 OF C0CA(ZFN)
     61 ; IF ZTAB IS NULL, IT DEFAULTS TO C0CA
     62 I '$D(ZTAB) S ZTAB="C0CA"
     63 Q $P(@ZTAB@(ZFN),"^",2)
     64ZVALUE(ZFN,ZTAB) ;EXTRINSIC TO RETURN VALUE FOR FIELD NAME PASSED
     65 ; BY VALUE IN ZFN. FILE NUMBER IS PIECE 3 OF C0CA(ZFN)
     66 ; IF ZTAB IS NULL, IT DEFAULTS TO C0CA
     67 I '$D(ZTAB) S ZTAB="C0CA"
     68 Q $P(@ZTAB@(ZFN),"^",3)
     69 ;
Note: See TracChangeset for help on using the changeset viewer.