Changeset 575 for ccr/trunk


Ignore:
Timestamp:
Oct 14, 2009, 8:41:00 AM (15 years ago)
Author:
George Lilly
Message:

now handles multiple lines of text in DATA

File:
1 edited

Legend:

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

    r574 r575  
    2121        ;
    2222TEST    ;
    23         S C0CXMLIN=$NA(^TMP("C0CMXML",$J)) K GARY
    24         W $$FTG^%ZISH("FORT$:","mxml-test.xml",$NA(@C0CXMLIN@(1)),3)
     23        S C0CXMLIN=$NA(^TMP("C0CMXML",$J))
     24        K GARY
     25        W $$FTG^%ZISH("/home/vademo2/EHR/p/","mxml-test.xml",$NA(@C0CXMLIN@(1)),3)
    2526        S C0CDOCID=$$PARSE(C0CXMLIN) W !,"DocID: ",C0CDOCID
    2627        S REDUX="//ContinuityOfCareRecord/Body"
     
    4950        . I GT'="" S NEWPATH=GT
    5051        S @ZXIDX@(NEWPATH)=ZOID ; ADD THE XPATH FOR THIS NODE TO THE XPATH INDEX
    51         N GD S GD=$$DATA(ZOID) ; SEE IF THERE IS DATA FOR THIS NODE
    52         I GD'="" S @ZXPARY@(NEWPATH)=GD ; IF YES, ADD IT TO THE XPATH ARRAY
     52        N GD D DATA("GD",ZOID) ; SEE IF THERE IS DATA FOR THIS NODE
     53        I $D(GD(2)) M @ZXPARY@(NEWPATH)=GD ; IF MULITPLE DATA MERGE TO THE ARRAY
     54        E  I $D(GD(1)) S @ZXPARY@(NEWPATH)=GD(1) ; IF SINGLE VALUE, ADD TO ARRAY
    5355        N ZFRST S ZFRST=$$FIRST(ZOID) ; SET FIRST CHILD
    5456        I ZFRST'=0 D  ; THERE IS A CHILD
     
    8183        Q $$SIBLING^MXMLDOM(C0CDOCID,ZOID)
    8284        ;
    83 DATA(ZOID)      ; RETURNS DATA FOR THE NODE
    84         N ZT,ZN S ZT=""
     85DATA(ZT,ZOID)   ; RETURNS DATA FOR THE NODE
     86        ;N ZT,ZN S ZT=""
    8587        ;S C0CDOM=$NA(^TMP("MXMLDOM",$J,C0CDOCID))
    8688        ;Q $G(@C0CDOM@(ZOID,"T",1))
    87         S ZN=$$TEXT^MXMLDOM(C0CDOCID,ZOID,"ZT")
    88         ;I $D(ZT) ZWR ZT
    89         Q $G(ZT(1))
     89        S ZN=$$TEXT^MXMLDOM(C0CDOCID,ZOID,ZT)
     90        Q
    9091        ;
Note: See TracChangeset for help on using the changeset viewer.