Changeset 593 for ccr


Ignore:
Timestamp:
Nov 3, 2009, 2:29:36 PM (15 years ago)
Author:
Sam Habiel
Message:

updated RPMS Meds...; still working on RxNorm

Location:
ccr/trunk/p
Files:
3 edited

Legend:

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

    r508 r593  
    4141 ; -- DAYS is passed by value (optional; if not passed defaults to 365)
    4242 ;
    43  ; Return:
    44  ; ~Type^PharmID^Drug^InfRate^StopDt^RefRem^TotDose^UnitDose^OrderID
    45  ; ^Status^LastFill^Chronic^Issued^Rx #^Provider^
    46  ; Status Reason^DEA Handling
     43 ; Return: 
     44 ;    ~Type(1)^PharmID(2)^Drug(3)^InfRate(4)^StopDt(5)^RefRem(6)^
     45 ;    TotDose(7)^UnitDose(8)^OrderID(9)^Status(10)^LastFill(11)^
     46 ;    Days Supply(12)^Quantity(13)^Chronic(14)^Issued(15)^
     47 ;    Rx #(16)^Provider(17)^Status Reason(18)^DEA Handling(19)^
     48 ;    Pharmacy Site(20)
    4749 ;
    4850 N MEDS,MEDS1,MAP
     
    7476 . S @MAP@("MEDOBJECTID")="MED"_MEDCNT ; MEDCNT FOR ID
    7577 . S @MAP@("MEDISSUEDATETXT")="Issue Date"
    76  . S @MAP@("MEDISSUEDATE")=$$FMDTOUTC^C0CUTIL($P(MEDS(MEDCNT),U,13))
     78 . S @MAP@("MEDISSUEDATE")=$$FMDTOUTC^C0CUTIL($P(MEDS(MEDCNT),U,15))
    7779 . S @MAP@("MEDLASTFILLDATETXT")="Last Fill Date"
    7880 . S @MAP@("MEDLASTFILLDATE")=$$FMDTOUTC^C0CUTIL($P(MEDS(MEDCNT),U,11))
    7981 . S @MAP@("MEDRXNOTXT")="Prescription Number"
    80  . S @MAP@("MEDRXNO")=$P(MEDS(MEDCNT),U,14)
     82 . S @MAP@("MEDRXNO")=$P(MEDS(MEDCNT),U,16)
    8183 . S @MAP@("MEDTYPETEXT")="Medication"
    8284 . S @MAP@("MEDDETAILUNADORNED")=""  ; Leave blank, field has its uses
  • ccr/trunk/p/C0CRXNRD.m

    r582 r593  
    33 W "No entry from top" Q
    44 ;
    5 DELFILED(FN,ERR) ; Delete file data; PEP procedure; READ WARNING
     5DELFILED(FN) ; Delete file data; PEP procedure; only for RxNorm files
    66 ; FN is Filenumber passed by Value
    7  ; ERR is error info, passed by reference
    8  ; If ERR is 1, then the operation failed.
    9  ; WARNING: THIS IS VERY DANGEROUS OPERATION
    10  ; I DON'T EVEN CHECK THE DEL NODE ON THE FILE!!!!
    11  ;
     7 QUIT:$E(FN,1,3)'=176  ; Quit if not RxNorm files
    128 D CLEAN^DILF ; Clean FM variables
    13  N C0CFINFO ; File info
    14  D FILE^DID(FN,"","GLOBAL NAME","C0CROOT") ; Get file info
    15  I $D(DIERR) D EN^DDIOL("Error...") S ERR=1 QUIT
    16  N ROOT2 S ROOT2=C0CROOT("GLOBAL NAME") ; Open global root
    17  N CLROOT S CLROOT=$$CREF^DILF(ROOT2) ; Closed Root
    18  N ZERO S ZERO=@CLROOT@(0) ; Save zero node
     9 N ROOT S ROOT=$$ROOT^DILFD(FN,"",1) ; global root
     10 N ZERO S ZERO=@ROOT@(0) ; Save zero node
    1911 S $P(ZERO,U,3,9999)="" ; Remove entry # and last edited
    20  K @CLROOT ; Kill the file -- so sad!
    21  S @CLROOT@(0)=ZERO ; It riseth again!
     12 K @ROOT ; Kill the file -- so sad!
     13 S @ROOT@(0)=ZERO ; It riseth again!
    2214 QUIT
    2315GETLINES(PATH,FILENAME) ; Get number of lines in a file
     
    3123 I PATH="" QUIT
    3224 N FILENAME S FILENAME="RXNCONSO.RRF"
    33  N ERR
    34  D DELFILED(176.001,.ERR) ; delete data
    35  IF $G(ERR) D EN^DDIOL("Couldn't delete file") G EX
     25 D DELFILED(176.001) ; delete data
    3626 N LINES S LINES=$$GETLINES(PATH,FILENAME)
    3727 D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
     
    7262 I PATH="" QUIT
    7363 N FILENAME S FILENAME="RXNSAT.RRF"
    74  N ERR
    75  D DELFILED(176.002,.ERR) ; delete data
    76  IF $G(ERR) D EN^DDIOL("Couldn't delete file") G EX2
     64 D DELFILED(176.002) ; delete data
    7765 N LINES S LINES=$$GETLINES(PATH,FILENAME)
    7866 D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
     
    9987 I PATH="" QUIT
    10088 N FILENAME S FILENAME="RXNSAB.RRF"
    101  N ERR
    102  D DELFILED(176.003,.ERR) ; delete data
    103  IF $G(ERR) D EN^DDIOL("Couldn't delete file") G EX2
     89 D DELFILED(176.003) ; delete data
    10490 D OPEN^%ZISH("FILE",PATH,FILENAME,"R")
    10591 IF POP W "Error reading file..., Please check...",! G EX3
  • ccr/trunk/p/C0C_1_0.txt

    r517 r593  
    113113
    114114It is intended that menu interfaces be provided in addition to command line interfaces for all package functions.
    115 
    116 
    117 
    118 
    119 
Note: See TracChangeset for help on using the changeset viewer.