- Timestamp:
- Oct 7, 2008, 11:48:02 AM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/CCRMEDS.m
r191 r192 34 34 ; ALL OTHERS HERE 35 35 S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDMAP")) 36 K @MEDTVMAP ; CLEAR VARIABLE ARRAY 36 37 S @MEDTVMAP@(0)=0 ; INITIALIZE NUMBER OF MEDS PROCESSED 37 38 S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP")) 39 K @MEDTARYTMP ; KILL XML ARRAY 38 40 D EXTRACT^CCRMEDS1(MEDXML,DFN,MEDOUTXML) ; FIRST EXTRACT OUTPATIENT MEDS 39 41 I @MEDOUTXML@(0)>0 D ; CCRMEDS FOUND ACTIVE OP MEDS … … 88 90 . S MEDPTMP=MEDRSLT(ZJ) ; PULL OUT FIRST LINE OF MED 89 91 . I $P(MEDPTMP,U,1)?1"~OP" Q ; SKIP OP ACTIVE AND PENDING 92 . S @MEDTVMAP@(0)=@MEDTVMAP@(0)+1 ; ADDING A MED HERE 90 93 . S @MEDVMAP@("MEDOBJECTID")="MED"_(ZI+MEDCNT) ; UNIQUE OBJID FOR MEDS 91 94 . I $P(MEDPTMP,"^",11)="" S @MEDVMAP@("MEDISSUEDATETXT")="" -
ccr/trunk/p/CCRMEDS1.m
r186 r192 46 46 N RXIEN S RXIEN=0 47 47 N MEDCOUNT S MEDCOUNT=0 48 S MEDMAP=$NA(^TMP("GPLCCR",$J,"MEDMAP")) ; THIS IS THE VARIABLE MAP 49 S MEDCOUNT=@MEDMAP@(0) ; ACCOUNT FOR MEDS ALREADY IN ARRAY 48 50 F S RXIEN=$O(MEDS(RXIEN)) Q:RXIEN="" D ; FOR EACH MEDICATION IN THE LIST 49 51 . S MEDCOUNT=MEDCOUNT+1 50 52 . I DEBUG W "RXIEN IS ",RXIEN,! 51 53 . S MAP=$NA(^TMP("GPLCCR",$J,"MEDMAP",MEDCOUNT)) 52 . K @MAP 54 . ; K @MAP DO NOT KILL HERE, WAS CLEARED IN CCRMEDS 55 . S @MEDMAP@(0)=@MEDMAP@(0)+1 ; INCREMENT TOTAL MEDS IN VAR ARRAY 53 56 . I DEBUG W "MAP= ",MAP,! 54 57 . N MED M MED=MEDS(RXIEN) ; PULL OUT MEDICATION FROM 55 . S @MAP@("MEDOBJECTID")="MED"_MED(.01) ;Rx Number 58 . S @MAP@("MEDOBJECTID")="MED"_MEDCOUNT ; MEDCOUNT FOR ID 59 . ; S @MAP@("MEDOBJECTID")="MED"_MED(.01) ;Rx Number 56 60 . S @MAP@("MEDISSUEDATETXT")="Issue Date" 57 61 . S @MAP@("MEDISSUEDATE")=$$FMDTOUTC^CCRUTIL($P(MED(1),U)) -
ccr/trunk/p/CCRMEDS2.m
r188 r192 49 49 N RXIEN S RXIEN=0 50 50 N MEDCOUNT S MEDCOUNT=0 51 S MEDMAP=$NA(^TMP("GPLCCR",$J,"MEDMAP")) ; THIS IS THE VARIABLE MAP 52 S MEDCOUNT=@MEDMAP@(0) ; ACCOUNT FOR MEDS ALREADY IN ARRAY 51 53 F S RXIEN=$O(MEDS(RXIEN)) Q:RXIEN="B" D ; FOR EACH MEDICATION IN THE LIST 52 54 . I $$GET1^DIQ(52.41,RXIEN,2,"I")="RF" QUIT ; Dont' want refill request as a "pending" order … … 54 56 . I DEBUG W "RXIEN IS ",RXIEN,! 55 57 . S MAP=$NA(^TMP("GPLCCR",$J,"MEDMAP",MEDCOUNT)) 56 . K @MAP 58 . ; K @MAP DON'T KILL MAP HERE, IT IS DONE IN CCRMEDS 59 . S @MEDMAP@(0)=@MEDMAP@(0)+1 ; INCREMENT TOTAL MEDS IN VAR ARRAY 57 60 . I DEBUG W "MAP= ",MAP,! 58 61 . N MED M MED=MEDS(RXIEN) ; PULL OUT MEDICATION FROM 59 . S @MAP@("MEDOBJECTID")="MED_PENDING"_MED(.01) ;Pending IEN 62 . S @MAP@("MEDOBJECTID")="MED_PENDING"_MEDCOUNT ; MEDCOUNT FOR ID 63 . ; S @MAP@("MEDOBJECTID")="MED_PENDING"_MED(.01) ;Pending IEN 60 64 . S @MAP@("MEDISSUEDATETXT")="Issue Date" 61 65 . ; Field 6 is "Effective date", and we pull it in timson format w/ I
Note:
See TracChangeset
for help on using the changeset viewer.