<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Yes, I would probably parse UL#foldinglist (all of them! I guess the
author doesn't quite understand the id attribute) from
<a class="moz-txt-link-freetext" href="http://codelists.wpc-edi.com/wpc_taxonomy.asp">http://codelists.wpc-edi.com/wpc_taxonomy.asp</a>.<br>
<br>
- Brian<br>
<br>
On 2011-03-19 09:00, Jay Strauss wrote:
<blockquote
cite="mid:AANLkTi=QiUa+BX3kdZSgUQkX5udrb3TbzuCFi41JFVjZ@mail.gmail.com"
type="cite">Hi sorry for the delay. I know everyone is hanging on
this thread with baited breath.
<div><br>
</div>
<div>I was trying to parse the data on: <a moz-do-not-send="true"
href="http://www.wpc-edi.com/codes/taxonomy">http://www.wpc-edi.com/codes/taxonomy</a></div>
<div><br>
</div>
<div>I initially cut/paste into word to change the hierarchy, so I
can probably reformat into something without the potential of
dupes. I looked at the source of the webpage. Maybe there is a
way I can parse the page directly for the hierarchy.</div>
<div><br>
</div>
<div>Thanks</div>
<div>Jay<br>
<br>
<div class="gmail_quote">On Wed, Mar 16, 2011 at 8:31 PM, Brian
Katzung <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:briank@kappacs.com">briank@kappacs.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff"> I would try very hard
to find an alternative source data format (perhaps with
level-dependent indentation?) if at all possible before
spending a lot of time trying to parse this one because
it's ambiguous.<br>
<br>
Consider an item on line "i." after an item on line "h.".
Depending on the type of the subsequent line, you may
("ii.") or may not ("V.") be able to determine what type
of line the "i." item is.<br>
<br>
- Brian
<div>
<div class="h5"><br>
<br>
On 2011-03-16 11:31, Jay Strauss wrote: </div>
</div>
<blockquote type="cite">
<div>
<div class="h5">Hi,
<div><br>
</div>
<div>I need to build a hierarchy out of some data to
load into a RDBMS. The data looks like below. I
need to convert it to more like:</div>
<div><br>
</div>
<div>code, desc, parent_code</div>
<div><br>
</div>
<div>(where code is like "193200000X")</div>
<div><br>
</div>
<div>I'm struggling.</div>
<div><br>
</div>
<div>I think I could do this in a rigid manner by
saying I have 4 indexes or levels:</div>
<div>upper case roman</div>
<div>lower case alpha</div>
<div>lower case roman</div>
<div>numeric</div>
<div><br>
</div>
<div>and keeping track where I am, and I the parent
one level above.</div>
<div><br>
</div>
<div>I'd like to do it flexibly, without having to
know how many levels in advance (I get similarly
structured data with # of levels and info from
time to time). </div>
<div><br>
</div>
<div>But I don't know:</div>
<div><br>
</div>
<div>1) whats the best structure for this (I'm
thinking an array of arrays)</div>
<div>2) how to traverse the array without knowing my
indexes, i.e. go one level up, go one level down</div>
<div><br>
</div>
<div>Can anyone suggest ways to skin this cat?</div>
<div><br>
</div>
<div>Thanks</div>
<div>Jay</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>I.<span style="white-space: pre-wrap;"> </span>Individual
or Groups (of Individuals)</div>
<div>a.<span style="white-space: pre-wrap;"> </span>Group
</div>
<div>i.<span style="white-space: pre-wrap;"> </span>Multi-Specialty
- 193200000X</div>
<div>ii.<span style="white-space: pre-wrap;"><br>
</span>Single Specialty - 193400000X</div>
<div>b.<span style="white-space: pre-wrap;"> </span>Allopathic
& Osteopathic Physicians </div>
<div>i.<span style="white-space: pre-wrap;"> </span>Allergy
& Immunology - 207K00000X</div>
<div>1.<span style="white-space: pre-wrap;"> </span>Allergy
- 207KA0200X</div>
<div>2.<span style="white-space: pre-wrap;"> </span>Clinical
& Laboratory Immunology - 207KI0005X</div>
<div> ii.<span style="white-space: pre-wrap;"> </span>Anesthesiology
- 207L00000X</div>
<div>1.<span style="white-space: pre-wrap;"> </span>Addiction
Medicine - 207LA0401X</div>
<div>2.<span style="white-space: pre-wrap;"> </span>Critical
Care Medicine - 207LC0200X</div>
<div>3.<span style="white-space: pre-wrap;"> </span>Hospice
and Palliative Medicine - 207LH0002X</div>
<div>4.<span style="white-space: pre-wrap;"> </span>Pain
Medicine - 207LP2900X</div>
<div> 5.<span style="white-space: pre-wrap;"> </span>Pediatric
Anesthesiology - 207LP3000X</div>
<div>iii.<span style="white-space: pre-wrap;"><br>
</span>Clinical Pharmacology - 208U00000X</div>
<div> iv.<span style="white-space: pre-wrap;"> </span>Colon
& Rectal Surgery - 208C00000X</div>
<div>v.<span style="white-space: pre-wrap;"> </span>Dermatology
- 207N00000X</div>
<div>1.<span style="white-space: pre-wrap;"> </span>Clinical
& Laboratory Dermatological Immunology -
207NI0002X</div>
<div>2.<span style="white-space: pre-wrap;"> </span>Dermatopathology
- 207ND0900X</div>
<div>3.<span style="white-space: pre-wrap;"> </span>MOHS-Micrographic
Surgery - 207ND0101X</div>
<div> 4.<span style="white-space: pre-wrap;"> </span>Pediatric
Dermatology - 207NP0225X</div>
<div>5.<span style="white-space: pre-wrap;"> </span>Procedural
Dermatology - 207NS0135X</div>
<div>vi.<span style="white-space: pre-wrap;"><br>
</span>Electrodiagnostic Medicine - 204R00000X</div>
<div>vii.<span style="white-space: pre-wrap;"><br>
</span>Emergency Medicine - 207P00000X</div>
</div>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
Chicago-talk mailing list
<div class="im"><a moz-do-not-send="true" href="mailto:Chicago-talk@pm.org" target="_blank">Chicago-talk@pm.org</a>
<a moz-do-not-send="true" href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a></div></pre>
</blockquote>
<br>
<pre cols="72">--
Brian Katzung, Kappa Computer Solutions, LLC
Leveraging UNIX, GNU/Linux, open source, and custom
software solutions for business and beyond
Phone: 877.367.8837 x1 <a moz-do-not-send="true" href="http://www.kappacs.com" target="_blank">http://www.kappacs.com</a></pre>
</div>
<br>
_______________________________________________<br>
Chicago-talk mailing list<br>
<a moz-do-not-send="true" href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br>
<a moz-do-not-send="true"
href="http://mail.pm.org/mailman/listinfo/chicago-talk"
target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Brian Katzung, Kappa Computer Solutions, LLC
Leveraging UNIX, GNU/Linux, open source, and custom
software solutions for business and beyond
Phone: 877.367.8837 x1 <a class="moz-txt-link-freetext" href="http://www.kappacs.com">http://www.kappacs.com</a>
</pre>
</body>
</html>