Jump to content

XDF mapping


vicki

Recommended Posts

My experience with tables is limited and very limited with Secondary Data Sources. I've attached a sample of a job that needs both. The files are without my attempts to muddy things. If you could at least point me in the right direction? Should I use create Table from Data Source? Can it even be done with what I have?  I've been reading the forums and manuals and usually like the challenge and opportunity to learn on my own. I think I could get there eventually but I'm running out of time.  Any ideas, help would really be appreciated.

Thank you.

Vicki

XDF mapping 2.zip

Link to comment
Share on other sites

The mapping in the dialog for secondary data sources (XDFs) won't help in this particular case.

That's meant for a "one to one" mapping, where a field value in the main data matches a field value in a single record in the secondary data, or a "one to many" mapping, where a field in the main data matches a field in multiple records in the secondary data (as in the Statement tutorial).  Your job has a "many to many" mapping, where you have multiple primary data fields mapping to secondary data.

So we need to make a data rule to handle this mapping.

I've done that in the attached job.  The Table Data rule iterates all the relevant fields in the primary data, looking for the "1", and adds the row of data from the secondary data file for each match to the table.

Note that I had to tweak things a bit to get the matches.  This would be a bit more straightforward if the field and value names in the two data files were more consistent, so that we don't have to jump through hoops (like putting everything in lower-case and replacing hyphens with spaces on lines 37 and 38) to match, say, "Well Care" in the primary data to "Well-Care Visit, also known as EPSDT or annual well visit." in the secondary data.  Also, you should clean up things like trailing spaces in the field names, such as "Who needs it ".  But the rule handles all of that currently.

sample-Dan-1.pdf

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...