Changeset 1586 for ccr/trunk/p/C0CNMED4.m
- Timestamp:
- Oct 30, 2012, 1:11:02 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/C0CNMED4.m
r1544 r1586 1 1 C0CNMED4 ; WV/CCDCCR/SMH/gpl - CCR/CCD PROCESSING FOR MEDICATIONS - Inpatient Meds/Unit Dose ;10/13/08 ; 5/10/12 2:54pm 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. 5 ; 6 ; This program is free software; you can redistribute it and/or modify 7 ; it under the terms of the GNU General Public License as published by 8 ; the Free Software Foundation; either version 2 of the License, or 9 ; (at your option) any later version. 2 ;;1.2;CCD/CCR GENERATION UTILITIES;;Oct 30, 2012;Build 50 3 ; Copyright 2008 WorldVistA. 4 ; 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. 15 ; 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. 13 ; GNU Affero General Public License for more details. 14 ; 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",! … … 58 56 IF ZCOUNT=0 Q ; no inpatient meds 59 57 ;M MEDS=^TMP($J,"UD") 60 I DEBUG ZWR MEDS61 S MEDMAP=$NA(^TMP("C0CCCR",$J,"MEDMAP")) 58 ;I DEBUG ZWR MEDS 59 S MEDMAP=$NA(^TMP("C0CCCR",$J,"MEDMAP")) 62 60 ;N MEDCOUNT S MEDCOUNT=@MEDMAP@(0) ; We already have meds in the array 63 61 S C0CMFLAG=$$GET^C0CPARMS("MEDALL")_"^"_$$GET^C0CPARMS("MEDLIMIT")_"^"_$$GET^C0CPARMS("MEDACTIVE")_"^"_$$GET^C0CPARMS("MEDPENDING") ;SETTING FLAG 64 N I S I=0 62 N I S I=0 65 63 F S I=$O(MEDS("med",I)) Q:'I D ; For each medication 66 64 . ;OHUM/RUT 3120507 ;STATUS VALIDATION FOR INPATIENT 67 68 69 70 71 72 65 . I ($P(C0CMFLAG,"^",1)'=1) D 66 . . I ($P(C0CMFLAG,"^",3)=1)&(MEDS("med",I,"vaStatus@value")'="ACTIVE") D 67 . . . K MEDS("med",I) Q 68 . . I ($P(C0CMFLAG,"^",4)=1)&(MEDS("med",I,"vaStatus@value")'="PENDING") D 69 . . . K MEDS("med",I) Q 70 . ;OHUM/RUT 73 71 . N MED M MED=MEDS("med",I) 74 72 . I $G(MED("vaType@value"))'="I" Q ; not inpatient … … 80 78 . I DEBUG W "RXIEN IS ",RXIEN,! 81 79 . I DEBUG W "MAP= ",MAP,! 82 . S @MAP@("MEDOBJECTID")="MED_INPATIENT_UD"_RXIEN 80 . S @MAP@("MEDOBJECTID")="MED_INPATIENT_UD"_RXIEN 83 81 . S @MAP@("MEDISSUEDATETXT")="Order Date" 84 82 . ;S @MAP@("MEDISSUEDATE")=$$FMDTOUTC^C0CUTIL($P(MED(27),U),"DT") … … 174 172 . S @MAP@("M","DIRECTIONS",1,"MEDDOSEVALUE")="" 175 173 . S @MAP@("M","DIRECTIONS",1,"MEDDOSEUNIT")="" 176 . S @MAP@("M","DIRECTIONS",1,"MEDRATEVALUE")="" 177 . S @MAP@("M","DIRECTIONS",1,"MEDRATEUNIT")="" 178 . S @MAP@("M","DIRECTIONS",1,"MEDVEHICLETEXT")="" 174 . S @MAP@("M","DIRECTIONS",1,"MEDRATEVALUE")="" 175 . S @MAP@("M","DIRECTIONS",1,"MEDRATEUNIT")="" 176 . S @MAP@("M","DIRECTIONS",1,"MEDVEHICLETEXT")="" 179 177 . S @MAP@("M","DIRECTIONS",1,"MEDDIRECTIONROUTETEXT")="" 180 178 . S @MAP@("M","DIRECTIONS",1,"MEDFREQUENCYVALUE")="" … … 191 189 . S @MAP@("M","DIRECTIONS",1,"MEDPROBLEMCODINGVERSION")="" 192 190 . S @MAP@("M","DIRECTIONS",1,"MEDPROBLEMSOURCEACTORID")="" 193 . S @MAP@("M","DIRECTIONS",1,"MEDSTOPINDICATOR")="" 191 . S @MAP@("M","DIRECTIONS",1,"MEDSTOPINDICATOR")="" 194 192 . S @MAP@("M","DIRECTIONS",1,"MEDDIRSEQ")="" 195 193 . S @MAP@("M","DIRECTIONS",1,"MEDMULDIRMOD")=""
Note:
See TracChangeset
for help on using the changeset viewer.