Changeset 81


Ignore:
Timestamp:
Jul 30, 2008, 3:11:28 PM (16 years ago)
Author:
Christopher Edwards
Message:

fix infinite loop bug if more than one med

File:
1 edited

Legend:

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

    r79 r81  
    3232          S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDICATIONS"))
    3333          S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP"))
    34           F J=1:1 Q:'$D(MEDRSLT(J))  D  ; FOR EACH MEDICATION IN THE LIST
    35           . W "J IS",J,!
     34          F J=1:3 Q:'$D(MEDRSLT(J))  D  ; FOR EACH MEDICATION IN THE LIST
     35          . W "J IS ",J,!
    3636          . S MEDVMAP=$NA(@MEDTVMAP@(J))
    3737          . K @MEDVMAP
     
    5757          . S @MEDVMAP@("MEDICATIONSTRENGTHUNIT")=""
    5858          . S @MEDVMAP@("MEDICATIONFORMTEXT")=""
    59           . S J=J+1
    60           . S @MEDVMAP@("MEDICATIONDESCRIPTIONTEXT")=$P(MEDRSLT(J)," *",2)
    61           . S J=J+1
    62           . S @MEDVMAP@("MEDICATIONDIRECTIONDESCRIPTIONTEXT")=$P(MEDRSLT(J),"\ Sig: ",2)
     59          . S @MEDVMAP@("MEDICATIONDESCRIPTIONTEXT")=$P(MEDRSLT(J+1)," *",2)
     60          . S @MEDVMAP@("MEDICATIONDIRECTIONDESCRIPTIONTEXT")=$P(MEDRSLT(J+2),"\ Sig: ",2)
    6361          . S @MEDVMAP@("MEDICATIONDIRECTIONDOSEVALUE")=""
    6462          . S @MEDVMAP@("MEDICATIONDIRECTIONROUTETEXT")=""
     
    6765          . K @MEDARYTMP
    6866          . D MAP^GPLXPATH(MEDXML,MEDVMAP,MEDARYTMP)
    69           . I J=3 D  ; FIRST ONE IS JUST A COPY
     67          . I J=1 D  ; FIRST ONE IS JUST A COPY
    7068          . . ; W "FIRST ONE",!
    7169          . . D CP^GPLXPATH(MEDARYTMP,MEDOUTXML)
    72           . I J>3 D  ; AFTER THE FIRST, INSERT INNER XML
     70          . I J>1 D  ; AFTER THE FIRST, INSERT INNER XML
    7371          . . D INSINNER^GPLXPATH(MEDOUTXML,MEDARYTMP)
    74           . S J=J+1
    7572          N MEDTMP,MEDI
    7673          D MISSING^GPLXPATH(MEDOUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS
Note: See TracChangeset for help on using the changeset viewer.