new to XML

Clovertech Forums Cloverleaf new to XML

  • Creator
    Topic
  • #121357
    Gene Millard
    Participant

      I am looking for step by step instructions on how to set up XML starting with setting up the XML package manager.

      Any help would be greatly appreciated.

      The Guthrie Clinic
      Sayre, PA

    Viewing 17 reply threads
    • Author
      Replies
      • #121358
        Jim Kosloskey
        Participant

          Assuming you have a Schema, I have attached a Word Document  with step-by-step to compile your Schema and start Xlating.

          I have not done a lot of XML but if you would like to brainstorm, email me.

          • This reply was modified 7 months, 3 weeks ago by Jim Kosloskey. Reason: No need for Zip file
          Attachments:
          You must be logged in to view attached files.

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

        • #121361
          Gene Millard
          Participant

            Thank you for the information.  I will have to find where the Schema is.

            The Guthrie Clinic
            Sayre, PA

          • #121362
            Jim Kosloskey
            Participant

              You are welcome. It is possible you do not have a schema. It appears a lot of vendors are sending XML messages which are formulated on the fly and thus have no published Schema. It is also possible the published Schema is a PDF Document instead of a .xsd file (I have seen that too often).

              If this is a FHIR XML message, the packages should already be there in Cloverleaf depending on the release. But I think you can get the .xsd files for various FHIR message sets online.

              The little XML I have done, I found it useful to have an XML Authoring/editing tool (like XML SPY – there are others) as a couple of the schemas I was given were not well formed. The vendor wanted to blame Cloverleaf for the issue (don’t they all?) but once I showed the commercial Authoring/editing tool also rejected the Schema, the vendor shut up and corrected the issue.  That alone was worth the investment.

              Hopefully you have a .xsd file and it is well-formed.

               

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

            • #121366
              Gene Millard
              Participant

                <?xml version=”1.0″ encoding=”UTF-8″ standalone=”no”?>
                <!– Edited by C. Beebe using Notepad++ on 2015 09 09 –>
                <xs:schema targetNamespace=”urn:hl7-org:v3″ xmlns:xs=”http://www.w3.org/2001/XMLSchema&#8221; xmlns=”urn:hl7-org:v3″ xmlns:mif=”urn:hl7-org:v3/mif” elementFormDefault=”qualified”>
                <xs:include schemaLocation=”POCD_MT000040UV.xsd”/>
                <xs:element name=”ClinicalDocument” type=”POCD_MT000040UV.ClinicalDocument”/>
                </xs:schema>

                 

                 

                This is what I got.

                Get error occurred whild attempting to compile.

                Compile command failed with status 1:

                Warning generated during parsing, Unable to open primary document entity.

                ‘//opt/cloverleaf/cis19.1/integrator/gene/formats/xml/CCD/POCD_M000040uv.xsd’ – Line 0, Col 0

                The Guthrie Clinic
                Sayre, PA

              • #121367
                Jim Kosloskey
                Participant

                  Gene,

                  I am not an XML expert here but that does not look like a Schema to me, but it does look like it references a schema (<xs:include schemaLocation=”POCD_MT000040UV.xsd”/>).

                  Do you have the POCD_MT000040UV.xsd file?

                  It looks like this is a CDA Schema – I found the file here CDA-core-2.1/schemas/normative/POCD_MT000040UV02.xsd at master · HL7/CDA-core-2.1 · GitHub.

                  You can download from there.

                  Are you sure the file you tried to compile has a .xsd extension. Of course, I could be way off base here not having done more than a couple of XML Integrations and no CDA.

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

                • #121368
                  Gene Millard
                  Participant

                    Jim,

                    Using the POCD_MT000040UV.xsd file I had to download other xsd files.

                    Once I got those files I get this when I tried to compile the POCD file.

                    [ERROR] The schema must contain at least one global element declaration.

                    The Guthrie Clinic
                    Sayre, PA

                  • #121369
                    Jim Kosloskey
                    Participant

                      Gene,

                      I don’t have anything to offer – sorry. Like I said I am not an XML expert and have no CDA experience. Perhaps someone who has worked with CDA or XML more can chime in.

                      But the entity that requires you to use this should provide an xsd I would think. Have you tried to get a good schema from them?

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

                    • #121370
                      Gene Millard
                      Participant

                        Jim,

                        I have contacted the people who sent me the XSD file asking if they have other files.

                         

                        The Guthrie Clinic
                        Sayre, PA

                      • #121371
                        Gene Millard
                        Participant

                          Jim,

                          I got the package to compile.  Had to download 5 other xsd files from the site you gave me.

                          Next problem.

                          Error in translation.

                          MESSAGE 1
                          Error generated during parsing. – No declaration found for element ‘sdtc:dischargeDispositionCode’ – Line 1, Col 9647
                          XML Error Source – Message Body for mid [0.0.0]
                          1:’110000-0400″/></effectiveTime><sdtc:dischargeDispositionCode nullFlavor=”UNK”/><‘

                          The Guthrie Clinic
                          Sayre, PA

                        • #121372
                          Jim Kosloskey
                          Participant

                            Gene,

                            First – congrats on getting the schema to compile.

                            Is this being used as Source or Destination in the Xlate?

                            Jim

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

                          • #121373
                            Gene Millard
                            Participant

                              Jim,

                              It would be the source.

                              This is in the schema file

                              <xs:element name=”dischargeDispositionCode” type=”CE” minOccurs=”0″/>

                              but nothing for

                              sdtc:dischargeDispositionCode

                              The Guthrie Clinic
                              Sayre, PA

                            • #121374
                              Jim Kosloskey
                              Participant

                                Gene,

                                So, I am assuming you have an input XML file to be matched against the schema. Does the Source file have that element but the schema does not or vice-versa?

                                Jim

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

                              • #121375
                                Gene Millard
                                Participant

                                  Jim,

                                  The source file has that element but the schema does not.

                                  The Guthrie Clinic
                                  Sayre, PA

                                • #121376
                                  Jim Kosloskey
                                  Participant

                                    Gene,

                                    Try this link Understanding C-CDA and the C-CDA Companion Guide – Consolidated CDA Release 2.1 StructureDefinition Publication v2.1 (fhir.org)

                                    and search for ‘sdtc:dischargeDispositionCode’.

                                    I did a brief reading and there is an extensions folder referenced therein which you might have to download.

                                    Jim

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

                                  • #121377
                                    Gene Millard
                                    Participant

                                      Jim,

                                      I will check it out. Thanks.

                                      The Guthrie Clinic
                                      Sayre, PA

                                    • #121378
                                      Lynelle Harper
                                      Participant

                                        Following closely, I have to put together an xml to hl7 for RTLS

                                         

                                      • #121379
                                        Gene Millard
                                        Participant

                                          Jim,

                                          I found an SDTC.xsd file.  Now to figure out how to incorporate it into the project.

                                          The Guthrie Clinic
                                          Sayre, PA

                                        • #121380
                                          Jim Kosloskey
                                          Participant

                                            Gene,

                                            From that document:

                                            To perform schema validation on a CDA document instance properly, it is necessary to use the schema that includes the CDA R2 schema extensions. All extensions will use the namespace urn:hl7-org:sdtc. As a document consumer, the possibility of schema extensions needs to be considered.

                                            Perhaps you need to add something like:

                                            xs:schema targetNamespace=”urn:hl7-org:stdc”

                                            somewhere in the Schema.

                                            I am really just guessing.

                                            Jim

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

                                        Viewing 17 reply threads
                                        • You must be logged in to reply to this topic.