Changeset 192 for ccr


Ignore:
Timestamp:
Oct 7, 2008, 11:48:02 AM (16 years ago)
Author:
George Lilly
Message:

MEDS DEBUGGING

Location:
ccr/trunk/p
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/CCRMEDS.m

    r191 r192  
    3434 ; ALL OTHERS HERE
    3535 S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDMAP"))
     36 K @MEDTVMAP ; CLEAR VARIABLE ARRAY
    3637 S @MEDTVMAP@(0)=0 ; INITIALIZE NUMBER OF MEDS PROCESSED
    3738 S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP"))
     39 K @MEDTARYTMP ; KILL XML ARRAY
    3840 D EXTRACT^CCRMEDS1(MEDXML,DFN,MEDOUTXML) ; FIRST EXTRACT OUTPATIENT MEDS
    3941 I @MEDOUTXML@(0)>0 D  ; CCRMEDS FOUND ACTIVE OP MEDS
     
    8890 . S MEDPTMP=MEDRSLT(ZJ) ; PULL OUT FIRST LINE OF MED
    8991 . I $P(MEDPTMP,U,1)?1"~OP" Q  ; SKIP OP ACTIVE AND PENDING
     92 . S @MEDTVMAP@(0)=@MEDTVMAP@(0)+1 ; ADDING A MED HERE
    9093 . S @MEDVMAP@("MEDOBJECTID")="MED"_(ZI+MEDCNT) ; UNIQUE OBJID FOR MEDS
    9194 . I $P(MEDPTMP,"^",11)="" S @MEDVMAP@("MEDISSUEDATETXT")=""
  • ccr/trunk/p/CCRMEDS1.m

    r186 r192  
    4646 N RXIEN S RXIEN=0
    4747 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
    4850 F  S RXIEN=$O(MEDS(RXIEN)) Q:RXIEN=""  D  ; FOR EACH MEDICATION IN THE LIST
    4951 . S MEDCOUNT=MEDCOUNT+1
    5052 . I DEBUG W "RXIEN IS ",RXIEN,!
    5153 . 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
    5356 . I DEBUG W "MAP= ",MAP,!
    5457 . 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
    5660 . S @MAP@("MEDISSUEDATETXT")="Issue Date"
    5761 . S @MAP@("MEDISSUEDATE")=$$FMDTOUTC^CCRUTIL($P(MED(1),U))
  • ccr/trunk/p/CCRMEDS2.m

    r188 r192  
    4949 N RXIEN S RXIEN=0
    5050 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
    5153 F  S RXIEN=$O(MEDS(RXIEN)) Q:RXIEN="B"  D  ; FOR EACH MEDICATION IN THE LIST
    5254 . I $$GET1^DIQ(52.41,RXIEN,2,"I")="RF" QUIT  ; Dont' want refill request as a "pending" order
     
    5456 . I DEBUG W "RXIEN IS ",RXIEN,!
    5557 . 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
    5760 . I DEBUG W "MAP= ",MAP,!
    5861 . 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
    6064 . S @MAP@("MEDISSUEDATETXT")="Issue Date"
    6165 . ; Field 6 is "Effective date", and we pull it in timson format w/ I
Note: See TracChangeset for help on using the changeset viewer.