Changeset 136
- Timestamp:
- Sep 4, 2008, 10:44:39 AM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLCCR.m
r135 r136 45 45 N ZY 46 46 S ZY=$$OUTPUT^GPLXPATH(OARY,ONAM,ODIR) 47 W $P(ZY,U,2)47 W !,$P(ZY,U,2) 48 48 Q 49 49 ; -
ccr/trunk/p/GPLMEDS.m
r135 r136 60 60 . S @MEDVMAP@("MEDOBJECTID")="MED"_ZI ; UNIQUE OBJID FOR MEDS 61 61 . S @MEDVMAP@("MEDISSUEDATETXT")=$$FMDTOUTC^CCRUTIL($P(MEDPTMP,"^",11),"DT") ; GETS LAST FILL DATE 62 . S @MEDVMAP@("MEDISSUEDATE")="" 63 . S @MEDVMAP@("MEDLASTFILLDATETXT")="" 64 . S @MEDVMAP@("MEDLASTFILLDATE")="" 65 . S @MEDVMAP@("MEDRXNOTXT")="" 66 . S @MEDVMAP@("MEDRXNO")="" 67 . S @MEDVMAP@("MEDDETAILUNADORNED")="" 68 . S @MEDVMAP@("MEDCONCVALUE")="" 69 . S @MEDVMAP@("MEDCONCUNIT")="" 70 . S @MEDVMAP@("MEDSIZETEXT")="" 71 . S @MEDVMAP@("MEDDOSEINDICATOR")="" 72 . S @MEDVMAP@("MEDDELIVERYMETHOD")="" 73 . S @MEDVMAP@("MEDRATEVALUE")="" 74 . S @MEDVMAP@("MEDRATEUNIT")="" 75 . S @MEDVMAP@("MEDVEHICLETEXT")="" 76 . S @MEDVMAP@("MEDFREQUENCYUNIT")="" 77 . S @MEDVMAP@("MEDINTERVALVALUE")="" 78 . S @MEDVMAP@("MEDINTERVALUNIT")="" 79 . S @MEDVMAP@("MEDPRNFLAG")="" 80 . S @MEDVMAP@("MEDPROBLEMOBJECTID")="" 81 . S @MEDVMAP@("PROBLEM")="" 82 . S @MEDVMAP@("MEDPROBLEMDESCRIPTION")="" 83 . S @MEDVMAP@("MEDPROBLEMCODEVALUE")="" 84 . S @MEDVMAP@("MEDPROBLEMCODINGSYSTEM")="" 85 . S @MEDVMAP@("MEDPROBLEMCODINGVERSION")="" 86 . S @MEDVMAP@("MEDPROBLEMSOURCEACTORID")="" 87 . S @MEDVMAP@("MEDSTOPINDICATOR")="" 88 . S @MEDVMAP@("MEDDIRSEQ")="" 89 . S @MEDVMAP@("MEDMULDIRMOD")="" 90 . S @MEDVMAP@("MEDPTINSTRUCTIONS")="" 91 . S @MEDVMAP@("MEDFULLFILLMENTINSTRUCTIONS")="" 62 92 . S @MEDVMAP@("MEDDATETIMEAGE")="" 63 93 . S @MEDVMAP@("MEDDATETIMEAGEUNITS")="" … … 66 96 . S @MEDVMAP@("MEDSOURCEACTORID")="ACTORSYSTEM_1" 67 97 . S @MEDVMAP@("MEDPRODUCTNAMETEXT")=$P(MEDPTMP,"^",3) 68 . S @MEDVMAP@("MEDPRODUCTNAMECODEVALUE")="" 98 . S @MEDVMAP@("MEDPRODUCTNAMECODEVALUE")="" ; DEFAULT VALUE 69 99 . S @MEDVMAP@("MEDPRODUCTNAMECODINGINGSYSTEM")="" 70 100 . S @MEDVMAP@("MEDPRODUCTNAMECODEVERSION")="" 101 . I $P(MEDPTMP,U,1)?1"~OP" D ; IS OUTPATIENT, MIGHT HAVE CODE 102 . . I $P(MEDPTMP,"^",10)="ACTIVE" D ; ONLY ACTIVE MEDS HAVE CODES 103 . . . N RXIEN ; IEN TO RX, EXAMPLE "~OP^13R;O^IBUPROFEN 400MG^" 13 IS IT 104 . . . S RXIEN=$$DIGITS($P($P(MEDPTMP,U,2),";",1)) ; GET JUST LEADING DIGITS 105 . . . I DEBUG W "RXIEN=",RXIEN,! ; 106 . . . D RX^PSO52API(DFN,"MEDCODE",RXIEN) ; EXTRACT THE RX RECORD TO ^TMP 107 . . . I $D(^TMP($J,"MEDCODE",DFN,RXIEN,27)) D ; IF SUCCESS 108 . . . . S @MEDVMAP@("MEDPRODUCTNAMECODEVALUE")=^TMP($J,"MEDCODE",DFN,RXIEN,27) 109 . . . . S @MEDVMAP@("MEDPRODUCTNAMECODINGINGSYSTEM")="NDC" 71 110 . S @MEDVMAP@("MEDBRANDNAMETEXT")="" 72 111 . S @MEDVMAP@("MEDBRANDNAMECODEVALUE")="" … … 111 150 Q 112 151 ; 152 DIGITS(INSTR) ; RETURN JUST THE LEADING DIGITS OF THE STRING 153 ; EXAMPLE: $$DIGITS("13R") RETURNS 13 154 N ALPHA ; CONTANT TO HOLD ALL ALPHA CHARACTERS 155 S ALPHA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" ; ALPHAS 156 Q $TR(INSTR,ALPHA) ; LEAVE ONLY THE DIGITS 157 ; -
ccr/trunk/p/GPLPROBS.m
r135 r136 48 48 . S @VMAP@("PROBLEMSTATUS")=$P(PTMP,U,2) 49 49 . S @VMAP@("PROBLEMDESCRIPTION")=$P(PTMP,U,3) 50 . S @VMAP@("PROBLEMCODINGVERSION")="" 50 51 . S @VMAP@("PROBLEMCODEVALUE")=$P(PTMP,U,4) 51 52 . S @VMAP@("PROBLEMDATEOFONSET")=$P(PTMP,U,5)
Note:
See TracChangeset
for help on using the changeset viewer.