My IPeople

Community discussion for IPeople products and services
Welcome to My IPeople Sign in | Join | Help
in
Home Blogs Forums

Getting dictionary data via prefix

Last post 12-18-2008, 11:28 AM by MarciaL. 2 replies.
Sort Posts: Previous Next
  •  12-17-2008, 4:49 PM 687

    Getting dictionary data via prefix

    I recently attended a couple of MUSE webcasts put on by IPeople and have been trying the techniques presented but I have a followup question.  How do you properly use the Z.link to get both .data and .dic linked up properly.

    I am trying to get positive culture results using the following macro to build an array of organisms.  I can see in the debugger that I get the organism ID but I don't get the name (/ORG in the example).  Can someone tell me what I'm doing wrong?

    Marcia Locke

     

    MIC
    C(*S,:S),
    @Chg.prefix(LAB.M.SPEC,:,*),
    @Chg.prefix(LAB.M.SPEC,?,*),
    %Z.link("*","LAB","%.LAB.data","LAB.SHS"),
    /PAT^LAB.M.SPEC.patient,
    ""^LAB.M.SPEC.collection.date^LAB.M.SPEC.collection.time,
    ""^LAB.M.SPEC.number.part^/SRC^/FNL^/ID^/ORG^/COL,
    DO{@Next(LAB.M.SPEC.collection.date,LAB.M.SPEC.patient.x) 1,
    @LAB.M.SPEC.collection.date^/CDT,
    DO{@Next(LAB.M.SPEC.collection.time,LAB.M.SPEC.patient.x) 1,
    @LAB.M.SPEC.collection.time^/CTM,
    "MB"^LAB.M.SPEC.prefix,
    DO{@Next(LAB.M.SPEC.number.part,LAB.M.SPEC.patient.x) 1,
    LAB.M.SPEC.patient.x^LAB.M.SPEC.urn^/URN,
    @SPEC}}},
    C(*U,:U)

    SPEC
    @LAB.M.SPEC.source^/SRC,
    ""^LAB.M.SPEC.proc,
    DO{@Next(LAB.M.SPEC.proc) ""^LAB.M.SPEC.res.q,
    DO{@Next(LAB.M.SPEC.res.q) 1,
    @LAB.M.SPEC.prelim.or.final^/FNL,
    IF{/SRC="SPT"&(/FNL="F") @GET.ORGS}}}

    GET.ORGS
    @Chg.prefix(LAB.M.ORG,?,:),
    %Z.link(":","LAB","%.LAB.dic","LAB.SHS"),
    ""^LAB.M.SPEC.result.org.q,
    DO{@Next(LAB.M.SPEC.result.org.q) 1,
    @LAB.M.SPEC.result.org.id^LAB.M.ORG.mnemonic^/ID,
    ;@LAB.M.ORG.name[/ID]^/ORG, <--tried both ways here
    @LAB.M.ORG.name^/ORG,  <--tried both ways here
    IF{/CDT&CTM %Z.date.out(/CDT)^/CDT,
    /CDT_" "_/CTM^/COL},
    %Z.ddc("ORGS")X,  <-----From here I can see that /ID is populated but there is nothing in /ORG
    IF{/COL&/ORG&(/ID'="NOF") 1^/ORGS[/PAT,/COL,/ORG]}}

  •  12-18-2008, 11:00 AM 688 in reply to 687

    Re: Getting dictionary data via prefix

    When you look at the data definitions for LAB.M.ORG it uses the & prefix. Your statement, %Z.link(":","LAB","%.LAB.dic","LAB.SHS"),
    looks correct but this will open : and point to the dictionaries. When NPR translates the statement, @LAB.M.ORG.name[/ID]^/ORG, it will still translate this using & but & is not open to the dictionaries. As a result, when you use the Chg.prefix statement you will want to change & to : instead of ? to :.

    GET.ORGS
    @Chg.prefix(LAB.M.ORG,&,:),
    %Z.link(":","LAB","%.LAB.dic","LAB.SHS"),

    This statement will tell the NPR report writer to use : for the prefix when it translates instead of & and since : is open to the dictionaries it should now successfully get the name. Give this a try and if this does not work for you then please let me know and I will be happy to try to reproduce this.

     Thanks!

  •  12-18-2008, 11:28 AM 689 in reply to 688

    RE: Getting dictionary data via prefix

    That was absolutely it!  I don’t know how many times I rechecked without seeing it.  Thanks a lot for your help Jenny.

     

    Regards,

    Marcia

     


    From: meditech@myipeople.com [mailto:meditech@myipeople.com] On Behalf Of Jenny
    Sent: Thursday, December 18, 2008 9:00 AM
    To: Marcia Locke
    Subject: Re: [MEDITECH Report Writer] Getting dictionary data via prefix

     

    When you look at the data definitions for LAB.M.ORG it uses the & prefix. Your statement, %Z.link(":","LAB","%.LAB.dic","LAB.SHS"),
    looks correct but this will open : and point to the dictionaries. When NPR translates the statement, @LAB.M.ORG.name[/ID]^/ORG, it will still translate this using & but & is not open to the dictionaries. As a result, when you use the Chg.prefix statement you will want to change & to : instead of ? to :.

    GET.ORGS
    @Chg.prefix(LAB.M.ORG,&,:),
    %Z.link(":","LAB","%.LAB.dic","LAB.SHS"),

    This statement will tell the NPR report writer to use : for the prefix when it translates instead of & and since : is open to the dictionaries it should now successfully get the name. Give this a try and if this does not work for you then please let me know and I will be happy to try to reproduce this.

     Thanks!




    Click reply to respond directly to the list. Unsubscribe at http://myipeople.com/forums/ForumSubscriptions.aspx

    Confidentiality Notice: This e-mail message, including any attachments, is
    for the sole use of the intended recipient(s) and may contain confidential
    and privileged information. Any unauthorized review, use, disclosure or
    distribution is prohibited. If you are not the intended recipient, please
    contact the sender by reply e-mail and destroy all copies of the original
    message.

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems