Changeset 320 for ccr


Ignore:
Timestamp:
Jan 11, 2009, 12:51:09 AM (16 years ago)
Author:
George Lilly
Message:

Initial Stab at RPMS meds

Location:
ccr/trunk/p
Files:
1 added
1 edited

Legend:

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

    r312 r320  
    6868 D CLOSE^%ZISH("FILE")
    6969 U $P ; reset back to principle device
    70  Q
    71  ;
    72 READSRC(PATH) ; Open the read RxNorm Sources file: RXNSAB.RRF
    73  I PATH="" QUIT
    74  N FILENAME S FILENAME="RXNSAB.RRF"
    75  D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
    76  IF POP W "Error reading file..., Please check...",! BREAK
    77  F I=1:1 Q:$$STATUS^%ZISH  D
    78  . U IO
    79  . N LINE R LINE
    80  . IF $$STATUS^%ZISH QUIT
    81  . U $P W I,! U IO  ; Write I to the screen, then go back to reading the file
    82  . N VCUI,RCUI,VSAB,RSAB,SON,SF,SVER,SCIT ; Fileman fields numbers below
    83  . S VCUI=$P(LINE,"|",1)        ; .01
    84  . S RCUI=$P(LINE,"|",2)        ; 2
    85  . S VSAB=$P(LINE,"|",3)        ; 3
    86  . S RSAB=$P(LINE,"|",4)        ; 4
    87  . S SON=$P(LINE,"|",5)         ; 5
    88  . S SF=$P(LINE,"|",6)          ; 6
    89  . S SVER=$P(LINE,"|",7)        ; 7
    90  . S SCIT=$P(LINE,"|",25)       ; 25
    91  . ; Remove embedded "^"
    92  . S SCIT=$TR(SCIT,"^")
    93  . ; Convert SCIT into an array of 80 characters on each line
    94  . ; In each line, chop 80 characters off, reset SCIT to be the rest
    95  . N SCITLINE S SCITLINE=$L(SCIT)\80+1
    96  . F J=1:1:SCITLINE S SCIT(J)=$E(SCIT,1,80) S SCIT=$E(SCIT,81,$L(SCIT))
    97  . ; Now, construct the FDA array
    98  . N RXNFDA
    99  . S RXNFDA(176.003,"+"_I_",",.01)=VCUI
    100  . S RXNFDA(176.003,"+"_I_",",2)=RCUI
    101  . S RXNFDA(176.003,"+"_I_",",3)=VSAB
    102  . S RXNFDA(176.003,"+"_I_",",4)=RSAB
    103  . S RXNFDA(176.003,"+"_I_",",5)=SON
    104  . S RXNFDA(176.003,"+"_I_",",6)=SF
    105  . S RXNFDA(176.003,"+"_I_",",7)=SVER
    106  . D UPDATE^DIE("","RXNFDA")
    107  . I $D(^TMP("DIERR",$J)) U $P BREAK
    108  . ; Now, file WP field SCIT
    109  . D WP^DIE(176.003,I_",",25,,$NA(SCIT))
    110  D CLOSE^%ZISH("FILE")
    111  Q
    11270
     71
Note: See TracChangeset for help on using the changeset viewer.