Changeset 225 for ccr/trunk/p/CCRMEDS2.m


Ignore:
Timestamp:
Oct 25, 2008, 8:20:47 PM (16 years ago)
Author:
George Lilly
Message:

fix for meds

File:
1 edited

Legend:

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

    r204 r225  
    4949 N RXIEN S RXIEN=0
    5050 N MEDCOUNT S MEDCOUNT=0
     51 N MEDFIRST S MEDFIRST=1 ; FLAG FOR FIRST MED IN THIS SECTION FOR MERGING
    5152 S MEDMAP=$NA(^TMP("GPLCCR",$J,"MEDMAP")) ; THIS IS THE VARIABLE MAP
    5253 S MEDCOUNT=@MEDMAP@(0) ; ACCOUNT FOR MEDS ALREADY IN ARRAY
     
    205206 . . . D MAP^GPLXPATH(DIRXML1,MDZNA,DIRXML2)
    206207 . . . D INSERT^GPLXPATH(RESULT,DIRXML2,"//Medications/Medication")
    207  . D:MEDCOUNT=1 CP^GPLXPATH(RESULT,OUTXML) ; First one is a copy
    208  . D:MEDCOUNT>1 INSINNER^GPLXPATH(OUTXML,RESULT) ; AFTER THE FIRST, INSERT INNER XML
     208 . I MEDFIRST D  ;
     209 . . S MEDFIRST=0 ; RESET FIRST FLAG
     210 . . D CP^GPLXPATH(RESULT,OUTXML) ; First one is a copy
     211 . D:'MEDFIRST INSINNER^GPLXPATH(OUTXML,RESULT) ; AFTER FIRST, INSERT INNER XML
    209212 N MEDTMP,MEDI
    210213 D MISSING^GPLXPATH(OUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS
Note: See TracChangeset for help on using the changeset viewer.