Changeset 593
- Timestamp:
- Nov 3, 2009, 2:29:36 PM (15 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/C0CMED6.m
r508 r593 41 41 ; -- DAYS is passed by value (optional; if not passed defaults to 365) 42 42 ; 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) 47 49 ; 48 50 N MEDS,MEDS1,MAP … … 74 76 . S @MAP@("MEDOBJECTID")="MED"_MEDCNT ; MEDCNT FOR ID 75 77 . S @MAP@("MEDISSUEDATETXT")="Issue Date" 76 . S @MAP@("MEDISSUEDATE")=$$FMDTOUTC^C0CUTIL($P(MEDS(MEDCNT),U,1 3))78 . S @MAP@("MEDISSUEDATE")=$$FMDTOUTC^C0CUTIL($P(MEDS(MEDCNT),U,15)) 77 79 . S @MAP@("MEDLASTFILLDATETXT")="Last Fill Date" 78 80 . S @MAP@("MEDLASTFILLDATE")=$$FMDTOUTC^C0CUTIL($P(MEDS(MEDCNT),U,11)) 79 81 . S @MAP@("MEDRXNOTXT")="Prescription Number" 80 . S @MAP@("MEDRXNO")=$P(MEDS(MEDCNT),U,1 4)82 . S @MAP@("MEDRXNO")=$P(MEDS(MEDCNT),U,16) 81 83 . S @MAP@("MEDTYPETEXT")="Medication" 82 84 . S @MAP@("MEDDETAILUNADORNED")="" ; Leave blank, field has its uses -
ccr/trunk/p/C0CRXNRD.m
r582 r593 3 3 W "No entry from top" Q 4 4 ; 5 DELFILED(FN ,ERR) ; Delete file data; PEP procedure; READ WARNING5 DELFILED(FN) ; Delete file data; PEP procedure; only for RxNorm files 6 6 ; 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 12 8 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 19 11 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! 22 14 QUIT 23 15 GETLINES(PATH,FILENAME) ; Get number of lines in a file … … 31 23 I PATH="" QUIT 32 24 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 36 26 N LINES S LINES=$$GETLINES(PATH,FILENAME) 37 27 D OPEN^%ZISH("FILE",PATH,FILENAME,"R") … … 72 62 I PATH="" QUIT 73 63 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 77 65 N LINES S LINES=$$GETLINES(PATH,FILENAME) 78 66 D OPEN^%ZISH("FILE",PATH,FILENAME,"R") … … 99 87 I PATH="" QUIT 100 88 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 104 90 D OPEN^%ZISH("FILE",PATH,FILENAME,"R") 105 91 IF POP W "Error reading file..., Please check...",! G EX3 -
ccr/trunk/p/C0C_1_0.txt
r517 r593 113 113 114 114 It 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.