0

I am attempting to generate c# classes of FHIR Resources, How handle Multiple classes with same name? For Example -> In Organization and Patient resources there are Composed classes with same name "Contact" and Contact is one Complex date Type too. etc... Please Help

http://www.hl7.org/implement/standards/fhir/organization.html
http://www.hl7.org/implement/standards/fhir/datatypes.html#Contact

Regards

Amit Joshi
  • 15,448
  • 21
  • 77
  • 141
NG5121472
  • 31
  • 1
  • 3

2 Answers2

2

I don't think the XSD.exe tool is capable of doing this, your best bet maybe to manually nest those classes where this is a problem, and then using the serialization attributes (most notable XmlTypeAttribute) to change the name of the types in the XSD if at all necessary.

Please note that a completely generated set of classes is part of the .NET reference implementation for FHIR (http://www.github.com/ewoutkramer/fhir-net-api). We'll soon have the class generator for this available as part of this project, including a set of support functions to serialize them correctly to FHIR XML and FHIR Json.

Ewout Kramer
  • 984
  • 6
  • 9
0

The full class name of organization contact is actually Organization.contact.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10