Good Afternoon,

We're working with some very large XML structures based on a healthcare
standard known as HL7v3.  To date, we've used a library of XPATH calls to
access the data we're interested in.  I'm exploring the possibility of
converting them to pure Python (and ideally Django models).  HL7v3
publishes XSD files so it's at least theoretically possible to use
GenerateDS to produce the desired code.

I'd welcome comments from anyone who's tried this, but have a couple
questions to kick off my attempt:

1) The HL7v3 specification has many files with common imports from a few
"core" files.

a) Is there a way to compile all (or a subset) of the XSD files at once,
preserving the common imports in the generated classes?
b) If not, can I achieve the desired behavior by creating a new XSD that
imports all of the files of-interest?
c) Can I get GenerateDS to produce multiple files (preferably mirroring the
original file structure)?

2) The HL7v3 specification is... odd.  There are cases where classes have
"inheritance" relationships that aren't specified in the XSD (if this is
even possible).  For example:

   - Class B is exactly the same as class A.
   - Class D, E, and F are (different) subsets of class B.

The standard intends all of these to represent the same thing (e.g. a
patient), presenting more or less information depending on the situation
(and as specified by the type in the XSD).  Ideally, I'd end up with a
single Django model for the patient and specialized serializers that would
be used when the XSD calls for them.

a) Any idea of GenerateDS will be friendly to this sorts of use?
b) Is there any way to feed inheritance information like this into the
generator?
c) If I hand-modify the generated classes to respect these relationships,
will the Django generator preserve these relationships?

Thanks,

Clayton

-- 
*The transmission of protected health information (PHI) and 
individually-identifiable personal information (IIPI) is regulated by 
federal and/or state privacy laws.  Do not send PHI or IIPI to this email 
account.  If you receive an email from this account that includes PHI or 
IIPI, (1) immediately delete the email without printing, forwarding or 
further distributing the content, and (2) send an email to this address and 
report all details of the incident.  Your cooperation is appreciated.*
------------------------------------------------------------------------------
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to