Changeset 1586 for ccr/trunk/p/C0CMED4.m
- Timestamp:
- Oct 30, 2012, 1:11:02 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/C0CMED4.m
r1544 r1586 1 1 C0CMED4 ; WV/CCDCCR/SMH - CCR/CCD PROCESSING FOR MEDICATIONS - Inpatient Meds/Unit Dose ;10/13/08 ; 5/10/12 2:38pm 2 ;;1.2;C0C;;May 11, 2012;Build 47 3 ; Copyright 2008 WorldVistA. Licensed under the terms of the GNU 4 ; General Public License See attached copy of the License. 2 ;;1.2;CCD/CCR GENERATION UTILITIES;;Oct 30, 2012;Build 50 3 ; Copyright 2008 WorldVistA. 5 4 ; 6 ; This program is free software ;you can redistribute it and/or modify7 ; it under the terms of the GNU General Public License as published by8 ; the Free Software Foundation; either version 2 of the License, or9 ; (at your option) any later version.5 ; This program is free software: you can redistribute it and/or modify 6 ; it under the terms of the GNU Affero General Public License as 7 ; published by the Free Software Foundation, either version 3 of the 8 ; License, or (at your option) any later version. 10 9 ; 11 10 ; This program is distributed in the hope that it will be useful, 12 11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 13 12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 ; GNU General Public License for more details.13 ; GNU Affero General Public License for more details. 15 14 ; 16 ; You should have received a copy of the GNU General Public License along 17 ; with this program; if not, write to the Free Software Foundation, Inc., 18 ; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 15 ; You should have received a copy of the GNU Affero General Public License 16 ; along with this program. If not, see <http://www.gnu.org/licenses/>. 19 17 ; 20 18 W "NO ENTRY FROM TOP",! … … 49 47 ; Otherwise, we go on... 50 48 M MEDS=^TMP($J,"UD") 51 I DEBUG ZWR MEDS52 S MEDMAP=$NA(^TMP("GPLCCR",$J,"MEDMAP")) 49 ; I DEBUG ZWR MEDS 50 S MEDMAP=$NA(^TMP("GPLCCR",$J,"MEDMAP")) 53 51 N MEDCOUNT S MEDCOUNT=@MEDMAP@(0) ; We already have meds in the array 54 N I S I=0 52 N I S I=0 55 53 F S I=$O(MEDS("B",I)) Q:'I D ; For each medication in B index 56 54 . N MED M MED=MEDS(I) … … 61 59 . I DEBUG W "RXIEN IS ",RXIEN,! 62 60 . I DEBUG W "MAP= ",MAP,! 63 . S @MAP@("MEDOBJECTID")="MED_INPATIENT_UD"_RXIEN 61 . S @MAP@("MEDOBJECTID")="MED_INPATIENT_UD"_RXIEN 64 62 . S @MAP@("MEDISSUEDATETXT")="Order Date" 65 63 . S @MAP@("MEDISSUEDATE")=$$FMDTOUTC^C0CUTIL($P(MED(27),U),"DT") … … 70 68 . S @MAP@("MEDTYPETEXT")="Medication" 71 69 . S @MAP@("MEDDETAILUNADORNED")="" ; Leave blank, field has its uses 72 . S @MAP@("MEDSTATUSTEXT")="ACTIVE" 70 . S @MAP@("MEDSTATUSTEXT")="ACTIVE" 73 71 . S @MAP@("MEDSOURCEACTORID")="ACTORPROVIDER_"_$P(MED(1),U) 74 72 . S @MAP@("MEDPRODUCTNAMETEXT")=MED("DDRUG",1,.01) … … 114 112 . . N QTYDATA M QTYDATA=^TMP($J,"QTY",MEDIEN) 115 113 . . S @MAP@("MEDQUANTITYUNIT")=QTYDATA(14.5) 116 114 . E S @MAP@("MEDQUANTITYUNIT")="" 117 115 . ; 118 116 . ; --- START OF DIRECTIONS --- … … 126 124 . S @MAP@("M","DIRECTIONS",1,"MEDDOSEVALUE")="" 127 125 . S @MAP@("M","DIRECTIONS",1,"MEDDOSEUNIT")="" 128 . S @MAP@("M","DIRECTIONS",1,"MEDRATEVALUE")="" 129 . S @MAP@("M","DIRECTIONS",1,"MEDRATEUNIT")="" 130 . S @MAP@("M","DIRECTIONS",1,"MEDVEHICLETEXT")="" 126 . S @MAP@("M","DIRECTIONS",1,"MEDRATEVALUE")="" 127 . S @MAP@("M","DIRECTIONS",1,"MEDRATEUNIT")="" 128 . S @MAP@("M","DIRECTIONS",1,"MEDVEHICLETEXT")="" 131 129 . S @MAP@("M","DIRECTIONS",1,"MEDDIRECTIONROUTETEXT")="" 132 130 . S @MAP@("M","DIRECTIONS",1,"MEDFREQUENCYVALUE")="" … … 143 141 . S @MAP@("M","DIRECTIONS",1,"MEDPROBLEMCODINGVERSION")="" 144 142 . S @MAP@("M","DIRECTIONS",1,"MEDPROBLEMSOURCEACTORID")="" 145 . S @MAP@("M","DIRECTIONS",1,"MEDSTOPINDICATOR")="" 143 . S @MAP@("M","DIRECTIONS",1,"MEDSTOPINDICATOR")="" 146 144 . S @MAP@("M","DIRECTIONS",1,"MEDDIRSEQ")="" 147 145 . S @MAP@("M","DIRECTIONS",1,"MEDMULDIRMOD")=""
Note:
See TracChangeset
for help on using the changeset viewer.