Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need XML stylesheet...(attribute-centric XML)

Status
Not open for further replies.

lameid

Programmer
Jan 31, 2001
4,212
US

This is my first time trying to import XML and of course I run into a more difficult scenario.

I ran through the code and stylesheet in the link at the top. And that much works ok. My issue is that I have an XML file that did not originate from Access and need to make a style sheet so I can use the code to transform and import it.

The XML file in question is a single lab run. What I really want it is one denormalized import or I beleive record as each lab run / order result is by file. So far I've not found a source to help with my understanding of Stylsheets (or rather any that have worked for the time I've had to spend). Can anyone out there point me to a good resource that explains what is going on in an XLS in a nutshell or write a good XLS for the below layout (ideally)? I've changed the identifying data and significant other values in this example.

Any help is much appreciated.

The XML is below, my apologies but the code box only made it more difficult to copy in preview....


<?xml version="1.0" encoding="utf-8"?><LabReport><ReportHeader><Requested-By /><Requested-On>04/01/2013 10:20 AM</Requested-On></ReportHeader><Clinic AccountNumber="1234" Ext-ID="56789" Status="Active"><Name>P&amp;G</Name><Address><Street>123 Seasame Street</Street><Street /><City>Springfield</City><StateProv>ST</StateProv><PostalCode>45040</PostalCode><Country>USA</Country></Address><Phone>555-555-5555</Phone><Fax>555-555-5555</Fax><Rtf-Version>2</Rtf-Version></Clinic><LabLocation LabLocationId="08" LabId="5"><LocationCode>M</LocationCode><LocationName>Lab Processing</LocationName><Address><Street>666 Williams Street</Street><City>Fruit Cake</City><StateProv>ST</StateProv><PostalCode>10000</PostalCode><Country>USA</Country></Address><LocationPhone>555-555-5555</LocationPhone></LabLocation><Accession Acc-Result-ID="123456789" Order-Status="F" Lab-ID="2" Location-ID="10" LabClinicExt-ID="14509"><AccessionHeader><Accession-ID Type="Clinic-AccID" ID="98612" /><Accession-ID Type="Chart-ID" ID="835" /><Accession-ID Type="Lab-AccID" ID="MEEA43117189" /><TimeStamp Type="Order Received DateTime" Value="03/24/2013" /><TimeStamp Type="Latest Results Received DateTime" Value="03/24/2013 07:28 PM" /><TimeStamp Type="Printed DateTime" Value="03/24/2013 05:35 PM" /><Pet><Name>Jack</Name><Age>19W</Age><Sex>M</Sex><Species Ext-ID="C">Canine</Species><Breed Ext-ID="LABRT" /><Owner>Merry</Owner><Doctor>Spam</Doctor></Pet></AccessionHeader><UnitCode Ext-ID="100" Status="F" Order-Control-Status="RE" Type="CBC"><Name>CBC</Name><TimeStamp Type="Released Datetime" Value="03/24/2013 07:42 PM" /><TimeStamp Type="Viewed Datetime" Value="03/24/2013 06:51 PM" /><TestCode Ext-ID="10" Status="F"><Name>WBC</Name><Value>9.0</Value><Units><![CDATA[10<sup>3</sup>/<font face="symbol">&#109;</font>L]]></Units><Range>4.0-15.5</Range></TestCode><TestCode Ext-ID="11" Status="F"><Name>RBC</Name><Value>5.75</Value><Units><![CDATA[10<sup>6</sup>/<font face="symbol">&#109;</font>L]]></Units><Range>4.8-9.3</Range></TestCode><TestCode Ext-ID="12" Status="F"><Name>Hemoglobin</Name><Value>13.2</Value><Units><![CDATA[g/dL]]></Units><Range>12.1-20.3</Range></TestCode><TestCode Ext-ID="13" Status="F"><Name>Hematocrit</Name><Value>40.7</Value><Units><![CDATA[%]]></Units><Range>36-60</Range></TestCode><TestCode Ext-ID="14" Status="F"><Name>MCV</Name><Value>71</Value><Units><![CDATA[fL]]></Units><Range>58-79</Range></TestCode><TestCode Ext-ID="15" Status="F"><Name>MCH</Name><Value>22.0</Value><Units><![CDATA[pg]]></Units><Range>19-28</Range></TestCode><TestCode Ext-ID="16" Status="F"><Name>MCHC</Name><Value>32.4</Value><Units><![CDATA[g/dL]]></Units><Range>30-38</Range></TestCode><TestCode Ext-ID="25" Status="F"><Name>Platelet Count</Name><Value>233</Value><Units><![CDATA[10<sup>3</sup>/<font face="symbol">&#109;</font>L]]></Units><Range>170-400</Range></TestCode><TestCode Ext-ID="26" Status="F"><Name>Platelet EST</Name><Value>Adequate</Value><Units /><Range>ADEQUATE</Range></TestCode><TestCode Ext-ID="28" Status="F" Abnormal="L" Type="CBCDIF" Related-Ext-ID="41"><Name>Neutrophils</Name><Value>45</Value><Units><![CDATA[%]]></Units><Range>60-77</Range></TestCode><TestCode Ext-ID="30" Status="F" Type="CBCDIF" Related-Ext-ID="43"><Name>Bands</Name><Value>0</Value><Units><![CDATA[%]]></Units><Range>0-3</Range></TestCode><TestCode Ext-ID="31" Status="F" Abnormal="H" Type="CBCDIF" Related-Ext-ID="44"><Name>Lymphocytes</Name><Value>45</Value><Units><![CDATA[%]]></Units><Range>12-30</Range></TestCode><TestCode Ext-ID="32" Status="F" Type="CBCDIF" Related-Ext-ID="45"><Name>Monocytes</Name><Value>5</Value><Units><![CDATA[%]]></Units><Range>3-10</Range></TestCode><TestCode Ext-ID="33" Status="F" Type="CBCDIF" Related-Ext-ID="46"><Name>Eosinophils</Name><Value>3</Value><Units><![CDATA[%]]></Units><Range>2-10</Range></TestCode><TestCode Ext-ID="34" Status="F" Type="CBCDIF" Related-Ext-ID="47"><Name>Basophils</Name><Value>1</Value><Units><![CDATA[%]]></Units><Range>0-1</Range></TestCode><TestCode Ext-ID="41" Status="F" Type="CBCABS"><Name>Absolute Neutrophils</Name><Value>3780</Value><Units><![CDATA[/uL]]></Units><Range>2060-10600</Range></TestCode><TestCode Ext-ID="43" Status="F" Type="CBCABS"><Name>Absolute Bands</Name><Value>0</Value><Units><![CDATA[/uL]]></Units><Range>0-300</Range></TestCode><TestCode Ext-ID="44" Status="F" Type="CBCABS"><Name>Absolute Lymphocytes</Name><Value>3780</Value><Units><![CDATA[/uL]]></Units><Range>690-4500</Range></TestCode><TestCode Ext-ID="44" Status="F" Type="CBCABS"><Name>Absolute Monocytes</Name><Value>420</Value><Units><![CDATA[/uL]]></Units><Range>0-840</Range></TestCode><TestCode Ext-ID="46" Status="F" Type="CBCABS"><Name>Absolute Eosinophils</Name><Value>336</Value><Units><![CDATA[/uL]]></Units><Range>0-1200</Range></TestCode><TestCode Ext-ID="47" Status="F" Type="CBCABS"><Name>Absolute Basophils</Name><Value>84</Value><Units><![CDATA[/uL]]></Units><Range>0-150</Range></TestCode></UnitCode><UnitCode Ext-ID="1" Status="F" Order-Control-Status="RE"><Name>Albumin</Name><TimeStamp Type="Released Datetime" Value="03/24/2013 07:28 PM" /><TimeStamp Type="Viewed Datetime" Value="03/24/2013 05:35 PM" /><TestCode Ext-ID="1001" Status="F"><Name>Albumin</Name><Value>3.1</Value><Units><![CDATA[g/dL]]></Units><Range>2.7-4.4</Range></TestCode><TestCode Ext-ID="11067" Status="F"><Name>Comment</Name><Value /><Units /><Range /><Comment><![CDATA[Hemolysis 2+. No significant analyte interference.]]></Comment></TestCode></UnitCode></Accession></LabReport>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top