json iterate

Homepage Clovertech Forums Cloverleaf json iterate

  • Creator
    Topic
  • #118174
    David Speare
    Participant

    Hey All –

    Putting a hl7–>json xlate.  This is working fine for my non repeatable fields.  I assumed that doing an iterate on the repeating group/field would iterate the json output, but obviously it isn’t or we wouldn’t be here.

     

    What’s the trick?  I can do this via an xlate correct?  just for good measure, i attached the xlate.

     

    Appreciate the insight.

     

Viewing 3 reply threads
  • Author
    Replies
    • #118175
      Boris Perov
      Participant

      Hi David,

      You need to use the field/segment/group iteration variable or a counter of some sort to specify where to copy the data…  Similar to HL7 iterations…  Could also be the JSON format.

      Let me know if you need additional help,
      Boris
      boris.perov@syapse.com

      Attachments:
      You must be logged in to view attached files.
    • #118177
      David Speare
      Participant

      Thanks Boris!  That makes sense, would you share a screenshot of your json config?  Specifically are your common_order and ordering_provider elements both arrays?

      • #118187
        Boris Perov
        Participant

        Sorry, just saw this.  Both common_order and ordering_provider are arrays set to tuple Element Mode.

        Attachments:
        You must be logged in to view attached files.
    • #118178
      Jim Kosloskey
      Participant

      David,

      What are you getting out? The first repetition, the last repetition, or no repetition.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #118179
      David Speare
      Participant

      Guys thanks so much.  It was partly my json config and partially my xlate reference.

      Going to spell it out here in case anyone else comes across it (supporting images attached).

      procedures node –> type: array, element mode: tuple

      (0) –> type object

      setid –> type: string

      proccode –> type: array; element mode: tuple

      (0) –> type: object

      proccodeid –> type: string

      Attachments:
      You must be logged in to view attached files.
Viewing 3 reply threads
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10